2023 Jun 30, 01:33 PM
Hi, I've been using SIP for years but recently having some problems with reliability. This is likely not SIP's fault, I have semi-regular power outs and network outages. I have some alerts set up to let me know if SIP is unavailable for a long time, but it turns out they're not enough. I'd like to add an alert if for whatever reason the sprinklers haven't been active in several days.
I thought of doing this by checking the sip log / history for latest run date. The documentation around the API and the fields it returns is ... not entirely clear to me.
I found info here: https://nosack.com/sipforum/showthread.php?tid=156
cross-referencing that with https://github.com/Dan-in-CA/SIP/blob/ma...erence.txt
I thought I could use the /jc command's lrun section.
"last run, used to display log line on home page (list [station index, program number, duration, end time])"
While the first two numbers change, I'm always getting the same value for the last two:
"lrun": [
0,
3,
1200,
0
]
this is the result shortly after one of the stations was open for 20 minutes in the middle of the afternoon.
The date and time are set correctly on the machine where SIP runs.
I also tried the /jl command. I'm getting an empty array, despite the fact that I enabled logs, see the latest run in the web UI and the /wl command downloads a CSV which includes the latest run.
Am I doing something wrong, or can you help me understand the right way to programmatically pull the latest run?
I'm running version: 4.1.53 (2022-12-04).
I thought of doing this by checking the sip log / history for latest run date. The documentation around the API and the fields it returns is ... not entirely clear to me.
I found info here: https://nosack.com/sipforum/showthread.php?tid=156
cross-referencing that with https://github.com/Dan-in-CA/SIP/blob/ma...erence.txt
I thought I could use the /jc command's lrun section.
"last run, used to display log line on home page (list [station index, program number, duration, end time])"
While the first two numbers change, I'm always getting the same value for the last two:
"lrun": [
0,
3,
1200,
0
]
this is the result shortly after one of the stations was open for 20 minutes in the middle of the afternoon.
The date and time are set correctly on the machine where SIP runs.
I also tried the /jl command. I'm getting an empty array, despite the fact that I enabled logs, see the latest run in the web UI and the /wl command downloads a CSV which includes the latest run.
Am I doing something wrong, or can you help me understand the right way to programmatically pull the latest run?
I'm running version: 4.1.53 (2022-12-04).