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

Moon Rise and Set times display 0 after 1/1/24 #41

Open
dbeltjr opened this issue Jan 2, 2024 · 5 comments
Open

Moon Rise and Set times display 0 after 1/1/24 #41

dbeltjr opened this issue Jan 2, 2024 · 5 comments

Comments

@dbeltjr
Copy link

dbeltjr commented Jan 2, 2024

I have a simple layout with just the moon phase picture and rise/set times. It has been working great for a few weeks no issue, but after 1/1/24, both the rise and set times display "0". See pic
2024-01-01 20 33 51

@dbeltjr
Copy link
Author

dbeltjr commented Jan 2, 2024

this is the output from the console about the module. I tried troubleshooting with ChatGPT since I am not a programmer and we could not get it to work.

[02.01.2024 10:51.13.599] [ERROR] Whoops! There was an uncaught exception...
[02.01.2024 10:51.13.599] [ERROR] TypeError: Assignment to constant variable.
at Class._getMeanJulianDays (/home/pi/MagicMirror/modules/MMM-MoonPhase/node_helper.js:195:19)
at Class.getMoonTimes (/home/pi/MagicMirror/modules/MMM-MoonPhase/node_helper.js:182:37)
at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-MoonPhase/node_helper.js:19:36)
at Socket. (/home/pi/MagicMirror/js/node_helper.js:104:11)
at Socket.emit (node:events:513:28)
at Socket.emitUntyped (/home/pi/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
at /home/pi/MagicMirror/node_modules/socket.io/dist/socket.js:704:39
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

@NolanKingdon
Copy link
Owner

Hey - thanks for pointing this out!

I made the change in #42 - let me know if the new version fixes the issue.

@dbeltjr
Copy link
Author

dbeltjr commented Jan 3, 2024

Thank you very much, that did fix the issue. Today it shows ---- for moonrise, but when I checked an online calendar for my area, today doesn't have a moonrise because it was at 11:42 last night and tonight's moonrise isn't until after midnight. On the 18th, the moonset will be in the morning and moonrise will be in the evening, will that also display correctly or will it have the ---- lines?

@NolanKingdon
Copy link
Owner

The ---- is supposed to show that there was no moonrise or set for the time span we're checking in (the day we run the calculation), so it makes sense that you would be seeing that today based on what you described.

For the situation you described on the 18th, it should display both dates.

I've noticed some odd behavior in general with the calculations I've been trying to find the time to fix. Those will have me tweaking a lot of the calculation anyways, so I may try and remove the lines altogether for something more intuitive while I'm at it.

@dbeltjr
Copy link
Author

dbeltjr commented Jan 4, 2024

I really appreciate your responsiveness on this. It is a great module and I like it. I did notice a few problems this morning. It is showing the moonrise time as 0:38 am when it should be 12:38 am and the moonset time is showing 12:19 am when it should be 12:19 pm.

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

2 participants