Recently i own a Toon, and have rooted it.
I use Pimatic to for home automation https://pimatic.org/
And wanted to control the Toon.
So i used the manual to Controlling Toon via Domoticz to create the manual for Controlling Toon via Pimatic

Moderators: marcelr, TheHogNL, Toonz
Code: Select all
{
"id": "toongetthermostatinfo",
"name": "ToongetThermostatInfo",
"rule": "when every 1 minute then execute \"curl -s 'http://192.168.1.111/happ_thermstat?action=getThermostatInfo' | jq '.' > /home/pi/pimatic-app/ToonThermostatInfo\"",
"active": true,
"logging": false
}
Code: Select all
{
"id": "toonthermostatinfo",
"name": "ToonThermostatInfo",
"class": "LogWatcher",
"file": "/home/pi/pimatic-app/ToonThermostatInfo",
"attributes": [
{
"name": "currentTemp",
"type": "number"
},
{
"name": "currentSetpoint",
"type": "number"
},
{
"name": "programState",
"type": "string"
},
{
"name": "activeState",
"type": "string"
},
{
"name": "nextProgram",
"type": "number"
},
{
"name": "nextState",
"type": "number"
},
{
"name": "nextTime",
"type": "number"
},
{
"name": "nextSetpoint",
"type": "number"
}
],
"lines": [
{
"match": ".currentTemp.:..(.+)..",
"currentTemp": "$1:100"
},
{
"match": ".currentSetpoint.:..(.+)..",
"currentSetpoint": "$1:100"
},
{
"match": ".programState.:..0..",
"programState": "Off"
},
{
"match": ".programState.:..1..",
"programState": "On"
},
{
"match": ".programState.:..2..",
"programState": "Temporary"
},
{
"match": ".programState.:..4..",
"programState": "Holiday"
},
{
"match": ".activeState.:..-1..",
"activeState": "Manual"
},
{
"match": ".activeState.:..0..",
"activeState": "Comfort"
},
{
"match": ".activeState.:..1..",
"activeState": "Home"
},
{
"match": ".activeState.:..2..",
"activeState": "Sleep"
},
{
"match": ".activeState.:..3..",
"activeState": "Away"
},
{
"match": ".activeState.:..4..",
"activeState": "Holiday"
},
{
"match": ".nextProgram.:..(.+)..",
"nextProgram": "$1"
},
{
"match": ".nextState.:..(.+)..",
"nextState": "$1"
},
{
"match": ".nextTime.:..(.+)..",
"nextTime": "$1"
},
{
"match": ".nextSetpoint.:..(.+)..",
"nextSetpoint": "$1"
}
],
"xAttributeOptions": []
}
Code: Select all
{
"id": "toontemp",
"name": "Toon",
"class": "VariablesDevice",
"variables": [
{
"name": "temperature",
"expression": "round($toonthermostatinfo.currentTemp / 100,1)",
"type": "number",
"unit": "°C",
"acronym": "Temp"
},
{
"name": "setpoint",
"expression": "round($toonthermostatinfo.currentSetpoint / 100,1)",
"type": "number",
"unit": "°C",
"acronym": "Setpoint"
}
],
"xAttributeOptions": []
}
Code: Select all
{
"id": "toonschemeinfo",
"name": "Toon",
"class": "VariablesDevice",
"variables": [
{
"name": "state",
"expression": "$toonthermostatinfo.activeState",
"label": "Scheme",
"acronym": "Schema"
},
{
"name": "program",
"expression": "$toonthermostatinfo.programState",
"label": "Program",
"acronym": "Program"
}
],
"xAttributeOptions": []
}
Code: Select all
{
"id": "toonprogram",
"name": "Toon Program",
"class": "ShellButtons",
"buttons": [
{
"id": "on",
"text": "On",
"onPress": "curl -s 'http://192.168.1.111/happ_thermstat?action=changeSchemeState&state=1'"
},
{
"id": "off",
"text": "Off",
"onPress": "curl -s 'http://192.168.1.111/happ_thermstat?action=changeSchemeState&state=0'"
}
]
}
Code: Select all
{
"id": "toonscheme",
"name": "Toon",
"class": "ShellButtons",
"buttons": [
{
"id": "SetAway",
"text": "Away",
"onPress": "curl -s 'http://192.168.1.111/happ_thermstat?action=changeSchemeState&state=2&temperatureState=3'"
},
{
"id": "SetSleep",
"text": "Sleep",
"onPress": "curl -s 'http://192.168.1.111/happ_thermstat?action=changeSchemeState&state=2&temperatureState=2'"
},
{
"id": "SetHome",
"text": "Home",
"onPress": "curl -s 'http://192.168.1.111/happ_thermstat?action=changeSchemeState&state=2&temperatureState=1'"
},
{
"id": "SetComfort",
"text": "Comfort",
"onPress": "curl -s 'http://192.168.1.111/happ_thermstat?action=changeSchemeState&state=2&temperatureState=0'"
}
]
}
Why isn't rooting an option? After rooting, the Toon is more compatible with Domotica systems then a non-rooted Toon.djmvt wrote:I've installed a Toon thermostat yesterday and in all my enthusiasm started to put your code in my config.json on pimatic, tried it, got a lot of errors and finally realised I've completely ignored the part where you wrote you rooted your Toon hahaha
But since I want to use Google home speech control with toon rooting is not an option for now, as far as I've seen.
Thanks anyway, I'll save the config.json just in case I want to root the Toon in the future!
Because I will have to figure out how to keep speech control with Google home on a rooted toon. Haven't found any links about that yet but when I do find them I will probably root itTerrorSource wrote: Why isn't rooting an option? After rooting, the Toon is more compatible with Domotica systems then a non-rooted Toon.