Announcement

Collapse
No announcement yet.

Topic Update vs Control command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Topic Update vs Control command

    Can someone tell me what is difference to send Topic->update vs Topic->control in node-red to control or update a HS device.
    For me it seems like this is basically doing the same thing?

    If anyone can give an example when to use what, i would be happy

    #2
    I just did a quick test using the flow shown below. It is very basic. The two Inject sent msg.payload.status of "On" and either set msg.topic to "update" or "control" as shown in their name. I ran the update one and HomeSeer changed the values associated with the light switch but did not actually turn the light switch on. I ran the control inject and the light switch turned on. So update just changes the status and/or value in HomeSeer without controlling the associated object while control tells HomeSeer to also the control of the associated object. In both cases all copies of nodes associated with the HomeSeer Device reported the change, which is what the bottom HomeSeer node tested.

    Why would you use this? I believe this was requested someplace after the initial release and there were examples given as to why, but I do not recall what they were. Maybe you have a HomeSeer device for something which you directly control via a native node for that device in a flow as opposed to controlling it through HomeSeer and the device does not report the changes to HomeSeer?

    This is what the flow looks like. I did not include an export of the entire flow as it is very basic and you would have to change the settings in the HomeSeer nodes to match your server and a device. I did include an export of the two inject nodes, but they are very basic as well.

    Click image for larger version

Name:	hs3.png
Views:	146
Size:	12.1 KB
ID:	1459109

    The Update and Control inject nodes:
    Code:
    [{"id":"6ac7d827.4e2fc8","type":"inject","z":"150262f9.9e6d7d","name":"","props":[{"p":"payload.status","v":"On","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"update","payloadType":"str","x":370,"y":940,"wires":[["181cba30.8d7ba6"]]},{"id":"3d9a1e95.dbc052","type":"inject","z":"150262f9.9e6d7d","name":"","props":[{"p":"payload.status","v":"On","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","x":370,"y":980,"wires":[["181cba30.8d7ba6"]]}]
    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    Comment


      #3
      Originally posted by ksum View Post
      I just did a quick test using the flow shown below. It is very basic. The two Inject sent msg.payload.status of "On" and either set msg.topic to "update" or "control" as shown in their name. I ran the update one and HomeSeer changed the values associated with the light switch but did not actually turn the light switch on. I ran the control inject and the light switch turned on. So update just changes the status and/or value in HomeSeer without controlling the associated object while control tells HomeSeer to also the control of the associated object. In both cases all copies of nodes associated with the HomeSeer Device reported the change, which is what the bottom HomeSeer node tested.

      Why would you use this? I believe this was requested someplace after the initial release and there were examples given as to why, but I do not recall what they were. Maybe you have a HomeSeer device for something which you directly control via a native node for that device in a flow as opposed to controlling it through HomeSeer and the device does not report the changes to HomeSeer?

      This is what the flow looks like. I did not include an export of the entire flow as it is very basic and you would have to change the settings in the HomeSeer nodes to match your server and a device. I did include an export of the two inject nodes, but they are very basic as well.

      Click image for larger version

Name:	hs3.png
Views:	146
Size:	12.1 KB
ID:	1459109

      The Update and Control inject nodes:
      Code:
      [{"id":"6ac7d827.4e2fc8","type":"inject","z":"150262f9.9e6d7d","name":"","props":[{"p":"payload.status","v":"On","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"update","payloadType":"str","x":370,"y":940,"wires":[["181cba30.8d7ba6"]]},{"id":"3d9a1e95.dbc052","type":"inject","z":"150262f9.9e6d7d","name":"","props":[{"p":"payload.status","v":"On","vt":"str"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","x":370,"y":980,"wires":[["181cba30.8d7ba6"]]}]
      Very good write up, thanks for testing.
      Yes now it make sense. I thought that updating a status actually controlled the device as well, but it seems not.
      It can be useful example to update a virtual device connected to homekit. to keep it in the loop.
      Example, Homeseer control device ->update Homekit-Homeseer virtual device->which again control Homeseer Device
      Something like this (If im not wrong )
      Click image for larger version

Name:	2021-02-26_17-54-05.png
Views:	157
Size:	100.7 KB
ID:	1459135

      Comment

      Working...
      X