Controlling Toon [HACKED] from Domoticz

For heating/cooling related questions in Domoticz

Moderator: leecollings

User avatar
George
Posts: 8
Joined: Saturday 16 June 2018 16:33
Target OS: Raspberry Pi / ODroid
Domoticz version: V4.10717
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by George »

Hi OedzesG can you help me to solve the problem......
Beer didn't help :lol:

Lua script and as trigger device i use:

Code: Select all

	
	-- Lua script. LET OP zet Trigger op Device
	
	
	commandArray = {}

	ToonThermostatSensorName = uservariables['toon_thermostaat_naam'] -- Sensor showing current setpoint
	ToonIP = uservariables['toon_ip']

	for deviceName,deviceValue in pairs(devicechanged) do
	if (deviceName == ToonThermostatSensorName) then
	if uservariables['toon_thermostaat_helper'] == 1 then
	commandArray['Variable:toon_thermostaat_helper'] = '0'
	else
	SetPoint = otherdevices_svalues[ToonThermostatSensorName]
	ToonCommand = string.format('http://%s/happ_thermstat?action=setSetpoint&Setpoint=%s', ToonIP, SetPoint*100)

	print('Setting Toon setpoint to '.. SetPoint)
	commandArray['OpenURL'] = ToonCommand
	   
	   end
	end
 end

return commandArray
dzVents script i use:

