This object is in archive! 

Zipato Bulb 2 color change

Zan Pokerznik shared this question 4 years ago
Need Answer

Hi everyone,


I am a newbie in ZWave technology. I would like to establish C++ app for controlling ZWave devices using OpenZwave library for C++.

I have a problem with Zipato Bulb2, when I want to change light color. I can set dimmer value, but the color doesn't change, although there is updated color data in the log.

I was trying to set color in this way:

void SetBulbColor(){
	string colorVal = "#";
	string *gathered = new string[1];
	for(int i=0; i<5; i++){
		colorVal += RequestColorComponent();
	}
	int bulbNode = 11;
	int colorCommandClass = 0x33;
	int colorIndex = 0;
	pthread_mutex_lock( &g_criticalSection);
	NodeInfo *foundNode = GetNodeById(bulbNode);	
	for(list<ValueID>::iterator it = foundNode->m_values.begin(); it != foundNode->m_values.end(); it++){
		ValueID v = *it;
		if((v.GetCommandClassId() == colorCommandClass) && (v.GetIndex() == colorIndex)){
			cout<<"Setting color to: "<< colorVal<<endl;
			Manager::Get()->SetValue(v, colorVal);
			printf("Successfully set!\n");
			Manager::Get()->GetValueAsString(v, gathered);
			cout << "GetValue() returned "<<gathered[0] << endl;
		}
	}
	pthread_mutex_unlock( &g_criticalSection  );
}
There is new color marked in the log, but the bulb doesn't change it's color in reality. Can anyone help me?


Thanks in advance icon_e_smile ,

Zan

Leave a Comment
 
Attach a file