Sensor values are not in MQTT message

160 views
Skip to first unread message

Wouter

unread,
Sep 7, 2018, 5:01:58 PM9/7/18
to SonoffUsers
I configured my mh-z14 and dht-11 to work with my Tasmota, by going to config, config module, and then setting the pins to the correct sensor. The readings show up when I got to the IP of the Tasmota:

DHT11 Temperature24.9°C
DHT11 Humidity44.0%
MHZ19B Carbon dioxide742 ppm
MHZ19B Temperature16.0°C

I set up Mosquitto on my Win10 NAS, and put the (static) IP address of this PC in the MQTT settings of the tasmota. I seem to be receiving messages, looking at the Domoticz log:
2018-09-07 22:53:21.403 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"","Battery":6,"RSSI":3}

The 'console' on the Tasmota web interface looks like this:

21:58:08 MQT: co2sensor/STATUS = {"Status":{"Module":1,"FriendlyName":["Co2"],"Topic":"co2sensor","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":0}}
21:58:14 MQT: co2sensor/STATUS = {"Status":{"Module":1,"FriendlyName":["Co2"],"Topic":"co2sensor","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":0}}
21:58:20 MQT: co2sensor/STATUS = {"Status":{"Module":1,"FriendlyName":["Co2"],"Topic":"co2sensor","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":0}}
21:58:26 MQT: co2sensor/STATUS = {"Status":{"Module":1,"FriendlyName":["Co2"],"Topic":"co2sensor","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"SaveData":1,"SaveState":1,"ButtonRetain":0,"PowerRetain":0}}


Both are not showing sensor data. Am I doing something wrong? How do I put sensor data in the MQTT message? Is that documented somewhere?

A small additional issue, time between the messages is like 5-10 minutes, so there's something wrong here. F5'ing the web interface works just fine so I think the WiFi connection is ok.


I'm running Sonoff-Tasmota 6.2.0.

Philip Knowles

unread,
Sep 7, 2018, 5:12:25 PM9/7/18
to Wouter, SonoffUsers

The logging frequency is set in Configure Logging and defaults to 300 (5 minutes). You will only see sensor data (both in console and MQTT) at the frequency set by the logging frequency unless you specifically request it.

I don’t know Domoticz but in openHAB you have to set up items that receive the MQTT messages to use them - Domoticz will need something similar.

 

Regards

 

Phil K

 

Sent from Mail for Windows 10

--
You received this message because you are subscribed to the Google Groups "SonoffUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Wouter

unread,
Sep 7, 2018, 5:45:07 PM9/7/18
to SonoffUsers
Thanks for the fast reply! Your explanation makes sense, but I feel like the web UI could use a few paragraphs of explanation there because this is all not very self explanatory.
So there's nothing that has to be configured on the Tasmota to transmit the right data?

Philip Knowles

unread,
Sep 7, 2018, 5:50:23 PM9/7/18
to Wouter, SonoffUsers

No configuring the module should set up the outputs automatically

 

Sent from my Windows 10 device

Reply all
Reply to author
Forward
0 new messages