Code: Select all

	
	local ToonIpAdres             					= '192.168.178.71'      	-- IP adres rooted TOON thermostaat 	
	local IDX_ToonActieveScene 				= 118 				-- IDX nummer van TOON scene / selector switch 					
	local IDX_ToonProgrammaVerloop			= 119 				-- IDX nummer van TOON programma / selector switch 					
	local IDX_ToonDoelTemperatuurThermostaat 	= 123 				-- IDX nummer van TOON thermostaat setpoint 					
	local IDX_ToonHuidigeKamerTemperatuur 		= 121 				-- IDX nummer van TOON kamer temperatuur 						
	local IDX_ToonHuidigeModulatieNiveau 		= 122 				-- IDX nummer van TOON modulatie niveau / custom sensor 					
	local IDX_ToonHuidigieActiviteit 			= 120 				-- IDX nummer van TOON huidige activiteit / slector switch			
				
	local   UV_ThermostaatHelper 				= 'toon_thermostaat_helper'   -- als het goed is niet veranderen 
	
	
	local scriptVersion = 'Versie 1.3'
	local scriptVar = 'TOON Thermostaat ' .. scriptVersion

	return 
		{ on = {
        httpResponses = { scriptVar },
       		 timer = {'every minute'},},
	    		logging = { level = domoticz.LOG_INFO,
       		 	marker = scriptVar },    

	execute = function(domoticz, item)
	if (item.isTimer) then
			
	domoticz.openURL({
        url = 'http://' .. ToonIpAdres .. '/happ_thermstat?action=getThermostatInfo',
        method = 'GET',
        callback = scriptVar,})
	end
			
	if (item.isHTTPResponse) then 
	domoticz.utils.dumpTable(item.headers)
           
	if item.ok then
                
	local   rawJSON = domoticz.utils.fromJSON(item.data)
	local   myData  = rawJSON
			
	local   ToonActieveScene = myData.activeState
	if 		ToonActieveScene ==  '-1' then ToonActieveSceneUpdateWaarde = 'Handmatige temp. instelling'
	elseif 	ToonActieveScene ==  '0' then ToonActieveSceneUpdateWaarde = 'Comfort'
	elseif 	ToonActieveScene ==  '1' then ToonActieveSceneUpdateWaarde = 'Thuis'
	elseif 	ToonActieveScene ==  '2' then ToonActieveSceneUpdateWaarde = 'Slapen'
	elseif 	ToonActieveScene ==  '3' then ToonActieveSceneUpdateWaarde = 'Weg'
	elseif 	ToonActieveScene ==  '4' then ToonActieveSceneUpdateWaarde = 'Vakantie'
    	end 
    	domoticz.log( '----- Toon actieve scéne = ' .. tostring(ToonActieveSceneUpdateWaarde))
	domoticz.devices(IDX_ToonActieveScene).switchSelector(ToonActieveSceneUpdateWaarde).silent()

   
	local ToonProgrammaVerloop = myData.programState
	if ToonProgrammaVerloop == '0' then ToonProgrammaVerloopUpdateWaarde = 'Uit'         
	elseif ToonProgrammaVerloop == '1' then ToonProgrammaVerloopUpdateWaarde = 'Aan'
	elseif ToonProgrammaVerloop == '2' then ToonProgrammaVerloopUpdateWaarde = 'Aan / afwijkend'
	elseif ToonProgrammaVerloop == '8' then ToonProgrammaVerloopUpdateWaarde = 'Aan / afwijkend'
    	end 
    	domoticz.log( '----- Toon automatisch programma verloop = ' .. tostring(ToonProgrammaVerloopUpdateWaarde))
	domoticz.devices(IDX_ToonProgrammaVerloop).switchSelector(ToonProgrammaVerloopUpdateWaarde).silent()
	        
	local ToonDoelTemperatuurThermostaat = myData.currentSetpoint / 100
	domoticz.log( '----- Doel temperatuur voor thermostaat: '.. tostring(ToonDoelTemperatuurThermostaat))
	domoticz.variables(UV_ThermostaatHelper).set(1)
	domoticz.devices(IDX_ToonDoelTemperatuurThermostaat).updateSetPoint(ToonDoelTemperatuurThermostaat).silent()
	        
	local ToonHuidigeKamerTemperatuur =   domoticz.utils.round((myData.currentTemp / 100),1)
    domoticz.log( '----- Huidige woonkamer temp. = ' .. tostring(ToonHuidigeKamerTemperatuur))
	domoticz.devices(IDX_ToonHuidigeKamerTemperatuur).updateTemperature(ToonHuidigeKamerTemperatuur).silent()
	        
	local ToonHuidigeModulatieNiveau  =   myData.currentModulationLevel
    domoticz.log( '----- Huidige modulatie niveau = ' .. tostring(ToonHuidigeModulatieNiveau))
	domoticz.devices(IDX_ToonHuidigeModulatieNiveau).updateCustomSensor(ToonHuidigeModulatieNiveau).silent()
	         
	local ToonHuidigieActiviteit = myData.burnerInfo
	if ToonHuidigieActiviteit == '0'  then ToonHuidigieActiviteitUpdateWaarde = 'Geen'
	elseif ToonHuidigieActiviteit == '1' then ToonHuidigieActiviteitUpdateWaarde = 'Verwarm. CV'
	elseif ToonHuidigieActiviteit == '2' then ToonHuidigieActiviteitUpdateWaarde = 'Verwarm. water'
	elseif ToonHuidigieActiviteit == '3' then ToonHuidigieActiviteitUpdateWaarde = 'Voor verwarm.'
	end 
    domoticz.log( '----- Huidige activiteit = ' .. tostring(ToonHuidigieActiviteitUpdateWaarde))
	domoticz.devices(IDX_ToonHuidigieActiviteit).switchSelector(ToonHuidigieActiviteitUpdateWaarde).silent()
	        
	                  
	           
            end     
   	    end 
    end 
}
And using JSONView with: http://ipadresraspberry/hdrv_zwave?acti ... vices.json:

Code: Select all

