Page 4 of 6
Re: Control Thermosmart thermostat
Posted: Thursday 22 October 2015 21:45
by schulpr
I had the same problem with a complex password. Changed it in one with only letters and digits, now it works fine.
Verzonden vanaf mijn iPad met Tapatalk
Re: Control Thermosmart thermostat
Posted: Friday 23 October 2015 11:14
by paultie
gizmocuz wrote:I received an api client_id/secret, there is a new beta available.
After the update, you have to setup the hardware again and provide your username/password
Hi Gizmocuz,
Since you added the support for the thermosmart to domoticz of which we thermosmart users are all grateful for!!
Are you able to add a default switch for the thermosmart that can execute the pause function via the following commands?
- Pause (thermostat goes to the pause program temperature):
curl -H "Content-Type: application/json" -X POST -d '{"pause":true}' "
https://api.thermosmart.com/thermostat/[IT0001]/pause?access_token=
[access_token]"
- Unpause (thermostat goes back to either an exception - if there is one for the current time - or to the current schedule block):
curl -H "Content-Type: application/json" -X POST -d '{"pause":false}' "
https://api.thermosmart.com/thermostat/[IT0001]/pause?access_token=
[access_token]"
The blue items need to come from the script that also gathers the current temperature and such based on the user login and credentials provided in domoticz beta release based on the thermosmart clientid / secret that you are using.
I am able to test this for you, so please PM me if you can free up some time for this.
Again we are very grateful for your work on domoticz!!!
Re: Control Thermosmart thermostat
Posted: Friday 23 October 2015 16:02
by Yoshiii
schulpr wrote:I had the same problem with a complex password. Changed it in one with only letters and digits, now it works fine.
Verzonden vanaf mijn iPad met Tapatalk
Hmmmm I noticed that with Youless, didnt work either, but worked without a password. So I ran the program from administrator and add everything again and now it works. Something to do with writables maybe.
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 13:56
by gizmocuz
paultie wrote:gizmocuz wrote:I received an api client_id/secret, there is a new beta available.
After the update, you have to setup the hardware again and provide your username/password
Hi Gizmocuz,
Since you added the support for the thermosmart to domoticz of which we thermosmart users are all grateful for!!
Are you able to add a default switch for the thermosmart that can execute the pause function via the following commands?
- Pause (thermostat goes to the pause program temperature):
curl -H "Content-Type: application/json" -X POST -d '{"pause":true}' "
https://api.thermosmart.com/thermostat/[IT0001]/pause?access_token=
[access_token]"
- Unpause (thermostat goes back to either an exception - if there is one for the current time - or to the current schedule block):
curl -H "Content-Type: application/json" -X POST -d '{"pause":false}' "
https://api.thermosmart.com/thermostat/[IT0001]/pause?access_token=
[access_token]"
The blue items need to come from the script that also gathers the current temperature and such based on the user login and credentials provided in domoticz beta release based on the thermosmart clientid / secret that you are using.
I am able to test this for you, so please PM me if you can free up some time for this.
Again we are very grateful for your work on domoticz!!!
Could you try Beta #3443 ? I hope it works, you should get a switch, and must be able to control....
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 16:52
by paultie
Thanks gizmocuz. Great work.
Heres what I found.
So I updated to the latest beta release just now.
Saw the switch in the device list added it to the config.
I am able to pause the thermostat and the thermosmart display jumps to pause also on the thermosmart portal.
So pausing the thermostat works.
Here comes the challenge.
Unpausing the thermostat via the switches shows action in the domoticz log. But isn't actionable on the thermostat and the thermosmart portal.
On domoticz it does show that it disables the switch but after a second it 'switches' back on. Probably picks up the actual status from the thermosmart backend.
So the switching off (unpause) command does not seem to work.
After manually unpausing the thermosmart it gives the actual status of the thermosmart thermostat.
So far good work. only the unpausing via the thermostat switch doesn't react yet.
Maybe the boolean for pausing (true / false) has a typo?
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 17:02
by gizmocuz
Nope, it has no typo
could it be you have to set the state to schedule ?
Maybe you could PM me your login details so i can test it via the web interface? (plz also send the webinterface address)
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 17:10
by paultie
you have a PM.
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 17:12
by gizmocuz
Thanks, i report back soon!
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 17:18
by paultie
saw you figured it out.....
you just paused and unpaused it... Cool!
found the problem?
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 17:59
by gizmocuz
Nope, this was via the thermosmart webpage !
I dont do anything wrong (of course

) when false i send
pause=false
this looks correct, and it ain't working (and thats not domoticz's fault)
one way to 'un-pause' is to set the setpoint temperature
do you know how to set the program ? (home/away ?)
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 18:10
by paultie
enlighten me please
but problem is at the thermosmart side?
what do you think the problem is?
I can get into contact with the developer there.
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 18:19
by gizmocuz
i already send an email to them
i 100% send
pause=true
or
pause=false
and the last one, does not do anything
it would also be nice to set the program mode:
anti_freeze
not_home
home
comfort
pause
or 'schedule'
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 18:25
by paultie
cool! Thanks.
According to their api documentation this should be possible but seeing your reaction it isn't.
https://api.thermosmart.com/apidoc/#api-Thermostat
But in the mean time. How can I unpause (use the work around you used)?
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 18:25
by gizmocuz
set a setpoint value (from the utility tab)
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 18:31
by paultie
check!
got it.
Re: Control Thermosmart thermostat
Posted: Saturday 24 October 2015 21:03
by paultie
I have fixed this temporarily with a json script that sets the setpoint of the thermosmart. That works like a charm.
I have created some blocky scripts so that during the day it sets a different value than during the night. Since I connected this to the geo location so that it automatically pauses and unpauses the thermosmart when away from home. (with multiple people and their geo location which is impossible for IFTTT to do)
Hopefully thermosmart fixes this soon so that it works as designed.
Thanks gizmocuz for your support on this.
Re: Control Thermosmart thermostat
Posted: Tuesday 27 October 2015 21:46
by ThinkPad
Interesting topic. I will receive my Thermosmart tomorrow.
Bought it a bit cheaper than normal retailprice, bought it from
Coolblue 2e kans @ Marktplaats for 197 euros

Re: Control Thermosmart thermostat
Posted: Tuesday 10 November 2015 19:44
by paultie
I just received my very own api key for the thermosmart thermostat.
Based on my own login credentials for my thermosmart with the api en secret I got from thermosmart.
I created two scripts to pause (pause:true) and unpause (pause:false) which work like a charm.
So I am not sure what is wrong in the beta version of domoticz
gizmocuz wrote:Gizmocuz
Could it be the authentication order (steps 1-4) in the script that is not working properly?
I used the script from kaashoek below.
Code: Select all
USERNAME=xxxx
PASSWORD=yyyy
CLIENT_ID=api-xxx
SECRET=secretid
THERMOSTAT_ID=IT12345
# 1. Login (username: either thermostat ID or email, in this case, we use thermostat ID)
curl -k -c cookie.txt -vd "username=$USERNAME&password=$PASSWORD" "https://api.thermosmart.com/login"
# 2. Get Authorize Dialog
curl -k -b cookie.txt --output answer.html -v "https://api.thermosmart.com/oauth2/authorize?response_type=code&client_id=$CLIENT_ID&redirect_uri=http://clientapp.com/done"
TID=`grep transaction answer.html | sed "s/.*value=\"\(.*\)\".*/\1/"`
echo "---------------------------------"
echo "$TID"
echo "---------------------------------"
# 3. Authorize (read out transaction_id from the HTML form received in the previous step). transaction_id prevents from XSRF attacks.
curl -k -b cookie.txt --output code.txt -vd "transaction_id=$TID" "https://api.thermosmart.com/oauth2/authorize/decision"
CODE=`cat code.txt | sed "s/.*code=\(.*\).*/\1\n/"`
echo "-------------------------------"
echo "$CODE"
echo "-------------------------------"
# 4. Exchange authorization code for Access token (read out the code from the previous response)
curl -k -u $CLIENT_ID:$SECRET --output access.txt -b cookie.txt -vd "grant_type=authorization_code&code=$CODE&redirect_uri=http://clientapp.com/done" "https://api.thermosmart.com/oauth2/token"
ACCESS=`cat access.txt | sed "s/.*token\":\"\(.*\)\",\"thermostat.*/\1\n/"`
echo "-------------------------------"
echo "$ACCESS"
echo "-------------------------------"
# 5. Access protected resource
curl -H "Content-Type: application/json" -X POST -d '{"pause":true}' "https://api.thermosmart.com/thermostat/$THERMOSTAT_ID/pause?access_token=$ACCESS"
This last step (action 5) does the actual pausing. The pause:true pauses it. if you change that to pause:false it unpauses.
Gizmocuz how do you execute the unpause action?
thanks for the help.
Re: Control Thermosmart thermostat
Posted: Tuesday 10 November 2015 20:19
by paultie
was fiddling with the scripts I created.
The pause thermostat switch created in the beta release only executed the pause function as mentioned earlier on.
I added the unpause script to the off setting of the pause thermostat switch with a delay of 10 seconds. That works like a charm.
Why the delay?
Sometimes what happens is that when a switch off command is given the thermostat executes a unpause and a pause action at the same time. This I find strange but I have no explanation for it.
Re: Control Thermosmart thermostat
Posted: Sunday 15 November 2015 9:48
by gizmocuz
Best is to look in the source code, and check what goes wrong, and if possible provide a patch