Using Toon with an electric heater

If you don't know where to post, post here.

Moderators: marcelr, Toonz, TheHogNL, TerrorSource

Using Toon with an electric heater

Postby TheHogNL » Thu Oct 31, 2019 12:31 pm

Hi all,
I created some small Toon script which allows you to use a Toon to control an eletric heater (for example in your shed, attic, study). Just connect a zwave smartplug (fe. fibaro) to the Toon first, look up the zwave internal address for this smartplug in the Toon, set your Toon setpoint/program and run the script. It will then, just as it is controlling a boiler, switch the electric heater on and off. The Toon will need to do some learning for the heating behaviour but it works perfectly!

It could also be used to control other types of heaters. For examle a electric floor heater or a infrared wall heater. Just make sure your zwave smartplug can handle the Watts.

See the script comments for the usage.

Code: Select all
#!/bin/sh
# This script will switch a connected zwave smartplug on or off based on the burner request state on the Toon.
# It will allow you to use a Toon in a room with a electric heater (a smartplug can be used for heater up to about 2000 Watts).
# Get your smartplug id from the zwave devices list: type "curl -Nks http://localhost/hdrv_zwave?action=getDevices.json" to find your smartplug id (internalAddress) and enter this in the next line
# To run this script from boot, best is to install it in /etc/inittab so it will be restarted automatically when it fails for unknown reason
SMARTPLUG=2
STATE=0
while true
do
  NEWSTATE=`curl -Nks http://localhost/happ_thermstat?action=getThermostatInfo | sed 's/.*"burnerInfo":"\([0-9]\)".*/\1/'`
  if [ "$STATE" -ne "$NEWSTATE" ]
  then
    STATE=$NEWSTATE
    RESULT=`curl -Nks "http://localhost/hdrv_zwave?action=basicCommand&nodeID=$SMARTPLUG&state=$STATE"`
  fi
  sleep 1
done
Member of the Toon Software Collective
User avatar
TheHogNL
Forum Moderator
Forum Moderator
 
Posts: 1692
Joined: August 2017

Return to Toon miscellaneous

Who is online

Users browsing this forum: No registered users and 1 guest

cron