Page 1 of 1
Dzvent send Json
Posted: Thursday 07 October 2021 22:15
by jacobsentertainment
Sorry to ask again

I have tried to find it in the manual and my friendly search engine no luck. Only interesting page I found was
Domoticz wiki
I'm looking for some way to have the value from a heating setpoint (domoticz device) to be send by mqtt to my zigbee bridge witch sends a jon commend to the thermostat. the working Json is
Code: Select all
ZbSend {"Device":"0x8A30", "Write":{"OccupiedHeatingSetpoint": 22}}
Where I want to adjust
22 with the value from the setpoint. Is this possible and how ?
Re: Dzvent send Json
Posted: Friday 08 October 2021 0:16
by waltervl
You can have DzVents send a mqtt message with mosquitto_pub
Example
viewtopic.php?t=32772
Re: Dzvent send Json
Posted: Friday 08 October 2021 11:03
by waltervl
And check also this Tasmota issue for further instructions:
https://github.com/arendst/Tasmota/issues/8226
Or use Node-Red to convert the Domoticz Setpoint MQTT message in Domoticz/out to the correct Zigbee Tasmota message.
Re: Dzvent send Json
Posted: Friday 08 October 2021 12:39
by jacobsentertainment
Nice info, I'll have a closer look tonight. But I just starting to get some things working in dzvent, I don't got anything working in nodered. New territory to discover.
Verstuurd vanaf mijn XQ-BT52 met Tapatalk
Re: Dzvent send Json
Posted: Friday 08 October 2021 20:04
by jacobsentertainment
This is helpful

I tried it and get to send the message, except I get "dzVents: Debug: Error ==>> sh: 1: mosquitto_pub: not found"
Also one part in the message that needs to be send, needs to be the value of a domoticz device. How can that be done? Ill continue on that topic think that's best to do

Thanks Waltervl
Re: Dzvent send Json
Posted: Friday 08 October 2021 20:07
by waltervl
Mosquitto_pub is an extra program you need to install first.
Re: Dzvent send Json
Posted: Friday 08 October 2021 20:13
by jacobsentertainment
waltervl wrote: Friday 08 October 2021 20:07
Mosquitto_pub is an extra program you need to install first.
I do have mqtt running on my pi, that's not enough

Re: Dzvent send Json
Posted: Friday 08 October 2021 20:21
by waltervl
jacobsentertainment wrote: Friday 08 October 2021 20:04
Also one part in the message that needs to be send, needs to be the value of a domoticz device. How can that be done? Ill continue on that topic think that's best to do

Thanks Waltervl
To get the setpoint use .setPoint eg
local mysetpoint = domoticz.devices(IDX).setPoint
https://www.domoticz.com/wiki/DzVents:_ ... _set_point
Re: Dzvent send Json
Posted: Saturday 09 October 2021 12:45
by jacobsentertainment
I did had some issues to get it working, most of the time the return was a nill value, after some playing around I have found a solution by sending a http message witch I adjusted. Now I finally can control my eurotronic device like mentioned. Thanks
Code that did the trick for me,
Code: Select all
return {
on = {
devices = { 197, --Setpoint gang
},
},
logging = {
level = domoticz.LOG_INFO,
marker = 'Heater',
},
execute = function(domoticz)
local mySetpoint = domoticz.devices(197).setPoint
local http_send = 'http://192.168.178.162/cs?c2=111&c1=ZbSend%20{"Device":"0x8A30",%20"Write":{"OccupiedHeatingSetpoint":%20'..mySetpoint..'}}'
domoticz.log('Temperatuur ingesteld op '..mySetpoint..'')
domoticz.openURL({
url = http_send
})
end
}