[BETA] MQTT app Home Assistant Discovery and statestream support

For now, just the current temperature is all I need

OK I'll walk you through how to display it as a virtual temperature sensor.... give me a few mins

1 Like

Click ...

image

Select the virtual device type you want and name it, click outside of the name field and create the device.

image

Click through done - go back into the virtual device config and enable the new device and also select the device for editing.. and 'Update' getting to this screen

In the temperature attribute status topic at the bottom .. type in the full topic name that contains the payload value you're wanting. You could instead also click on the topic in MQTT Explorer and copy paste it if you wish. Make sure there is no leading space (there usually will be so remove it) and save it (done). You might have to do this twice - it's a bit quirky the editor.

_nk/aq/bk_v3_011/climate/heater_controller/current_temperature

If you wish to double check the topic name has been updated correctly it should now be showing in the 'Devices' page in HE in a temperature_Topic data field.

The published value by HA should now appear and update here
image

This is the longer 'arbitrary MQTT' device addition. In the next beta the sensors will be automatically created. If you have a lot of such devices to create let me know and I can add you as a pre-tester but it will be out very shortly anyway. All other discovered and listed devices (except climate) work already.

Basically your choosing any MQTT payload and an attribute within an HE virtual device and then telling HE where on MQTT (the topic) that attribute will be updated from. You can do this for every attribute the virtual device has.

1 Like

@kevin Thanks for this, helpful walk through. I went and added one of the devices using the method you described above. This did populate the temperature in the virtual device. However, any future changes aren't reflected. If I delete the device and repeat the above I get the updated temperature. In MQTT explorer I Can see the history of varying temperatures.

Is it necessary to have the device selected in the MQTT Discovery Protocols > HE section as well?

[UPDATE] I gave the hub a reboot and see these errors and warning from the MQTT App on hub startup:

    app:32022020-09-09 12:41:38.172 pm warnWaiting ... [90 seconds]
