Problem sending the RGB state, brightness and color to Domoticz
-
So I've created an RGB node using some neopixels. Domoticz sees this node and I'm able to control the node. But when I report the node's state to Domoticz, Domoticz doesn't do anything with the message.
Here's the code I use. I've found a full sketch on the Domoticz forum, but had to adjust it, because Fastled.h apparently can't run on a pro mini 3.3V.
void SendLastColorStatus() { char buf[20]; uint32_t val; sprintf(buf, "%02X%02X%02X", (uint8_t)red, (uint8_t)green, (uint8_t)blue ); String cStatus=buf+String("&")+String(actRGBbrightness)+String("&")+String(actRGBonoff); gw.send(lastColorStatusMsg.set( cStatus.c_str() ) ); }I've added a moodlight mode child to this node, so when ever I turn on the moodlight, I'd be expecting the above code to turn off the rgb light in Domoticz. But hmmm it doesn't.
All help is welcome. Maybe @AWI can point me in the right direction, since he created the original sketch.
-
So I've created an RGB node using some neopixels. Domoticz sees this node and I'm able to control the node. But when I report the node's state to Domoticz, Domoticz doesn't do anything with the message.
Here's the code I use. I've found a full sketch on the Domoticz forum, but had to adjust it, because Fastled.h apparently can't run on a pro mini 3.3V.
void SendLastColorStatus() { char buf[20]; uint32_t val; sprintf(buf, "%02X%02X%02X", (uint8_t)red, (uint8_t)green, (uint8_t)blue ); String cStatus=buf+String("&")+String(actRGBbrightness)+String("&")+String(actRGBonoff); gw.send(lastColorStatusMsg.set( cStatus.c_str() ) ); }I've added a moodlight mode child to this node, so when ever I turn on the moodlight, I'd be expecting the above code to turn off the rgb light in Domoticz. But hmmm it doesn't.
All help is welcome. Maybe @AWI can point me in the right direction, since he created the original sketch.
@TheoL I have to get the latest status but I am pretty sure that domoticz does not handle RGB input. Off topic: also try to avoid the String class in Arduino c++ but use char array instead. The String class creates a lot of overhead and is not well suites for real time purposes (hear say..:blush: )
-
@TheoL I have to get the latest status but I am pretty sure that domoticz does not handle RGB input. Off topic: also try to avoid the String class in Arduino c++ but use char array instead. The String class creates a lot of overhead and is not well suites for real time purposes (hear say..:blush: )
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login