{
dev_settings_device: {
uuid: "cd5a4b02-a23e-4165-8ae7-4130b9151c08",
name: "settings_device",
internalAddress: "settings_device",
type: "settings_device"
},
dev_6: {
uuid: "634c56b5-3f04-4c24-a909-b4ad313ae478",
name: "HAE_METER_v3",
internalAddress: "6",
type: "HAE_METER_v3",
supportsCrc: "1",
ccList: "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e",
supportedCC: "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e",
nodeFlags: [ ],
IsConnected: "1",
HealthValue: "10",
DeviceName: "HAE_METER_v3",
CurrentSensorStatus: "UNKNOWN"
},
dev_6.1: {
uuid: "18cd69ab-7fa6-491b-8cbb-870932f63d9c",
name: "HAE_METER_v3_1",
internalAddress: "6.1",
type: "HAE_METER_v3_1",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "WARNING",
CurrentGasFlow: "39.00",
CurrentGasQuantity: "2673902.00",
DeviceName: ""
},
dev_6.2: {
uuid: "5446565f-2e23-4101-b4ae-f5d36641c91a",
name: "HAE_METER_v3_2",
internalAddress: "6.2",
type: "HAE_METER_v3_2",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "UNKNOWN",
DeviceName: "",
CurrentElectricityFlow: "NaN",
CurrentElectricityQuantity: "NaN"
},
dev_6.3: {
uuid: "1c29dcf9-1814-4f79-aa41-4d149fcd2afc",
name: "HAE_METER_v3_3",
internalAddress: "6.3",
type: "HAE_METER_v3_3",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "UNKNOWN",
DeviceName: "",
CurrentElectricityFlow: "NaN",
CurrentElectricityQuantity: "NaN"
},
dev_6.4: {
uuid: "d9d7d18e-5507-489d-aa54-596ab28f5603",
name: "HAE_METER_v3_4",
internalAddress: "6.4",
type: "HAE_METER_v3_4",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "WARNING",
DeviceName: "",
CurrentElectricityFlow: "0.00",
CurrentElectricityQuantity: "4050743.00"
},
dev_6.5: {
uuid: "b45317d6-feeb-494c-8ba1-8e55818d96cd",
name: "HAE_METER_v3_5",
internalAddress: "6.5",
type: "HAE_METER_v3_5",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "WARNING",
DeviceName: "",
CurrentElectricityFlow: "0.00",
CurrentElectricityQuantity: "0.00"
},
dev_6.6: {
uuid: "fede1130-fe96-4c0d-b9fd-dc5ba246741d",
name: "HAE_METER_v3_6",
internalAddress: "6.6",
type: "HAE_METER_v3_6",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "WARNING",
DeviceName: "",
CurrentElectricityFlow: "823.00",
CurrentElectricityQuantity: "7442750.00"
},
dev_6.7: {
uuid: "c8bf3923-444c-4f2d-b452-095c334e9044",
name: "HAE_METER_v3_7",
internalAddress: "6.7",
type: "HAE_METER_v3_7",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "WARNING",
DeviceName: "",
CurrentElectricityFlow: "0.00",
CurrentElectricityQuantity: "92.00"
},
dev_6.8: {
uuid: "a9468352-f6a5-4303-9d43-60e5be3c6505",
name: "HAE_METER_v3_8",
internalAddress: "6.8",
type: "HAE_METER_v3_8",
supportsCrc: "0",
ccList: "5e 59 85 8e 3c 3d 3e",
supportedCC: "5e 59 85 8e 3c 3d 3e",
nodeFlags: [ ],
CurrentSensorStatus: "UNKNOWN",
DeviceName: "",
CurrentHeatQuantity: "NaN"
}
}
Hope to get some help
Using: Domoticz V4.10717, Raspberry 3B+, Z-wave plus, Wemos
OedzesG
Posts: 106
Joined: Monday 11 March 2019 0:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by OedzesG »

usualy beer helps verry wel ! :D
for setpoint u can use this one:

