-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Device Name in output (and/or in context variable timers) #28
Comments
Hi , I forgot to say thanks for the excellent node ! |
Hi joinke, thanks for your suggestion - I need a a little more information though.
If the device names are (additionally?) stored in context, how exactly would you make use of it?
You can already send new schedules to the node through a msg.payload just like you would inject new schedules after a reboot. What would be your use case to change a device name? I mean you can't rewire the output of a device so the device probably won't change anyway (without the rewiring). And speaking of outputs... yes - from todays perspective one output would be enough (sending a msg topic was an addition just a little while ago) but some people see it as very useful to just connect the device to the correct output without having to deal with topics (changing that would also break existing installations). If you would prefer one output you can just combine all the outputs to a switch node for example. |
Hi Fellinga, Thanks for the elaborate answer. Well understood and agree, and my initial comments were not entirely structured ;-)
P.S. Using this node to controle an irrigation system, where solenoid valves (=devices) are "often" added. Trying to avoid end-users having to use the node-red editor. Devices are stored in a mysql db and as such, ideally, would be fed into the time-scheduler node. Many thanks for your answers provided. Much appreciated. I am not expecting any action , just your opinion. |
Thanks for the explanation, sounds like a very nice project! The implementation would not be a big problem but I can't see a solution that is backwards compatible:
Any ideas? |
Valid comments.
That option could be used to show/hide devices in the configuration of the node and as a parameter in the code. |
Is there a version yet available with one single output and the msg.topic option to show the item #number of output? |
Regarding backwards compatibility would be an additional output (at the end), this way nothing really breaks for current users. |
i added msg.id to the output to be able to identify it in a function after, seems to work |
I seem to have noticed that device names are not stored in context but in the main flow json .
The timers context is only containing output as an index to the device name array.
Is there any way to have the device names also stored in context, so we can make use of them at initialisation , independent of the scheduler node configuration ? (In other words, we can then input device names and schedules independent of what is in the node config)
timers | array[4]0: objectstarttime: 1615404600000days: array[7]**output: "0**"endtime: 1615404900000
Thanks,
The text was updated successfully, but these errors were encountered: