Controlling Toon via Domoticz

Everything about external control, apps, VNC, etc goes here.

Moderators: marcelr, TheHogNL, Toonz

Edwin66
Member
Member
Posts: 79
Joined: Mon Aug 13, 2018 10:50 pm

Re: Controlling Toon via Domoticz

Post by Edwin66 »

Ah... At the moment I see something happening.
2018-11-14 12:53:45.847 (Toon Schakelaars) Light/Switch (Toon Auto Program)
2018-11-14 12:53:45.842 Status: User: Admin initiated a switch command (126/Toon Auto Program/Set Level)
2018-11-14 12:53:47.049 Error: Error opening url: http://192.168.0.4/happ_thermstat?actio ... te&state=0
2018-11-14 12:53:52.197 (Toon Schakelaars) Light/Switch (Toon Auto Program)
2018-11-14 12:53:52.193 Status: User: Admin initiated a switch command (126/Toon Auto Program/Set Level)
2018-11-14 12:53:56.077 (Toon Schakelaars) Light/Switch (Toon Auto Program)
2018-11-14 12:53:56.073 Status: User: Admin initiated a switch command (126/Toon Auto Program/Set Level)
2018-11-14 12:54:13.804 (Toon Schakelaars) Light/Switch (Toon Auto Program)
2018-11-14 12:54:13.800 Status: User: Admin initiated a switch command (126/Toon Auto Program/Set Level)
2018-11-14 12:54:19.385 (Toon Schakelaars) Light/Switch (Toon Scenes)
2018-11-14 12:54:19.378 Status: User: Admin initiated a switch command (127/Toon Scenes/Set Level)
2018-11-14 12:54:22.749 (Toon Schakelaars) Light/Switch (Toon Scenes)
2018-11-14 12:54:22.743 Status: User: Admin initiated a switch command (127/Toon Scenes/Set Level)
2018-11-14 12:54:26.653 (Toon Schakelaars) Light/Switch (Toon Scenes)
2018-11-14 12:54:26.648 Status: User: Admin initiated a switch command (127/Toon Scenes/Set Level)
Toon® (rooted) | Hue bulbs | TRÅDFRI bulbs | Smart Plug | Domoticz latest BETA |

I'm not a programmer, just wish things work MY way
Edwin66
Member
Member
Posts: 79
Joined: Mon Aug 13, 2018 10:50 pm

Re: Controlling Toon via Domoticz

Post by Edwin66 »

TerrorSource wrote:Please let me know if there’s a typo or error in the manual so I can edit it if needed.
As far as i can see, there is nothign wrong with your guide. It's just me
Toon® (rooted) | Hue bulbs | TRÅDFRI bulbs | Smart Plug | Domoticz latest BETA |

I'm not a programmer, just wish things work MY way
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Controlling Toon via Domoticz

Post by madpatrick »

Edwin66 wrote: As far as i can see, there is nothign wrong with your guide. It's just me
Edwin,
There are people willing to help you. So use this gesture.
Somebody can login in to your system and check it for you

Check you logs carefully:

Code: Select all

2018-11-14 12:53:47.049 Error: Error opening url: http://192.168.0.4/happ_thermstat?actio ... te&state=0
Can you access toon with your webbrowser ?

Code: Select all

http://TOON_IP/happ_thermstat?action=getThermostatInfo
Edwin66
Member
Member
Posts: 79
Joined: Mon Aug 13, 2018 10:50 pm

Re: Controlling Toon via Domoticz

Post by Edwin66 »

madpatrick wrote:
Edwin66 wrote: As far as i can see, there is nothign wrong with your guide. It's just me
Edwin,
There are people willing to help you. So use this gesture.
Somebody can login in to your system and check it for you

Check you logs carefully:

Code: Select all

2018-11-14 12:53:47.049 Error: Error opening url: http://192.168.0.4/happ_thermstat?actio ... te&state=0
Can you access toon with your webbrowser ?

Code: Select all

http://TOON_IP/happ_thermstat?action=getThermostatInfo
Yes, having no problems with that:

{
result: "ok",
currentTemp: "2002",
currentSetpoint: "2000",
currentInternalBoilerSetpoint: "28",
programState: "0",
activeState: "1",
nextProgram: "-1",
nextState: "-1",
nextTime: "0",
nextSetpoint: "0",
randomConfigId: "1804289383",
errorFound: "255",
connection: "0",
burnerInfo: "0",
otCommError: "0",
currentModulationLevel: "0"
}

Also that error, although it's there, I can paste it in a browser and it works. So that might have been a hiccup
Toon® (rooted) | Hue bulbs | TRÅDFRI bulbs | Smart Plug | Domoticz latest BETA |

I'm not a programmer, just wish things work MY way
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Controlling Toon via Domoticz

Post by madpatrick »

Edwin66 wrote:
madpatrick wrote:
Edwin66 wrote: As far as i can see, there is nothign wrong with your guide. It's just me
Edwin,
There are people willing to help you. So use this gesture.
Somebody can login in to your system and check it for you

Check you logs carefully:

Code: Select all

2018-11-14 12:53:47.049 Error: Error opening url: http://192.168.0.4/happ_thermstat?actio ... te&state=0
Can you access toon with your webbrowser ?

Code: Select all

http://TOON_IP/happ_thermstat?action=getThermostatInfo
Yes, having no problems with that:

{
result: "ok",
currentTemp: "2002",
currentSetpoint: "2000",
currentInternalBoilerSetpoint: "28",
programState: "0",
activeState: "1",
nextProgram: "-1",
nextState: "-1",
nextTime: "0",
nextSetpoint: "0",
randomConfigId: "1804289383",
errorFound: "255",
connection: "0",
burnerInfo: "0",
otCommError: "0",
currentModulationLevel: "0"
}

Also that error, although it's there, I can paste it in a browser and it works. So that might have been a hiccup
No hiccups.... it works or not

So, this also works ?

Code: Select all

http://TOON_IP/happ_thermstat?action=changeSchemeState&state=2&temperatureState=0
you see the change on your Toon ?

Now, what is working an what not ?
Edwin66
Member
Member
Posts: 79
Joined: Mon Aug 13, 2018 10:50 pm

Re: Controlling Toon via Domoticz

Post by Edwin66 »

madpatrick wrote:
So, this also works ?

Code: Select all

http://TOON_IP/happ_thermstat?action=changeSchemeState&state=2&temperatureState=0
Yes, the above works.
Now, what is working an what not ?
I can: set the 4 levels (home, comfort, away and sleep), can turn on/off the auto program

Can't: See boiler in/out temp, Toon Temp, no P1 data (gas/stroom), Keteldruk (pressure), Modulation Level or use the Toon Thermostat.
Toon® (rooted) | Hue bulbs | TRÅDFRI bulbs | Smart Plug | Domoticz latest BETA |

I'm not a programmer, just wish things work MY way
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Controlling Toon via Domoticz

Post by madpatrick »

First put you loglevel to DEBUG and check your logfile.
See boiler in/out temp, Keteldruk (pressure), Modulation Level
Check : http://TOON_IP/boilerstatus/boilervalues.txt
If the outputs are 0 you probly don't have modulating boiler or not set to ON in your Toon
Toon Temp, no P1 data (gas/stroom)
Check names of the switched etc... (LOGFILE....)

For the Thermostat.
Check the name of the switch. This must be the same as in the (2nd) script

Code: Select all

		devices = {
			'Toon Thermostaat'
Edwin66
Member
Member
Posts: 79
Joined: Mon Aug 13, 2018 10:50 pm

Re: Controlling Toon via Domoticz

Post by Edwin66 »

See boiler in/out temp, Keteldruk (pressure), Modulation Level
Check : http://TOON_IP/boilerstatus/boilervalues.txt
If the outputs are 0 you probly don't have modulating boiler or not set to ON in your Toon
{
sampleTime: "15-11-2018 21:00:00",
boilerSetpoint: 6,
roomTempSetpoint: 20,
boilerPressure: 1.89,
roomTemp: 21.11,
boilerOutTemp: 34,
boilerInTemp: 34.5,
boilerModulationLevel: 0
}
For the Thermostat.
Check the name of the switch. This must be the same as in the (2nd) script

Code: Select all

		devices = {
			'Toon Thermostaat'
Toon® (rooted) | Hue bulbs | TRÅDFRI bulbs | Smart Plug | Domoticz latest BETA |

I'm not a programmer, just wish things work MY way
WickedMaster
Member
Member
Posts: 76
Joined: Wed Nov 07, 2018 1:53 pm

Re: Controlling Toon via Domoticz

Post by WickedMaster »

Typo found in Dutch manual:

Chapter 5:
Ga naar tabblad “Sensors” binnen Domoticz.

This "Sensors" tab doesn't exist. You mean "Switches". That's where the ToonAutoProgram is listed at.
rvanmoorsel
Starting Member
Starting Member
Posts: 3
Joined: Fri Nov 16, 2018 9:44 pm

Re: Controlling Toon via Domoticz

Post by rvanmoorsel »

mAiden wrote:Edwin,

You will have to search for the right dev. I'll have a look tonight, if I get him working, I can tell you which column you should look at.
First off, I'm a newbie with both domoticz and Toon. I started out with the manual located at: http://files.domoticaforum.eu/uploads/T ... _NL_v2.zip. Everything seems to work, but the one (important) thing I can't seem to get to work, is setting the (utility) temp setpoint. It's being read when I change the Toon, but it cannot be set from domoticz. When I click on 'set' the old temp is set (that's the one before I change it). If I disable the Toon.lua script, it works perfect, but of course nothing is read from Toon to Domoticz, so it's out of sync. I stumbled across this dzEvents script and decided to give this a try. Now I too get the error:

Code: Select all

 Status: dzVents: Error (2.4.6): ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:57: attempt to index field 'dev_44' (a nil value)
Hence the quote, How can I find the right dev number?? The logfile doesn't say anything about it and I cannot find other logfiles even remotely showing some sort of dev...
I've also tried:
dev_2.2
or: dev_2.1
or: dev_2.5
or: dev_2.6
or: dev_2.8
But without the . between the digits, because that results in error:

Code: Select all

 Status: dzVents: Error (2.4.6): error loading module 'Toon' from file '/home/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua':
...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:57: malformed number near '.8.C'
Can you please give me some advise on how to solve this error?? Currently I'm completely out of clues and options.

Thanks in advance and keep up the good work!
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Controlling Toon via Domoticz

Post by madpatrick »

rvanmoorsel wrote:

Code: Select all

 Status: dzVents: Error (2.4.6): ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:57: attempt to index field 'dev_44' (a nil value)
Hence the quote, How can I find the right dev number?? The logfile doesn't say anything about it and I cannot find other logfiles even remotely showing some sort of dev...
I've also tried:
dev_2.2
or: dev_2.1
or: dev_2.5
or: dev_2.6
or: dev_2.8
Check this: http://TOON_IP/hdrv_zwave?action=getDevices.json
I've set it to : dev_24 (even there is a . in the file)
Everything seems to work, but the one (important) thing I can't seem to get to work, is setting the (utility) temp setpoint. It's being read when I change the Toon, but it cannot be set from domoticz.
Do you have the script : Toon_setpoint activated.
This is a seperate script to control the setpoints.
See also : domoticaforum.eu/viewtopic.php?f=102&am ... =30#p88055
This is a DzVents script which works better than the LUA scripts
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Controlling Toon via Domoticz

Post by madpatrick »

TerrorSource wrote:Hi guys,

As requested by a few users around here i've created a how-to manual to control Toon via Domoticz.
It's pretty much a step-by-step guide and should be enough to get it working within 20-30minutes.

The complete manual is based off information and scripts found on: https://www.domoticz.com/forum/viewtopic.php?t=11421

Please ask for support in the topic/url mention above. The scripts are made by users on that forum, not by me.
I will not take credit for the scripts nor will i support it personally.
I will however create a new version of the manual when there are errors or improvements possible in the current manual.

There's are seperate manuals for Dutch and English.

Please do NOT distribute this document or the content in any kind. It is for personal use only.

Version 2 available now:
- Fixes typo's
- Added LUA/DzVents option enabling

Dutch: Download v2
English: Download v2
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.
TerrorSource
Administrator
Administrator
Posts: 494
Joined: Thu May 04, 2017 9:28 pm

Re: Controlling Toon via Domoticz

Post by TerrorSource »

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 ;)
rvanmoorsel
Starting Member
Starting Member
Posts: 3
Joined: Fri Nov 16, 2018 9:44 pm

Re: Controlling Toon via Domoticz

Post by rvanmoorsel »

Hi madpatrick,

Thank you for the quick reply! I've tried the things you suggested. The URL http://toon_ip/hdrv_zwave?action=getDevices.json shows:

Code: Select all

