OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Is there a way to tell via API if the station is running via manual start?
Tagged: API, jc, Manual run
- This topic has 2 replies, 2 voices, and was last updated 4 years ago by George.
-
AuthorPosts
-
December 25, 2020 at 8:43 am #68935
GeorgeParticipantHi.
Is there a way to tell if a given station is running from a program or from a manual individual start?
I have a setup in a remote location and I seen in the GUI Logs that there are multiple runs for a station (Attached image)
I wonder if the OS is having problems or if someone is running the station manually.
I have been abe to set up Node-red to catch MQTT for each station so I can then call the API and get whatever info I need.I am using /jc to get back current OS info.
There is a “Program status data” (each element is a 3-field array that stores the [pid,rem,start] of a station, where
pid is the program index (0 means none), rem is the remaining water time (in seconds), start is the start time)This is what I get form it.
{“devt”:1608891781,”nbrd”:3,”en”:1,”sn1″:0,”sn2″:0,”rd”:0,”rdst”:0,”sunrise”:394,”sunset”:1255,”eip”:3189155300,”lwc”:1608880798,”lswc”:1608880798,”lupt”:1608723594,”lrbtc”:99,”lrun”:[10,99,1200,1608889322],”mac”:”D8:80:39:43:1E:A4″,”loc”:”-33.24907,-70.79167″,”jsp”:”https://ui.opensprinkler.com/js”,”wsp”:”weather.opensprinkler.com”,”wto”:{“h”:100,”t”:100,”r”:100,”bh”:40,”bt”:60,”br”:0,”pws”:””,”key”:””},”ifkey”:””,”mqtt”:{“en”:1,”host”:”lasverbenas.hopto.org”,”port”:1883,”user”:””,”pass”:””},”wtdata”:{“wp”:”DS”,”h”:51.33,”p”:0,”t”:72.2,”raining”:0},”wterr”:0,”curr”:205,”sbits”:[8,0,0,0],”ps”:[[0,0,0],[0,0,0],[0,0,0],[99,94,1608890795],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]}
[99,94,1608890795] should be the info I am looking for.
99 would be pid
94 would be rem
1608890795 would be startHow can I tell if this is a manual run of that station?
Attachments:
December 29, 2020 at 9:45 am #68965
RayKeymasterIf pid is 99, then it’s a manual run. Otherwise, the pid would be a valid program index (since there can only be up to 40 programs, a valid program ID would be from 0 to 39).
December 29, 2020 at 10:38 am #68966
GeorgeParticipantThanks Ray.
I am trying to make a monitoring system for my installation.
I have well issues so I need to know with the system fails. I am using MQTT and HTTP to connect to Node-Red and it seems to be working.
I need to add a pressure sensor and a flow sensor (both via an ESP) and I will have full control on what happened during irrigation.Thanks once again.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Is there a way to tell via API if the station is running via manual start?