10-23-2023 02:02 AM
Hello all,
I just want to share with you how I implemented a virtual thermostat at my home.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Goal:
My need was to replace my old and not IoT thermostat with a smart one, without spending a lot of money.
I don't need, at the moment, a physical device in order to set the temperature, I will be satisfied to use Google Assistant/Google Home in order to set the thermostat.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Requirements:
- 1 device that can measure the temperature ( I'm using Shelly H&T Plus )
- 1 switch installed as replacement of my old thermostat ( I'm using a Shelly 1 Plus ) (Please refer to a different tutorial in order to install it)
- 1 virtual thermostat created on google playground with just TemperatureSetting trait and avaiable thermostat modes avaiable: on, off, heat. I've also set the min threashold to 18°C and max to 28°C. These will be the range within the thermostat is working. If you need to change, please take in account to change also the attached scripts.
- of course all off them must be connected to google home
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Details:
When you ready with requirements, you can go over and create in google home the script attached.
Please take in account that you have to replace in all files the following device names with yours:
- "Caldaia - Casa" --> Is the Switch name and room
- "Riscaldamento - Playground" --> Is the virtual thermostat name and room
- "Sensore Temperatura - Casa" --> Is the temperature measurement device
---------------------------------------------------------------------------------------------------------------------------------------------------------------
How to use:
In google home you have 3 devices: virtual thermostat, temperature device and switch.
You can use Google Assistant or google home app in order to turn on/off or change the setpoint temperature or schedule the turn on/off based on time conditions.
The only problem that I have and I think it's not easy to solve, is that the thermostat "measured" temperature it's not changing. So, I've set that to 0 from google playground and I look to the temperature device in order to know the actual temperature of the room.
Hope this post will be useful to someone else.
Here there are the 3 scripts that you need to create in google home:
https://drive.google.com/file/d/1-C5un56xe-EqdRNuz5Jy9vTZPOUxnGYy/view?usp=sharing
https://drive.google.com/file/d/1-KjZBc7h0WwSWnJgx3zhjgRLlFH0ZIS2/view?usp=sharing
https://drive.google.com/file/d/1-A0gcrcpL0lBhxF2CjklI3pdGGYJisRN/view?usp=sharing