Page 1 of 1

MQTT format for Temp & humidity

Posted: Wednesday 12 October 2016 23:06
by Andrex
Hi guys,
I've created a "Temp + Humidity" device from a dummy hardware.
I want to sent to it the value from Node-Red from another machine. I've tried sending this data in multiple ways with MQTT to domoticz/in, but without any luck.
How do I need to format the MQTT to send the temp and humidity?
Thanks!!!
Andrea

Re: MQTT format for Temp & humidity

Posted: Thursday 13 October 2016 15:20
by Andrex
Using this format
{
"Battery" : 100,
"RSSI" : 12,
"dtype" : "Temp + Humidity",
"id" : "13825",
"idx" : 93,
"name" : "Badkamer",
"nvalue" : 0,
"stype" : "WTGR800",
"svalue1" : "22.5",
"svalue2" : "58",
"svalue3" : "1",
"unit" : 0
}
from this post http://www.domoticz.com/forum/viewtopic ... ure#p93407, I see the temperature updating with the nvalue, not svalue1 and just the temperature not the humidity :(

If I listen to all the MQ

Code: Select all

domoticz/in {"idx" : 23,"nvalue" : 11,"svalue1" : 21.2,"svalue2" : 52.5}
domoticz/out {
   "Battery" : 255,
   "RSSI" : 12,
   "dtype" : "Temp + Humidity",
   "id" : "82022",
   "idx" : 23,
   "name" : "Temp+Hum",
   "nvalue" : 11,
   "stype" : "THGN122/123, THGN132, THGR122/228/238/268",
   "unit" : 1
}
Domoticz doesn't read the svalues

Re: MQTT format for Temp & humidity

Posted: Sunday 16 October 2016 14:55
by Andrex
No one knows??? Come on, I don't believe it!

Re: MQTT format for Temp & humidity

Posted: Monday 24 October 2016 8:56
by Toyman
{ "idx" : 74,
"nvalue" : 0,
"svalue" : "21;35;1"}

Re: MQTT format for Temp & humidity

Posted: Saturday 29 October 2016 12:53
by Andrex
YES YES YES!
Thanks Toyman!!!
Though it was really elementary... :oops:

Re: MQTT format for Temp & humidity

Posted: Sunday 30 October 2016 16:14
by Toyman
You are welcome. Actually, it's all in Domoticz wiki

Re: MQTT format for Temp & humidity

Posted: Sunday 19 August 2018 20:30
by ben53252642
Solution for sending Temp + Hum + Baro to a single sensor in Domoticz via MQTT

viewtopic.php?f=68&t=23607&start=40#p189095

Re: MQTT format for Temp & humidity

Posted: Wednesday 19 September 2018 0:12
by ben53252642
To send only Humidity to a Humidity Sensor in Domoticz via MQTT, I spent over an hour trying to get this to work (solution):

It's sensitive to quotes "", this is what I use in a Node-Red function:

msg.payload.idx = 1211;
msg.payload.nvalue = humidity;
msg.payload.svalue = "0";

The nvalue cannot be sent as a string.