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

sunevents empty #48

Open
Giel88 opened this issue May 21, 2024 · 11 comments
Open

sunevents empty #48

Giel88 opened this issue May 21, 2024 · 11 comments

Comments

@Giel88
Copy link

Giel88 commented May 21, 2024

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

Screenshot 2024-05-21 at 19 04 39
@freakent
Copy link
Owner

freakent commented May 21, 2024

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

@Giel88
Copy link
Author

Giel88 commented May 22, 2024

Sure! I am running the homeassistant addon

  1. Updated nodered to latest version by updating the homeassistant addon
  2. Yes, currently running latest version of nodered (3.1.9) homeassistant addon (17.0.12) and the node (3.1.1)
  3. From 3.1.8 to 3.1.9

@freakent
Copy link
Owner

freakent commented May 22, 2024

@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.

@Giel88
Copy link
Author

Giel88 commented May 22, 2024

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

@freakent
Copy link
Owner

OK, now I understand the problem. You meant the timestamp was null not the that the array is empty. Big difference.

@Giel88
Copy link
Author

Giel88 commented May 22, 2024

Correct, mistake on my end. Sorry about that!

@IronSolder
Copy link

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.

@IronSolder
Copy link

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.
sunevents1
sunevents2

@freakent
Copy link
Owner

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.

@Giel88
Copy link
Author

Giel88 commented Jun 12, 2024

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.

@Giel88 Giel88 closed this as completed Jun 12, 2024
@Giel88 Giel88 reopened this Jun 12, 2024
@IronSolder
Copy link

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.

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