Controlling Toon [HACKED] from Domoticz
Moderator: leecollings
-
- Posts: 46
- Joined: Thursday 28 May 2015 18:41
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Location: Diemen Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
There was an error on my events, was set on Time instead of device. Change that, now it works.
Re: Controlling Toon [HACKED] from Domoticz
Good to hear 
Now that you finally got it working, you can replace these scripts with the DzVents version I made. I put it in the opening post


Now that you finally got it working, you can replace these scripts with the DzVents version I made. I put it in the opening post


-
- Posts: 46
- Joined: Thursday 28 May 2015 18:41
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Location: Diemen Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Ai, after changing ToonSetPoint and ToonGetInfo Toonthermostat is again not functioning.
Re: Controlling Toon [HACKED] from Domoticz
give me details
-
- Posts: 46
- Joined: Thursday 28 May 2015 18:41
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Location: Diemen Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
I just brought the temperature via ToonThermostat from 20 to 22 degrees and then set. I am now looking at my VNC screen (unfortunately, I can not make a print screen of my domoticz with an active wake up vnc screen) But with the replacement script, my Toon does not want to take over the temperature anymore. Even Domoticz restarts (then my synology will start again) but that did not help.
Re: Controlling Toon [HACKED] from Domoticz
Ai.. just revert back to the old lua script, it works fine
-
- Posts: 46
- Joined: Thursday 28 May 2015 18:41
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Location: Diemen Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
I already dit dat (for the moment).
Re: Controlling Toon [HACKED] from Domoticz
Just to make sure: You are using DzVents 2.3.0 ?
And when you created the new script did you select Type = "DzVents" ? And was it set to active?
And when you created the new script did you select Type = "DzVents" ? And was it set to active?
-
- Posts: 46
- Joined: Thursday 28 May 2015 18:41
- Target OS: NAS (Synology & others)
- Domoticz version: 3.5877
- Location: Diemen Netherlands
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
No, i don't know if there is a DZVent package for the Synology (where my Domoticz is installed).
Re: Controlling Toon [HACKED] from Domoticz
Is there anyone out there who could help me out in a more simple way, since I am not a programmer, nor a hacker and I can't figure it out. May be there is someone out there near Leiden who is willing to do it for me for some small donation (pizza, beer, money).
Thanks for now.
Joost
Thanks for now.
Joost
-
- Posts: 11
- Joined: Monday 09 October 2017 10:20
- Target OS: Linux
- Domoticz version: 2021.1
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
I've asked the same thing. Still waiting for reply. But hey, I'm not pushingjovabe wrote:Is there anyone out there who could help me out in a more simple way, since I am not a programmer, nor a hacker and I can't figure it out. May be there is someone out there near Leiden who is willing to do it for me for some small donation (pizza, beer, money).
Thanks for now.
Joost

Verstuurd vanaf mijn SM-G903F met Tapatalk
-
- Posts: 52
- Joined: Wednesday 04 October 2017 11:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
I've copied these files to /home/pi/domoticz/scripts/p1_meter/ and made sure they are executable with chmod +xDennisD wrote: ↑Thursday 05 October 2017 8:20 I will try and explain howto make the gas sensor:
What i did was make a dummy switch in Domoticz/hardware and named it ToonHacked, just to keep things organized.After this is created click on make virtual sensor and then fill in a name that you want, in my case i did gas verbruik and in the pull down menu select gas. After this is created goto your devices (settings drop down menu) and search for "gas verbuik" or whatever name you called the virtual gas sensor, and look for the idx and remember/write it down.
Code: Select all
Electricity_data_json.php
gas_data_json.php
OT_data_json.php
Then I changed the Toon_IP, the Domoticz_IP and entered the 2 idx values where it should.
I've also set up crontab as followes (with crontab -e, not with sudo) so it should execute every minute.
Code: Select all
*/1 * * * * /home/pi/domoticz/scripts/p1_meter/gas_data_json.php
*/1 * * * * /home/pi/domoticz/scripts/p1_meter/Electricity_data_json.php
*/1 * * * * /home/pi/domoticz/scripts/p1_meter/OT_data_json.php
Code: Select all
http://192.168.0.200:8080/json.htm?type=command¶m=udevice&idx=24&nvalue=0&svalue=1061431
http://192.168.0.200:8080/json.htm?type=command¶m=udevice&idx=25&nvalue=0&svalue=2205
Code: Select all
http://192.168.0.11/hdrv_zwave?action=getDevices.json
http://192.168.0.11/happ_pwrusage?action=GetCurrentUsage
What am I doing wrong?

-edit-
nvm.. I didn't have curl installed. Fixed it by executing "sudo apt-get install php-curl"
Next to that I made my own version of the electricity script, because I wanted to see the total (kwh) used and the current usage (watt)
I've added Add a virtual sensor "Electric (Instant+Counter)"
And than I made this code. I am not a coder so I probably don't code according to the rules lol.
Code: Select all
code obsolete, see new code below
Last edited by FunFair on Thursday 19 October 2017 21:48, edited 1 time in total.
-
- Posts: 52
- Joined: Wednesday 04 October 2017 11:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Is it possible to update the information from "GetToonInfo" quicker than 1 minute?
When I switch the setting from home to away 1 minute is quite a long time for an update.
Isn't it possible to have the script trigger when the button has been pressed? That way it'll update instantly right?
When I switch the setting from home to away 1 minute is quite a long time for an update.
Isn't it possible to have the script trigger when the button has been pressed? That way it'll update instantly right?
-
- Posts: 11
- Joined: Monday 09 October 2017 10:20
- Target OS: Linux
- Domoticz version: 2021.1
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Is it possible to add all the proper steps and information about how to set up a Rooted Toon in Domoticz to a Wiki?
That way all outdated or wrong info is not finding its way into someone's setup and all the steps are in the proper sequence.
That way all outdated or wrong info is not finding its way into someone's setup and all the steps are in the proper sequence.
-
- Posts: 52
- Joined: Wednesday 04 October 2017 11:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
My meter adapter went down for some reason and Toon started reporting bad values to Domoticz. So my database values were all messed up.
The power meter reported only the nighttime value and the gas value was in the millions.
So I altered the php script to make them more robust. I alsmo made it a bit easier for new users aswell.
It's probably not perfect. php files are attached to this post. and also shown in the code. If anyone has improvements, please share
note: the gas values with a smart meter will only update once every hour. The previous script would rewrite the same value every minute. This script will skip this, because it will only write a new value if it's different from the excisting one.
note2: before setting up the crontab. Run the files with ./electricity_data_json.php and ./gas_data_json.php from the commandline. If it doesn't work. Enable the echo's by removing the # signs to see a bit better what's happening.
note3: This code is written and tested by me for an hacked Toon firmware 4.7. The original script was written for firmware 3.x so I would think it will still work.
-update 23/10/17-
Created a P1_Meter script and Solar return power script.
Updated some things. See post later in this topic.
The power meter reported only the nighttime value and the gas value was in the millions.
So I altered the php script to make them more robust. I alsmo made it a bit easier for new users aswell.
It's probably not perfect. php files are attached to this post. and also shown in the code. If anyone has improvements, please share

note: the gas values with a smart meter will only update once every hour. The previous script would rewrite the same value every minute. This script will skip this, because it will only write a new value if it's different from the excisting one.
note2: before setting up the crontab. Run the files with ./electricity_data_json.php and ./gas_data_json.php from the commandline. If it doesn't work. Enable the echo's by removing the # signs to see a bit better what's happening.
note3: This code is written and tested by me for an hacked Toon firmware 4.7. The original script was written for firmware 3.x so I would think it will still work.
-update 23/10/17-
Created a P1_Meter script and Solar return power script.
Updated some things. See post later in this topic.
Last edited by FunFair on Monday 23 October 2017 20:18, edited 2 times in total.
-
- Posts: 51
- Joined: Friday 18 September 2015 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Nice, good job!
Re: Controlling Toon [HACKED] from Domoticz
Currently this topic is mainly focused on controlling Toon from Domoticz (yeah yeah... I know it's in the forum title), but maybe there are also people that want to control Domoticz from Toon. And therefor "TerrorSoure" made a nice application: DomoticzBoard
It takes some time to setup but in the end I think it is pretty neat
Also if you need authorization see my post here
It takes some time to setup but in the end I think it is pretty neat

Also if you need authorization see my post here
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
- Benjamin Disraeli -
Re: Controlling Toon [HACKED] from Domoticz
Looks like a cool project, but unfortunately its not possible (afaik) to install apps on a rooted toon 

-
- Posts: 11
- Joined: Monday 09 October 2017 10:20
- Target OS: Linux
- Domoticz version: 2021.1
- Contact:
Re: Controlling Toon [HACKED] from Domoticz
Re: Controlling Toon [HACKED] from Domoticz
Ahh.. I didn't know. Unfortunately it looks like I have to flash my Toon again. Which I can't do, Marcelr did it for me last time 

Who is online
Users browsing this forum: No registered users and 1 guest