SmartThings Community

New Virtual Thermostat With Device

devicetype
smartapp
echo
thermostat
googlehome

(Eliot Stocker) #21

just another small tweak my end, to fix the update that added new labels in the device handlers, should look nicer and the labels should make a bit of sense now :slight_smile:


(Enis Hoca) #22

Thanks a lot Eliot. I am in US and have checked out the Fahrenheit handlling (the fix was for selfish reasons :)). Appreciate you taking the time to the the original work and putting it all together, I am so glad I stumbled on to this thread, I was going to embark on doing something very similar. Mind if we collaborate and take it further? I would like to 2 things -

  1. Divvy up the responsibilities a little and have all the child thermostats under one manager, as @Navat604 is asking for - look at my X-10 node-red code, I am doing something similar.
  2. Have multiple types of child managers - my secondary thermostats are going to ESP8266 other wierd things. so no need have 2 levels of virtuals, if the main app can load different type of children

(Eliot Stocker) #23

@enis sounds good to me, I don’t have a lot of time to spend in this, I’m happy for the project to encapsulate more developers etc :slight_smile:


(Eliot Stocker) #24

Hi again,

I have pushed a few more fixes and tweaks to get things working 100% correctly.

New Feature:
Average temperature across multiple temperature sensors is now included

Enjoy


(Enis Hoca) #25

Couple of things not working now:
Shows Centigrade range for me my default range is Fahrenheit.
Alex can tell setpoint and current temperature but not set the temperature any more


(Eliot Stocker) #26

@enis
Damnit, I had a feeling that would happen, I read somewhere that there are problems getting the temperature scale.

If you switch the centigrade function to return false at the top i assume it works correctly after that?


(Enis Hoca) #27

yes - I did 2 things to make it work; one just returned false at top, second put parenthesis around the range () - the docs show parans, I don’t know if that had an effect. was thinking that C/F doesn’t change at all, so no need to be dynamic. the eval can be in initialize() or update() and can set a state var, then the function can just return the state.
That would be faster than calling an external function anyway.

Alexa is a lot of trial and error, I didn’t have time to play with it yet, last time it took all evening to find the sweet spot. They seem to be reading the specs in their own way, and that integration seems to be stateful.


(Eliot Stocker) #28

I see the Alexa issue, and I’ll get it resolved this afternoon :slight_smile:

update: alexa fixes now live on my github


(Enis Hoca) #29

thanks it works now.


(Eliot Stocker) #30

just a quick update to let you all know i have pushed @enis latest fixes and tweaks to my repo, so you should be good to get the latest version if you haven’t already.

next on the list is:

  • Keep all thermostats in one app (i have another app that i have now done this with, so the implementation looks pretty strait forward)
  • a better way of handling F/C temperature scales (so you don’t have to edit the code)

hoping to have these done this week :slight_smile:


(Eliot Stocker) #31

Hi All,

i have added a new parent app to the repo called Virtual Thermostat Manager, its simply a parent app to house multiple Virtual Thermostats.

unfortunately you will need to remove your current device and reinstall with the new Virtual Thermostat Manager if you want to use this.

I have also been looking into a better method for handling temperature scale, but it would seem that it is evaluated at compile time for a number of critical function, therefore right now i cant find a way to make it so that you dont have the edit the true/false value in the code.

latest code is on my GitHub as always, please let me know if you have any issues with the update :slight_smile:


#32

Hey @eliotstocker thanks for this - saved me a tonne of work!

I use actiontiles.com any idea how I can remove the icons at the bottom? i.e. the cog and fan? I don’t need to see that information…

Capture


(Eliot Stocker) #33

@willcm im afraid I don’t use actiontiles myself so I’m not sure what makes them show up, I’d be happy to tweak some bits if someone lets me know what is needed for that.


(Eliot Stocker) #34

Update Notice

Hi all the latest version is now available in my github.

New feature:

  • Showing the amount of time heating is active today and yesterday in the device handler

Best
Eliot


(Ron Talley) #35

I should be able to use this to get Alexa to tell me what the temperatures are in rooms where I do not have an Alexa supported sensor…

If so, then this is awesome!

I have 2 Ecobee Therms with 8 remote sensors which gives me temp reports in 10 locations. However, I have plenty of Iris sensors that gives me temps in the ST App but does not report to Alexa.

Hoping that I will now be able to get temp status in all rooms!

Have you thought about adding Humidity?


(Ron Talley) #36

Could you add this information to the first post and also list the functions in the first post along with the to-do list.

This is big deal! Especially with the Alexa and Google Home Support!


(Eliot Stocker) #37

@rontalley updated :slight_smile:


(Ron Talley) #38

This is such a handy App and DTH!

I am using it for its intended purposes in 2 rooms with heaters.

I am also using it to get Alexa to tell me the temperatures in various rooms where I do not have an Ecobee Remote Sensor.

Couple of observations that is probably not repeated to the app itself are:

  1. Having an Echo device named the same as a Virtual Thermostat. For Example: I have an Echo named Kitchen. When I created the Thermostat “Kitchen” and asked Alexa to find new devices, she finds it but says, “Sorry Kitchen does not support that”…I overcame this by naming the Thermostat Kitchen Temperature and adding that to the Echo Enabled group “Kitchen”…

  2. Have to have a Switch in order for this to work. I understand why and I just created a Virtual Switch to assigned it to the Thermostats that I created just to read Temperature for Alexa.

  3. C and F are being mixed in the DTH. Didn’t see how to change this…

Finally, it would great to have a stripped down version to just link a Sensor to a Thermostat just to have Alexa read Temperature! No controls or anything just a link between ST and Alexa.

Awesome work!


#39

Such a great solution, @eliotstocker. Thank you! Have you thought about adding a motion sensor option to it? I’m using a webCoRE pistion to do it with your virtual device today, but would readily drop the added complexity of a piston for a simple setting in your device.

BTW, for anybody else trying to use webCoRE to turn on and off the virtual thermostat, I’ve found that I need to use heatbtn() for on and offbtn() for off.


(Enis Hoca) #40

Yeah that is almost like missing functionality in ST itself. Was thinking about the same the other day. I don’t think though that only a sensor would report though. Alexa only reports on a few things and it expects a target setting for a thermostat device.

@eliotstocker may be we could make the switch control optional ,so if there is no switch selected we tread the current temperature as target temperature - that would allow people to use this just for reporting, and we wouldn’t need to maintain another codebase