NolanKingdon / MMM-MoonPhase

Magic Mirror Module that displays the current moon phase
MIT License
53 stars 24 forks source link

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

Open dbeltjr opened 9 months ago

dbeltjr commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

Hey - thanks for pointing this out!

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

dbeltjr commented 9 months ago

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 commented 9 months ago

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 commented 8 months ago

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.