HappyBubbles/MQTT strange things

I have a happy Bubble since 1 month.
I had no problem.

Now if i verify mosquitto broker i have my message ok
mosquitto_sub -h 192.168.10.8 -p 1883 -v -t “#” -u hadash -P hadash

happy-bubbles/presence/ha/home {"id":"ceeb5d1bea5f","name":"NutOrange","distance":74}
happy-bubbles/presence NutOrange is most likely in home with average distance 74.000000
happy-bubbles/presence miband3 is most likely in  with average distance 0.000000
happy-bubbles/presence NutBlanc is most likely in  with average distance 0.000000

So my NutOrange is at home like in the broker.

But now on Home assistant, my beacon are seen as away…

in the syslog i have this :

May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.loader:Loaded mqtt from homeassistant.components.mqtt
May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.setup:Setting up mqtt
May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: service=publish, domain=mqtt>
May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=mqtt>
May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.loader:Loaded sensor.mqtt_room from homeassistant.components.sensor.mqtt_room
May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.loader:Loaded automation.mqtt from homeassistant.components.automation.mqtt
May 11 10:52:23 gano-vm hass[12226]: INFO:homeassistant.components.sensor:Setting up sensor.mqtt_room
May 11 10:52:23 gano-vm hass[12226]: message repeated 2 times: [ INFO:homeassistant.components.sensor:Setting up sensor.mqtt_room]
May 11 10:52:39 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:52:55 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:52:57 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:00 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:03 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:06 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:09 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:12 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:21 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:26 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:30 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:33 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
May 11 10:53:42 gano-vm hass[12226]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server

The problem is appeared after upgrading in 0.44
But even with a downgrade in 0.41 the problem is still here…

Any ideas about that ? an upgrade to paho_mqtt module ?

Did you try subscribing to the “changes” topic of Happy Bubbles?

for me no data on this topic …
mosquitto_sub -h 192.168.10.8 -p 1883 -v -t "happy-bubbles/presence/changes" -u hadash -P hadash

why suddently it stops to work ?

I thought that the topic used by ha was :
happy-bubbles/presence/ha

the following command returns me that :

mosquitto_sub -h 192.168.10.8 -p 1883 -v -t "happy-bubbles/presence/#" -u hadash -P hadash
happy-bubbles/presence/ha/home {"id":"d2c4317d2737","name":"miband3","distance":95}
happy-bubbles/presence miband3 is most likely in home with average distance 95.000000
happy-bubbles/presence/ha/home {"id":"c1f42791752e","name":"NutBlanc","distance":88.66666666666667}
happy-bubbles/presence NutBlanc is most likely in home with average distance 88.666667
happy-bubbles/presence/ha/home {"id":"ceeb5d1bea5f","name":"NutOrange","distance":75.33333333333333}
happy-bubbles/presence NutOrange is most likely in home with average distance 75.333333

After a restart HA i have many reconnection in MQTT
May 11 17:23:42 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:44 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:46 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:48 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:50 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:52 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:54 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:56 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:23:58 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:00 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:02 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:04 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:06 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:08 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:10 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:12 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:14 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:16 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:18 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:20 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:22 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:24 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:26 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:28 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:30 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:32 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:34 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:36 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:38 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:40 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:42 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:44 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:46 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:48 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:50 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:24:52 gano-vm hass[5958]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server
each 2 seconds…

and with the complete trace

May 11 17:55:40 gano-vm mosquitto[24433]: Client hadash already connected, closing old connection. May 11 17:55:40 gano-vm mosquitto[24433]: Client hadash disconnected. May 11 17:55:40 gano-vm mosquitto[24433]: New client connected from 192.168.10.49 as hadash (c0, k60, u'hadash'). May 11 17:55:40 gano-vm mosquitto[24433]: New connection from 192.168.10.8 on port 1883. May 11 17:55:40 gano-vm hass[9023]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:55:40 gano-vm hass[9023]: INFO:homeassistant.components.http:Serving /api/camera_proxy/camera.webcamsurf to 192.168.10.21 (auth: False) May 11 17:55:41 gano-vm mosquitto[24433]: Socket error on client <unknown>, disconnecting. May 11 17:55:41 gano-vm mosquitto[24433]: New connection from 192.168.10.8 on port 1883. May 11 17:55:41 gano-vm mosquitto[24433]: Client hadash already connected, closing old connection. May 11 17:55:41 gano-vm mosquitto[24433]: Client hadash disconnected. May 11 17:55:41 gano-vm mosquitto[24433]: New client connected from 192.168.10.8 as hadash (c1, k60, u'hadash'). May 11 17:55:42 gano-vm mosquitto[24433]: New connection from 192.168.10.49 on port 1883. May 11 17:55:42 gano-vm mosquitto[24433]: Client hadash already connected, closing old connection. May 11 17:55:42 gano-vm mosquitto[24433]: Client hadash disconnected. May 11 17:55:42 gano-vm mosquitto[24433]: New client connected from 192.168.10.49 as hadash (c0, k60, u'hadash'). May 11 17:55:42 gano-vm mosquitto[24433]: New connection from 192.168.10.8 on port 1883. May 11 17:55:42 gano-vm hass[9023]: INFO:homeassistant.components.mqtt:Successfully reconnected to the MQTT server May 11 17:55:43 gano-vm mosquitto[24433]: Socket error on client <unknown>, disconnecting. May 11 17:55:43 gano-vm mosquitto[24433]: New connection from 192.168.10.8 on port 1883. May 11 17:55:43 gano-vm mosquitto[24433]: Client hadash already connected, closing old connection. May 11 17:55:43 gano-vm mosquitto[24433]: Client hadash disconnected. May 11 17:55:43 gano-vm mosquitto[24433]: New client connected from 192.168.10.8 as hadash (c1, k60, u'hadash').

nobody has problem with MQTT (mosquitto) following the last update of HA ? even with a downgrade HA in 0.41.0 the detection works 3 minutes and stops to see me at home (away)… But messages are still posted in mosquitto … it seems that ha stops to get them …

I think that it’s corrected !
I use Wallpanel project with data send on MQTT broker.

I stopped the option on Wallpanel and now the presence detection re - works :wink:

I have the same problem. In the Presence server the status for my iBeacons is ok. When I restart HA the status in HA is ok. When I move an iBeacon away the status is updated in the Presence server but not in Hass. I am not using Wallpanel. Anyone experiencing similar problems ?

Hi @piotr

For me the problem was that i had the same clientid used from the android app (on my tablet) and Happy Bubbles since i shutdown the data sent by the tablet, i have no more problems.

Perhaps you have another messages posted with the same clientid that your HappyBubbles ?

I believe that you can filter messages by clientid on your broker with mosquitto_sub command … to debug that …