Page 5 of 12
Re: Controlling Toon via Domoticz
Posted: Tue Nov 20, 2018 11:10 am
by rvanmoorsel
Hi madpatrick,
That last comment did it. Change lines 51 and 52 to 2. or 2: (in my case that is). I had a few other problems, but nothing where the logfile couldn't point me in the right direction. I now have both dzEvent scripts and no LUA scripts running for my Toon and I can see all the info coming in and change the temperature with my app / homekit setup.
Thanks for the great help! It sure helped me a lot.
Re: Controlling Toon via Domoticz
Posted: Thu Nov 22, 2018 4:01 pm
by WickedMaster
Is there any way to add Toon poweradapters and lights in Domoticz?
Re: Controlling Toon via Domoticz
Posted: Thu Nov 22, 2018 8:47 pm
by madpatrick
WickedMaster wrote:Is there any way to add Toon poweradapters and lights in Domoticz?
If they are z-wave compatible you can, but you to connect them to Domoticz and release from your Toon
Re: Controlling Toon via Domoticz
Posted: Fri Nov 23, 2018 11:47 am
by WickedMaster
madpatrick wrote:WickedMaster wrote:Is there any way to add Toon poweradapters and lights in Domoticz?
If they are z-wave compatible you can, but you to connect them to Domoticz and release from your Toon
I managed to set the state (on/off) on a Z-Wave smartplug using
hdrv_zwave?action=basicCommand&uuid=688b44c4-19d4-4453-8aa8-6b02ee9aa78f&state=1. This works, but when I have a look at the Toon itself, it still shows the old state. So, when I turn it off, the smartplug goes off, but Toon still shows it as active. What did I miss?
Re: Controlling Toon via Domoticz
Posted: Fri Nov 23, 2018 12:25 pm
by mAiden
WickedMaster wrote:madpatrick wrote:WickedMaster wrote:Is there any way to add Toon poweradapters and lights in Domoticz?
If they are z-wave compatible you can, but you to connect them to Domoticz and release from your Toon
I managed to set the state (on/off) on a Z-Wave smartplug using
hdrv_zwave?action=basicCommand&uuid=688b44c4-19d4-4453-8aa8-6b02ee9aa78f&state=1. This works, but when I have a look at the Toon itself, it still shows the old state. So, when I turn it off, the smartplug goes off, but Toon still shows it as active. What did I miss?
You miss nothing, Domoticz didn't sync with Toon.
Will see if I have time to look at it this weekend, so that there will be sync.
Re: Controlling Toon via Domoticz
Posted: Fri Nov 23, 2018 12:28 pm
by madpatrick
It's is easier to let Domoticz control your switches, but that is my opinion.
Re: Controlling Toon via Domoticz
Posted: Fri Nov 23, 2018 12:30 pm
by WickedMaster
mAiden wrote:You miss nothing, Domoticz didn't sync with Toon.
Will see if I have time to look at it this weekend, so that there will be sync.
For your understandig: Domoticz is still seperate from this since we simply send the command from the webbrowser. The smartplug changes the state, but Toon just doesn't show the right state. The smartplug is by the way connected to the Toon (so not to another Z-Wave controller).
madpatrick wrote:It's is easier to let Domoticz control your switches, but that is my opinion.
I agree, but I still didn't manage to show external Z-Wave plugs on the Toon itself. I would like to have the on-off option at the Toon's control panel (the easy access panel).
Re: Controlling Toon via Domoticz
Posted: Sun Nov 25, 2018 6:07 pm
by michel30
Hello,
does somebody runs Domoticz with IFTTT?
When I say to google someting what I enter in IFTTT it says I don't now what you mean or I cannot find it please add it in google.
Re: Controlling Toon via Domoticz
Posted: Sun Nov 25, 2018 11:52 pm
by WickedMaster
michel30 wrote:Hello,
does somebody runs Domoticz with IFTTT?
When I say to google someting what I enter in IFTTT it says I don't now what you mean or I cannot find it please add it in google.
That should work. I've just tested it out, and you can simply make an applet with Google Assisant as "if". Then, for example, you can pick the "Say a simple phrase" trigger. Enter the texts there and create the trigger. After that you've to create the "that" action service which will be a web request (using Webhooks). There you can enter the URL which IFTTT has to execute and create the trigger (no need to modify the other settings such as method).
This worked for me.
Re: Controlling Toon via Domoticz
Posted: Mon Nov 26, 2018 2:08 am
by michel30
Hello,
I am trying first with my lights but it always says This isn't a valid URL.
http://<user>:<password>@<domoticz public IP or URL>:8080/json.htm?type=command¶m=switchlight&idx=181&switchcmd=Off
When I used this command in my webbrowser the light will switch off.
I also try this out with a hotspot and when I try it does not work.
How does your URL looks like for phrase?
And can I talk dutch with IFTTT? I only see couple of language , german, french , english..
Thanks,
Re: Controlling Toon via Domoticz
Posted: Mon Nov 26, 2018 2:27 am
by WickedMaster
I have only tested it out with the direct link of the Toon itself. Haven't tried it out with Domoticz yet. Will try that tomorrow and come back to it.
You can only talk the languages which are listed at IFTTT to it. I tried Dutch, but that doesn't seems like to work..
Re: Controlling Toon via Domoticz
Posted: Fri Nov 30, 2018 1:14 am
by michel30
Okay, Toon is now working with IFTTT and domoticz is I say set temperature ... degrees is switch.
This how you set up the connection in IFTTT
Code: Select all
https://user:password@IP:port/json.htm?type=command¶m=updateuservariable&vname=Status&vtype=2&vvalue={{TextField}}
I am searching how to set up when you ask google home what is the temperature in house that it will say at this moment the temperature is....
An other question: what could you do more with integrate Toon and Google home together with Domoticz and IFTTT?
Re: Controlling Toon via Domoticz
Posted: Wed Dec 05, 2018 11:23 pm
by michel30
WickedMaster wrote:I have only tested it out with the direct link of the Toon itself. Haven't tried it out with Domoticz yet. Will try that tomorrow and come back to it.
You can only talk the languages which are listed at IFTTT to it. I tried Dutch, but that doesn't seems like to work..
Hello WickedMaster,
Did you already try the Toon with Domoticz and google home?
The only thing that works for me is only set the temperature on .. degrees but asking what is the temperature in the house it does not work yet.
Re: Controlling Toon via Domoticz
Posted: Sun Jan 06, 2019 7:50 pm
by glsf91
BOverdevest wrote:Based on several posts, I combined getting all Toon data to Domoticz in a single DzVents script. So both boiler data, thermostat data and the P1 data.
Now that I have a rooted Toon2

