Hi,
I’m trying to integrate a SYR SafeTech Connect water leak protection device into HA. It has some sort of HTTP interface in my local network, i.e. I need to call individual URLs to trigger an action or request data. Data is being returned as JSON, values to be transmitted are simply appended to the URL:
- Example 1: http://syr.mydomain.com:5333/get/AB will return
{"getAB":"1"}
and means the valve is open - Example 2: ‘http://syr.mydomain.com:5333/set/PRF/2’ sets behaviour profile 2 will return
{"setPRF2":"OK"}
Unfortunately some commands require special “access rights”, thus I need to call http://syr.mydomain.com:5333/safe-tec/set/ADM/(1)f
before I can e.g. clear an alarm or set parameters like maximum flow rate or similar. However, I am still new to HA and not sure how to do this best:
-
Always call the access rights URL before I call another one? If yes, how can I do that? Seems there can only be one resource in a REST sensor
-
Call the access rights URL immediately after startup and once every x hours. Would that be an automation (e.g. HA startup as trigger, but what service?) or a script?
Maybe there is also a more elegant way I didn’t think about yet
Thanks for your help!!
Klayman