Cronplus Sunset

I don't have experience with cronplus; however I've created a test flow that outputs at specific times that works without issue. The issue I'm seeing is "Sunset"; after setting my timezone I set a schedule for Sunset. After deploying I noticed at the bottom of the cronplus node it lists the next schedule: sunset Nov 5, 2023 12:48 EST - WHAT! That should have been more like 16:48 EST; to get it to display the proper sunset time for my area I had the set the time-zone to America/Scoresbysund (where ever that is - lol) GMT -1.

The time-zone for the PC Node-Red is running on is correct, and displays the correct time.

What am I missing? BTW: Suncalc displays the correct sunset time.
X.

Check the timezone of the machine running the browser.

What OS/hardware are you running node red on?

Also show us how you have configured the cronplus node.

Hi Colin,

Sorry it took so long to reply; I was on Skype with someone in Slovakia.

To answer your questions.
The PC's running Node-Red & the dash-board have correct time-zone and times; as I mentioned Suncalc is working properly.
Tho OS is Windows 10, for both PC's

Here is cronplus:

[
    {
        "id": "6899ca4fa12d4416",
        "type": "cronplus",
        "z": "5c6c548399542bca",
        "g": "890130a13d286321",
        "name": "",
        "outputField": "payload",
        "timeZone": "America/Scoresbysund",
        "storeName": "",
        "commandResponseMsgOutput": "output1",
        "defaultLocation": "",
        "defaultLocationType": "fixed",
        "outputs": 1,
        "options": [
            {
                "name": "schedule1",
                "topic": "topic1",
                "payloadType": "str",
                "payload": "cronplus First Timeout",
                "expressionType": "cron",
                "expression": "0 30 20 * JAN-DEC *",
                "location": "",
                "offset": "0",
                "solarType": "all",
                "solarEvents": "sunrise,sunset"
            },
            {
                "name": "schedule2",
                "topic": "topic2",
                "payloadType": "str",
                "payload": "cronplus Second Timeout",
                "expressionType": "cron",
                "expression": "0 30 22 * JAN-DEC *",
                "location": "",
                "offset": "0",
                "solarType": "all",
                "solarEvents": "sunrise,sunset"
            },
            {
                "name": "schedule3",
                "topic": "topic3",
                "payloadType": "str",
                "payload": "cronplus Sunrise/Sunset",
                "expressionType": "solar",
                "expression": "0 * * * * * *",
                "location": "",
                "offset": "0",
                "solarType": "selected",
                "solarEvents": "sunrise,sunset"
            }
        ],
        "x": 260,
        "y": 1860,
        "wires": [
            [
                "d98594324c36bc0b"
            ]
        ]
    }
]

The time-zone you see is the one I had to select to get the proper sunset time for my area; which is US New York.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

``` 
   code goes here 
```

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

Also please post it without the hack on the timezone. We need an example that fails so we can test it.

I was referring to the one running the browser, which is often a different machine to the one running node-red. I don't think it is a factor in this case but it is worth checking they are all the same to avoid confusion.

When I said dash-board PC I was referring to the Browser PC; it's all ok.

Did you deliberately NOT enter any location coordinates?

Coordinates are REQUIRED to precisely calculate the exact sun time for you.

  1. chose a position from the map (... button OR enter your coordinates manually)
  2. clear the timezone (if your server time zone is correct)

I realise it states "optional" but that is because you might NOT be using solar events. For solar events, the node NEEDS to know where you are!

It did say the Location coordinates were optional; in any case I had tried Location coordinates and it didn't make any difference.

They are needed.

Set it up correctly and put your mouse in the offset box for a preview - what do you see?

I'll try it again, with the correct time-zone; standby.

After correcting the time-zone, and enterring the location:
Notice at the bottom of the cronplus node, it's list the next schedule at 8:30PM skipping over the sunset which would be about 5:50PM.

Cronplus Image

Please show me how you have setup the node AND please place your mouse in the "offset" field as I requested.

Also, show me what timezone is set on the device running Node-RED and its current time value.

Every time I try to do a screenshot the window displaying with the mouse disappears. this is the best so far:

It now says Sunset at the right time, but for the next day Nov 06; but suset for today hasn't occurred yet; It should be the next scheduled event.

UPDATE: I tried removing the "sunrise" leaving only the sunset; it still shows Schedule1 a 8:30PM next, and Sunset for the next day. BTW: when I said adding location didn't make a difference; that was the first thing I had tried and it kept saying the sunset would occur the next day. Then I took to location out and got the sunset for the current day, but at the wrong time.

Which is why I asked for other details: Please provide the info requested.

You can get this from the "System Info" CTRL+SHIFT+P

chrome_gsuyaqA1Za


Also, remove the timezone from the "Timezone" field as requested.




This is normal for tooltips - that is why I use a shortcut (Print Screen button in my case)

Colin the time-zones for all PC are set to East-coast USA New York; and as I said they're both display the correct time.
Time-Zone

It is not that we don't believe you, but if you want further help, I would prefer not to be guessing.

please provide the info requested:

I think I found what you're looking for:

"time": {
"utc": "Sun, 05 Nov 2023 16:38:29 GMT",
"local": "11/5/2023, 11:38:29 AM"

From Node-Red System Information; which appears correct.

And the intl timezone entry below the time entry (like on my screenshot)

},
"intl": {
"locale": "en-US",
"timeZone": "America/New_York"
},

Again it appears correct.

BTW: Here's the System Information for the PC running the server:

"scope": "basic",
"time": {
"utc": "Sun, 05 Nov 2023 16:46:47 GMT",
"local": "11/5/2023, 11:46:47 AM"
},
"intl": {
"locale": "en-US",
"timeZone": "America/New_York"
},

Import these 2 nodes and deploy - show me what they display

[{"id":"832f8b5683776813","type":"cronplus","z":"3a59b8d7dc9167b0","name":"","outputField":"payload","timeZone":"","storeName":"file","commandResponseMsgOutput":"output2","defaultLocation":"40.39 -74.115","defaultLocationType":"fixed","outputs":2,"options":[{"name":"sunup","topic":"topic1","payloadType":"default","payload":"","expressionType":"solar","expression":"0 0 6 * * 1-5 *","location":"","offset":"0","solarType":"selected","solarEvents":"sunrise"}],"x":400,"y":320,"wires":[[],[]]},{"id":"d982f721a5acc6e4","type":"cronplus","z":"3a59b8d7dc9167b0","name":"","outputField":"payload","timeZone":"","storeName":"file","commandResponseMsgOutput":"output2","defaultLocation":"40.39 -74.115","defaultLocationType":"fixed","outputs":2,"options":[{"name":"sunup","topic":"topic1","payloadType":"default","payload":"","expressionType":"solar","expression":"0 0 6 * * 1-5 *","location":"","offset":"0","solarType":"selected","solarEvents":"sunset"}],"x":400,"y":380,"wires":[[],[]]}]

(CTRL-I, paste)

I get:
image

but I am in the UK (UTC: +00:00, DST: +01:00)