Skip to content
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

New input - Turn on/off current output index #100

Open
linker3000 opened this issue Mar 25, 2024 · 2 comments
Open

New input - Turn on/off current output index #100

linker3000 opened this issue Mar 25, 2024 · 2 comments

Comments

@linker3000
Copy link

This is a great node - thanks for creating it.

May I request the following new input be considered:

Msg.topic = Device name or index
Msg.payload = SETON or SETOFF

Turns ON or OFF (overrides) the current state of the given output (assuming it's currently enabled). Other future timer settings for the name or index behave as normal.

Msg.topic of -1 overrides all currently active timer schedules.

Bonus feature: Msg.topic can be an array of outputs to override!

This would allow a current on/off condition to be overridden - for example, turning off one or more heaters because the weather has warmed up and they no longer need to be on for the rest of the timer period, or if arriving at an office early and wanting to turn the heating on without disrupting the normal set schedules.

I might have a go at coding this myself, but I am not the greatest programmer!

Thanks

@fellinga
Copy link
Owner

fellinga commented Apr 23, 2024

That sounds a lot like the existing "disableDevice" feature. If you send msg.disableDevice with a value of 0 for example it will completely deactivate the schedule of the first device.

It's documented in the nodes help section:
image

msg.disableDevice / msg.enableDevice does the same thing that the alarm clock symbol in the ui does:
image

There is no always on option currently though. Does this help?

@linker3000
Copy link
Author

Thanks,

The enable/disableDevice features aren't quite what I was looking for.

Here's a scenario: Timer 0 is due to turn on a heater from 0900 to 1600, but you arrive at work early at 0830 and want to turn the heater on at that time.

I'd like a timer-driven option to override the ON time for timer 0 so it comes on 'now', but then follows any valid timer setting for the next OFF time.

The enableDevice feature would enable timer 0 if it was disabled, but won't start any enabled schedules early.

I could create a separate button to just turn on a device, but wanted to route things through the timer node so that the dashbaord visualisation changed to match. As it happens, I have started to implement some functions to read the stored settings and then push changes into the timer node, so I could implement this 'early on' as an external function rather than generate the need for node code changes:

https://github.com/linker3000/node-red-contrib-ui-time-scheduler-support-functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants