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
MQTT format for Temp & humidity
Moderator: leecollings
Re: MQTT format for Temp & humidity
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
Domoticz doesn't read the svalues
{
"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
}
Re: MQTT format for Temp & humidity
No one knows??? Come on, I don't believe it!
-
- Posts: 23
- Joined: Wednesday 31 August 2016 16:17
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: MQTT format for Temp & humidity
{ "idx" : 74,
"nvalue" : 0,
"svalue" : "21;35;1"}
"nvalue" : 0,
"svalue" : "21;35;1"}
Re: MQTT format for Temp & humidity
YES YES YES!
Thanks Toyman!!!
Though it was really elementary...
Thanks Toyman!!!
Though it was really elementary...
-
- Posts: 23
- Joined: Wednesday 31 August 2016 16:17
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: MQTT format for Temp & humidity
You are welcome. Actually, it's all in Domoticz wiki
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: MQTT format for Temp & humidity
Solution for sending Temp + Hum + Baro to a single sensor in Domoticz via MQTT
viewtopic.php?f=68&t=23607&start=40#p189095
viewtopic.php?f=68&t=23607&start=40#p189095
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
-
- Posts: 543
- Joined: Saturday 02 July 2016 5:17
- Target OS: Linux
- Domoticz version: Beta
- Contact:
Re: MQTT format for Temp & humidity
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.
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.
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
Who is online
Users browsing this forum: No registered users and 1 guest