Hello,
I'm tackling a subject that's been going on in my head for quite some time: the interactions between Loxone and Synology Surveillance Station.
More specifically, I want to enable/disable Synology's HOME mode from Loxone.
I found on different forums the commands to send, but I'm not good enough in programming (or smart enough in the Loxone configuration?) to implement them.
In case someone is able to help us move forward, here's where I am:
1/ you must first authenticate on the Synology before you can do anything:
url : http://<syno_ip_address>:<syno_ip_port>/webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=3&account=<surveillance_station_user>&passwd=<mypassword>&session=SurveillanceStation&format=sid
By calling this url we get a variable allowing us to authenticate ourselves in the futur url according to :
"{"data":{"sid": "MzNGJNpoqCP6M1550N4N747204"}, "success":true};
this famous SID changes with each authentication unfortunately.
2/ URL to switch from HOME to ON/OFF mode:
http://<syno_ip_address>:<syno_ip_port>/webapi/entry.cgi?api=SYNO.SurveillanceStation.HomeMode&version=1&method=Switch&on=true&_sid=MzNGJNpoqCP6M1550N4N747204 (we see the SID at the end of the url)
synology returns the answer: {"success":true} when everything is going well.
To switch the Home Mode to OFF, simply replace ON with OFF in the same URL.
well, as an option (I'm not sure it's necessary) url to make a logout:
http://<syno_ip_address>:<syno_ip_port>/webapi/auth.cgi?api=SYNO.API.Auth&method=Logout&version=1
Here, my problem comes from this variable: SID which changes every time, I don't know how to get it back in Loxone (if possible), to integrate it in the URL........
thank you in advance.