X-Sense Security - is it possible to create an integration?

Thanks for your work! Just to report that the integration works with my XS03-WX (wifi-only).

Support for the camera will come, I don’t know when.

1 Like

Klasse, genau das war ich gesucht habe.

Nein WLAN Rauchmelder könnte problemlos eingebunden werden.

Jedoch habe ich keinen Zustand für “alarm” oder “Test”.

Ich würde gerne Automatisierungen auslösen, wenn der Alarm ausgelöst wird. Gibt es hier schon einen Fahrplan von euch?

Theo hat gerade viel um die Ohren.


There are some errors at this time?

Hello together,

i’m using this integration in version 1.08, only with supported devices (Base Station SBS50, 6x Smoke Detector XS01 M). I can install the integration without problems, but shortly after connecting to the x-sense cloud (with the second user, i created before) i receive this error message:

Einrichtung fehlgeschlagen, wird erneut versucht: ‘NoneType’ object has no attribute ‘set_data’

I deleted the integration, re-installed it, deleted the second user and re-created it, updated the firmware of the base station (from 1.35 to 1.5) without any success and restarted HA several times.

Does anybody have an idea on how to fix this error?

Kind regards

…in fact, it’s not updating. once logged in , it takes the value and never update them afterwards

we must wait of @theosnel, I hope he can answer some questions. He is the codeowner and coder of this things

hi all,

for live updates mqtt is needed. I already have a stand-alone client working, but it was impossible to integrate that with home assistant, due to threading issues.
I’ve now taken the mqtt-client that is already included in home assistant and currently I’m adapting that to my needs.

I’m still making progress, but my time is limited. Hopefully I can share something soon.

1 Like

This is an extract form /config/home-assistant.log

2024-06-24 16:49:20.550 ERROR (MainThread) [custom_components.xsense] Unexpected error fetching xsense data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/xsense/coordinator.py", line 54, in _async_update_data
    return await self.get_devices()
  File "/config/custom_components/xsense/coordinator.py", line 117, in get_devices
    await self.xsense.get_state(s)
  File "/usr/local/lib/python3.12/site-packages/xsense/async_xsense.py", line 208, in get_state
    self._parse_get_state(station, res['state']['reported'])
  File "/usr/local/lib/python3.12/site-packages/xsense/base.py", line 215, in _parse_get_state
AttributeError: 'NoneType' object has no attribute 'set_data'

any ideas?

Last week I finally made good progress and implemented MQTT. The component checks the region for each house that exists in your account and makes a connection to all required MQTT servers and subscribes to all relevant channels. (EU and US are different regions with separate servers). In my test-account I have 2 EU houses and 2 US, which results in 2 MQTT connections.

The temperature-sensors now work in realtime, sometimes giving multiple updates per minute. I’ve also tested the water-sensor-alarm, which is also handled in realtime.
There is probably more information that can be extracted, but I’ll have to analyse and test that first. Maybe it works already, maybe not. Please let me know if something works correctly for you.

The MQTT-code is derived from the MQTT component, but is adapted to work for xsense. It is not production ready and will probably contain enough bugs. I’m now testing it at home and it seems to be stable for 24 hours, including some reconnects.

@Jarnsen will create a new HACS version, which makes it easier to test.

Expect bugs if you test it.


This is a strange error, it seems to receive data for a device that is not yet known.
Did you receive this error more than once?

…in fact, it’s not updating. once logged in , it takes the value and never update them afterwards

Yes, that was a known issue. The basestation does not query the sensors if there is no need for that. When you open the app, the basestation starts querying and the values in home assistant will also be updated.

With the new update, we make the same calls as the normal app and you should see continous updates.

At this time, there is an error with the HACS 1.0.9_beta. Hopefully one can help.
This is 1.0.9_beta

And this 1.0.8

Since the update it doesn’t work at all anymore - the same error always occurs, see above
Version 1.0.9

use 1.0.8… do not update to 1.0.9. I will write here if 1.0.9 is running on HACS.

In my case with the new version the _raise_on_error and AsyncMessageCallbackType import (mqtt.py) are unknowned.

Unfortunately I carried out the update via HACS, and today an update was displayed again, now with the error:

module Paho.mqtt.client has not attribute CallbackAPIVersion

please standby, i will give you a call when 1.0.9 is ready.

1 Like


I just thought that if an update was displayed in HACS, that it would also be stable.

Hi guys. Just wanted to send my appreciation to @theosnel and @Jarnsen for this great work! I have recently purchased the SBS50 and 6 XP02S-MR. After installing everything in Home Assistant the base station and smoke detectors showed up right away. It took a while, though, for all sensor and diagnostic data to show up, I was already a little worried. But after about 30 mins, everything looked like in the pic of Jarnsen in post #154. I’m looking forward to all the new functions and the upcoming MQTT-support. Thank you for everything!