Closed gvdhoven closed 2 years ago
Hi
So with the Maintenance menu, you'd probably have to just rewrite the generated script sections to fit your needs. Probably the best way to go about it is to give your calibration menu items unique function ID and write your new code for those functions (including the display code since you'll be fetching data interactively).
If I'm not mistaken you can disable and enable a script in an action too so you can disable the blankout for the calibration process.
The pump speeds seem straightforward, you can create them as custom action buttons.
And the home screen as you mentioned, you can modify the display code to not show the screensaver, instead show whatever values you need. In your case you can even hardcode the stuff since it's not necessary for it to be universal.
The only thing then is once you modify the generated YAML it's up to you to maintain it since it can't be fed back to the generator. If you want to add items you'll either need to restructure the menu manually or generate new from scratch and modify again.
Just a quick question, not seeking support in implementation just 'if this would work out'. I have envisioned a pool controller and this menu system:
Basically this is what i want to achieve: "Home" would return to the screen saver but this might not be needed given the auto time-out. The "Home" screen should display certain values of various sensors which i think is possible looking at your example code. The screen should preferably also 'blank out' after a certain time in order to prevent burn-in.
"Pool pump speed" is a submenu with actions that define a PWM value for a sensor
"Heat pump" is a submenu with actions that define relay state (auto) or override this; based on a 'global variable' if the pump is running.
"Maintenance" is where it gets tricky. Calibration would mean that a 'script' would run that, for example with pH calibarion; would mean the sensor to be removed from the installation and put into a solution of pH4, wait for the sensor to stabilise(), then give instructions to put into pH7, wait for the sensor to stabilise() then in pH10 and wait for the sensor to stabilise(*).
with (*) i mean that the display should show the current value of that sensor, and when the 'enter' button has been pressed it should store it and go to the next calibration phase. During this calibration phase, the screensaver should not turn (Q: just modify the ss_timeout lambda to see where we are at?) on and the 'switch' button should know which step in the calibration phase it is in. I suppose this would work by just using a lambda like this?