- Screenshot_20201016-185232_Chrome.png (285.39 KiB) Viewed 1460 times
Controlling Toon [HACKED] from Domoticz
Moderator: leecollings
-
- 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
These settings?
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Yes. It is for me unclear why it is not working
The trigger “ Tijdelijk” looks valid.
If you breakdown the blocky script with the IF function and at DO only a log function. Do you see the message in your log ?
And then step by step add functions
The trigger “ Tijdelijk” looks valid.
If you breakdown the blocky script with the IF function and at DO only a log function. Do you see the message in your log ?
And then step by step add functions
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
-
- 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
Hi,
Well I'm getting somewhere, When I use the button "Tijdelijk" in Domoticz my script runs.
Now I still can't figure out why it doesn't when changing the setpoint, Changing the setpoint changes the state through the feedback by Toon.
Same when I just use the first DO to write to the log and don't let Domoticz make changes to Toon.
I set the delay to change back to 30 seconds so I can change tabs and wait for it to appea
Below I changed the setpoint from 10 to 11 and you can see it does not say eventsystem triggered
Well I'm getting somewhere, When I use the button "Tijdelijk" in Domoticz my script runs.
Now I still can't figure out why it doesn't when changing the setpoint, Changing the setpoint changes the state through the feedback by Toon.
Same when I just use the first DO to write to the log and don't let Domoticz make changes to Toon.
Code: Select all
2020-10-17 08:22:13.524 Status: User: Admin initiated a switch command (128/ToonAutoProgram/Set Level)
2020-10-17 08:22:13.774 Status: Toon Auto Test trigger
2020-10-17 08:22:43.809 (Dummy) Light/Switch (Toon Scenes)
2020-10-17 08:22:43.854 (Dummy) Light/Switch (ToonAutoProgram)
Below I changed the setpoint from 10 to 11 and you can see it does not say eventsystem triggered
Code: Select all
2020-10-17 08:25:23.434 (Dummy) Thermostat (ToonThermostat)
2020-10-17 08:25:23.723 Status: dzVents: Info: Handling events for: "ToonThermostat", value: "11.00"
2020-10-17 08:25:23.723 Status: dzVents: Info: ------ Start internal script: Toon Setpoint: Device: "ToonThermostat (Dummy)", Index: 127
2020-10-17 08:25:23.724 Status: dzVents: Info: Setting Toon setpoint to 11.0
2020-10-17 08:25:23.724 Status: dzVents: Info: ------ Finished Toon Setpoint
2020-10-17 08:26:00.704 (Dummy) Light/Switch (Toon Scenes)
2020-10-17 08:26:00.740 (Dummy) Light/Switch (ToonAutoProgram)
2020-10-17 08:26:00.281 Status: dzVents: Info: ------ Start internal script: Toon:, trigger: "every minute"
2020-10-17 08:26:00.608 Status: dzVents: Info: ------ Finished Toon
2020-10-17 08:27:00.329 Status: dzVents: Info: ------ Start internal script: Toon:, trigger: "every minute"
2020-10-17 08:27:00.664 Status: dzVents: Info: ------ Finished Toon
2020-10-17 08:28:00.328 Status: dzVents: Info: ------ Start internal script: Toon:, trigger: "every minute"
2020-10-17 08:28:00.648 Status: dzVents: Info: ------ Finished Toon
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Jasper,
Maybe an other suggetion.
if you use the toon script, maybe it is possible (with help) to adjust the script.
I think that dzvent is more powerfull then blocky.
In the script both function (autoprogram and setpoint) are available.
Maybe you can change this with an "AND"function and ".afterMin()"
Maybe an other suggetion.
if you use the toon script, maybe it is possible (with help) to adjust the script.
I think that dzvent is more powerfull then blocky.
In the script both function (autoprogram and setpoint) are available.
Code: Select all
-- Update the current temperature setpoint
local currentSetpoint = tonumber(jsonThermostatInfo.currentSetpoint) / 100
local currentTemperature = tonumber(jsonThermostatInfo.currentTemp) / 100
currentTemperature = tonumber(string.format("%.1f", currentTemperature))
-- Update the current auto program
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
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
-
- 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
Thanks, That's way beyond my skills.
I do wonder if the silent part could cause the blockly doesn't trigger?
I do wonder if the silent part could cause the blockly doesn't trigger?
Code: Select all
-- 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
-
- 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
Thanks for pointing me to the toon script and making me try to understand something about it.
I deleted the .silent() and now it does what I wanted.
I deleted the .silent() and now it does what I wanted.
Code: Select all
-- domoticz.devices(ToonAutoProgram).switchSelector(currentProgramState).silent()
domoticz.devices(ToonAutoProgram).switchSelector(currentProgramState)
-
- Posts: 31
- Joined: Sunday 03 January 2016 0:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Hello, I rooted my Toon a couple of days ago and started to follow this thread. Nice scripts, but why oh why use scripts when you can make a native domoticz plugin?
Currently I only cover the basic functionality and only tested it with my Toon (v1). Use at your own risk.
You can clone it from github:
https://github.com/hansaplast26/domoticz-rooted-toon
Currently I only cover the basic functionality and only tested it with my Toon (v1). Use at your own risk.
You can clone it from github:
https://github.com/hansaplast26/domoticz-rooted-toon
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Nice addon !hansaplast31 wrote: ↑Saturday 26 December 2020 15:58 Hello, I rooted my Toon a couple of days ago and started to follow this thread. Nice scripts, but why oh why use scripts when you can make a native domoticz plugin?
Currently I only cover the basic functionality and only tested it with my Toon (v1). Use at your own risk.
You can clone it from github:
https://github.com/hansaplast26/domoticz-rooted-toon
Maybe start sepearate topic for this feature
Has this plugin a backwards communication with the Toon. In other words, if you change a setting on your Toon, does Domoticz get updated ?
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
-
- Posts: 31
- Joined: Sunday 03 January 2016 0:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Yes it is bi-directionalmadpatrick wrote: ↑Saturday 26 December 2020 16:27 Has this plugin a backwards communication with the Toon. In other words, if you change a setting on your Toon, does Domoticz get updated ?
There are a couple of advantages to plugins:
- the connection (i.e. http) is handled natively by domoticz itself, which means you will get no script that gets stuck due to some external url calls that get stuck
- in this plugin the heartbeat is set to 5 seconds, which means that domoticz will connect to the Toon every 5 seconds and reads several things, such as:
"/happ_thermstat?action=getThermostatInfo"
"/boilerstatus/boilervalues.txt"
I have not yet implemented the readout of "/hdrv_zwave?action=getDevices.json" as I believe this might be the wrong call to read out electricity and gas readings. "/happ_pwrusage?action=GetCurrentUsage" is probably better, but I am also looking for the readings of todays usage.
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
I'll try the script and let you know for any feedback.
The Powerconsumption and Boilerinfo would be great add-ons.
As on the Toon it self, these are also add-ons
-------- Update ----------
Some feedback.
When you change a temparature to a Progam temperature, the program status is not set to this status
For example if you Home temparature is 20°C and you change the Setpoint to 20°C, the Program remains Manual and not Home
With "/boilerstatus/boilervalues.txt" I'm missing :
- boilerSetpoint
- boilerOutTemp
- boilerInTemp
- boilerPressure
- boilerModulationLevel
Is it possible to add those also ?
The Powerconsumption and Boilerinfo would be great add-ons.
As on the Toon it self, these are also add-ons
-------- Update ----------
Some feedback.
When you change a temparature to a Progam temperature, the program status is not set to this status
For example if you Home temparature is 20°C and you change the Setpoint to 20°C, the Program remains Manual and not Home
With "/boilerstatus/boilervalues.txt" I'm missing :
- boilerSetpoint
- boilerOutTemp
- boilerInTemp
- boilerPressure
- boilerModulationLevel
Is it possible to add those also ?
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
-
- Posts: 31
- Joined: Sunday 03 January 2016 0:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Thanks for testing!madpatrick wrote: ↑Saturday 26 December 2020 17:02 Some feedback.
When you change a temparature to a Progam temperature, the program status is not set to this status
For example if you Home temparature is 20°C and you change the Setpoint to 20°C, the Program remains Manual and not Home
The plugin does not have intelligence, it just reads back what the Toon has to tell (and interprets that).
I did this test at my home just now, where home is 20.5 C and comfort is 21.0 C
1) Toon is in home mode
2) On domoticz I increase the setpoint from 20.5 to 21.0
3) Result: Auto program goes to Temporary and Program goes to manual
4) On domoticz I set the setpoint back to 20.5
5) Result: Auto program goes to Yes and Program goes back to Home
-
- Posts: 31
- Joined: Sunday 03 January 2016 0:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
the boilerinfo is in the plugin now.
(if you had the earlier version of the plugin you will need to remove and add the hardware in domoticz for the new device to appear. domoticz is not very good at this).
(if you had the earlier version of the plugin you will need to remove and add the hardware in domoticz for the new device to appear. domoticz is not very good at this).
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Thankshansaplast31 wrote: ↑Saturday 26 December 2020 19:44 the boilerinfo is in the plugin now.
(if you had the earlier version of the plugin you will need to remove and add the hardware in domoticz for the new device to appear. domoticz is not very good at this).
Maybe place plugin.py in the main directory and not in the sub folder RootedToonPlug.
If you install the plugin by git the plugin is not working because of the subfolder.
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Probably the Toon has no intelligence to regonize the temperature with a scene.hansaplast31 wrote: ↑Saturday 26 December 2020 17:34Thanks for testing!madpatrick wrote: ↑Saturday 26 December 2020 17:02 Some feedback.
When you change a temparature to a Progam temperature, the program status is not set to this status
For example if you Home temparature is 20°C and you change the Setpoint to 20°C, the Program remains Manual and not Home
The plugin does not have intelligence, it just reads back what the Toon has to tell (and interprets that).
I did this test at my home just now, where home is 20.5 C and comfort is 21.0 C
1) Toon is in home mode
2) On domoticz I increase the setpoint from 20.5 to 21.0
3) Result: Auto program goes to Temporary and Program goes to manual
4) On domoticz I set the setpoint back to 20.5
5) Result: Auto program goes to Yes and Program goes back to Home
It should indeed come from the Toon.
In the script there is a work around to read the temperature and set the Toon to the correct scene.
Looks like to Program has a link with the temperature setting and also sets the scene correct.
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
The dzVents openURL command is also handled natively by domoticz.hansaplast31 wrote: ↑Saturday 26 December 2020 16:41 - the connection (i.e. http) is handled natively by domoticz itself, which means you will get no script that gets stuck due to some external url calls that get stuck
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- 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
Plugin looks nice, If you start a new thread for this please post the link in this one. New thread will probably make it easier to follow for both developers.
-
- Posts: 3
- Joined: Monday 04 March 2019 19:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.9700
- Location: Holland
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Hello,
I am just a beginner in Domoticz and i try to connect my rooted Toon to Domoticz .
The switches are working well, but the temperatures are not shown.
when i use de URL http://192.168.178.x/happ_thermstat?act ... mostatInfo
the result seems OK
{"result":"ok", "currentTemp":"2112", "currentSetpoint":"2000", "currentInternalBoilerSetpoint":"6", "programState":"0", "activeState":"0", "nextProgram":"-1", "nextState":"-1", "nextTime":"0","nextSetpoint":"0","randomConfigId":"1804289383","errorFound":"255","connection":"0","burnerInfo":"0","otCommError":"0","currentModulationLevel":"0"}
What can be wrong
I am just a beginner in Domoticz and i try to connect my rooted Toon to Domoticz .
The switches are working well, but the temperatures are not shown.
when i use de URL http://192.168.178.x/happ_thermstat?act ... mostatInfo
the result seems OK
{"result":"ok", "currentTemp":"2112", "currentSetpoint":"2000", "currentInternalBoilerSetpoint":"6", "programState":"0", "activeState":"0", "nextProgram":"-1", "nextState":"-1", "nextTime":"0","nextSetpoint":"0","randomConfigId":"1804289383","errorFound":"255","connection":"0","burnerInfo":"0","otCommError":"0","currentModulationLevel":"0"}
What can be wrong
- madpatrick
- Posts: 636
- Joined: Monday 26 December 2016 12:17
- Target OS: Linux
- Domoticz version: 2024.7
- Location: Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
If you want have a easy setup you better can you this plugin
viewtopic.php?f=34&t=34986
Otherwise if you to use this script, you need to give more information.
Check all names and uservariables in detail. A misspell is easy made
viewtopic.php?f=34&t=34986
Otherwise if you to use this script, you need to give more information.
Check all names and uservariables in detail. A misspell is easy made
-= HP server GEN8 Xeon(R) E3-1220L_V2 -=- OZW -=- Toon2 (rooted) -=- Domoticz v2024.7 -=- Dashticz v3.12b on Tab8" =-
-
- Posts: 451
- Joined: Friday 16 October 2015 7:58
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
I use the Toon api on a non rooted Toon.
https://github.com/JohnvandeVrugt/toona ... TALL_PI.md
Got this in my manual:
Installatie op basis van https://github.com/JohnvandeVrugt/toona ... TALL_PI.md
• Bestanden van https://github.com/costastf/toonapilib gedownload
• toonapilib-master geplakt in C:\Program Files\Domoticz\plugins
• Start een command prompt als administrator en voer daar in: pip3 install toonapilib -U (Hier kwam waarschijnlijk door de eerste poging telkens op terug “Requirements already satisfied”)
• Bestanden van https://github.com/JohnvandeVrugt/toonapilib4domoticz gedownload
• toonapilib4domoticz-master geplakt in C:\Program Files\Domoticz\plugins
• Domoticz service herstart
• In hardware “ToonApiLib als nieuwe hardware toevoegen
Voor de API key (informatie van (http://www.digitaldomo.nl/homebridge/to ... n-homekit/):
• Ga naar https://developer.toon.eu/
• Maak een nieuwe app en vul als “App Name” in “Domoticz” en als “Callback URL” een “/”
• Nadat de app is goedgekeurd is er een ‘Consumer Key‘ gegenereerd en hiermee kan een apiToken aangevraagd worden.
•
• Ga naar https://api.toon.eu/toonapi-accesstoken ... nsumer_key> Waarbij <consumer_key> uiteraard de Consumer_Key van de zojuist gemaakte app is. De apiToken zie je op het scherm nadat je inlogt met je Eneco-gebruikers-account.
• Log in met je Eneco gegevens en er komt een access token terug.
• Deze dient ingevuld te worden bij de nieuwe hardware
https://github.com/JohnvandeVrugt/toona ... TALL_PI.md
Got this in my manual:
Installatie op basis van https://github.com/JohnvandeVrugt/toona ... TALL_PI.md
• Bestanden van https://github.com/costastf/toonapilib gedownload
• toonapilib-master geplakt in C:\Program Files\Domoticz\plugins
• Start een command prompt als administrator en voer daar in: pip3 install toonapilib -U (Hier kwam waarschijnlijk door de eerste poging telkens op terug “Requirements already satisfied”)
• Bestanden van https://github.com/JohnvandeVrugt/toonapilib4domoticz gedownload
• toonapilib4domoticz-master geplakt in C:\Program Files\Domoticz\plugins
• Domoticz service herstart
• In hardware “ToonApiLib als nieuwe hardware toevoegen
Voor de API key (informatie van (http://www.digitaldomo.nl/homebridge/to ... n-homekit/):
• Ga naar https://developer.toon.eu/
• Maak een nieuwe app en vul als “App Name” in “Domoticz” en als “Callback URL” een “/”
• Nadat de app is goedgekeurd is er een ‘Consumer Key‘ gegenereerd en hiermee kan een apiToken aangevraagd worden.
•
• Ga naar https://api.toon.eu/toonapi-accesstoken ... nsumer_key> Waarbij <consumer_key> uiteraard de Consumer_Key van de zojuist gemaakte app is. De apiToken zie je op het scherm nadat je inlogt met je Eneco-gebruikers-account.
• Log in met je Eneco gegevens en er komt een access token terug.
• Deze dient ingevuld te worden bij de nieuwe hardware
-
- Posts: 3
- Joined: Monday 04 March 2019 19:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.9700
- Location: Holland
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
u am trying to use the script i checked the uservariables for at least 10 times made 2 times form scratch new settings.madpatrick wrote: ↑Thursday 18 February 2021 20:28 If you want have a easy setup you better can you this plugin
viewtopic.php?f=34&t=34986
Otherwise if you to use this script, you need to give more information.
Check all names and uservariables in detail. A misspell is easy made
but the temperature will not show the signal to the toon like home,comfort,away, manual are working OK
So i tryed your plugin but i get error see below.
2021-02-19 14:10:50.529 (TOON@) onMessage aborted, response format not JSON
2021-02-19 14:10:50.529 (TOON@) <?xml version="1.0" encoding="iso-8859-1"?>
2021-02-19 14:10:50.529 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2021-02-19 14:10:50.529 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2021-02-19 14:10:50.529 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2021-02-19 14:10:50.529 <head>
2021-02-19 14:10:50.529 <title>404 - Not Found</title>
2021-02-19 14:10:50.529 </head>
2021-02-19 14:10:50.529 <body>
2021-02-19 14:10:50.529 <h1>404 - Not Found</h1>
2021-02-19 14:10:50.529 </body>
2021-02-19 14:10:50.529 </html>
2021-02-19 14:10:50.529
Who is online
Users browsing this forum: No registered users and 1 guest