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

time-inject: wrong displayed times and (multiple) wrong trigger times #159

Closed
chrschdev opened this issue Jun 12, 2020 · 2 comments
Closed
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@chrschdev
Copy link

Describe the bug
i use the time-inject node to trigger the garden lights at specific times depending on the sun position (on = civil dusk, off = civil dawn).

there seems to be 2 issues for me:

1.) the status which is displayed next to the node is only correct after the first deploy. when the first time the node was triggered, the new displayed value for next trigger time seems to be wrong.
For example at the moment, the displayed value for the next civil dusk is at 12.06.2020 23:45:21 which is A) in the past and B) not a correct calculated value for civil dusk for my lat/long location.

2.) it will trigger at the correct time, but also at other times. so last night, the expected time was 04:32 but it has also triggered at 01:00 and 02:20.

it is completely independent from the chosen sun set method (nautical dusk, astronomical dusk etc), they all not working. even using an exact timestamp to trigger seems not to work correctly.

i have checked the defined time and timezone on my server, it is set correctly.

Expected behavior
the status of the used nodes should display the next time when the it will trigger again. this value will be automatically updated after a trigger.
it will only trigger once in 24h, the time of the selected sun position.

System information (please complete the following information):

  • Node Version 10.14.1
  • Node-Red Version 1.0.4
  • sun-position version 1.1.3

Additional context
n/a

It would be nice to get some help, this things are driving me crazy at the moment.

@Hypnos3 Hypnos3 added the 🐛 bug Something isn't working label Jun 14, 2020
@Hypnos3 Hypnos3 self-assigned this Jun 14, 2020
@chrschdev
Copy link
Author

have again checked the issue to give you more detailed information.

This is how to reproduce the bug:

  1. create a time-inject node, configure a time where it should trigger, like 10:00 AM
  2. deploy with "only changed nodes"
  3. change the time in node from step 1 from 10:00 AM to 10:01 AM
  4. deploy with "only changed nodes"

Expected Result: it will only trigger at 10:01 AM

But Result is: it will trigger on 10:00 AM and on 10:01 AM

To avoid this, the workaround is to restart the whole flows, or to restart the machine where node red is running. then it would run again as expected.

@PierreScerri
Copy link

I have the same issue.

This flow:
Screenshot 2020-07-02 at 21 06 43
with inject enhanced node set like this:
Screenshot 2020-07-02 at 20 59 31
triggers like this:
Screenshot 2020-07-02 at 21 06 28

Sunset is given as 20:23:41 by the node itself.

The time shown in the node status changrs with each trigger.

The workaround suggested above to restart did not work for me.

@Hypnos3 Hypnos3 added this to the 1.1.4 milestone Aug 25, 2020
Hypnos3 added a commit that referenced this issue Aug 25, 2020
- general
  - for a property compare implemented `contain`, `containSome` and `comtainAll` #158

- time inject
  - maybe fix of #159 by better memory cleanup on change
  - added possibility of define which time should be in payload (current or next) #163
  - now setup of payload, topic and additional payload is similar to the inject node of th newest Node-Red Version #172

- within-time
  - fix bug not usable/visible offset for alternate times #170
  - added `withinTimeStart` and `withinTimeEnd` and `withinTime` property to message #156 + #166

- moon-position
  - moon-times now available #161
  - has now a `isUp` _Boolean_ property which gives the state if the moon is Up #162
  - additional properties are `positionAtRise` and `positionAtSet` with position information on rise and set

- clock-time
  - fixed not working overrides #171
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Development

No branches or pull requests

3 participants