app:32022020-09-09 12:41:38.164 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:41:28.152 pm warnWaiting ... [80 seconds]
app:32022020-09-09 12:41:28.151 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:41:18.139 pm warnWaiting ... [70 seconds]
app:32022020-09-09 12:41:18.138 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:41:08.123 pm warnWaiting ... [60 seconds]
app:32022020-09-09 12:41:08.122 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:58.079 pm warnWaiting ... [50 seconds]
app:32022020-09-09 12:40:58.078 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:48.067 pm warnWaiting ... [40 seconds]
app:32022020-09-09 12:40:48.065 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:38.053 pm warnWaiting ... [30 seconds]
app:32022020-09-09 12:40:38.050 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:28.037 pm warnWaiting ... [20 seconds]
app:32022020-09-09 12:40:28.036 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:18.013 pm warnWaiting ... [10 seconds]
app:32022020-09-09 12:40:18.011 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:07.999 pm warnWaiting ... [0 seconds]
app:32022020-09-09 12:40:07.997 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:40:07.962 pm warnMQTT: Will now wait up to 2 minutes for abort 
app:32022020-09-09 12:40:07.719 pm warnMQTT: Restarting MQTT app and reconnecting to MQTT in 0 seconds
app:32022020-09-09 12:40:07.673 pm errorMQTT: MQTT reports status of Error
app:32022020-09-09 12:40:03.497 pm infoMQTT: Initialize exit
app:32022020-09-09 12:40:03.371 pm infoMQTT: Adding HA switches, lights and sensors friendly names topics 
app:32022020-09-09 12:40:03.229 pm infoMQTT: Subscribing to 2 individual device topics
app:32022020-09-09 12:40:03.029 pm infoMQTT: HA stateStream enabled
app:32022020-09-09 12:40:03.028 pm info<font color='blue'>MQTT: Starting HA Discovery</font>
app:32022020-09-09 12:40:02.999 pm infoMQTT: Skipping homie MQTT discovery
app:32022020-09-09 12:40:02.970 pm info<font color='blue'>MQTT: HE device publishing to MQTT has completed in 0 secs </font>
app:32022020-09-09 12:40:02.601 pm infoMQTT: Resynch MQTT device states and HA discovery topics
app:32022020-09-09 12:40:02.553 pm errorjava.lang.NullPointerException: Cannot get property 'value' on null object on line 5918 (HASensorEventP)
app:32022020-09-09 12:40:02.504 pm infoMQTT: Passing on sensor Event values:  emoncms_use 1823.0 sensor true
app:32022020-09-09 12:40:02.471 pm info<font color='blue'>MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes</font>
app:32022020-09-09 12:40:02.372 pm infoMQTT: Initialize exit
app:32022020-09-09 12:40:02.139 pm infoMQTT: Adding HA switches, lights and sensors friendly names topics 
app:32022020-09-09 12:40:01.956 pm infoMQTT: Subscribing to 2 individual device topics
app:32022020-09-09 12:40:01.435 pm infoMQTT: HA stateStream enabled
app:32022020-09-09 12:40:01.433 pm info<font color='blue'>MQTT: Starting HA Discovery</font>
app:32022020-09-09 12:40:01.331 pm infoMQTT: Skipping homie MQTT discovery
app:32022020-09-09 12:40:01.278 pm info<font color='blue'>MQTT: HE device publishing to MQTT has completed in 1 secs </font>
app:32022020-09-09 12:40:00.258 pm infoMQTT: Resynch MQTT device states and HA discovery topics
app:32022020-09-09 12:39:59.971 pm info<font color='blue'>MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes</font>
app:32022020-09-09 12:39:46.800 pm warnMQTT:  Abort is false 
app:32022020-09-09 12:39:46.724 pm warnMQTT: restart requested but there's maybe another instance still initializing
app:32022020-09-09 12:39:46.590 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:39:46.524 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:39:44.297 pm warnMQTT:  Abort is false 
app:32022020-09-09 12:39:44.189 pm infoMQTT: Waiting for MQTT connection: true
app:32022020-09-09 12:39:44.162 pm warnMQTT: restart requested but there's maybe another instance still initializing
app:32022020-09-09 12:39:43.947 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:39:43.871 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:39:42.488 pm infoMQTT: initialising with App count 0
app:32022020-09-09 12:39:41.906 pm infoMQTT: Hubitat hub name is : Hubitat
app:32022020-09-09 12:39:41.821 pm infoMQTT: MQTT Client driver present
app:32022020-09-09 12:39:41.670 pm infoMQTT: ===================== ReStart =====================
app:32022020-09-09 12:39:40.008 pm infoMQTT: Waiting for MQTT connection: false
app:32022020-09-09 12:39:38.631 pm infoMQTT: initialising with App count 0
app:32022020-09-09 12:39:38.288 pm infoMQTT: Hubitat hub name is : Hubitat
app:32022020-09-09 12:39:38.201 pm infoMQTT: MQTT Client driver present
app:32022020-09-09 12:39:37.862 pm infoMQTT: ===================== Reboot =====================
app:32022020-09-09 12:39:37.854 pm infoLocation Alert: systemStart 2.2.3.145
app:32022020-09-09 12:36:53.938 pm warnWaiting ... [50 seconds]
app:32022020-09-09 12:36:53.937 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:36:43.929 pm warnWaiting ... [40 seconds]
app:32022020-09-09 12:36:43.929 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:36:33.921 pm warnWaiting ... [30 seconds]
app:32022020-09-09 12:36:33.920 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:36:23.913 pm warnWaiting ... [20 seconds]
app:32022020-09-09 12:36:23.912 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:36:13.906 pm warnWaiting ... [10 seconds]
app:32022020-09-09 12:36:13.904 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:36:03.898 pm warnWaiting ... [0 seconds]
app:32022020-09-09 12:36:03.897 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:36:03.890 pm warnMQTT: Will now wait up to 2 minutes for abort 
app:32022020-09-09 12:36:03.828 pm warnMQTT: Restarting MQTT app and reconnecting to MQTT in 0 seconds
app:32022020-09-09 12:36:03.805 pm errorMQTT: MQTT reports status of Error
app:32022020-09-09 12:35:58.793 pm errorjava.lang.NullPointerException: Cannot get property 'value' on null object on line 5918 (HASensorEventP)
app:32022020-09-09 12:35:58.790 pm infoMQTT: Passing on sensor Event values:  emoncms_use 402.0 sensor true
app:32022020-09-09 12:35:58.702 pm infoMQTT: Initialize exit
app:32022020-09-09 12:35:58.537 pm infoMQTT: Subscribing to 2 individual device topics
app:32022020-09-09 12:35:58.533 pm infoMQTT: Adding HA switches, lights and sensors friendly names topics 
app:32022020-09-09 12:35:58.389 pm infoMQTT: HA stateStream enabled
app:32022020-09-09 12:35:58.388 pm info<font color='blue'>MQTT: Starting HA Discovery</font>
app:32022020-09-09 12:35:58.378 pm infoMQTT: Skipping homie MQTT discovery
app:32022020-09-09 12:35:58.372 pm info<font color='blue'>MQTT: HE device publishing to MQTT has completed in 0 secs </font>
app:32022020-09-09 12:35:58.244 pm infoMQTT: Resynch MQTT device states and HA discovery topics
app:32022020-09-09 12:35:58.219 pm info<font color='blue'>MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes</font>
app:32022020-09-09 12:35:47.507 pm warnMQTT:  Abort is false 
app:32022020-09-09 12:35:47.500 pm warnMQTT: restart requested but there's maybe another instance still initializing
app:32022020-09-09 12:35:47.468 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:35:47.452 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:35:45.758 pm infoMQTT: Waiting for MQTT connection: false
app:32022020-09-09 12:35:45.587 pm infoMQTT: initialising with App count 0
app:32022020-09-09 12:35:45.546 pm infoMQTT: Hubitat hub name is : Hubitat
app:32022020-09-09 12:35:45.536 pm infoMQTT: MQTT Client driver present
app:32022020-09-09 12:35:45.506 pm infoMQTT: ===================== ReStart =====================
app:32022020-09-09 12:35:44.443 pm infoMQTT: Previous run was aborted succesfully
app:32022020-09-09 12:35:44.291 pm warnMQTT: Abort Initialize 1
app:32022020-09-09 12:35:34.435 pm warnWaiting ... [10 seconds]
app:32022020-09-09 12:35:34.433 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:35:34.203 pm warnMQTT:  Abort is true 
app:32022020-09-09 12:35:34.196 pm warnMQTT: restart requested but there's maybe another instance still initializing
app:32022020-09-09 12:35:34.174 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:35:34.154 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:35:32.576 pm warnMQTT: Waiting another try [1] until MQTT connected: false
app:32022020-09-09 12:35:24.427 pm warnWaiting ... [0 seconds]
app:32022020-09-09 12:35:24.426 pm warnMQTT: App restart requested after MQTT disconnect but there's maybe another instance still initializing
app:32022020-09-09 12:35:24.420 pm warnMQTT: Will now wait up to 2 minutes for abort 
app:32022020-09-09 12:35:24.360 pm warnMQTT: Restarting MQTT app and reconnecting to MQTT in 0 seconds
app:32022020-09-09 12:35:24.348 pm errorMQTT: MQTT reports status of Error
app:32022020-09-09 12:35:22.562 pm warnMQTT:  Abort is false 
app:32022020-09-09 12:35:22.553 pm warnMQTT: restart requested but there's maybe another instance still initializing
app:32022020-09-09 12:35:22.522 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:35:22.504 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:35:20.846 pm infoMQTT: Waiting for MQTT connection: false
app:32022020-09-09 12:35:20.658 pm infoMQTT: initialising with App count 0
app:32022020-09-09 12:35:20.616 pm infoMQTT: Hubitat hub name is : Hubitat
app:32022020-09-09 12:35:20.607 pm infoMQTT: MQTT Client driver present
app:32022020-09-09 12:35:20.582 pm infoMQTT: MQTT Updated
app:32022020-09-09 12:35:19.414 pm errorjava.lang.NullPointerException: Cannot get property 'value' on null object on line 5918 (HASensorEventP)
app:32022020-09-09 12:35:19.396 pm infoMQTT: Passing on sensor Event values:  emoncms_use 393.0 sensor true
app:32022020-09-09 12:35:19.308 pm infoMQTT: Initialize exit
app:32022020-09-09 12:35:18.988 pm infoMQTT: Adding HA switches, lights and sensors friendly names topics 
app:32022020-09-09 12:35:18.913 pm infoMQTT: Subscribing to 2 individual device topics
app:32022020-09-09 12:35:18.754 pm infoMQTT: HA stateStream enabled
app:32022020-09-09 12:35:18.753 pm info<font color='blue'>MQTT: Starting HA Discovery</font>
app:32022020-09-09 12:35:18.742 pm infoMQTT: Skipping homie MQTT discovery
app:32022020-09-09 12:35:18.736 pm info<font color='blue'>MQTT: HE device publishing to MQTT has completed in 0 secs </font>
app:32022020-09-09 12:35:18.594 pm infoMQTT: Resynch MQTT device states and HA discovery topics
app:32022020-09-09 12:35:18.567 pm info<font color='blue'>MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes</font>
app:32022020-09-09 12:35:07.607 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:35:07.516 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:35:05.774 pm infoMQTT: Waiting for MQTT connection: false
app:32022020-09-09 12:35:05.536 pm infoMQTT: initialising with App count 0
app:32022020-09-09 12:35:05.470 pm infoMQTT: Hubitat hub name is : Hubitat
app:32022020-09-09 12:35:05.461 pm infoMQTT: MQTT Client driver present
app:32022020-09-09 12:35:05.390 pm infoMQTT: ===================== ReStart =====================
app:32022020-09-09 12:35:04.265 pm infoMQTT: Previous run was aborted succesfully
app:32022020-09-09 12:35:04.221 pm warnMQTT: Restarting MQTT app and reconnecting to MQTT in 0 seconds
app:32022020-09-09 12:35:04.209 pm errorMQTT: MQTT reports status of Error
app:32022020-09-09 12:34:59.362 pm info<font color='green'>MQTT: ================== Startup complete ==================</font>
app:32022020-09-09 12:34:59.228 pm infoMQTT: Unsubscribing HA events
app:32022020-09-09 12:34:59.227 pm info<font color='green'>MQTT:     [1]  Total Hubitat endpoints enabled on MQTT</font>
app:32022020-09-09 12:34:59.226 pm info<font color='green'>MQTT:     [0]  Total Hubitat devices are enabled on MQTT</font>
app:32022020-09-09 12:34:59.194 pm errorjava.lang.NullPointerException: Cannot get property 'value' on null object on line 5918 (HASensorEventP)
app:32022020-09-09 12:34:59.189 pm infoMQTT: Passing on sensor Event values:  emoncms_use 383.0 sensor true
app:32022020-09-09 12:34:59.075 pm info<font color='green'>MQTT: ==================================================</font>
app:32022020-09-09 12:34:59.074 pm infoMQTT: Initialize exit
app:32022020-09-09 12:34:58.998 pm infoMQTT: Subscribing to 2 individual device topics
app:32022020-09-09 12:34:58.963 pm infoMQTT: Skipping homie MQTT discovery
app:32022020-09-09 12:34:58.956 pm info<font color='blue'>MQTT: HE device publishing to MQTT has completed in 0 secs </font>
app:32022020-09-09 12:34:58.822 pm infoMQTT: Resynch MQTT device states and HA discovery topics
app:32022020-09-09 12:34:58.796 pm info<font color='blue'>MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes</font>
app:32022020-09-09 12:34:47.870 pm infoMQTT: MQTT has reconnected, restarting APP
app:32022020-09-09 12:34:47.846 pm infoMQTT: MQTT reports status of Connect
app:32022020-09-09 12:34:46.314 pm infoMQTT: Waiting for MQTT connection: false
app:32022020-09-09 12:34:46.197 pm infoMQTT: initialising with App count 0
app:32022020-09-09 12:34:46.154 pm infoMQTT: Hubitat hub name is : Hubitat
app:32022020-09-09 12:34:46.145 pm infoMQTT: MQTT Client driver present

