Controlling Toon [HACKED] from Domoticz

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
walberg
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

Post by walberg »

There was an error on my events, was set on Time instead of device. Change that, now it works.
Schermafbeelding 2017-10-09 om 18.59.18.jpg
Schermafbeelding 2017-10-09 om 18.59.18.jpg (154.16 KiB) Viewed 4127 times
Maes
Posts: 34
Joined: Tuesday 05 April 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Maes »

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 :lol: :lol:
walberg
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

Post by walberg »

Ai, after changing ToonSetPoint and ToonGetInfo Toonthermostat is again not functioning.
Maes
Posts: 34
Joined: Tuesday 05 April 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Maes »

give me details
walberg
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

Post by walberg »

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.
Maes
Posts: 34
Joined: Tuesday 05 April 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Maes »

Ai.. just revert back to the old lua script, it works fine
walberg
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

Post by walberg »

I already dit dat (for the moment).
Maes
Posts: 34
Joined: Tuesday 05 April 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Maes »

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?
walberg
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

Post by walberg »

No, i don't know if there is a DZVent package for the Synology (where my Domoticz is installed).
jovabe
Posts: 1
Joined: Tuesday 10 October 2017 14:55
Target OS: OS X
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by jovabe »

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
ronalddehaan
Posts: 11
Joined: Monday 09 October 2017 10:20
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by ronalddehaan »

jovabe 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
I've asked the same thing. Still waiting for reply. But hey, I'm not pushing :)

Verstuurd vanaf mijn SM-G903F met Tapatalk

FunFair
Posts: 52
Joined: Wednesday 04 October 2017 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by FunFair »

DennisD 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.
I've copied these files to /home/pi/domoticz/scripts/p1_meter/ and made sure they are executable with chmod +x

Code: Select all

Electricity_data_json.php 
gas_data_json.php 
OT_data_json.php
I've added 1 virtual gasmeter (idx 24) and virtual electricity meter (idx 25)
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
When I enter information manually to the meters it works.

Code: Select all

http://192.168.0.200:8080/json.htm?type=command&param=udevice&idx=24&nvalue=0&svalue=1061431
http://192.168.0.200:8080/json.htm?type=command&param=udevice&idx=25&nvalue=0&svalue=2205
This updates my gasmeter idx24 and electricitymeter idx25 to the entered svalue that I manually retreived from

Code: Select all

http://192.168.0.11/hdrv_zwave?action=getDevices.json
http://192.168.0.11/happ_pwrusage?action=GetCurrentUsage
But the php script doesn't seem to run?
What am I doing wrong? :o

-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.
FunFair
Posts: 52
Joined: Wednesday 04 October 2017 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by FunFair »

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?
ronalddehaan
Posts: 11
Joined: Monday 09 October 2017 10:20
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by ronalddehaan »

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.
FunFair
Posts: 52
Joined: Wednesday 04 October 2017 11:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by FunFair »

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.
Last edited by FunFair on Monday 23 October 2017 20:18, edited 2 times in total.
DennisD
Posts: 51
Joined: Friday 18 September 2015 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by DennisD »

Nice, good job!
Timeless
Posts: 41
Joined: Friday 10 June 2016 23:46
Target OS: Linux
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Timeless »

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
"The greatest good you can do for another, is not to share your own riches, but to reveal to him, his own."
- Benjamin Disraeli -
Maes
Posts: 34
Joined: Tuesday 05 April 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Maes »

Looks like a cool project, but unfortunately its not possible (afaik) to install apps on a rooted toon :(
ronalddehaan
Posts: 11
Joined: Monday 09 October 2017 10:20
Target OS: Linux
Domoticz version: 2021.1
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by ronalddehaan »

Maes wrote: Friday 20 October 2017 9:08 Looks like a cool project, but unfortunately its not possible (afaik) to install apps on a rooted toon :(
There is even an appstore available :lol:

https://www.domoticaforum.eu/viewtopic.php?f=87&t=11756
Maes
Posts: 34
Joined: Tuesday 05 April 2016 20:45
Target OS: -
Domoticz version:
Contact:

Re: Controlling Toon [HACKED] from Domoticz

Post by Maes »

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 ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest