Page 1 of 1

Domoticz, Sonoff, DHT22, MQTT

Posted: Sunday 12 February 2017 15:41
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

Re: Domoticz, Sonoff, DHT22, MQTT

Posted: Sunday 12 February 2017 17:59
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

Re: Domoticz, Sonoff, DHT22, MQTT

Posted: Monday 13 February 2017 13:40
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.

Re: Domoticz, Sonoff, DHT22, MQTT

Posted: Monday 13 February 2017 17:35
by SweetPants
jossie67 wrote:but maybe I should post my question on a EasyESP forum.
Maybe You do