Control Thermosmart thermostat

For heating/cooling related questions in Domoticz

Moderator: leecollings

rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

Works great. Thanks for the work. :D
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
bgitmans
Posts: 11
Joined: Thursday 20 August 2015 22:19
Target OS: OS X
Domoticz version: 3.5166
Location: Boxtel, the Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by bgitmans »

When I add the Thermosmart hardware I fill out my username and password, however in the log I get a message: Invalid login credentials provided.

I'm sure that i filed out the combination correctly.

What could be wrong?
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

bgitmans wrote:When I add the Thermosmart hardware I fill out my username and password, however in the log I get a message: Invalid login credentials provided.

I'm sure that i filed out the combination correctly.

What could be wrong?
It works with me. You have to use the same username and password as you use in the website from thermosmart.
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
bgitmans
Posts: 11
Joined: Thursday 20 August 2015 22:19
Target OS: OS X
Domoticz version: 3.5166
Location: Boxtel, the Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by bgitmans »

I did use the same username and password combo. In the thermosmart settings window, in the thermosmart website, do you see a domoticz entry?
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

Yes, you can see that the username and password is accepted. When wrong you get the message invalid login. I think there is no other way to check it.
There is only one difference because i already applied for api before. Perhaps there is someone who didn't do that and you can check with him if he is having the same trouble.
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
mastair
Posts: 24
Joined: Wednesday 01 July 2015 7:56
Target OS: -
Domoticz version:
Contact:

Re: Control Thermosmart thermostat

Post by mastair »

Are you using Windows? You have to make sure you have permissions to write in the installation folder because it will write the cookie there.

If not, let it know.
bgitmans
Posts: 11
Joined: Thursday 20 August 2015 22:19
Target OS: OS X
Domoticz version: 3.5166
Location: Boxtel, the Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by bgitmans »

I'm using a mac to run domoticz on, and the folder is writable as far as i know. I will check however the write permissons on the folder and subfolders.
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

Naamloos2.png
Naamloos2.png (17.32 KiB) Viewed 5694 times
Naamloos.png
Naamloos.png (11.4 KiB) Viewed 5694 times
Is it possible to make a temperature adjustment in the thermo setpoint icon instead of going first to "aanpassen"?
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
bgitmans
Posts: 11
Joined: Thursday 20 August 2015 22:19
Target OS: OS X
Domoticz version: 3.5166
Location: Boxtel, the Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by bgitmans »

In the domocookie there is an entry for api.thermosmart.com. However I see an # in front of this line. Could this be the problem?
jwbrock
Posts: 4
Joined: Tuesday 17 March 2015 22:30
Target OS: Linux
Domoticz version:
Contact:

Re: Control Thermosmart thermostat

Post by jwbrock »

@bgitmans
Thermosmart control stopped working when I switched to https / port 443: there was a login error for Thermosmart. After switching back to http it is logging in correctly.
The entry (and cookie) was created when in http mode. Could this be your problem too?
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

When I 'm opening my gardendoor I 'm using a z wave doorcontact to set Thermosmart to pause with this script

Code: Select all

 
    USERNAME=xxxx
    PASSWORD=yyyy
    CLIENT_ID=zzzz
    SECRET=ssss
    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"

When i'm closing the door I use almost the same script to switch on Thermosmart.
Sometimes I set thermosmart to pause by hand but when I,m opening/closing the door the automatic script is overuling the pause state. I want to prevent this is happening and there for I must know if the pause state is active.

How can I extract the state of the Thermosmart? Can someone give me a hint?
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

I have tried the following script but that give's me an error.
USERNAME=xxxxx
PASSWORD=xxxxx
CLIENT_ID=xxxxx
SECRET=xxxxxx
THERMOSTAT_ID=xxxxxxx


# 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/auth ... p.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 GET -d '{"source":pause}' "https://api.thermosmart.com/thermostat/ ... en=$ACCESS"
Can someone give me som help please?
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
paultie
Posts: 16
Joined: Thursday 08 October 2015 20:58
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3272
Location: Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by paultie »

First time on the forum but long time domoticz supporter / fan.

If you fancy trying Domoticz with Thermosmart. The beta version has the thermosmart functions build in. (so no subscribing for an API with thermosmart)
Thanks to the developers! (not sure who to thank)

You will now see the thermostat temperature, outside temperature and a set point for setting the temperature in devices.

Only thing that is missing is the pause feature. I would like to get this rolling but I am not sure howto since I am not sure how this is added in the beta version.
So if someone can give me a pointer...

From the API description of Thermosmart I get the following example scripts.

- Pause (thermostat goes to the pause program temperature):
curl -H "Content-Type: application/json" -X POST -d '{"pause":true}' "https://api.thermosmart.com/thermostat/ ... cess_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/ ... cess_token]"