{"dev_settings_device": {"uuid": "d873daef-93f8-4291-8ac0-66aadcea8875"
"name": "settings_device"
"internalAddress": "settings_device"
"type": "settings_device"}
"dev_2": {"uuid": "66ca6f0b-612a-4b7b-bc85-d2eb5963fd83"
"name": "HAE_METER_v2"
"internalAddress": "2"
"type": "HAE_METER_v2"
"supportsCrc": "1"
"ccList": "22 3c 3d 3e 56 60 70 72 7a 86 8b 73"
"supportedCC": "22 3c 3d 3e 56 60 70 72 7a 86 8b 73"
"nodeFlags": []
"IsConnected": "1"
"HealthValue": "10"
"DeviceName": "HAE_METER_v2"}
"dev_2.1": {"uuid": "cf59f617-26ea-483b-ac9f-58012b5e4ec0"
"name": "HAE_METER_v2_1"
"internalAddress": "2.1"
"type": "HAE_METER_v2_1"
"supportsCrc": "0"
"ccList": "3c 3d 3e 72 86"
"supportedCC": "3c 3d 3e 72 86"
"nodeFlags": []
"CurrentGasFlow": "0.00"
"CurrentGasQuantity": "666275.00"
"DeviceName": "HAE_METER_v2_1"}
"dev_2.2": {"uuid": "7de2d7dc-8e30-4b32-9444-1f011071cb59"
"name": "HAE_METER_v2_2"
"internalAddress": "2.2"
"type": "HAE_METER_v2_2"
"supportsCrc": "0"
"ccList": "3c 3d 3e 72 86"
"supportedCC": "3c 3d 3e 72 86"
"nodeFlags": []
"DeviceName": "HAE_METER_v2_2"}
"dev_2.3": {"uuid": "3f6684ec-9e93-4a5a-bb13-3cc364462c1c"
"name": "HAE_METER_v2_3"
"internalAddress": "2.3"
"type": "HAE_METER_v2_3"
"supportsCrc": "0"
"ccList": "3c 3d 3e 72 86"
"supportedCC": "3c 3d 3e 72 86"
"nodeFlags": []
"DeviceName": "HAE_METER_v2_3"
"CurrentElectricityFlow": "347.00"
"CurrentElectricityQuantity": "2047960.00"}
"dev_2.4": {"uuid": "6d4dade8-8102-4290-b3b3-eb9ed141345b"
"name": "HAE_METER_v2_4"
"internalAddress": "2.4"
"type": "HAE_METER_v2_4"
"supportsCrc": "0"
"ccList": "3c 3d 3e 72 86"
"supportedCC": "3c 3d 3e 72 86"
"nodeFlags": []
"DeviceName": "HAE_METER_v2_4"
"CurrentElectricityFlow": "0.00"
"CurrentElectricityQuantity": "0.00"}
"dev_2.5": {"uuid": "e2e615ff-6aba-49df-be88-06ec61b521fb"
"name": "HAE_METER_v2_5"
"internalAddress": "2.5"
"type": "HAE_METER_v2_5"
"supportsCrc": "0"
"ccList": "3c 3d 3e 72 86"
"supportedCC": "3c 3d 3e 72 86"
"nodeFlags": []
"DeviceName": "HAE_METER_v2_5"
"CurrentElectricityFlow": "0.00"
"CurrentElectricityQuantity": "2302215.00"}
"dev_2.6": {"uuid": "e80c84da-d4b0-4ca5-b481-ea8a9a9ec8b6"
"name": "HAE_METER_v2_6"
"internalAddress": "2.6"
"type": "HAE_METER_v2_6"
"supportsCrc": "0"
"ccList": "3c 3d 3e 72 86"
With this output I assume I need dev_2.3, so I adjusted the script to look like this (line 54 - 66):

Code: Select all

        local jsonGasPower = json:decode(GasPowerInfo)
       
       -- domoticz.log(jsonGasPower)
         local CurrentElectricityFlowHoog = tonumber(jsonGasPower.dev_23.CurrentElectricityFlow )
         local CurrentElectricityQuantityHoog = tonumber(jsonGasPower.dev_23.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
I just changed the first two lines to check the log for an error in a later line, but I still receive the error:

Code: Select all

Error (2.4.6): ...e/pi/domoticz/scripts/dzVents/generated_scripts/Toon.lua:57: attempt to index field 'dev_23' (a nil value)
Maybe I'm doing it completely wrong. If that's the case, I'd love to hear how to do it right :)

By the way, right now the setting temp is working because of the Toon script is not working. When I've got this working, I'll add the Toon_setpoint activated dzEvents script.

Thanks for all the great work guys!!
User avatar
madpatrick
Member
Member
Posts: 104
Joined: Wed Dec 06, 2017 9:52 pm
Location: Zuid-Holland

Re: Controlling Toon via Domoticz

Post by madpatrick »

in your file i see :

Code: Select all

"DeviceName": "HAE_METER_v2_4"
"CurrentElectricityFlow": "0.00"
"CurrentElectricityQuantity": "0.00"}
This means dev_24 instead of dev_23

Change the 4x number into 2x number and it should work fine. (at least it was with me ;-) )


You can also put -- in front of the line to bypass it (complete blok) so you can test and add each time a function untill every option works.
Post Reply

Return to “Toon external control”