If you have a similar system, you may be interested in this as well, so I’m sharing it.
Please read these issues and disclaimers before proceeding to github!
This is a personal project with no guarantee of functionality or security. Use it with caution at own risk. * Never use an administrator PIN with this component! Create a dedicated regular user + PIN code!
Only two components are supported: Light and Cover. Alarm Panel, Generic Output and Scenarios are not supported at this point.
For both Light and Cover, only controls are supported, status is not updated at this point.
For each control, the component initializes a new Websocket connection. Controlling multiple lights or covers simultaneously may break.
The SSL Websocket implementation has stability issues upon initialization of the Cover component. If SSL fails at component initialization (normally due to Handshake failure), please restart HASS server (“Settings” => “Server Controls”. Multiple restarts may be necessary).
The Lares SSL certificate is self signed. For this reason, I disable SSL Certificate authentication, this is vulnerable to man in the middle attacks (The same is true when accessing your Lares Ksenia 4.0 central from your PC/Browser!). Again: it is highly reccomended that you define a dedicated Lares user + PIN code, dedicated exclusively to HASS, limiting permissions as much as needed.
You can find the repository and configuration steps on Github:
Let me know if you find it useful, or if you’d like to contribute to improving this first attempt!
Hi Gianmaria,
sensor are “not supported at this point” due to non-info from ksenia, or because can’t be done?
it will be awesome connect Sensor (windows/radars) to other HA automation
I think it can be done. Once you open the websocket you can place a “REALTIME” Command (see line 35 in laresToolbox.py) to register and receive updates you can see in the web interface in the “Real Time” tab. Sensors are included there, so you should see the status change.
My coding skills, though, are inadequate to implement this properly, as you’ll need to keep alive the websocket, continue reading for updates you registered to, and update HASS sensors states as a consequence. Happy to walk you through more of my findings though, if you want to give it a try.
Thanks, good to see I’m not the only crazy person with a Lares 4.0 and willing to integrate it with HASS.
My current big issue is still that for some reason I don’t understand, the cover platform doesn’t reliably initialize (while the light platform does), due to some SSL issue.
If other users are willing to give this a try, and let me know their experience - that may be great (altough I can’t promise to be able to fix it ).
wow! this is great ! I have a Lares 4.0 too and I would like to control the alarm via Home Assistant at the first attempt and then with Crestron Touch Display. Any idea on where I can start? Thanks
The first step would be to download from github my custom integration, following the readme file to try and set it up. It comes with quite some limitation… but give it a try and feel free to message me to see if I can help you.
More broadly, with the latest firmware update, I noticed a new “HTTP Gateway” option became available (but it needs to be enabled by your installer). That seems like a rest API that would make my code unnecessary… and would need to re-write the code entirely based on those APIs, which should make everything much more reliable.
Hi. Can you tell me more about this MQTT gateway? I am about to install a Lares alarm system and would like to integrate it into HA. MQTT would be my preferred solution… Thanks!