resourses->operation to turn off a light - dosn't update status of light on mycontroller
I've got a simple operation to send a payload to a light node. This all works fine, but the status of the node on mycontroller isn't updated so the buttons and light become out of sync.
Is there a way in mycontroller to handle this, or is the only way to send a status update from the light node back to mycontroller ?
@rmf69 Status should be updated in MyController. Have you refreshed the page? And tried?
Thats what I thought... on my led node i present present( 0, S_DIMMER ); however mycontroller shows 2 sensors id 0 and 1. I was manipulating and viewing a switch connected to id 0, but adding also a switch connected to id 1, and of course changing the update frequency to 1s then the switch connected with id=1 does get updated.
I'm having trouble understanding why 2 sensors have been created when I only presented 1 ?
just to recap
- light switch
- led light
I've created 2 operations, lighton, light off which send a payload to led light node.
Now when I press the 1) light switch button node, the led light on node 2) turns on/off. All ok...
Except the status of the light on the dash board dosn't change
@rmf69 Can you post your sketch?
Are you using any script in MyController for this switch? If Yes, can you post that script too?
@jkandasa I feel a bit stupid now, because I got it working, but can't describe 100% why. Which is bad because it dosn't garantee that I don't make the same mistake again. I think I was connecting the button to the wrong sensor value that needed changing to turn the led on and off.