Code: Select all

	local scriptVersion = '	Script 2.2	'
	local scriptVar 	= '	Rooted Toon ' .. scriptVersion	
	
	------------------------------------------------------------------------------------------------------------------
	--						         DOMOTICZ THERMOSTAAT SETPOINT DATA NAAR TOON				    	    		--
	------------------------------------------------------------------------------------------------------------------      
	--[[
	
	Dit dzVents-script wordt gebruikt om de handmatig ingestelde doelTemperatuur
	van de Domoticz Termostaat te synchroniseren met Toon. 
	
	Voordat u het script activeert:
    lees het gedeelte AAN DE SLAG van de dzVents-wiki.
    wijzig xxx.xxx.xxx.xxx in dit script in het IP-adres van uw Toon.
    Definieer dummy hardware in domoticz als dit nog niet is gebeurd en 
    definieer virtuele sensoren en wijzig de naam in de apparaatverklaringen.
    
    Datum laatsteUpdate: 13.01.2020. 

	]]--
	----------------------------------------------------------------------------------------------------------------------
	--												Script Settings: 													--
	----------------------------------------------------------------------------------------------------------------------


	local ToonIP = '192.168.178.71'  	            -- IpAdress Rooted TOON
	local ThermostaatNaam = 'TOON Thermostaat'      -- Exacte naam van Toon Thermostaat dummy 

   	----------------------------------------------------------------------------------------------------------------------
	--										Hierna niets meer veranderen!! 												--
	---------------------------------------------------------------------------------------------------------------------- 

    return {
	on = {
	devices = { ThermostaatNaam },},
	logging = { level = domoticz.LOG_ERROR,
	marker = scriptVar }, 
	

	execute = function(domoticz, device)
		domoticz.openURL(string.format('http://%s/happ_thermstat?action=setSetpoint&Setpoint=%s', ToonIP, device.setPoint*100))
			domoticz.log(' ** TOON THERMOSTAAT NAAR NIEUWE WAARDE ** '.. (device.setPoint)..' C')
	end
}
can you share output from json call:

Code: Select all

http://192.168.178.71/happ_thermstat?action=getThermostatInfo
ArieKanarie
Posts: 41
Joined: Saturday 12 December 2015 13:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by ArieKanarie »

OedzesG wrote: Wednesday 08 January 2020 23:00 So i made a verry simple script witch downloads the data from toon to update my devices in Domoticz with only 3 UserVariable
if you want i can share it?
What are the variables? I miss them in your next post?

I guess one of them is the thermostat helper, but what should be the value?

now i get this in my log

Code: Select all

2020-03-18 20:32:00.353 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ------ Start internal script: Toon:, trigger: every minute
2020-03-18 20:32:00.353 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ------ Finished Toon
2020-03-18 20:32:00.353 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2020-03-18 20:32:00.488 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ------ Start internal script: Toon: HTTPResponse: "TOON Thermostaat Versie 1.3"
2020-03-18 20:32:00.488 Status: dzVents: > Server: lighttpd/1.4.35
2020-03-18 20:32:00.488 Status: dzVents: > Content-Type: text/javascript; charset=utf-8
2020-03-18 20:32:00.488 Status: dzVents: > Content-Length: 344
2020-03-18 20:32:00.488 Status: dzVents: > Date: Wed, 18 Mar 2020 19:32:00 GMT
2020-03-18 20:32:00.494 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ----- Toon actieve scéne = Thuis
2020-03-18 20:32:00.514 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ----- Toon automatisch programma verloop = Uit
2020-03-18 20:32:00.516 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ----- Doel temperatuur voor thermostaat: 20
2020-03-18 20:32:00.516 Status: dzVents: Error (2.4.19): TOON Thermostaat Versie 1.3: There is no uservariable with that name or id: toon_thermostaat_helper
2020-03-18 20:32:00.516 Status: dzVents: Error (2.4.19): TOON Thermostaat Versie 1.3: An error occured when calling event handler Toon
2020-03-18 20:32:00.516 Status: dzVents: Error (2.4.19): TOON Thermostaat Versie 1.3: ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:64: attempt to index a nil value
2020-03-18 20:32:00.516 Status: dzVents: Info: TOON Thermostaat Versie 1.3: ------ Finished Toon
balurmie
Posts: 1
Joined: Thursday 16 April 2020 14:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by balurmie »

Peebee01 wrote: Friday 11 October 2019 21:55 Thanks!

Now it works

My mistake was that I had the right UV, they did not have the “current value” shown tothe right of it. I assumed this current value would get written by the script based on the information from the Toon, but it looks like this is the link to the devices....
So modifying the UV and the devices fixed it.

Thanks for your support!
Hi Peebee what do you mean by right or UV , do you mean correct UV they did not have the “current value” shown tothe right of it.
If you can copy that part of the code and hight it , it would be easier to understand.
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

I'm trying to add Toon and include the energy as well.
On the Toon script I get this error
2020-07-26 11:08:03.975 Error: dzVents: Error: (3.0.2) error loading module 'Toon' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua':
2020-07-26 11:08:03.975 ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:43: <name> expected near '//'
I already changed the line 43 from http://IP_TOON/hdrv_zwave?action=getDevices.json to http://192.168.1.21/hdrv_zwave?action=getDevices.json with same result
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

