biddster / node-red-contrib-schedex

Scheduler for node-red which allows you to enter on/off times as 24hr clock (e.g. 01:10) or suncalc events (e.g. goldenHour). It also allows you to offset times and randomise the time within the offset.
22 stars 17 forks source link

info about actually on and off time #26

Closed goczen closed 6 years ago

goczen commented 6 years ago

Hi Can I read the actually on and off time from this node? If not, could you develop it? example I send the "info" in msg.payload and I get the on time and off time. Br. Norbert

biddster commented 6 years ago

Seems like a good idea, I'll see what I can do.

biddster commented 6 years ago

Any thoughts on how you'd like the dates presented and formatted?

biddster commented 6 years ago

Had a quick stab, output message looks like this:

{ 
  "topic": "info", 
  "payload": { 
    "on": "2017-11-29 07:21", 
    "off": "2017-11-29 16:00"
  }
}
elyobelyob commented 6 years ago

Could we stick to w3 formats, e.g. 1997-07-16T19:20:30+01:00 or similar ..

On 28 November 2017 at 23:26, biddster notifications@github.com wrote:

Had a quick stab, output message looks like this:

{ "topic": "info", "payload": { "on": "2017-11-29 07:21", "off": "2017-11-29 16:00" }, " }}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/biddster/node-red-contrib-schedex/issues/26#issuecomment-347698845, or mute the thread https://github.com/notifications/unsubscribe-auth/AASMJjdaNoeoRoTXRsRR6ignbHlIpULIks5s7JaNgaJpZM4QthLg .

goczen commented 6 years ago

Hi I tested it, great job. Could you insert the act. status in the payload obj, too. "status": "ON" or "OFF" Br. Norbert

biddster commented 6 years ago

I'll look into a state property on the info object. I'll also emit the on/off times in iso 8601 format.

elyobelyob commented 6 years ago

Not sure if you saw my quick convo with Knolleary ... he's not thought about standardising date usage, but suggested Wed, 14 Jun 2017 07:00:00 GMT as per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString

Nick

On 29 November 2017 at 22:57, biddster notifications@github.com wrote:

I'll look into a state property on the info object. I'll also emit the on/off times in iso 8601 format.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biddster/node-red-contrib-schedex/issues/26#issuecomment-348025003, or mute the thread https://github.com/notifications/unsubscribe-auth/AASMJi0THpobehcxHiIoQw14r_eQXkpYks5s7eFagaJpZM4QthLg .

biddster commented 6 years ago

toUTCString() is just fine by me.

biddster commented 6 years ago

Released in 1.1.0.

goczen commented 6 years ago

It is a very useful, Lot of thanks.