Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin that adds water tank info to the home page
#6
(2023 Nov 14, 03:33 PM)dan Wrote:
(2023 Nov 14, 12:20 PM)ahat Wrote: Hi Dan, I am making progress with my plugin. Here is the githab link in case you want to check it out https://github.com/ahatzikonstantinou/SI...ank_plugin.

1. At the moment I am writing code that must detect if any programs are currently running and possibly stop them if the level of water in the water-tank has dropped below a critical level. How do I get the program (or programs) that are currently running?

2. Another piece of code that runs in the background, needs to check if any station is on (i.e. valve is open) when a water-level sensor reports a drop of the water-level. If no valve is open then either there is a leak at the water-tank or pipes, or someone is stealing water from the water-tank. Either way, the code sends a notification and an email. How should I check if a valve is on?
Great to hear that you are making progress. I will take a look.

Take a look at the gv_reference.pdf file for the control variables you need:
https://raw.githubusercontent.com/wiki/D...erence.pdf

"gv.pon" holds the number of the program that is currently running.
"gv.srvals" holds the station(s) that is/are on.

You can also use the GET command [SIP url]/sn in the browser to see the current "gv.srvals"

You may also find "gv.ps" and "gv.rs" useful.

Dan

Thanks Dan
Reply


Messages In This Thread
RE: Plugin that adds water tank info to the home page - by ahat - 2023 Nov 14, 04:14 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)