node-red-contrib-cron-plus icon indicating copy to clipboard operation
node-red-contrib-cron-plus copied to clipboard

request: including the information of when things are happening.

Open Just-another-pleb opened this issue 3 years ago • 5 comments

Ok, this may be petty, but it is nearly done anyway.

In the edit screen you see written under the node when the next event will be.

It would be nice if this could be included somewhere in the message.

I have a clock and it does things at times depending on solar events. So they aren't FIXED times.

Sometimes it would be nice to see (at the dashboard level) when the next event will be happening.

OK, it may be there already. I did a quick search through the included other message - which are complex and handy in other ways - but I couldn't find that for which I am asking.

Just-another-pleb avatar Feb 17 '22 20:02 Just-another-pleb

It would be nice if this could be included somewhere in the message.

Is this what you need?

image

You can also send a status topic and get info at any time. (see built in demos and built in help)

Steve-Mcl avatar Feb 17 '22 21:02 Steve-Mcl

Oh, sorry.... So msg.nextDate tells me when the next thing will happen?

Sorry. I was overwhelmed with all the information in the message.

Ok, my bad.

I goofed (partly) asking the question. I'll accept that.

I have your node configured like this:

[{"id":"c885fe17837f728e","type":"cronplus","z":"91ff22c5.2cec4","g":"5eaa47ed5f8179fb","name":"Day time backlight control","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"Dawn","topic":"schedule1","payloadType":"str","payload":"dawn","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"civilDawn"},{"name":"Sunrise","topic":"schedule2","payloadType":"str","payload":"sunrise","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"sunrise"},{"name":"DayStart","topic":"schedule3","payloadType":"str","payload":"daystart","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"morningGoldenHourEnd"},{"name":"DayEnd","topic":"schedule4","payloadType":"str","payload":"dayend","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"eveningGoldenHourStart"},{"name":"SunSet","topic":"schedule5","payloadType":"str","payload":"sunset","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"sunset"},{"name":"Dusk","topic":"schedule6","payloadType":"str","payload":"dusk","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"civilDusk"},{"name":"Night","topic":"schedule7","payloadType":"str","payload":"astrodusk","expressionType":"solar","expression":"0 * * * * * *","location":"-33.86, 151.23","offset":"0","solarType":"selected","solarEvents":"nightStart"}],"x":200,"y":1090,"wires":[["64a491e91ee6f845","9eb34147aef43b9c","be3d3159f483e57f"]]}]

As is I get a display of what is the active event. But want to know when the next event (globally - not just of the same type) will happen and have it displayable at the dashboard level of things.

Is that better / clearer?

Here is a screen shot to maybe explain it a different way.

Screenshot from 2022-02-18 08-47-52

Where is the "evening golden hour start" time in the message?

Just-another-pleb avatar Feb 17 '22 21:02 Just-another-pleb

Where is the "evening golden hour start" time in the message?

In the solarTimes object.

Do you know how to get the path to any item? There is a copy path button that appears under your mouse pointer when you hover over the properties of a message in the debug sidebar.

Steve-Mcl avatar Feb 17 '22 22:02 Steve-Mcl

Ok, but....

That answer is specifically if the NEXT event is a solarTimes event.

(Poor wording by me - sorry)

All my examples are driven by solarTimes. I get that. But say the next event isn't....

I just think it may be nice to make the time of the next event - irrespective of its type - to be visible in the last message sent.

Another effort at asking: (Morning) A solarTimes event happens. The message goes out. (hold this thought)

Later on today at a time determined any way another event is scheduled to happen. (Loop back to the first one)

The first message includes in it the time of the NEXT event to happen - the one I just mentioned.

That way you get up, things have happened. All good. But you can see (via the dashboard) when the next event is going to happen.

Clearer?

Just-another-pleb avatar Feb 17 '22 22:02 Just-another-pleb

Where is the "evening golden hour start" time in the message?

In the solarTimes object.

Also, if I am reading your reply correctly: That would be in the new message.

I've looked at/in the existing message and there is no time mentioned for the evening golden hour event.

Screenshot from 2022-02-18 09-38-25

Just-another-pleb avatar Feb 17 '22 22:02 Just-another-pleb