[ANNOUNCE] node-red-contrib-chronos

Hi all,

please be informed about my new node package called node-red-contrib-chronos. The package provides nodes to schedule, queue, route or filter messages based on fixed times or sun and moon position events.

I hope you like it!

3 Likes

Today I released version 1.1.0 which adds the first roadmap feature: the possibility to specify an offset (which might also be randomized) for the before/after/between/outside conditions of the switch and filter node.

Yesterday I released version 1.2.0 with the following new stuff:

  • Possibility to add custom sun positions.
  • Possibility to enable/disable single schedule events via input message.
  • German localization for UI and help texts.

Today I released version 1.3.0 which introduces this new feature for the scheduler node:

You can now activate an option to create a dedicated output port for each schedule event producing output messages. Then the messages of these events will be delivered to the corresponding output port.

Additionally this release fixes a bug in scheduler node. Some more bugfixes have been done in the previous minor versions 1.2.1 and 1.2.2.

1 Like

Today I released version 1.4.0 which comes with the following new things:

  • Time switch node now has an operator "otherwise" which is considered in case that all other conditions do not match.
  • Time filter node has a mode "annotation only" which forwards messages in any case and adds the evaluation results of each condition as property evaluation to the message. This can be used if the node's built-in expression capabilities (logical OR and logical AND) are not sufficient by connecting a function node downstream and form more complex expressions.
  • Smaller improvements and optimizations.

This seems like a well thought out combination of nodes. I currently don't have the need (or time) to test them but I've definitely wished I had the time switch node available earlier on.

I did install the package to get a feel for the UI though. The settings seemed to follow common Node-RED patterns which makes things more intuitive. :+1:

One suggestion based in this superficial testing: the time of day and the custom inputs made me confused for a moment what should I put there. I then found the required info from the repository documentation but it would be a lot more practical to have the info on the sidebar documentation when you need it.

Thank you for your comment and the positive words about the nodes!

I did not want to overwhelm the sidebar help with too detailed information and keep the details in the repository wiki. But if the information is not sufficient in the sidebar help, of course I can try to explain this better there. Anyway I also wanted to put a link on the sidebar help that leads you directly to the wiki (I had this in mind in the beginning but at that time, the wiki was not yet ready, so I left them out for the time being).

A link would definitely be better than nothing if you want to keep the info separate.

This might become a problem though if you decide to do a breaking change and some users are still using an old version.

My personal preference, in case it is of interest, would be for more info in the help panel rather than having to go to the wiki.

1 Like

Actually in version 1.4.1 I have applied both. I added links to the sidebar help pages and also described the time input in more detail.

In case of breaking changes, I would probably keep both descriptions in the wiki, at least for some transition period.

2 Likes

Here comes version 1.5.0 which introduces a map (provided by OpenStreetMap) in the configuration node that visualizes the entered geographic location. This helps verifying that the coordinates are correct.

I wonder how the download stats for your node show nothing at https://flows.nodered.org/node/node-red-contrib-chronos. It cannot have zero installs.

Edit: fix link broken by autocomplete

I think the link above is not correct.

From my experience, shortly after an update, the download stats show nothing, it takes a while until they are showing numbers again.

Does it still work (not throw error) when not connected to internet ? Does it handle it gracefully.

I was on the correct page but it appears my tablet keyboard autocompletion decided to "improve" it. Stats were empty also last time I checked but it was likely shortly after an update also. I don't think updates shouldn't affect the stats.

I tried it out and it shows a browser specific error message instead of the map in case there is no Internet connection.

Maybe catch that and replace by something, or hide whole section ?

I agree this would improve user perception of the UI, but needs some more investigation. I'm using an iframe to display the map, this is the official way to embedd an OSM map. The browser is completely handling the content of the iframe, I'm just composing the OSM URL and passing it to the iframe. Maybe it's possible to test connectivity to "openstreetmap.org" with some Javascript code first and if not possible, hide the iframe. But I'm not sure if this works in all circumstances because it could also be that Internet connection is available but just bad and in this case, such test would probably take longer time due to connection timeouts.

I like the look of the Node.

I was hoping this would solve something i was trying to do.

I'd like to have a node that only allows MSG to be passed if the current time is within a time range.

So for me that is from Sunset to a little after midnight so let say 1.15am.

Screenshot 2020-10-25 164241

however i dont think this works, as if i pass a time say 3am it still lets the msg through. also verified this
Annotate only, do not filter to a debug node.

Is this something doable.. or are you only allow 24h clock that starts 00:00 to 23:59

so my example highest end time i can do is 23:59

Thanks. :slight_smile:

Hi Kazzy,

thanks for your feedback. What you try to do should definitely be feasible. The node allows a maximum time range of 24h to be checked and this range is also allowed to cross the midnight border.

Could you please enter an issue in the GitHub issue tracker? Then I can have a look to see if there is a bug. Additionally it would be helpful if you could set the log level of your Node-RED to "debug" and if you reproduce the issue, provide me the logs of the filter node.

Thanks!