Jasper79 wrote: Sunday 26 July 2020 11:12 I'm trying to add Toon and include the energy as well.
On the Toon script I get this error
2020-07-26 11:08:03.975 Error: dzVents: Error: (3.0.2) error loading module 'Toon' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua':
2020-07-26 11:08:03.975 ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:43: <name> expected near '//'
I already changed the line 43 from http://IP_TOON/hdrv_zwave?action=getDevices.json to http://192.168.1.21/hdrv_zwave?action=getDevices.json with same result
This line can be comment out (at least i've it like that)
you can put -- (2x -) in front of it. The line will then turn green
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

And I don't need it to get the electricity and gas to show up in domoticz? That's why I uncommented it according to the guide I was following.
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

Jasper79 wrote: Sunday 26 July 2020 18:15 And I don't need it to get the electricity and gas to show up in domoticz? That's why I uncommented it according to the guide I was following.
It just a comment to make the script readable and how to use the action
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

Thanks Patrick,

Now it goes on, though with a new error.
My dev is 17.8 I think and it stops on a new error.

2020-07-26 18:45:00.346 Error: dzVents: Error: (3.0.2) error loading module 'Toon' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua':
2020-07-26 18:45:00.346 ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:55: malformed number near '.8.C'
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

Jasper79 wrote: Sunday 26 July 2020 18:46 Thanks Patrick,

Now it goes on, though with a new error.
My dev is 17.8 I think and it stops on a new error.

2020-07-26 18:45:00.346 Error: dzVents: Error: (3.0.2) error loading module 'Toon' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua':
2020-07-26 18:45:00.346 ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:55: malformed number near '.8.C'
It help if you post your config.
There are lot of different versions.
Check all you data frist and Uservariables. This is mostly the problem
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

Okay, I'll check it out on my computer tomorrow and then post it. From my phone is a pain.
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

For trying the code I went back to the original version with commented energy part to check for errors.

Guide I'm following: https://ehoco.nl/geroote-toon-bedienen-met-domoticz/ (In Dutch though most Toon users will understand)
Original code

Code: Select all

return {
	on = {
		timer = {
			'every minute'
		}
	},
 
	execute = function(domoticz)
		local ToonThermostat = domoticz.variables('UV_ToonThermostatSensorName').value -- Sensor showing current setpoint
		local ToonTemperature = domoticz.variables('UV_ToonTemperatureSensorName').value -- Sensor showing current room temperature
		local ToonBoilerTempIn = domoticz.variables('UV_ToonboilerInTempName').value -- Sensor showing water temp return
		local ToonBoilerTempOut = domoticz.variables('UV_ToonboilerOutTempName').value -- Sensor showing current water temp out
		local ToonBoilerPressure = domoticz.variables('UV_ToonboilerPressure').value -- Sensor showing current room temperature
		local ToonBoilerModulation = domoticz.variables('UV_ToonboilerModulationLevel').value -- Sensor showing current Boiler Modulation
		local ToonScenes = domoticz.variables('UV_ToonScenesSensorName').value -- Sensor showing current program
		local ToonAutoProgram = domoticz.variables('UV_ToonAutoProgramSensorName').value -- Sensor showing current auto program status
		local ToonProgramInformation = domoticz.variables('UV_ToonProgramInformationSensorName').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_ToonBoilerTempSetpointSensorName').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)
		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 = domoticz.utils.round(tonumber(jsonThermostatInfo.currentTemp) / 100,1)
		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
			elseif currentActiveState == 4 then currentActiveState = 60 -- Holiday
		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
			elseif currentBurnerInfo == 3 then currentBurnerInfo = 10 -- voorverwarmen volgend setpoint
		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
}
Next thing I want is to activate the energy readings to work from Toon so I don't have to get a separate connection.

Output from http://192.168.1.21/hdrv_zwave?action=getDevices.json

Code: Select all

{"dev_settings_device": {"uuid": "d213df3c-c5dd-4e68-99b7-9128eb1648f8", "name": "settings_device", "internalAddress": "settings_device", "type": "settings_device"}, "dev_14": 
{"uuid": "e13a535e-ddc7-4739-ac04-f098bad85366", "name": "Lampjes", "internalAddress": "14", "type": "EM6550_v1", "supportsCrc": "0", "ccList": "25 27 72 86 75 73", "supportedCC": "25 27 72 86 75 73", "nodeFlags": [], "TargetStatus": "-1", "CurrentState": "-1", "IsConnected": "0", "HealthValue": "1", "DeviceName": "Lampjes"}, "dev_17": 
{"uuid": "ccd6f8f3-5770-4b94-804d-ed30b97b1a91", "name": "HAE_METER_v3", "internalAddress": "17", "type": "HAE_METER_v3", "supportsCrc": "1", "ccList": "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "supportedCC": "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "nodeFlags": [], "IsConnected": "1", "DeviceName": "HAE_METER_v3", "HealthValue": "2", "CurrentSensorStatus": "UNKNOWN"}, "dev_17.1": 
{"uuid": "8ca51e51-4e8b-4fe1-b68b-34767b51c704", "name": "HAE_METER_v3_1", "internalAddress": "17.1", "type": "gas", "supportsCrc": "0", "nodeFlags": [], "CurrentGasFlow": "15.00", "CurrentGasQuantity": "4211734.00", "DeviceName": "HAE_METER_v3_1"}, "dev_17.2": 
{"uuid": "3c460ec3-833a-4f94-9818-133a05633dbf", "name": "HAE_METER_v3_2", "internalAddress": "17.2", "type": "elec", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "NaN", "CurrentElectricityQuantity": "NaN", "DeviceName": "HAE_METER_v3_2"}, "dev_17.3": 
{"uuid": "2115f78e-0570-4577-9d37-61568641bf2e", "name": "HAE_METER_v3_3", "internalAddress": "17.3", "type": "elec_solar", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "595.00", "CurrentElectricityQuantity": "3462758.00", "DeviceName": "HAE_METER_v3_3"}, "dev_17.4": 
{"uuid": "a16b3a91-63e9-4ec2-929d-4e13a5aecd50", "name": "HAE_METER_v3_4", "internalAddress": "17.4", "type": "elec_delivered_nt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "7034350.00", "DeviceName": "HAE_METER_v3_4"}, "dev_17.5": 
{"uuid": "70be0518-1e82-41a1-9df5-7afc0af4136b", "name": "HAE_METER_v3_5", "internalAddress": "17.5", "type": "elec_received_nt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "5189314.00", "DeviceName": "HAE_METER_v3_5"}, "dev_17.6": 
{"uuid": "fb56b156-3b42-45f5-a6b8-5fa8598662e0", "name": "HAE_METER_v3_6", "internalAddress": "17.6", "type": "elec_delivered_lt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "1867.00", "CurrentElectricityQuantity": "7955151.00", "DeviceName": "HAE_METER_v3_6"}, "dev_17.7": 
{"uuid": "4d3da2f1-a06f-4768-9c0b-d52a1d2438e1", "name": "HAE_METER_v3_7", "internalAddress": "17.7", "type": "elec_received_lt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "2165469.00", "DeviceName": "HAE_METER_v3_7"}, "dev_17.8": 
{"uuid": "4a9a478b-bee6-4bd9-b2c9-e8831ff3f78f", "name": "HAE_METER_v3_8", "internalAddress": "17.8", "type": "heat", "supportsCrc": "0", "nodeFlags": [], "CurrentHeatQuantity": "NaN", "DeviceName": "HAE_METER_v3_8"}, "dev_2": 
{"uuid": "8655ca7c-c82f-4d45-84a9-1e2f8b14c7e3", "name": "Hal", "internalAddress": "2", "type": "EM6550_v1", "supportsCrc": "0", "ccList": "25 27 72 86 75 73", "supportedCC": "25 27 72 86 75 73", "nodeFlags": [], "IsConnected": "1", "HealthValue": "10", "DeviceName": "Hal", "CurrentState": "0", "TargetStatus": "0"}}
made it readable by splitting it on the UUID tag

Note: I do have Toon Zon as well so I may have 2 additional counters in there.
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

Jasper,

Please check out my post on a different forum:
https://www.domoticaforum.eu/viewtopic. ... 135#p91636

Becasue there are some many variants of the script it difficult to check.
This one works wih me
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

I took your script and changed the dev to my numbers.

Code: Select all

-- JSON data from Toon contains a extra "." which should not be there.
        GasPowerInfo = string.gsub(GasPowerInfo, "dev_17.", "dev_17")
        GasPowerInfo = string.gsub(GasPowerInfo, "dev_17:", "dev_17\":")
       
        local jsonGasPower = json:decode(GasPowerInfo)
       
-- Update the powerconsumption
         local CurrentElectricityFlowHoog = tonumber(jsonGasPower.dev_17.5.CurrentElectricityFlow )           --stroomverbruik momenteel hoogtarief
         local CurrentElectricityFlowLaag = tonumber(jsonGasPower.dev_17.7.CurrentElectricityFlow )           --stroomverbruik momenteel laagtarief
         local CurrentElectricityQuantityHoog = tonumber(jsonGasPower.dev_17.5.CurrentElectricityQuantity)    --stroomverbruik totaal hoogtarief
         local CurrentElectricityQuantityLaag = tonumber(jsonGasPower.dev_17.7.CurrentElectricityQuantity)    --stroomverbruik totaal laagtarief
         local CurrentElectricityDeliveredHoog = tonumber(jsonGasPower.dev_17.4.CurrentElectricityQuantity)   --stroomgeleverd momenteel hoogtarief
         local CurrentElectricityDeliveredLaag = tonumber(jsonGasPower.dev_17.6.CurrentElectricityQuantity)   --stroomgeleverd momenteel laagtarief   
         local CurrentElectricityQuantity =   CurrentElectricityFlowHoog + CurrentElectricityFlowLaag       --stroomverbruik totaal aktueel
         local totalDeliveredPower = 0
         local totalDeliveredPower2 = CurrentElectricityDeliveredHoog/1000 + CurrentElectricityDeliveredLaag/1000      --stroomverbruik totaal geleverd
         local CurrentGasFlow = tonumber(jsonGasPower.dev_17.1.CurrentGasFlow)
         local CurrentGasQuantity = tonumber(jsonGasPower.dev_17.1.CurrentGasQuantity)
Now the extra . in my dev is the problem

2020-07-27 10:41:19.642 Error: dzVents: Error: (3.0.2) error loading module 'Toon_Script' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Toon_Script.lua':
2020-07-27 10:41:19.642 ...moticz/scripts/dzVents/generated_scripts/Toon_Script.lua:62: malformed number near '.5.C'
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

your dev numbers are 3_x and not 17.x
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

Do I need to enter the HAE_METER_v numbers then?

Code: Select all

{"dev_settings_device": {"uuid": "d213df3c-c5dd-4e68-99b7-9128eb1648f8", "name": "settings_device", "internalAddress": "settings_device", "type": "settings_device"}, "dev_14": {"uuid": "e13a535e-ddc7-4739-ac04-f098bad85366", "name": "Lampjes", "internalAddress": "14", "type": "EM6550_v1", "supportsCrc": "0", "ccList": "25 27 72 86 75 73", "supportedCC": "25 27 72 86 75 73", "nodeFlags": [], "TargetStatus": "-1", "CurrentState": "-1", "IsConnected": "0", "HealthValue": "1", "DeviceName": "Lampjes"}, "dev_17": {"uuid": "ccd6f8f3-5770-4b94-804d-ed30b97b1a91", "name": "HAE_METER_v3", "internalAddress": "17", "type": "HAE_METER_v3", "supportsCrc": "1", "ccList": "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "supportedCC": "5e 86 72 32 56 5a 59 85 73 7a 60 8e 22 70 8b 3c 3d 3e", "nodeFlags": [], "IsConnected": "1", "DeviceName": "HAE_METER_v3", "HealthValue": "10", "CurrentSensorStatus": "UNKNOWN"}, "dev_17.1": {"uuid": "8ca51e51-4e8b-4fe1-b68b-34767b51c704", "name": "HAE_METER_v3_1", "internalAddress": "17.1", "type": "gas", "supportsCrc": "0", "nodeFlags": [], "CurrentGasFlow": "46.00", "CurrentGasQuantity": "4211966.00", "DeviceName": "HAE_METER_v3_1"}, "dev_17.2": {"uuid": "3c460ec3-833a-4f94-9818-133a05633dbf", "name": "HAE_METER_v3_2", "internalAddress": "17.2", "type": "elec", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "NaN", "CurrentElectricityQuantity": "NaN", "DeviceName": "HAE_METER_v3_2"}, "dev_17.3": {"uuid": "2115f78e-0570-4577-9d37-61568641bf2e", "name": "HAE_METER_v3_3", "internalAddress": "17.3", "type": "elec_solar", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "1409.00", "CurrentElectricityQuantity": "3495762.00", "DeviceName": "HAE_METER_v3_3"}, "dev_17.4": {"uuid": "a16b3a91-63e9-4ec2-929d-4e13a5aecd50", "name": "HAE_METER_v3_4", "internalAddress": "17.4", "type": "elec_delivered_nt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "7035179.00", "DeviceName": "HAE_METER_v3_4"}, "dev_17.5": {"uuid": "70be0518-1e82-41a1-9df5-7afc0af4136b", "name": "HAE_METER_v3_5", "internalAddress": "17.5", "type": "elec_received_nt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "831.00", "CurrentElectricityQuantity": "5190399.00", "DeviceName": "HAE_METER_v3_5"}, "dev_17.6": {"uuid": "fb56b156-3b42-45f5-a6b8-5fa8598662e0", "name": "HAE_METER_v3_6", "internalAddress": "17.6", "type": "elec_delivered_lt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "7960829.00", "DeviceName": "HAE_METER_v3_6"}, "dev_17.7": {"uuid": "4d3da2f1-a06f-4768-9c0b-d52a1d2438e1", "name": "HAE_METER_v3_7", "internalAddress": "17.7", "type": "elec_received_lt", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "0.00", "CurrentElectricityQuantity": "2188695.00", "DeviceName": "HAE_METER_v3_7"}, "dev_17.8": {"uuid": "4a9a478b-bee6-4bd9-b2c9-e8831ff3f78f", "name": "HAE_METER_v3_8", "internalAddress": "17.8", "type": "heat", "supportsCrc": "0", "nodeFlags": [], "CurrentHeatQuantity": "NaN", "DeviceName": "HAE_METER_v3_8"}, "dev_2": {"uuid": "8655ca7c-c82f-4d45-84a9-1e2f8b14c7e3", "name": "Hal", "internalAddress": "2", "type": "EM6550_v1", "supportsCrc": "0", "ccList": "25 27 72 86 75 73", "supportedCC": "25 27 72 86 75 73", "nodeFlags": [], "IsConnected": "1", "HealthValue": "10", "DeviceName": "Hal", "CurrentState": "0", "TargetStatus": "0"}}
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

Sorry. You need to use the DEV_ number.
I've not seen a 17.x number earlier.....

for example : 17.2.CurrentElectricityFlow

Try to comments the most options out and add the step by step.
Is this way you can monitor script function by function
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

Got it working, not completely fine but it does show some values correct. I will try to play with the numbers again.
Screenshot_20200727-172420_Chrome.png
Screenshot_20200727-172420_Chrome.png (379.63 KiB) Viewed 1856 times
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Jasper79 »

Next question,
Does it support Zon op Toon?
"dev_17.3": "type": "elec_solar", "supportsCrc": "0", "nodeFlags": [], "CurrentElectricityFlow": "1409.00", "CurrentElectricityQuantity": "3495762.00", "DeviceName": "HAE_METER_v3_3"},
User avatar
madpatrick
Posts: 659
Joined: Monday 26 December 2016 12:17
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by madpatrick »

Yes. This is the P1 readout which can be used.
I’m using myself the Solaredge for the current power.
In the powergraph of the P1 readout you also see solar return values
-= HP server GEN11 =- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.14b on Tab8" =-
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest