At my home I make use of different scenes. This works perfect but sometimes mismatches with the real world:
When I turn on a scene all lights and devices will set to the value according to the scene, which is ok. But when for example I turn off one device, the scene doesn't change.
Now I'm wondering what would be the right behaviour.
- The scene selected stays active and ignores that the real world is different
- The scene selected changes according to device states
The first option is easy, set scene and forget. Also visually in node red this is easy to create with standard nodes.
The second option is a lot more work, all device states has to be monitored and based on output states a scene is active or no scene is active.
I opt for the second option, but again it is a lot more work, and also less graphical because I have to program a function node that handles all the scene information.
As you mention "scenes", are you referring to the Home Assistant set of nodes? Or something else entirely?
Is this a feature request for those nodes?
I have buttons on the nodered gui. These buttons send a text payload containing the scene to a change node which sets the value of the payload. The payload is send to the mqtt device topics and also to a node that changes the button colors according to the active scene.
Are you asking for advice on how your system should behave, or help on how to implement what you want to achieve?
I'm doubting what would be the best choice, scenes ignoring device output states or scene status based on device output states.
So more advice then help on implementing this, although tips are always welcome.
Personally I would have a 'scene' as a fixed setup so if a device state is changed the current 'scene' is cancelled and a manual 'scene' is entered. This manual 'scene' would have all the settings of the original 'scene', updated with the 1 (or more) changes. However, this presupposes that you are already monitoring device states which from what you say is not the case.
You should probably ask yourself a few questions:
What is the result of a 'scene' and the real world not coinciding?
In your first case if you turn the 'scene' on again all that happens is that the device you turned off is turned on again, is this a problem?
Does your Dashboard show what it thinks is the current state of each device?
Am I bothered if the 'scene' and the real world do not agree? (though given that you have asked the question this is probably 'yes')
Anything other than option 1 is going to require your flow getting feedback from the devices, so, do you want the fun of arranging this?
I use a scene for mass switching of items. I also have a status area on my dashboard showing the state of the switches.
All switching runs through the status switch, so that if the state of an individual switch changes it is shown on the status.
That way I have the best of both worlds, automatic and manual control of my switch gear.
Ok, I had a chat with a friend of mine which uses Apple Homekit and is very satisfied. It turns out Apple Homekit does monitor the output states and determines the scene based on that info.
Also with the information you guys have given me I want to change my scene based on the output states.
Is there any node for nodered that makes this easy for me or should I go with a self programmed function node?
Depends on the protocol your devices are operating under. (zigbee, Tuya, Tasmota etc.)
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.