Something is wrong with the connection to the MQTT broker ... it's failing . (Hence the app is repeatedly trying to reconnect) .

Have you setup a username and password correctly - does MQTT Explorer connect and stay connected OK ?

Passing on sensor Event values: emoncms_use 393.0 sensor true
I will take a look at what's causing re error on 5918

Hi Kevin, It will pull in the first value and then start erroring. Just as you sent this I had decided to just delete the MQTT app and re-set everything up from scratch and it's worked first time and seems to be updating correctly. I'll keep playing with it and set up a few more devices to see if I can re-create.

Thanks again. This is a game changer for me as it opens the door to oddball integrations with hardware unlikely to be supported by Hubitat via HomeAssistant. So thank you for all your work on this!

That's the main purpose of this app - to enable HE to import and support many many more devices. It does do the reverse too (exporting from HE) but that's a secondary benefit.

Keep me updated on the previous issue.

Sorry I’m not being very specific need to try and see if I can replicate consistently, but adding more devices I often find that the mqtt “path” I provide doesn’t initially appear within the virtual device and I have to try and re enter a couple of times.. I find that when this occurs I end up getting connection errors and needing to restart the hub to clear the problem. I’ll try and replicate with exact steps and report back.. but something is a bit glitchy

Once set up though it works perfectly thereafter ..

see above...

There are two significant known issues in beta 3d , you have encountered them both. This latter one hasn't been fixed yet - but can be worked around

1 Like

Hi Kevin,

Not sure if its a new issue, but I noticed after adding some new temperature sensors, the current values are shown in the log, but the virtual device isn’t updated being updated and neither are the temperature sensors that were working.. I see th following in the logs:

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:41.264 pm [info](http://hubitat.local/installedapp/configure/3271)<font color='green'>MQTT: ================== Startup complete ==================</font>

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:41.170 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: HA unsupported device bathroom

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:41.016 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: HA unsupported device ensuite

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.871 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: HA unsupported device living_room

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.871 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: Unsubscribing HA events

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.870 pm [info](http://hubitat.local/installedapp/configure/3271)<font color='green'>MQTT: [1] Total Hubitat endpoints enabled on MQTT</font>

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.869 pm [info](http://hubitat.local/installedapp/configure/3271)<font color='green'>MQTT: [0] Total Hubitat devices are enabled on MQTT</font>

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.773 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: HA unsupported device bedroom

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.690 pm [info](http://hubitat.local/installedapp/configure/3271)<font color='green'>MQTT: ==================================================</font>

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.686 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: Initialize exit

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.680 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: HA unsupported device toilet

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.424 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: Subscribing to 5 individual device topics

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.384 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: Skipping homie MQTT discovery

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.377 pm [info](http://hubitat.local/installedapp/configure/3271)<font color='blue'>MQTT: HE device publishing to MQTT has completed in 0 secs </font>

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.267 pm [info](http://hubitat.local/installedapp/configure/3271)MQTT: Resynch MQTT device states and HA discovery topics

[app:3271](http://hubitat.local/logs/past#app3271)2020-09-12 04:05:40.184 pm [info](http://hubitat.local/installedapp/configure/3271)<font color='blue'>MQTT: Starting HE device publishing to MQTT for 0 HE devices with 0 attributes</font>

I am not sure why that would happen. The logs don't help unfortunately. Especially losing existing devices that worked.

Can you check the data values within the devices are still correct (state topic) and do me a screenshot of just one that worked previously and doesn't work now.

The values are still updating on MQTT are they ? You can delete them (trash can) and then easily check. as HA will re-create them on update (as they are likely retained).

MQTT has connected OK I assume.

Seeing an Unhandled HA Climate QTT parse for every device in the logs, which may hold a clue.

There is an error but on that same line you can also see the actual current temperature correctly shown

Unhandled HA (b) climate MQTT parse HAStateStream50 climate bathroom current_temperature - 21.7 <<< CORRECT TEMP

In the device:

dev:30842020-09-12 04:05:41.242 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/cover/+/current_position

dev:30842020-09-12 04:05:41.212 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/cover/+/state

dev:30842020-09-12 04:05:41.182 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/person/+/state

dev:30842020-09-12 04:05:41.141 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/input_boolean/+/state

dev:30842020-09-12 04:05:41.083 pm warnMQTT> Unhandled HA (b) climate MQTT parse HAStateStream50 climate bathroom current_temperature - 21.7

dev:30842020-09-12 04:05:41.079 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/group/+/state

dev:30842020-09-12 04:05:41.055 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/binary_sensor/+/state

dev:30842020-09-12 04:05:41.009 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/sensor/+/state

dev:30842020-09-12 04:05:40.989 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/light/+/brightness

dev:30842020-09-12 04:05:40.952 pm infoMQTT> MQTT unsubscribing from: HAStateStream50/light/+/state

dev:30842020-09-12 04:05:40.928 pm warnMQTT> Unhandled HA (b) climate MQTT parse HAStateStream50 climate ensuite current_temperature - 20.8

You are not using HAStatestream discovery - as the climate devices were showing as unhandled in that version.

What you are using is the manual (adhoc) import of payload values from MQTT using virtual devices. The payload values are being retrieved from the HA published statestream structure though.

That device screenshot is from a virtual temperature device created in my app ? That part is just not visible on those screenshots.

Thanks for the reply - yes it was created via the app as a virtual temperature device.

Your state temperature_Topic for this device is now

HAStateStream50/climate/bathroom/current_temperature

this is very different to your previous entries and my screenshots - why did you change those ? Are you sure you have not overwritten the devices by trying to include them from HA directly ??

_nk/aq/bk_v3_011/climate/heater_controller/current_temperature

was one of your older working ones...
Your sure it shouldn't be something like ..

_nk/aq/bk_v3_011/climate/bathroom/current_temperature

Also - are you you sure you haven't re-published this device from HE back out to MQTT ? I am surprised to see it in the HAStateStream50/... topic

Looking back at the thread, it looks like I connected to one of the default brokers when I sent you my original screenshot, but HomeAssistant is publishing on HAStateStream50,

I'm going to remove the MQTT app and start over, there is something not quite right when adding multiple devices, I had set up a few saw it was all working and then stopped checking between each device, so I'm not sure at what point things went awry

This was fixed via PM.

Don’t configure the HA statestream topic to be the same as the discovery topic into HA.
This isn’t mentioned in the read me - good find Daniel.. thanks

1 Like

I am having trouble getting HA devices discovered in HE, as in 0 devices have been discovered so far. I only just got the child app getting the broker info just now, if that matters.

I'm trying to figure out if this applies to anything I've done, but I'm getting confused as to all the places topics are introduced, and from where to where.

I had to edit the configuration.yaml file in HA to add the statestream configuration and get it to start outputting anything at all over MQTT. At first I gave the topic name of "homeassistant", but after reading this, I went back and made it "ha-statestream", although I am not sure whether or not it mattered. It did update to filling in that topic as I could see in MQTT Explorer.

In the MQTT config in HE, under the "Discovery into HE" section, I turned on the Home Assistant Statestream setting and entered "ha-statestream" as the topic.

I assume "discover topic into HA" would be the topic one puts in the MQTT integration under HA, which I haven't done much with. I tried filling it in with a topic that matched the HE data I seem to be seeing under the homie topic, but it definitely isn't set to "ha-statestream".

In the "Discovery into HE" section, The Home Asssistant header is now colored green and it says "checking" next to it. I have no idea if that's supposed to update at some point? Or is it an ongoing thing that it's always checking? However, I have yet to have any devices show up in the discovery section in HE.

What should I check next?

If HA is publishing information to MQTT using 'statestream' then that's a good first step
HAStateStream50 in this screenshot and ha-statestream in yours.

image

If HE is discovering these items from HA then that's a good second step

image

Note the 1382 discovered entities. This discovery into HE takes a little while.. depending on how many devices you have - 1000+ takes about 3 minutes. You will need to re-run the app to see them.

  • changing this topic after discovery might cause retention of older, now non existent information so you might have to forget previous ones.

image

'checking' means it still checking - did it complete ?

Discovery into HA from HE is a totally separate area.

the one in discovery_prefix .. yes i.e homeassistant in above screenshot

image