Closed christian1986 closed 10 months ago
"props":[{"p":"payload.lat","v":"60","vt":"num"},{"p":"payload.lng","v":"5.37","vt":"str"}]
It looks like you have one defined as a number and the other as a string. Could be the issue?
That's my bad. Still strange that it works with 50?
I changed to number and got this error again
I need to see more of the log file to understand what's causing that error. Are you sure that's coming from SunEvents?
What logs?
100% sure. Attached is the debug logs from when I use 50 and 60 as latitude. 50 is no problem.
Is there something else in your flow referencing a milliseconds property?
You could also try adding a decimal point to force it do a decimal, so 50.0 and 60.0.
For node red logs, see: https://nodered.org/docs/user-guide/runtime/logging
21 Aug 13:31:03 - [info] [sun events:837794965f13d7b8] calculating sunevents for lat 60.2 and lng 5.37 21 Aug 13:31:03 - [error] [sun events:837794965f13d7b8] TypeError: Cannot read properties of undefined (reading 'milliseconds')
And if I change to sub 60 for latitude it works like a charm!
Looking at an incorrect timezone issue I have ended up here. Mainly to verify what sunrise is returned by different "calculators". @freakent This issue appears to be an issue from the luxon library, and is resolved by the latest update. https://github.com/moment/luxon/issues/1488
Looking at an incorrect timezone issue I have ended up here. Mainly to verify what sunrise is returned by different "calculators".
@freakent This issue appears to be an issue from the luxon library, and is resolved by the latest update. https://github.com/moment/luxon/issues/1488
Is this related to Issue with Lattitude originally reported by @christian1986 ? If not please can you raise a separate issue and explain the error you are experiencing. At the moment I can not see what I would be testing for.
Sorry ignore my issue, I was saying the solution to this issue is to update luxon, and check the migration notes related to the milliseconds change, but hopefully you just need to update luxon.
With 60.30 and 5.34 there is no events scheduled according to node red. Have been working flawless for a long period.
If I change to 50.30 it works.
[{"id":"837794965f13d7b8","type":"sun events","z":"87bcc20f.660cb8","testmode":true,"verbose":"N","topic":"","name":"","x":1050,"y":520,"wires":[["e371375a.41027","0bafd0bc4128e97f"],[]]},{"id":"6465b2672b54fe77","type":"inject","z":"87bcc20f.660cb8","name":"","props":[{"p":"payload.lat","v":"60","vt":"num"},{"p":"payload.lng","v":"5.37","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":790,"y":520,"wires":[["837794965f13d7b8"]]}]