Pull request discussion - node-red-node-suncalc (send msg at startup)

Hi folks,

I would like to create a pull request to add a new feature to the node-red-node-suncalc node, but the contribution guidelines mention to discuss all new PR's in this forum.

I added last night the suncalc node to my flow, to know sunset and sunrise. That works fine. But when I restart Node-RED, I also need to know whether it is day or night. And I would like to avoid that my flow needs to store that info, because I like to keep my flows as simple as possible. And I also want to avoid reading the first output of the node (where an output msg is being send periodically), to avoid doing lots of unnecessary processing.

So I added this checkbox to the config screen:

image

Now it sends the output msg also on the second output when my flow is started.

Hopefully it is ok to create my pull request.

Thanks!
Bart

If you really canā€™t wait the minute for that first output then yes :slight_smile:

Hey Dave,
You seem to be aware of my impatient nature :yum:

But I don't want to listen to the messages on the first output every minute, and check in my flow if the value has changed. The second output is great for me: I get 2 messages per day, one at sunset and one sunrise. As a result I have a simple flow, and I only get the required messages (when the value changes between day and night).

I just want an extra message in between, when my Node-RED is restarted. Just to know if it is day or night at that moment.

Not a problem. Though a filter node would have a similar effect. Go for it.

1 Like

Here it is:

Thanks Bart, merged and published as version 1.2.0

Hi Dave,
Thanks for the quick review and publishing!
The new version is now running in my flow...
Bart

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.