tagyoureit / nodejs-poolController

An application to control pool equipment from various manufacturers.
GNU Affero General Public License v3.0
323 stars 94 forks source link

[BUG] Heliotrope and schedule flexibility logic #820

Closed CodeSlinger69 closed 1 year ago

CodeSlinger69 commented 1 year ago

nodejs-poolController Version/commit

head

nodejs-poolController-dashPanel Version/commit

No response

relayEquipmentManager Version/commit

No response

Node Version

No response

Platform

No response

RS485 Adapter

No response

Are you using Docker?

OCP

No response

Pump(s)

No response

Chlorinator(s)

No response

What steps will reproduce the bug?

I wanted to leverage Nixie to automatically cool my pool at night using my solar system. Nixie checks to see "isNight" as a condition for doing so, but the logic in this method was incorrect.

Additionally, I wanted schedules that cross the midnight boundary, for example sunset to sunrise, or just 22:00 - 06:00. The logic to determine if a schedule should be "on" does not handle this situation.

I've corrected the logic, it works in my testing so far, and I created a number of pull requests (1, 2, 3) for inclusion in the official code base if wanted. I'll be honest, I am not a git expert, so forgive me if I messed up the branches, pulls, pushes, commits, and so on.

I've also created a few other pull requests (1, 2) for other bugs I discovered along the way.

I'm pleased that Nixie is working the way I want now, and please feel free to use my code if its helpful.

What happens?

See above.

What should have happened?

See above.

Additional information

No response

rstrouse commented 1 year ago

I’ll check them out tomorrow and integrate them.

CodeSlinger69 commented 1 year ago

Closing this due to learning that njsPC had a design decision to NOT allow schedules to cross the midnight boundary.