that's it! :D
hum = (jsonParse[14]['values']['humidity'])
temp = (jsonParse[14]['values']['temperature'])
temphum = temp..';'..hum..';0'
domoticz_updateDevice(10, 0, temphum)
thanks for your script. now my cheap temperature/humidity 433Mhz-Sensors works via pilight with domoticz!
thank you ...
Search found 2 matches
- Monday 07 December 2020 16:48
- Forum: LUA
- Topic: Decode JSON from pilight
- Replies: 2
- Views: 514
- Sunday 06 December 2020 16:36
- Forum: LUA
- Topic: Decode JSON from pilight
- Replies: 2
- Views: 514
Decode JSON from pilight
Hi,
i want decode this json-file from pilight with domoticz_applyJsonPath:
[
{
"type": 3,
"devices": [
"Aussen"
],
"values": {
"timestamp": 1607253494,
"battery": 1,
"humidity": 91,
"temperature": 5.77
}
},
{
"type": 3,
"devices": [
"Schlafzimmer"
],
"values": {
"timestamp": 0 ...
i want decode this json-file from pilight with domoticz_applyJsonPath:
[
{
"type": 3,
"devices": [
"Aussen"
],
"values": {
"timestamp": 1607253494,
"battery": 1,
"humidity": 91,
"temperature": 5.77
}
},
{
"type": 3,
"devices": [
"Schlafzimmer"
],
"values": {
"timestamp": 0 ...