deconz-community / node-red-contrib-deconz

Node-Red Nodes for deCONZ connectivity.
GNU General Public License v3.0
81 stars 16 forks source link

Make the scenes call function available under the command type #184

Closed nicedevil007 closed 2 years ago

nicedevil007 commented 2 years ago

My idea

My idea is to get only one deconz output node for all my usecases (like it is possible with a mqtt output node).

To achieve this it is neccessary to be able to pass in a variable like msg.scene to the node and it should be read with the type set to "Custom" instead of "Deconz state | Scenes Call".

Big big thanks in advance for implementing this in the future :)

Zehir commented 2 years ago

I think the easier way to do that is to have a scene call target in custom type

nicedevil007 commented 2 years ago

ok here we go :)

so as I thought it would be easier to have only realy dynamic output node for deconz, I would think about a solution around a specific key of our input.

So f.e. to activate the "scene picker" in your output node it should be a msg.scene be provided (as we do with msg.query for the query to pick the right devices at the top). If the msg.scene exists it should switch to the scene picker if the value of it is boolean and true => on false or nothing it should not use this one.

If the msg.scene = true the user has to provide the unique name of the scene and if that is not doable the user should provide the GID and SID on msg.payload = {group: 5, scene: 1}

Zehir commented 2 years ago

I can't change the node UI based on a msg but I could add a 'tab' to select scene name instead of the gid+sid and he will use the groups selected in the device list / query. This is for the "Scenes call" command. I also need a way to call it from the "Custom" commands, probably with a "Scene call" target and a group name / group id property