Mqtt

Hello everyone
My question is, is it possible to integrate an MQTT sensor to HP 2023?
I know there is an option where you can run your own MQTT on HP or use a public server. Also its possible with Home Assistant, since my QuingPing ClearGrass not working with Homey Xiaomi MIHome app, I hope there is a way to connect it via MQTT.

You can use MQTT client app or the Home Assistent community app.

Thanks, now I know where to look

The MQTT Hub app has a “MQTT Device” driver that can be used to create virtual sensor devices. It has a bit of a learning curve though (and some UI issues, where the “Next” button isn’t visible).

Looks like MQTT HUB and client is only way to go, since I don;t have home assistant and don’t feel like installing/getting one, but it looks very complicated, I gonna need MQTT Hub + MQTT Client + MQTT Broker (this way I guess its all going to run via my local LAN).
Yeah, I’ve noticed that there is no Next button visible, but it does exist, thanks for your help

1 Like

Hello everyone
I have managed to install all 3 Apps - MQTT HUB, MQTT Client and MQTT Broker, I connected my QuingPing ClearGrass device to my MQTT Broker and now I’m able to use MQTT Explorer and connect to my MQTT and see all my device’s sensors data, but the problem is, I don’t know how to setup my sensors in MQTT HUB, I added new devices, chose temperature sensor for start and entered my topic address

Then I press next and can see my temp sensor, but it doesn’t show any values (

Here is RAW data off MQTT Explorer:

{“id”:217,“mac”:“XXXXXXXXXX”,“need_ack”:1,“sensorData”:[{“battery”:{“status”:1,“value”:100},“co2”:{“status”:0,“value”:1108},“humidity”:{“status”:0,“value”:40.79999923706055},“pm10”:{“status”:0,“value”:6},“pm25”:{“status”:0,“value”:9},“temperature”:{“status”:0,“value”:23.299999237060547},“timestamp”:{“value”:1694008800},“tvoc”:{“status”:2,“value”:2}},{“battery”:{“status”:1,“value”:100},“co2”:{“status”:0,“value”:1068},“humidity”:{“status”:0,“value”:40.900001525878906},“pm10”:{“status”:0,“value”:7},“pm25”:{“status”:0,“value”:10},“temperature”:{“status”:0,“value”:23.399999618530273},“timestamp”:{“value”:1694007900},“tvoc”:{“status”:2,“value”:10}},{“battery”:{“status”:1,“value”:100},“co2”:{“status”:0,“value”:1039},“humidity”:{“status”:0,“value”:40.70000076293945},“pm10”:{“status”:0,“value”:7},“pm25”:{“status”:0,“value”:10},“temperature”:{“status”:0,“value”:23.799999237060547},“timestamp”:{“value”:1694007000},“tvoc”:{“status”:2,“value”:4}},{“battery”:{“status”:1,“value”:100},“co2”:{“status”:0,“value”:987},“humidity”:{“status”:0,“value”:41.29999923706055},“pm10”:{“status”:0,“value”:7},“pm25”:{“status”:0,“value”:11},“temperature”:{“status”:0,“value”:24.200000762939453},“timestamp”:{“value”:1694006100},“tvoc”:{“status”:2,“value”:2}},{“battery”:{“status”:1,“value”:100},“co2”:{“status”:0,“value”:952},“humidity”:{“status”:0,“value”:42.5},“pm10”:{“status”:0,“value”:6},“pm25”:{“status”:0,“value”:9},“temperature”:{“status”:0,“value”:24.5},“timestamp”:{“value”:1694005200},“tvoc”:{“status”:2,“value”:1}}],“third_state”:1,“timestamp”:1694009280,“type”:“17”,“version”:“4.1.8_0267”}

I appreciate any help, thanks in advance

You may try with DC and flows reading mqtt messages…

Flows example :

Thanks, I will look into it, looks interesting and very complicated :slight_smile: though

It looks like my sensor device, added with MQTT Hub App, shows 0 values, when my sensor sends data with MQTT, it refreshes the values, but always 0 for some reason

Assuming the topic is correct (that is, it’s the one where the raw data is being published to), you need to extract the correct value to map to the measure_temperature capability.

Try using this in the “value template” field:

$.sensorData[0].temperature.value
1 Like

That worked, thank you so much! Now I can do the same for other values, like humidity PM 2.5 etc