Domoticz, Sonoff, DHT22, MQTT

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jossie67
Posts: 39
Joined: Wednesday 31 December 2014 12:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Domoticz, Sonoff, DHT22, MQTT

Post by jossie67 »

Hi,

I have severeal Sonoff in my Domoticz system, they al work fine.
Some have even a DHT22 connected, I have no problem sending the Temp and Hygro to Domoticz
But now I want to send them first to MTTQ and then to Domoticz.
This what mttq is recieving

{"idx":533,"nvalue":0,"svalue":"3.20;99.90;0"}

That wrong it should be {"idx":533,"nvalue":3.20,"svalue":"99.90"}

These are my setting in EasyESP

Optional Setting Value
Formula Temperature: %nvalue% Decimals: 2
Formula Humidity: %svalue% Decimals: 2
Value Name 1: Temperature
Value Name 2: Humidity

How do I fix this
Raspberry Pi (3x)
Master Domoticz installed on a Synology
RFXCOM RFXtrx433E USB
RFLink
USB Z-Wave Mini Adapter
Mi-light
QuinLED
Landis+Gyr ZME120ACd
Kamstrup_M401
USB-IR-Schreib-Lesekopf Alecto WS1700
Watermeter with TCRT5000
Kodi
DS18B20
SweetPants

Re: Domoticz, Sonoff, DHT22, MQTT

Post by SweetPants »

jossie67 wrote:That wrong it should be {"idx":533,"nvalue":3.20,"svalue":"99.90"
Are you sure? According to the Wiki it should be:
https://www.domoticz.com/wiki/Domoticz_ ... 2Fhumidity
for a Temp+Humidity Sensor when sending JSON, don't think there is too much difference when sending MQTT.
Knew I read it somewhere on the forum: viewtopic.php?t=13695#p100374
jossie67
Posts: 39
Joined: Wednesday 31 December 2014 12:47
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz, Sonoff, DHT22, MQTT

Post by jossie67 »

There is a difference in JSON and MQTT.
The information from MQTT to Domoticz is okay.
What goes wrong is the settings in Sonoff EasyESP , but maybe I should post my question on a EasyESP forum.
Raspberry Pi (3x)
Master Domoticz installed on a Synology
RFXCOM RFXtrx433E USB
RFLink
USB Z-Wave Mini Adapter
Mi-light
QuinLED
Landis+Gyr ZME120ACd
Kamstrup_M401
USB-IR-Schreib-Lesekopf Alecto WS1700
Watermeter with TCRT5000
Kodi
DS18B20
SweetPants

Re: Domoticz, Sonoff, DHT22, MQTT

Post by SweetPants »

jossie67 wrote:but maybe I should post my question on a EasyESP forum.
Maybe You do
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest