I'm a long time user of NodeRED but have used it for quite simple things in my home automation so far and now I'm trying to do something more complex, than I can handle, therefore some help is needed.
So the thing I want implement in Nodered is a specific scene activation in some room when I press some button. E.g. all my devices in the room are controlled via MQTT, e.g. to switch the light on I just send MQTT message with at topic "/myhome/Living_Light" and payload "ON". Same is for dimmers and rollershutters, where the payload can be some number. Totally it can be up to 20 devices, which might be involved in the scene. So basically I want to store the latest state of device and activate it on demand. The idea is to have an "agnostic" system e.g. without explicit specifying of topics to be monitored/activated.
So basically what I want to do:
- during normal operation I want to monitor all topic/payload commands, which were used in the room
- once I issue "Store" command, these pairs should be stored in some variable(or multiple variables) in flow context
- then once I activate a scene, NodeRED should inject these topic/payloads into MQTT.
Currently I'm struggling with first topic - e.g how to create a full list of topic:payload, which would be automatically updated once new message arrives. Any Ideas welcome.