Open Giel88 opened 1 month ago
@Giel88, please can you provide more details?
1) When you say "worked before", are you saying before you did an update or something else has changed?
2) are you running the latest version?
3) what version of nodered have you upgraded from and to?
Sure! I am running the homeassistant addon
@Giel88,
I have just updated the node-red on my development system from v3.1.3 to v3.1.9, testing sunevents before and after with your same coordinates, and the results were the same both times. I don't see an issue.
I am looking at your screen shot. You say that the sunevents array is empty, however your screenshot clearly shows there is one element for "night" in that array. Please clarify.
Aren't both outputs supposed to give me a timestamp for either upcoming or past sunevents? The night timestamp is empty and all other events are missing
OK, now I understand the problem. You meant the timestamp was null not the that the array is empty. Big difference.
Correct, mistake on my end. Sorry about that!
Since an unknown point in time, sunevents has also been behaving completely incorrectly for me, contrary to the documentation, and is currently not providing any usable data. I didn't knowingly make any updates, but I can't assess whether automatic update processes might have taken effect. Output 2 only delivers an array with size 1 and an event_name "night" with an empty timestamp. Output 1 sometimes (not yet entirely comprehensible) delivers timestamps for individual, diverse sunevents at random intervals without an external trigger. The sunevents node always shows the correct next sunevent. Overall, sunevents cannot be used in version 3.1.1, which is currently installed on my system.
After some observation, it looks as if output 1 (debug13) outputs the individual object set of output 2 approximately every minute. The state of the node then corresponds more closely to the announcement output 1 - here I prematurely thought that the state of the node would be correct, but this was not true. Unfortunately, the sunevents node cannot be uninstalled, updated, or reinstalled in any way - both npm and Nodered's palette management abort with errors.
I'm sorry this node has stopped working. I can only assume that a change in some dependency has this problem. Unfortunately I won't be able to look into this for a while.
That's alright, life gets busy sometimes!
@IronSolder For now I'm using the sunrisesunset.io API, maybe that's a solution for you as well.
External dependencies are a plague... . Thanks to this problem, I discovered another problem: after the last update of my operating system (Debian Bullseye), a version of nodejs seemed to ship with a built-in but incompatible/broken npm. Very nice problem that I was able to solve by manually installing a more recent version (v18) of nodejs. I have now been able to replace the sunevents functionalities I need with suncron.
The past sunevents array is empty (null) when injecting. Worked before but no longer works after nodered update! Nodered log gives no errors only:
21 May 19:18:26 - [info] [sun events:c1ee1b226fd00ee2] calculating sunevents for lat 52.10347 and lng 5.10608