Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with latitude #47

Closed
christian1986 opened this issue Aug 17, 2023 · 9 comments
Closed

Issue with latitude #47

christian1986 opened this issue Aug 17, 2023 · 9 comments

Comments

@christian1986
Copy link

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"]]}]

@freakent
Copy link
Owner

"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?

@christian1986
Copy link
Author

That's my bad. Still strange that it works with 50?

I changed to number and got this error againimage

@freakent
Copy link
Owner

I need to see more of the log file to understand what's causing that error. Are you sure that's coming from SunEvents?

@christian1986
Copy link
Author

What logs?

100% sure. Attached is the debug logs from when I use 50 and 60 as latitude. 50 is no problem.

Skjermbilde 2023-08-18 kl  10 36 06

@freakent
Copy link
Owner

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

@christian1986
Copy link
Author

christian1986 commented Aug 21, 2023

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!

@tyeth
Copy link

tyeth commented Aug 29, 2023

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. moment/luxon#1488

@freakent
Copy link
Owner

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. moment/luxon#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.

@tyeth
Copy link

tyeth commented Aug 29, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants