No devices/entities
Closed this issue · 3 comments
General information
Integration
Integration version: 1.2.0
Root topic: SleepAsAndroid
Application settings
topic:
Description
Thanks for working on this! Testing it out now!
I'm having issues where no devices or entities are showing up or being created. Listening to MQTT event 'SleepAsAndroid' is working and showing the appropriate events. I have two clients with different Client IDs in the app. The integration was installed and I left both the sensor name and topic as default 'SleepAsAndroid'.
HA Logs:
2021-02-07 15:02:29 INFO (MainThread) [custom_components.sleep_as_android] Setting up 67fab8a69bcd5607d95ff896ab1d4fb3
2021-02-07 15:02:33 DEBUG (MainThread) [custom_components.sleep_as_android.sensor] Subscribing to root topic 'SleepAsAndroid'
2021-02-07 15:02:34 DEBUG (MainThread) [custom_components.sleep_as_android.sensor] Subscribing to root topic is done!
MQTT Logs:
[INFO] found mqtt on Home Assistant
1612728941: New client connected from 192.XXX.X.XX as Test2 (p2, c1, k60, u'mqtt').
1612728941: Client Test2 disconnected.
1612728948: New connection from 192.XXX.X.XX on port 1883.
1612728948: New client connected from 192.XXX.X.XX as Test1 (p2, c1, k60, u'mqtt').
1612728948: Client Test1 disconnected.
1612728952: New connection from 192.XXX.X.XX on port 1883.
1612728952: New client connected from 192.XXX.X.XX as Test1 (p2, c1, k60, u'mqtt').
1612728952: Client Test1 disconnected.
Any ideas what I'm missing?
@sgobat, hello.
What is the topic in Application settings?
It should be like SleepAsAndroid/client1 for client-1 and SleepAsAndroid/client2 for client-2 (because you have "SleepAsAndroid" as root topic in integration settings).
Then integration must create two devices SleepAsAndroid_client1 and SleepAsAndroid_client2.
You are correct. Thank you! I thought the Client ID in the application would create the subtopic but it didn't. Adding "root-topic/client" to the topic field in the application works and the sensor shows up!
Welcome.
I'll try to update documentation to make it more clear.
Will keep this issue open as reminder.