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

BlindController only run once each time I restarted the node red flow #42

Open
zhifanl opened this issue Aug 12, 2021 · 4 comments
Open

Comments

@zhifanl
Copy link

zhifanl commented Aug 12, 2021

Do you guys have any idea about why the blind controller only run once? My flow is supposed to run the blindcontroller every 10 seconds and it seems that it runs only once and then stop... Here is the screenshot of my flow.
Screen Shot 2021-08-12 at 12 42 24 PM
Screen Shot 2021-08-12 at 12 41 26 PM

@kadza
Copy link

kadza commented Aug 22, 2021

I've just started playing with it, but it seems that it sends a message when one of the three properties changes:
if (
blinds[i].blindPosition != previousBlindPosition ||
blinds[i].sunInWindow != previousSunInWindow ||
blinds[i].blindPositionReasonCode != previousBlindPositionReasonCode
)
Probably, in your case it sends a message once when the properties "change" from the default values.

@alisdairjsmyth
Copy link
Owner

The node will only emit a message if the position of the blind needs to change, or the reason for its existing position changes. In my setup, I run the calculation every five minutes, but the position for each blind is adjusted about 10 times a day - so there are only this number of output messages per day. My suggestion would be to adjust the frequency of execution of the flow so it doesn't run as frequently, and to monitor it for a longer duration.

@zhifanl
Copy link
Author

zhifanl commented Aug 23, 2021

Thanks Sir, and I have another question: How do you keep node-red running in the background? In my case, I use node-red on home-assistant in the VM with my computer, and my node-red stops working when my computer goes to sleep, because then the network shuts down automatically, do you have any idea for solving this issue? :)

@alisdairjsmyth
Copy link
Owner

Node-Red (and Home Assistant) runs really well on low-cost hardware such as the Raspberry Pi. Raspberry Pi are a great to run 24/7. This is what I used in my setup.

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