Closed slurpey closed 4 years ago
I'm not sure I understand the issue at the moment.
For example, let's say you were trying this at 2020-01-29 20:44 (an hour or so before you raised this issue)
If my msg.payload is "ontime 23:11 onoffset 0" I get: ON 2020-01-29 23:11 (which works) Correct: the next available ontime that can be scheduled is actually today. 23:11 is after 20:44 today so I'd expect 2020-01-29 23:11
If it's "ontime 10:45 onoffset 12" I get: ON 2020-01-30 10:57 (that's 24hrs and 12 minutes offset) It's already 20:44, that's after 10:45 today so I'd expect the next ontime to be tomorrow. i.e. 2020-01-30 10:45 + 12 minutes
If it's "ontime 2.30 onoffset 36" I get on 2020-01-30 03:06 (that's 24 hours, 36 minutes Again, it's already 20:44, that's after 2:30 today so I'd expect the next ontime to be tomorrow. i.e. 2020-01-30 02:30 + 36 minutes
Am I correct in assuming your schedule time?
I am simply very stupid. I guess I was tired. I assume the offset was in hours... oups. insted of "ontime 10:45 onoffset 12" - using "ontime 10:45 onoffset 720" works....
Apologies for the bother.
On Wed, 29 Jan 2020 at 23:50, biddster notifications@github.com wrote:
I'm not sure I understand the issue at the moment.
For example, let's say you were trying this at 2020-01-29 20:44 (an hour or so before you raised this issue)
If my msg.payload is "ontime 23:11 onoffset 0" I get: ON 2020-01-29 23:11 (which works) Correct: the next available ontime that can be schedule is actually today. 23:11 is after 20:44 today so I'd expect 2020-01-29 23:11
If it's "ontime 10:45 onoffset 12" I get: ON 2020-01-30 10:57 (that's 24hrs and 12 minutes offset) It's already 20:44, that's after 10:45 today so I'd expect the next ontime to be tomorrow. i.e. 2020-01-30 10:45 + 12 minutes
If it's "ontime 2.30 onoffset 36" I get on 2020-01-30 03:06 (that's 24 hours, 36 minutes Again, it's already 20:44, that's after 2:30 today so I'd expect the next ontime to be tomorrow. i.e. 2020-01-30 02:30 + 36 minutes
Am I correct in assuming your schedule time?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/biddster/node-red-contrib-schedex/issues/71?email_source=notifications&email_token=ACMPYTGTIZP5WKD3A5VCEYLRAIB3HA5CNFSM4KNMAEX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKJBLJQ#issuecomment-579999142, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMPYTHFZSF72SJTKVY26ODRAIB3HANCNFSM4KNMAEXQ .
It's never bother. Asking questions is a fundamental right. Glad it's all working for you.
Hi, I'm having a curious behavior.
If my msg.payload is "ontime 23:11 onoffset 0"
I get: ON 2020-01-29 23:11 (which works)
If it's "ontime 10:45 onoffset 12" I get: ON 2020-01-30 10:57 (that's 24hrs and 12 minutes offset)
If it's "ontime 2.30 onoffset 36" I get on 2020-01-30 03:06 (that's 24 hours, 36 minutes
You can check my Node-red flow if you want below (it's planned to receive a webhook from IFTTT / Google Home and I had to do some weird time calculations)