I had to update the script, as the P1 data apparently changed in the http://<ToonIP>/hdrv_zwave?action=getDevices.json.
Code: Select all
return {
on = {
timer = {
'every minute'
}
},
execute = function(domoticz)
local ToonThermostat = domoticz.variables('UV_ToonThermostat').value -- Sensor showing current setpoint
local ToonTemperature = domoticz.variables('UV_ToonTemperature').value -- Sensor showing current room temperature
local ToonBoilerTempIn = domoticz.variables('UV_ToonBoilerTempIn').value -- Sensor showing water temp return
local ToonBoilerTempOut = domoticz.variables('UV_ToonBoilerTempOut').value -- Sensor showing current water temp out
local ToonBoilerPressure = domoticz.variables('UV_ToonBoilerPressure').value -- Sensor showing current room temperature
local ToonBoilerModulation = domoticz.variables('UV_ToonBoilerModulation').value -- Sensor showing current Boiler Modulation
local ToonScenes = domoticz.variables('UV_ToonScenes').value -- Sensor showing current program
local ToonAutoProgram = domoticz.variables('UV_ToonAutoProgram').value -- Sensor showing current auto program status
local ToonProgramInformation = domoticz.variables('UV_ToonProgramInformation').value -- Sensor showing displaying program information status
local ToonIP = domoticz.variables('UV_ToonIP').value
local DomoticzIP = domoticz.variables('UV_DomoticzIP').value
local ToonBurnerName = domoticz.variables('UV_ToonBurnerName').value
local P1SmartMeterPower = domoticz.variables('UV_P1SmartMeterElectra').value
local P1SmartMeterGas1 = domoticz.variables('UV_P1SmartMeterGasMeterStand').value
local ToonBoilerSetpoint = domoticz.variables('UV_ToonBoilerTempSetpoint').value -- Sensor showing current boiler set point water temp out
-- Handle json
local json = assert(loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")() -- For Linux
local handle = assert(io.popen(string.format('curl http://%s/happ_thermstat?action=getThermostatInfo', ToonIP)))
local ThermostatInfo = handle:read('*all')
handle:close()
local jsonThermostatInfo = json:decode(ThermostatInfo)
if jsonThermostatInfo == nil then
return
end
local handle2 = assert(io.popen(string.format('curl http://%s/boilerstatus/boilervalues.txt', ToonIP)))
local BoilerInfo = handle2:read('*all')
handle2:close()
-- JSON data from Toon contains a extra "," which should not be there.
BoilerInfo = string.gsub(BoilerInfo, ",}", "}")
jsonBoilerInfo = json:decode(BoilerInfo)
-- http://IP_TOON/hdrv_zwave?action=getDevices.json
local handle4 = assert(io.popen(string.format('curl http://%s/hdrv_zwave?action=getDevices.json', ToonIP)))
local GasPowerInfo = handle4:read('*all')
handle4:close()
-- JSON data from Toon contains a extra "." which should not be there.
GasPowerInfo = string.gsub(GasPowerInfo, "dev_4.", "dev_4")
GasPowerInfo = string.gsub(GasPowerInfo, "dev_4:", "dev_4\":")
local jsonGasPower = json:decode(GasPowerInfo)
-- domoticz.log(jsonGasPower)
local CurrentElectricityFlowHoog = tonumber(jsonGasPower.dev_44.CurrentElectricityFlow )
local CurrentElectricityQuantityHoog = tonumber(jsonGasPower.dev_44.CurrentElectricityQuantity)
local CurrentElectricityFlowLaag = tonumber(jsonGasPower.dev_46.CurrentElectricityFlow )
local CurrentElectricityQuantityLaag = tonumber(jsonGasPower.dev_46.CurrentElectricityQuantity)
local CurrentGasFlow = tonumber(jsonGasPower.dev_41.CurrentGasFlow)
local CurrentGasQuantity = tonumber(jsonGasPower.dev_41.CurrentGasQuantity)
local CurrentElectricityQuantity = CurrentElectricityFlowHoog + CurrentElectricityFlowLaag
local CurrentElectricityDeliveredLaag = 0
local CurrentElectricityDeliveredHoog = 0
local totalDeliveredPower = 0
domoticz.devices(P1SmartMeterPower).updateP1(CurrentElectricityQuantityLaag, CurrentElectricityQuantityHoog, CurrentElectricityDeliveredLaag, CurrentElectricityDeliveredHoog, CurrentElectricityQuantity, totalDeliveredPower).silent()
domoticz.devices(P1SmartMeterGas1).updateGas(CurrentGasQuantity).silent()
-- Update the Boiler Water In to current value
local currentboilerInTemp = tonumber(jsonBoilerInfo.boilerInTemp)
if domoticz.utils.round(domoticz.devices(ToonBoilerTempIn).temperature,0) ~= domoticz.utils.round(currentboilerInTemp,0) then
-- domoticz.log('Updating Boiler Water In to current value: ' ..currentboilerInTemp)
domoticz.devices(ToonBoilerTempIn).updateTemperature(currentboilerInTemp).silent()
end
-- Update the Boiler water Out to current value
local currentboilerOutTemp = tonumber(jsonBoilerInfo.boilerOutTemp)
if domoticz.utils.round(domoticz.devices(ToonBoilerTempOut).temperature,0) ~= domoticz.utils.round(currentboilerOutTemp,0) then
-- domoticz.log('Updating Boiler Water Out to current value: ' ..currentboilerOutTemp)
domoticz.devices(ToonBoilerTempOut).updateTemperature(currentboilerOutTemp).silent()
end
-- Update the Boiler water Pressure to current value
local currentBoilerPressure = tonumber(jsonBoilerInfo.boilerPressure) * 10
if domoticz.utils.round(domoticz.devices(ToonBoilerPressure)._nValue,0) ~= domoticz.utils.round(currentBoilerPressure,0) then
-- domoticz.log('Updating Boiler Pressure to current value: ' ..currentBoilerPressure)
domoticz.devices(ToonBoilerPressure).updatePressure(currentBoilerPressure).silent()
end
local currentSetpoint = tonumber(jsonThermostatInfo.currentSetpoint) / 100
local currentTemperature = tonumber(jsonThermostatInfo.currentTemp) / 100
local currentProgramState = tonumber(jsonThermostatInfo.programState)
if currentProgramState == 0 then currentProgramState = 10 -- No
elseif currentProgramState == 1 then currentProgramState = 20 -- Yes
elseif currentProgramState == 2 then currentProgramState = 30 -- Temporary
end
local currentActiveState = tonumber(jsonThermostatInfo.activeState)
if currentActiveState == -1 then currentActiveState = 50 -- Manual
elseif currentActiveState == 0 then currentActiveState = 40 -- Comfort
elseif currentActiveState == 1 then currentActiveState = 30 -- Home
elseif currentActiveState == 2 then currentActiveState = 20 -- Sleep
elseif currentActiveState == 3 then currentActiveState = 10 -- Away
end
-- Update the toon burner selector to current program state
local currentBurnerInfo = tonumber(jsonThermostatInfo.burnerInfo)
local CurrentToonBurnerValue = domoticz.devices(ToonBurnerName).level
if currentBurnerInfo == 0 then currentBurnerInfo = 0 -- uit
elseif currentBurnerInfo == 1 then currentBurnerInfo = 10 -- cv aan
elseif currentBurnerInfo == 2 then currentBurnerInfo = 20 -- warmwater aan
end
if CurrentToonBurnerValue ~= currentBurnerInfo then -- Update toon burner selector if it has changed
-- domoticz.log('Updating Toon burner info:')
domoticz.devices(ToonBurnerName).switchSelector(currentBurnerInfo)
end
-- Update the modulation level of the burner
local currentModulationLevel = tonumber(jsonThermostatInfo.currentModulationLevel)
if domoticz.devices(ToonBoilerModulation).percentage + 1 ~= currentModulationLevel + 1 then
-- domoticz.log('Updating the Modulation sensor to new value: ' ..currentModulationLevel)
domoticz.devices(ToonBoilerModulation).updatePercentage(currentModulationLevel)
end
-- Update the temperature Boiler setpoint to current boiler set point
local currentInternalBoilerSetpoint = jsonThermostatInfo.currentInternalBoilerSetpoint+1
if domoticz.utils.round(domoticz.devices(ToonBoilerSetpoint).temperature, 1) ~= domoticz.utils.round(currentInternalBoilerSetpoint, 1) then
-- domoticz.log('Updating the Boiler internal temperature setpoint to new value: ' ..currentInternalBoilerSetpoint)
domoticz.devices(ToonBoilerSetpoint).updateTemperature(currentInternalBoilerSetpoint)
end
-- Update the thermostat sensor to current setpoint
if domoticz.devices(ToonThermostat).setPoint*100 ~= currentSetpoint*100 then
-- domoticz.log('Updating thermostat sensor to new set point: ' ..currentSetpoint)
domoticz.devices(ToonThermostat).updateSetPoint(currentSetpoint).silent()
end
-- Update the temperature sensor to current room temperature
if domoticz.utils.round(domoticz.devices(ToonTemperature).temperature, 1) ~= domoticz.utils.round(currentTemperature, 1) then
-- domoticz.log('Updating the temperature sensor to new value: ' ..currentTemperature)
domoticz.devices(ToonTemperature).updateTemperature(currentTemperature)
end
-- Update the toon scene selector sensor to current program state
if domoticz.devices(ToonScenes).level ~= currentActiveState then -- Update toon selector if it has changed
-- domoticz.log('Updating Toon Scenes selector to: '..currentActiveState)
domoticz.devices(ToonScenes).switchSelector(currentActiveState).silent()
end
-- Updates the toon auto program switch
if domoticz.devices(ToonAutoProgram).level ~= currentProgramState then -- Update toon auto program selector if it has changed
-- domoticz.log('Updating Toon Auto Program selector to: '..currentProgramState)
domoticz.devices(ToonAutoProgram).switchSelector(currentProgramState).silent()
end
-- Updates the toon program information text box
local currentNextTime = jsonThermostatInfo.nextTime
local currentNextSetPoint = tonumber(jsonThermostatInfo.nextSetpoint) / 100
if currentNextTime == 0 or currentNextSetPoint == 0 then
ToonProgramInformationSensorValue = 'Op ' ..currentSetpoint.. '°'
else
ToonProgramInformationSensorValue = 'Om ' ..os.date('%H:%M', currentNextTime).. ' op ' ..currentNextSetPoint.. '°'
end
if domoticz.devices(ToonProgramInformation).text ~= ToonProgramInformationSensorValue then
-- domoticz.log('Updating Toon Program Information to: '..ToonProgramInformationSensorValue)
domoticz.devices(ToonProgramInformation).updateText(ToonProgramInformationSensorValue)
end
end
}
Are you sure "domoticz.devices(ToonThermostat).updateSetPoint(currentSetpoint).silent()" is indeed silent?
In my Domoticz it is still triggering the ToonThermostat setpoint script. Looks like silent is not working. I'am on the recent stable version.
Re: Controlling Toon via Domoticz
Posted: Wed Jan 09, 2019 9:41 am
by yjb
TerrorSource wrote:madpatrick wrote:
Hello TerrorSource,
Is it possible to share the DOC-file.
I can update the manual for the DzVents script, update it and correct a few errors.
You can contact me via PM or email so I can edit the modifications in the PDF files

Just wondering, was the manual ever updated?