This unofficial integration allows you to connect your HomeAssistant to the Ksenia Lares 4.0 control panel and add all your devices. This integration, me or any contributor, are NOT affiliated with Ksenia Security S.p.A in any way.
| Device | Compatibility |
|---|---|
| Alarm System | ✅ |
| Lights | ✅ |
| Roller Blinds | ✅ |
| Window Shutters | ✅ |
| Garage Shutters | ✅ |
| Buttons | ✅ |
| Switches | ✅ |
| Scenarios | ✅ |
| Sensors | |
| Partitions | ✅ |
⛔ - Not Implemented;
If any of the devices listed is not compatible, or if some devices listed as "compatible" are not working as intended, please open an issue. Collaboration is more than welcome, if somebody wants to implement new functions or contribute in any form to the integration, feel free to open a pull request.
Make sure to have HACS installed on your Home Assistant.
Simply click the button above, you will be redirected to HomeAssistant. Then you can proceed with setup.
When setting up the integration, you will be greeted with this setup page:
When prompted, insert:
- The local IP address of your Ksenia Control Panel
- The user PIN to access the Ksenia Control Panel. I highly encourage you to use a user PIN, without admin permissions and (if you wish) without access to the home security system. Alternatively, you can create a dedicated user for HomeAssistant
- Tick the "SSL" box if you want HomeAssistant to communicate using a secure connection. In case of network error, and only in that case, un-check the box
- Check all the devices that you want to add to HomeAssistant (by default, the integration will scan for all compatible devices)
After the integration finds all the entities, you should be able to see it in your Integrations page:
The easiest way to get a complete snapshot of your integration's state:
- Go to Settings > Devices & Services
- Find the Ksenia Lares 4.0 integration and click on it
- Click on the device (e.g., "Ksenia Lares")
- Click the three dots (⋮) in the top right corner
- Select Download diagnostics
This downloads a JSON file containing:
- All entities with their current states and attributes (including
raw_data) - WebSocket connection status
- System information from your Ksenia panel
- Complete data for all device types
- Configuration settings
This file is perfect for sharing when reporting issues, as it contains everything needed to understand your setup without exposing sensitive credentials.
For real-time troubleshooting and to capture dynamic behavior:
- Go to Settings > Devices & Services
- Find the Ksenia Lares 4.0 integration
- Click the three dots (⋮) in the top right corner
- Select Enable debug logging
- Reproduce the issue
- Click the three dots again and select Disable debug logging
- Download the logs to share when reporting issues
Debug logs will show detailed WebSocket communication, including:
- All incoming/outgoing messages
- Initial data acquisition
- Status updates for all device types
- Command responses
This information is helpful when reporting issues or troubleshooting connection problems.
Big thanks to @gvisconti1983 for the crc functions and to @realnot16 for the WebSocket library, which has been reworked and updated by me.