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. How to update LIGHT state on Domoticz?

How to update LIGHT state on Domoticz?

Scheduled Pinned Locked Moved Domoticz
6 Posts 3 Posters 3.4k Views 2 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.
  • palande.vaibhavP Offline
    palande.vaibhavP Offline
    palande.vaibhav
    wrote on last edited by palande.vaibhav
    #1

    Hello all,

    I want to send message to Domoticz to only update the state of the LIGHT without actually changing it.

    So for example if my Light is ON and I reset my Arduino, the default state of the LIGHT is OFF but Domoticz knows the last state as ON, now I want my node to send a message to Domoticz and only update the state of the LIGHT to OFF.

    I tried sending a message using send command and MyMessage but it doesn't work.

    Any solution?

    Thank You

    AWIA 1 Reply Last reply
    0
    • nagelcN Offline
      nagelcN Offline
      nagelc
      wrote on last edited by
      #2

      I have sent this type of message to Domoticz and it worked, but very slowly. You might just be giving up on it too soon. On my network it usually resets on Domoticz just when I am convinced it is not working and about ready to give up. I'll time it next time I have that node set up.

      When clicking the button in Domoticz it turns the light on almost instantly. It is just when I want a message from the light to reset Domoticz that it is slow. Since it is just changing the screen to match what has already happened, it doesn't bother me in practice, only when I am testing and waiting on it.

      palande.vaibhavP 1 Reply Last reply
      0
      • nagelcN nagelc

        I have sent this type of message to Domoticz and it worked, but very slowly. You might just be giving up on it too soon. On my network it usually resets on Domoticz just when I am convinced it is not working and about ready to give up. I'll time it next time I have that node set up.

        When clicking the button in Domoticz it turns the light on almost instantly. It is just when I want a message from the light to reset Domoticz that it is slow. Since it is just changing the screen to match what has already happened, it doesn't bother me in practice, only when I am testing and waiting on it.

        palande.vaibhavP Offline
        palande.vaibhavP Offline
        palande.vaibhav
        wrote on last edited by
        #3

        @nagelc How did you do it?

        1 Reply Last reply
        0
        • nagelcN Offline
          nagelcN Offline
          nagelc
          wrote on last edited by
          #4

          This is not a very good example because it is using MySensors 1.5 and I have several buttons that I update at the same time so I am building a message on the fly:

          	msg.setSensor(btn[i]->childID);
          	gw.send(msg.set(btn[i]->stateObject), true); // Send new state and request ack back
          

          All this is doing is setting the child ID, setting the state (I'm calling a variable, but it is 1 for On), and the true at the end is for the ack. You don't really need the ack.

          For MySensors 2.0 I think you do it this way:

          If you have a message declared:
          MyMessage lightMsg(CHILD_ID_LIGHT, V_LIGHT);

          To send the status to the gateway:
          send(lightMsg.set(1)); //1 for On or 0 for 0ff

          I'm still moving over from MySensors 1.5 to 2.0, so I haven't tried this one yet.

          1 Reply Last reply
          0
          • palande.vaibhavP palande.vaibhav

            Hello all,

            I want to send message to Domoticz to only update the state of the LIGHT without actually changing it.

            So for example if my Light is ON and I reset my Arduino, the default state of the LIGHT is OFF but Domoticz knows the last state as ON, now I want my node to send a message to Domoticz and only update the state of the LIGHT to OFF.

            I tried sending a message using send command and MyMessage but it doesn't work.

            Any solution?

            Thank You

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

            @palande.vaibhav You can also "request()" the last state from domoticz (or another controller) Domoticz will than send you the current state.

            If you send a message to Domoticz It will take a little while to show up on the dashboard. Domoticz updates the value immediately but calls the display update every x seconds.

            palande.vaibhavP 1 Reply Last reply
            0
            • AWIA AWI

              @palande.vaibhav You can also "request()" the last state from domoticz (or another controller) Domoticz will than send you the current state.

              If you send a message to Domoticz It will take a little while to show up on the dashboard. Domoticz updates the value immediately but calls the display update every x seconds.

              palande.vaibhavP Offline
              palande.vaibhavP Offline
              palande.vaibhav
              wrote on last edited by palande.vaibhav
              #6

              @AWI how do I use request()?

              What I need to do is my automation for the sensors is running on the Arduino itself. So, if domoticz stops working and then some values of the switches or lights change, I want Domoticz to display the same values not the values it had the last time.

              I tried what @nagelc said but it changes the state of the switch in domoticz. I just want to update what domoticz displays not actually change the state of the LIGHT.

              I read on Domoticz forum that this can be achieved using dummy switch which when set up as the slave for the actual switch only updates the displayed state of the switch. But this was discussed for JSON. I don't know how to make mysensors talk to the dummy node.
              Do you have any idea about this?

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


              14

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2019 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