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

Function of top output #101

Open
linker3000 opened this issue Apr 17, 2024 · 4 comments
Open

Function of top output #101

linker3000 opened this issue Apr 17, 2024 · 4 comments

Comments

@linker3000
Copy link

Is the top output supposed to send out a JSON summary of all timers whenever a setting is changed via the node's input?

I am not seeing any output on this line except for very occasionally(?) and I have not identified a pattern for its behaviour, apart from when injecting a msg.getStatus into the node.

Thanks

@linker3000
Copy link
Author

linker3000 commented Apr 23, 2024

I have worked out the issue:

  1. If you change any timer settings via the dashboard, the top output sends out a JSON payload of all current settings.
  2. If you inject any new settings into the node, it does not send out a JSON payload.

This is maybe by design and just means that if, for example, you read in some settings from a save fle, modify them and inject them into the node, you have to arrange for the updated into to be written to the save file - you can't rely on it come out of the top output.

Example: node structure

@fellinga
Copy link
Owner

fellinga commented Apr 23, 2024

Hi @linker3000,

it's actually by design and well documented (see the docs here) but I think I understand why you would expect the node to trigger the output when you change its values via payload.

I've implemented a fix - would you mind testing before I create an official update? You only need to replace your time-scheduler.js with the one here in this repo.

EDIT: the change makes sure to only output actual changes, so there is no output at the top when you inject the same payload twice

@fellinga fellinga reopened this Apr 23, 2024
@linker3000
Copy link
Author

linker3000 commented Apr 23, 2024

EDIT: Also see my next post for a snag.

Hi @fellinga,

Thanks for the quick response.

With the updated code, I am seeing a payload on the top output for dashboard and injected changes so that's perfect.

Now I just have to change my flows to remove the file save operation from my function outputs to stop a (harmless) double file write.

Cheers!

@linker3000
Copy link
Author

linker3000 commented Apr 23, 2024

Just spotted an issue:

if I push a new payload with an added config for an output (say 0), that is for a time period of 'now' to 'now+2hr' (a heating boost), I see this reflected in the dashboard, but if I then delete the 'boost' selectively by pushing a new config or through the dashboard, or by loading an empty config, the dashboard updates, but there's no top output AND the device output does not send out a new value.

This situation happens if "Output "off" payloads only at the defined end time" is ticked. If it is unticked then the relevant output/s update,

It seems that the timer outputs are not re-evaluated fully if there's a config update and existing 'live' end times are changed or deleted.

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