If this can be set up as a normal switch. I am able to pause / unpause the thermostat with geofencing.

I hope someone is able to point me to the location where the thermosmart scripts are located so I can start messing with it.
I am using a RPI with Zwave GPIO board, a RFXCOM reciever and P1 interface.

Many thanks.
Raspberry Pi B+ with Zwave GPIO board, P1 interface and RFXCOM receiver.
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

@paultie,
That,s exactly the point where i also have problem. You want to know the status of thermosmart. There,s a way through webhook but to get the status but i don,t understand that part. There,s a lot of information on the website apithermosmart. Perhaps you have more knowledge of this.
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

paultie wrote:First time on the forum but long time domoticz supporter / fan.

If you fancy trying Domoticz with Thermosmart. The beta version has the thermosmart functions build in. (so no subscribing for an API with thermosmart)
Thanks to the developers! (not sure who to thank)

You will now see the thermostat temperature, outside temperature and a set point for setting the temperature in devices.

Only thing that is missing is the pause feature. I would like to get this rolling but I am not sure howto since I am not sure how this is added in the beta version.
So if someone can give me a pointer...

From the API description of Thermosmart I get the following example scripts.

- Pause (thermostat goes to the pause program temperature):
curl -H "Content-Type: application/json" -X POST -d '{"pause":true}' "https://api.thermosmart.com/thermostat/ ... cess_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/ ... cess_token]"

If this can be set up as a normal switch. I am able to pause / unpause the thermostat with geofencing.

I hope someone is able to point me to the location where the thermosmart scripts are located so I can start messing with it.
I am using a RPI with Zwave GPIO board, a RFXCOM reciever and P1 interface.

Many thanks.
If you make a dummy switch and you call it thermo pauze. And with that dummy switch you can trigger the pause.sh script on the first page.
You have to ask for an api at thermosmart, see the beginning of the post, for using scripts.
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
paultie
Posts: 16
Joined: Thursday 08 October 2015 20:58
Target OS: Raspberry Pi / ODroid
Domoticz version: V2.3272
Location: Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by paultie »

@rron so it is more of the question who can incorporate the pause.sh script into domoticz.

I have been in contact with Thermosmart but somehow they are not giving me the access I need to fidle with the pause script.

And since the trust (or however you want to call it) between the beta version of domoticz (with api) and thermosmart is a fact.
I would really like to add a pause switch to the config with the pause script behind it. But on my end I am missing the authentication with thermosmart.

I know @kaashoek was the topic starter and has done a lot of work on these scripts. Do you have any pointers to sort this out if you do not have your own authentication method with thermosmart and want to use the version that has been added in the beta?

many thanks
Raspberry Pi B+ with Zwave GPIO board, P1 interface and RFXCOM receiver.
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

:cry:
paultie wrote:@rron so it is more of the question who can incorporate the pause.sh script into domoticz.

I have been in contact with Thermosmart but somehow they are not giving me the access I need to fidle with the pause script.

And since the trust (or however you want to call it) between the beta version of domoticz (with api) and thermosmart is a fact.
I would really like to add a pause switch to the config with the pause script behind it. But on my end I am missing the authentication with thermosmart.

I know @kaashoek was the topic starter and has done a lot of work on these scripts. Do you have any pointers to sort this out if you do not have your own authentication method with thermosmart and want to use the version that has been added in the beta?

many thanks
There is also a possibility to use IFTTT . You can create diferent settings also with the pause script.
Perhaps you can use that.
I don,t know why thermosmart is not giving you an api because on there site they are giving the option to ask for it.
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
mistysnip
Posts: 34
Joined: Thursday 15 October 2015 22:01
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Control Thermosmart thermostat

Post by mistysnip »

I'm a newbie to this domotica business. I have a Thermosmart and I'm trying to use one of the APA3-1500R switches to turn my floor heating water pump on and (after a delay) off. For this, I would need to know when the Thermosmart fires the boiler. Is this status available?
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Control Thermosmart thermostat

Post by rron »

mistysnip wrote:I'm a newbie to this domotica business. I have a Thermosmart and I'm trying to use one of the APA3-1500R switches to turn my floor heating water pump on and (after a delay) off. For this, I would need to know when the Thermosmart fires the boiler. Is this status available?
I'm not shure but you can look here: https://api.thermosmart.com/apidoc/
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
Yoshiii
Posts: 3
Joined: Wednesday 21 October 2015 23:17
Target OS: Windows
Domoticz version:
Contact:

Re: Control Thermosmart thermostat

Post by Yoshiii »

I'm trying to connect the Thermosmart with domoticz but I get the following error:

Error: Thermosmart: Error login!, check username/password

I used the email and password from the my.thermosmart.nl website, which should be correct. I found some posts here with people who had the same problem but I can't seem to get it fixed. Any ideas? I use the windows server.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest