Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Domoticz
  4. Problem sending the RGB state, brightness and color to Domoticz

Problem sending the RGB state, brightness and color to Domoticz

Scheduled Pinned Locked Moved Domoticz
3 Posts 2 Posters 1.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TheoLT Offline
    TheoLT Offline
    TheoL
    Contest Winner
    wrote on last edited by TheoL
    #1

    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.

    AWIA 1 Reply Last reply
    0
    • TheoLT TheoL

      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.

      AWIA Offline
      AWIA Offline
      AWI
      Hero Member
      wrote on last edited by AWI
      #2

      @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: )

      TheoLT 1 Reply Last reply
      0
      • AWIA AWI

        @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: )

        TheoLT Offline
        TheoLT Offline
        TheoL
        Contest Winner
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        16

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular