Toon Energy Readings on Domoticz Topic is solved

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

bernard

Toon Energy Readings on Domoticz

Post by bernard »

Question : I just added Toon to Domoticz. I see gas usage, Energy reading (high cost) , room temperature, current temperature.
I do not see the energy Usage Low Cost. How do I add this to DOmoticz ?
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Toon Energy Readings on Domoticz

Post by ThinkPad »

I can't help you with the Toon <> Domoticz part, but if you have a smartmeter, you could also try not only reading the meter with Toon, but also with the Pi.
This is probably possible by using a RJ11-splitter and a P1 USB-Serial cable. I have done this in the past with an Arduino and a Pi both reading the smartmeter and it worked fine.

But if you don't have a smartmeter (yet) i can't help you unfortunately, something for the programmers ;)
I am not active on this forum anymore.
User avatar
Mooseknuckle
Posts: 43
Joined: Sunday 08 March 2015 9:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Toon Energy Readings on Domoticz

Post by Mooseknuckle »

Hi there,

I also have the toon thermostat but no smart meter (yet). Maybe you just have to wait a day. The low cost energy reading is not a seperate device in Domoticz. When I check the log for my energy meter I see both the low and high cost reading in one graph. And because its daytime now you probably just see the high cost.
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

I'll wait a few hours and report back here what the outcome is.

Anyone also experience with Toon - DOmoticz and Fibaro smart plug ?
Last edited by bernard on Friday 27 March 2015 15:20, edited 1 time in total.
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

ThinkPad wrote:I can't help you with the Toon <> Domoticz part, but if you have a smartmeter, you could also try not only reading the meter with Toon, but also with the Pi.
This is probably possible by using a RJ11-splitter and a P1 USB-Serial cable. I have done this in the past with an Arduino and a Pi both reading the smartmeter and it worked fine.

But if you don't have a smartmeter (yet) i can't help you unfortunately, something for the programmers ;)
I do have a smart meter and have some experience with logging via raspberry.
On github I've got a p1 logger witch logs to a sql database

https://github.com/bernardflach/P1Logger
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

I think i've sorted the low and high cost out .. DOmoticz receives, so it seems, both values. The graph says : value1 and value2
If i' m correct the value2 will be used within a few hours now.
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

And Yes :) Domoticz registeres both values :) awesome
Adriaan25
Posts: 6
Joined: Monday 30 March 2015 11:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Toon Energy Readings on Domoticz

Post by Adriaan25 »

Bernard, good to hear it's working!

I was wondering, by the way, what you meant by "room temperature" and "current temperature". Do you mean the room temperature and set-point (target) temperature?
I'm moving soon to a new place, and I'm considering to get Toon as well.

Could you perhaps list all the "Toon" devices that become available in Domoticz (maybe with a screenshot or something)?
This would give me a better indication of the possibilities and make a more informed choice for Toon. :)
Thanks in advance!
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

That's exactly what i meant :)
I hope the Domoticz Team can add the specific Toon Scenes to the system And support for smart Plugs registered in Toon

I see in Domoticz :
- Room Temperature
- Target Temperature
- Energy Reading
- Gas Reading
- And one Standard switch witch i don't know what it does. I tried it several times but nothing happens.

In the Toon settings in Domoticz you can add the gas & Energy Fee
Adriaan25
Posts: 6
Joined: Monday 30 March 2015 11:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Toon Energy Readings on Domoticz

Post by Adriaan25 »

Thanks for clearing that up!

I'm pretty sure there is already support for "Toon Scenes". In the wiki it says:
Setting the programState via json:
json.htm?type=command&param=thermostatstate&idx=123&state=3.

STATE_RELAX = 0,
STATE_ACTIVE = 1
STATE_SLEEP = 2
STATE_AWAY = 3
STATE_HOLIDAY = 4
Maybe this is the function of the "standard switch" you mentioned?
Does this switch have a particular name?

And as far as I understand, the "smart plugs" are essentially Fibaro Wall plugs.
I suppose you can either hook them up to a Z-wave controller (which will give domoticz access) or to the Toon Thermostat.
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

I'll post some screenshots (hopefully tonight otherwise tomorrow)

I added the Fibaro Wall plugs to my Toon so others can easily (if needed) start my radio (Webradio) or TV.

Note : Found some new info on this forum regarding the Fibaro wall Plugs : http://www.domoticz.com/forum/viewtopic.php?f=5&t=4908
Last edited by bernard on Monday 30 March 2015 14:54, edited 1 time in total.
R0cc0
Posts: 7
Joined: Monday 26 January 2015 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Toon Energy Readings on Domoticz

Post by R0cc0 »

The switch shows the status of the burner in your boiler (Or "CV ketel" as we call it in Dutch)

(I think this only works if Toon is used as an on/off device (instead of Opentherm) )
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

R0cc0 wrote:The switch shows the status of the burner in your boiler (Or "CV ketel" as we call it in Dutch)

(I think this only works if Toon is used as an on/off device (instead of Opentherm) )
I'll check it out and report back.
User avatar
Mooseknuckle
Posts: 43
Joined: Sunday 08 March 2015 9:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Toon Energy Readings on Domoticz

Post by Mooseknuckle »

I don't know if this is the proper way to do it but what I did to get the toon scenes in Domoticz is created a virtual switch for every scene. After this I made a script that checks the temperature setting of the toon setpoint.

This is how I get the temp value:

Code: Select all

curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=SWITCH_IDX" | grep -oP '(?<="SetPoint" : ").*(?=",)'
Based on that value it turns the virtual switch on for that scene.

You can also activate the scenes from Domoticz with the commands Adriaan25 mentioned, for example:

Code: Select all

curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=thermostatstate&idx=SWITCH_IDX&state=1"
It works but if anybody has a better idea to do this please let me know.
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

hereby a screenshot of my "Toon" devices in Domoticz.
Image

I tested something new today : I splitted my P1 port from my smartmeter and added a USB serial cable to my pi : P1 Smart meter USB.
This works :) :)
kurniawan77
Posts: 46
Joined: Wednesday 21 January 2015 20:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Toon Energy Readings on Domoticz

Post by kurniawan77 »

Mooseknuckle wrote:I don't know if this is the proper way to do it but what I did to get the toon scenes in Domoticz is created a virtual switch for every scene. After this I made a script that checks the temperature setting of the toon setpoint.

This is how I get the temp value:

Code: Select all

curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=SWITCH_IDX" | grep -oP '(?<="SetPoint" : ").*(?=",)'
Based on that value it turns the virtual switch on for that scene.
Can you help me out with this?

I don't know what to do with your script. What kind of script is it? is it bash? And what SWITCH_IDX do you use actually, is it from the Eneco Toon Room SetPoint or from the virtual switch?

Would you be kind to guide me please?
bernard

Re: Toon Energy Readings on Domoticz

Post by bernard »

Yes, This is in bash. You call this way a JSON script to control Toon (or other devices) via Domoticz

The IDX is the unique device identifier.

In this case you want to set the scene of Toon so you set the Thermostat (SetPoint)
User avatar
Mooseknuckle
Posts: 43
Joined: Sunday 08 March 2015 9:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Toon Energy Readings on Domoticz

Post by Mooseknuckle »

What I wanted to do is show the Toon scenes in Domoticz so I can trigger actions based on the scene that is active on the thermostat. I Created 4 virtual switches for the Toon scenes. After that I made a shell script that runs every 2 minutes. The script checks the toon setpoint temp. Based on that setting it switches on the vswitch for that scene.
Here is my script:

Code: Select all

#!/bin/bash

DOMO_IP="192.168.1.26"      
DOMO_PORT="8080"            
TOON_SETPOINT_IDX="66"
TOON_AWAY_IDX="82"
TOON_THUIS_IDX="84"
TOON_COMFORT_IDX="81"
TOON_SLAPEN_IDX="83"

temp=`curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_SETPOINT_IDX" | grep -oP '(?<="SetPoint" : ").*(?=",)'`

if expr "$temp" '=' 20.0
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_COMFORT_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Comfort already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_COMFORT_IDX&switchcmd=On"
       fi
elif expr "$temp" '=' 15.0
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_AWAY_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Away already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_AWAY_IDX&switchcmd=On"
       fi
elif expr "$temp" '=' 16.0
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_SLAPEN_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Slapen already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_SLAPEN_IDX&switchcmd=On"
       fi
elif expr "$test" '=' 19.5
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_THUIS_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Thuis already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_THUIS_IDX&switchcmd=On"
       fi

fi
Ofcourse you have to change the ip address, the idx numbers and the temperature values to match your settings :)
RPI 3, Philips Hue,Toon Thermostat, Harmony Smart Control, Yeelights
Mysensors wifi gateway + sensors, RFXtrx433E, Kaku stuff, Xiaomi gateway + sensors
Domoticz controlled DIY ambilight, Selectplus chime, Mi-light led controller
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Toon Energy Readings on Domoticz

Post by gizmocuz »

bernard wrote:I'll wait a few hours and report back here what the outcome is.

Anyone also experience with Toon - DOmoticz and Fibaro smart plug ?
Send you a PM
Quality outlives Quantity!
kurniawan77
Posts: 46
Joined: Wednesday 21 January 2015 20:23
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Toon Energy Readings on Domoticz

Post by kurniawan77 »

Mooseknuckle wrote:Hi,

What I wanted to do is show the Toon scenes in Domoticz so I can trigger actions based on the scene that is active on the thermostat. I Created 4 virtual switches for the Toon scenes. After that I made a shell script that runs every 2 minutes. The script checks the toon setpoint temp. Based on that setting it switches on the vswitch for that scene.
Here is my script:

Code: Select all

#!/bin/bash

DOMO_IP="192.168.1.26"      
DOMO_PORT="8080"            
TOON_SETPOINT_IDX="66"
TOON_AWAY_IDX="82"
TOON_THUIS_IDX="84"
TOON_COMFORT_IDX="81"
TOON_SLAPEN_IDX="83"

temp=`curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_SETPOINT_IDX" | grep -oP '(?<="SetPoint" : ").*(?=",)'`

if expr "$temp" '=' 20.0
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_COMFORT_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Comfort already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_COMFORT_IDX&switchcmd=On"
       fi
elif expr "$temp" '=' 15.0
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_AWAY_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Away already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_AWAY_IDX&switchcmd=On"
       fi
elif expr "$temp" '=' 16.0
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_SLAPEN_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Slapen already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_SLAPEN_IDX&switchcmd=On"
       fi
elif expr "$test" '=' 19.5
then
 curl -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=devices&rid=$TOON_THUIS_IDX" | grep "Status" | grep "On" > /dev/null

       if [ $? -eq 0 ] ; then
       echo "Thuis already ON"
       else
       curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$TOON_THUIS_IDX&switchcmd=On"
       fi

fi
Ofcourse you have to change the ip address, the idx numbers and the temperature values to match your settings :)
Aha, now i understand! i assume you use cron to run the script every two minutes?

Is it also possible to get the STATE from toon instead of the temperature values?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest