Problem sending the RGB state, brightness and color to Domoticz


  • Contest Winner

    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.


  • Hero Member

    @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..😊 )


  • Contest Winner

    @AWI Thanx for your quick reply. I already had a gut feeling that Domoticz doesn''t handle it. nd you're right the String in Arduino C++ isn't the best option. But since Domoticz ignores it I can leave it out anyway.


Log in to reply
 

Suggested Topics

  • 5
  • 4
  • 3
  • 2
  • 1
  • 8

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts