[677] Tado thermostat

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

sammyke007
Posts: 204
Joined: Monday 08 May 2017 20:48
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.1
Location: Belgium
Contact:

Re: [677] Tado thermostat

Post by sammyke007 »

Hi rjblake

Tnx for writing this script!
I created a temp+humidity virtual device and your script is providing my TADO's measurements correctly!
What kind of devices do I create for

Code: Select all

$tado_setpointIDX	= "nnn"; // Your Domoticz DeviceID for the Tado Setpoint device
$tado_heatdemandIDX 	= "nnn"; // Your Domoticz DeviceID for the current Tado Heat Demand
$tado_anyoneHomeIDX	= "nnn"; // Your Domoticz DeviceID for the Anyone Home? alert
EDIT:
A virtual switch device on/off seems OK for $tado_anyoneHomeIDX
A virtual Setpoint (Temperature) seems OK for $tado_setpointIDX.

Domoticz receives temp+hum / homestatus / setpoint. Can it work in the other direction too? Changing the setpoint temp from Domoticz?


Also, sometimes the script is spitting out this error and returning temp 0 and humidty 0 to Domoticz

Code: Select all

Token Age: 142 | Used cached token | HomeID:  - ZoneID:  - Temp&Humidity: ;;2 - Setpoint:  - Status: Off
PHP Warning:  min(): When only one parameter is given, it must be an array in /volume1/tado.php on line 322
Is this because I didn't make all devices in Domoticz?
tacoschuur
Posts: 2
Joined: Wednesday 17 January 2018 13:28
Target OS: Linux
Domoticz version:
Contact:

Re: [677] Tado thermostat

Post by tacoschuur »

rjblake wrote: Thursday 20 July 2017 11:39 Additionally, you'll need the JSON modules/extension installed if they are not as this will definitely cause an issue (check to see modules installed with "php -m" or "php70 -m").
Hi all,

I know nothing about linux but got domoticz to work on a raspberry pi by following a manual i found on the internet. I didn't know what I was doing but in the end it worked and i could read out my smart meter.
Now I would really like to add the Tado script, but I don't have a clue where to put it. Nor do i know how to add something to start the script.
Next to that I believe I dont have (the right) JSON libraries. When I type php -m or php70 -m in putty it gives me "-bash: php: command not found"
Could somebody please help me to a guide how to install this library and script.

Many thanks in advance! I would really like to use domoticz on a higher level.

Cheers, Taco
rjblake
Posts: 142
Joined: Friday 21 October 2016 9:25
Target OS: NAS (Synology & others)
Domoticz version:
Location: Netherlands
Contact:

Re: [677] Tado thermostat

Post by rjblake »

tacoschuur wrote: Wednesday 17 January 2018 13:40
rjblake wrote: Thursday 20 July 2017 11:39 Additionally, you'll need the JSON modules/extension installed if they are not as this will definitely cause an issue (check to see modules installed with "php -m" or "php70 -m").
Hi all,

I know nothing about linux but got domoticz to work on a raspberry pi by following a manual i found on the internet. I didn't know what I was doing but in the end it worked and i could read out my smart meter.
Now I would really like to add the Tado script, but I don't have a clue where to put it. Nor do i know how to add something to start the script.
Next to that I believe I dont have (the right) JSON libraries. When I type php -m or php70 -m in putty it gives me "-bash: php: command not found"
Could somebody please help me to a guide how to install this library and script.

Many thanks in advance! I would really like to use domoticz on a higher level.

Cheers, Taco
Taco - first thing is you will need to install PHP, as this is not installed. There are plenty of guides online for this (...or simply "sudo apt install php7.0 php7.0-curl php7.0-cli php7.0-json" should cover it. You can create a folder where you choose to install the scripts (e.g. /home/pi/tado). After that, create a bash script (e.g. tado.sh with rwx permissions) which contains the following lines

Code: Select all

#!/bin/bash
php -f tado.php > /dev/null &
Call this script at startup and it'll run on restart/reboot

Not a detailed step by step guide, but should be enough to get you sorted.
tacoschuur
Posts: 2
Joined: Wednesday 17 January 2018 13:28
Target OS: Linux
Domoticz version:
Contact:

Re: [677] Tado thermostat

Post by tacoschuur »

Hi rjblake,

I will try it this weekend.

Thanks a Lot!
SentryneL
Posts: 1
Joined: Friday 16 March 2018 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [677] Tado thermostat

Post by SentryneL »

Hi all!

I'm quiet new to domoticz and thats my first post in the forum.

I would like to thank you rjblake for this script. Very usefull.

I'm running domoticz on a Raspberry Pi. Followed your instructions as in the quoted post. Script is running, everything is ok, but I'm not able to get the script running on startup. If I execute tado.sh (located at home/pi/domoticz/scripts) on command line as pi user in that folder, works like a charm.

I've tried to call it from /etc/init.d/domoticz.sh in several ways but with no results. Also tried with contab. Nothing.

I'm doing something wrong but don't know what. Take into account that i'm also new on linux environement.

Any ideas??

Thank you!!
rjblake wrote: Friday 19 January 2018 18:49
tacoschuur wrote: Wednesday 17 January 2018 13:40
rjblake wrote: Thursday 20 July 2017 11:39 Additionally, you'll need the JSON modules/extension installed if they are not as this will definitely cause an issue (check to see modules installed with "php -m" or "php70 -m").
Hi all,

I know nothing about linux but got domoticz to work on a raspberry pi by following a manual i found on the internet. I didn't know what I was doing but in the end it worked and i could read out my smart meter.
Now I would really like to add the Tado script, but I don't have a clue where to put it. Nor do i know how to add something to start the script.
Next to that I believe I dont have (the right) JSON libraries. When I type php -m or php70 -m in putty it gives me "-bash: php: command not found"
Could somebody please help me to a guide how to install this library and script.

Many thanks in advance! I would really like to use domoticz on a higher level.

Cheers, Taco
Taco - first thing is you will need to install PHP, as this is not installed. There are plenty of guides online for this (...or simply "sudo apt install php7.0 php7.0-curl php7.0-cli php7.0-json" should cover it. You can create a folder where you choose to install the scripts (e.g. /home/pi/tado). After that, create a bash script (e.g. tado.sh with rwx permissions) which contains the following lines

Code: Select all

#!/bin/bash
php -f tado.php > /dev/null &
Call this script at startup and it'll run on restart/reboot

Not a detailed step by step guide, but should be enough to get you sorted.
rjblake
Posts: 142
Joined: Friday 21 October 2016 9:25
Target OS: NAS (Synology & others)
Domoticz version:
Location: Netherlands
Contact:

Re: [677] Tado thermostat

Post by rjblake »

SentryneL wrote: Friday 16 March 2018 13:57 Hi all!

I'm quiet new to domoticz and thats my first post in the forum.

I would like to thank you rjblake for this script. Very usefull.

I'm running domoticz on a Raspberry Pi. Followed your instructions as in the quoted post. Script is running, everything is ok, but I'm not able to get the script running on startup. If I execute tado.sh (located at home/pi/domoticz/scripts) on command line as pi user in that folder, works like a charm.

I've tried to call it from /etc/init.d/domoticz.sh in several ways but with no results. Also tried with contab. Nothing.

I'm doing something wrong but don't know what. Take into account that i'm also new on linux environement.

Any ideas??

Thank you!!
Quick and easy fix is to add it to the end of /etc/rc.local file. Example entry as follows:

Code: Select all

php -f /home/homeauto/remeha/remeha.php > /dev/null &
, where /home/homeauto/remeha/ is the full path to the remeha.php file
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests