The Weather Safety Proxy (WSP) driver connects a Weather Safety Service (WSS) to INDI such that schedulers and observatory dome and roll-off-roof drivers can be told when it is safe to open and when they must close. The WSP driver differs from most other Weather Station drivers in that it does not deal with sensor readings itself, that is deferred to the WSS. The WSP driver proxies the safety state that the WSS determines and adds configurable hysteresis levels for soft errors when a safety reading update is missed so that the observatory does not immediately close down on a glitch. When on the other hand the WSS reads as UNSAFE the observatory is signalled to immediately close down. The WSS is expected to have hysteresis handling itself so to not cause the observatory to open/close too often.
Current features are:
The Weather Safety Proxy polls a Weather Safety Service via either a local script or a curl URL call, configurable in the Options tab. The poll interval is configurable in the Main Control tab and defaults to 60 seconds.
The Weather Safety Service which the Weather Safety Proxy driver polls is expected to report its state in JSON format. Required fields are roof_status with open_ok integer (0 for UNSAFE and 1 for SAFE) and optionally a reasons text field. For instance :
{ "timestamp_utc": "2019-03-24T23:26:02", "roof_status": { "open_ok": 0, "reasons": "Still not dry long enough" } }
In case the Script itself determines a soft error it can report so in an error field like this :
{"error": "Empty DB result"}
This will be logged :
2019-03-24T11:50:08: [ERROR] Error hint found in JSON [{"error": "Empty DB result"}]
In case of SAFE conditions soft errors will be logged and counted until they reach the hysteresis treshold.
2019-03-23T22:41:58: [ERROR] curl_easy_perform failed with [Couldn't connect to server] 2019-03-23T22:41:53: [WARNING] Soft error 4 occured during SAFE conditions, counting
In case of UNSAFE conditions soft errors are logged and otherwise ignored
2019-03-24T11:47:02: [WARNING] Soft error occured during UNSAFE conditions, ignore
Additional fields in the JSON like the timestamp_utc field in the above JSON are ignored.
The Weather Safety Service is not included in this driver.
General Info tab just shows the driver's name and binary and version
The Options tab is used for initial setup and finetuning of the Hysteresis levels.
The Weather Safety Proxy cannot set the needed WEATHER_STATUS state directly. Instead it sets a WEATHER_SAFETY 'sensor' to 0 for UNSAFE and 1 for SAFE and specifies a range for SAFE from 0.9 to 1.1
Site Management is not used. This tab is inherited from general Weather devices snooping on GPS.