biddster / node-red-contrib-time-range-switch

A simple Node-RED node that routes messages depending on the time.
18 stars 6 forks source link

Allow specifying start and end time on the message #34

Closed skylord123 closed 3 years ago

skylord123 commented 3 years ago

It would be nice if the start and end time could be sent in on the message instead of having to be configured.

rakgupta commented 3 years ago

Also, is it possible to have the "Start time offset" and "End time offset" be passed into the node? Example: if DST=True, then Start offset = +120 otherwise Start offset = +60. Thanks!

skylord123 commented 3 years ago

@biddster Are you still working on this? Starting to think this is abandoned.

ghost commented 3 years ago

Same. I would also like to see this features

ghost commented 3 years ago

This one looks the same but with support for specifying the times and offsets in the message: https://flows.nodered.org/node/node-red-contrib-time-switch

biddster commented 3 years ago

Sorry for the silence. This project isn't dead. That job that pays the bills (and the other job that pays) have taken the majority of my time over the last 6 months. I just haven't had time to work on this.

I'm glad you've found an alternative that suits your needs. I will sort out making this node programmable as soon as I am able.

biddster commented 3 years ago

Will this meet all your needs? Please read the section at the bottom of the readme if you have a moment.

https://github.com/biddster/node-red-contrib-time-range-switch/blob/issues/34/README.md

Thanks.

rakgupta commented 3 years ago

Will this meet all your needs?

For me, I think it will. Will these settings persist (except for restarts) or will they have to be sent when initiating the flows every time? In my DST use case, my thought is that I would have an inject node trigger on startup and probably a fixed time (say midnight) and send the appropriate values to wherever they need to be set.

bad-louis commented 3 years ago

I'm the Ghost from above. Thanks for implementing it so fast. For me it would be fine like that

biddster commented 3 years ago

@rakgupta Thanks for reminding to document that the configuration done via input is entirely transient. The changes won't persist over a flow or node-red restart.

It's in test here locally now, so I'll update the docs and release it at the weekend.

rakgupta commented 3 years ago

The changes won't persist over a flow or node-red restart.

Oh - I was hoping that they would persist beyond the flow (but not a node-red restart) :-( Or do you mean that if I set the offset for a particular flow at startup, it would persist for that flow until I restarted? I'm hoping to avoid having to pass msg._config every time that flow is initiated...

biddster commented 3 years ago

@rakgupta the values are transient. They will not survive a flow restart or node red restart.

biddster commented 3 years ago

Fixed in release 1.1.0