The venstar thermostats now publish a REST API (http://developer.venstar.com/restcalls.html) and while I’ve been able to pull in thermostat data into my instance, I’m not competent enough to build a proper interface for interacting with the set temperatures and fan modes (let alone all the other features). Anyone else have a Venstar thermostat and the skills to build a component for it? It would be a welcome addition to my configuration.
I’ve bought one of these thermostats but found there isn’t a published Python API for it which is a precursor to doing a HA component (and switches/sensors). This is fairly far down my TODO list but eventually I intend to write the HA side. First I need to get around to publishing the repo to PyPI (which I could bump up my TODO list if someone is about to start on the HA stuff)…
Anyway, if you find you have some time, here’s what I’ve got so far:
“patches welcome”
I’ve got a colortouch on order- i’ll collaborate on this once i get it!
oh good because my TODO list got longer.
Awesome- thanks! It’s supposed to be delivered tomorrow. I’ll be sure to post status here.
Making some pretty good progress. Got the thermostat installed over the weekend, and can pretty much read everything into hass from it. Need to work on the control services next.
I’ll have a pull request coming soon for the python library- I added ssl+digest with support and a few other tweaks to assist with the hass integration.
Getting close- this is the feature set for this first revision:
- Setting the mode of the HVAC (heat/cool/auto/off)
- Setting the target temperature (cool if in cool mode, heat if in heat mode)
- Turning the fan on/off
- Setting the humidity level
- Reporting on temperature, humidity, fan state (actually running vs. idle) and operating state (actually running vs. idle).
I know there’s more, but this should be a good first cut. I’m pushing my dev branch as i write this if anyone wants to help test! I’ll likely need to update the dependencies as hpeyerl pushes a new revision of the python library.
This open source thing works great. All you have to do is write a teeny little api in hopes someone will come along and do all the hard work. Thanks Cinntax!
FYI- pull request was accepted and merged into the dev branch. Release is set for 0.62!
Well- were in 0.62 released yesterday, but I’m having issues unfortunately. My dev environment works still but the new release doesn’t. Anyone else had a chance to try it yet? I do have an adjustment I can make to the upstream library that should resolve my issue, but I’m not sure if it’s just me or not, and unsure why I didn’t see this in dev… it’s complaining about the hum_active attribute being non-existent.
Ok- yeah again not sure how this happened- but i did a quick patch on the venstarcolortouch library, and it’s working. I’ll get a pull request going to resolve that, and get another one ready for hass…Sorry!
Hi,
I have a Venstar ColorTouch T8900, just upgraded to the latest HASS release but it doesn’t work, getting the following logs:
Jan 29 10:21:53 ha1 hass[3262]: #033[32m2018-01-29 10:21:53 INFO (MainThread) [homeassistant.loader] Loaded climate.venstar from homeassistant.components.climate.venstar#033[0m
Jan 29 10:21:56 ha1 hass[3262]: #033[32m2018-01-29 10:21:56 INFO (Thread-7) [homeassistant.util.package] Attempting install of venstarcolortouch==0.5#033[0m
Jan 29 10:21:57 ha1 hass[3262]: #033[32m2018-01-29 10:21:57 INFO (MainThread) [homeassistant.components.climate] Setting up climate.venstar#033[0m
Jan 29 10:21:57 ha1 hass[3262]: #033[31m2018-01-29 10:21:57 ERROR (MainThread) [homeassistant.components.climate] venstar: Error on device update!#033[0m
Jan 29 10:21:57 ha1 hass[3262]: File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/venstar.py”, line 75, in update
Jan 29 10:21:57 ha1 hass[3262]: File “/srv/homeassistant/lib/python3.5/site-packages/venstarcolortouch/venstarcolortouch.py”, line 139, in update_info
Jan 29 10:21:57 ha1 hass[3262]: File “/srv/homeassistant/lib/python3.5/site-packages/venstarcolortouch/venstarcolortouch.py”, line 173, in get_info
Can I do anything to help make it work?
Thanks
I took a quick look at the code here, and it looks like it’s attempting to pull the temperature units. Before we go changing code, can you confirm what firmware version you’re running? I know I had to update mine- there were issues with the API in the earlier versions.
VW4.08
I believe it is supposed to be the latest for this particular model
I was looking at venstars website, and it does look like they had an update to v5.04 for that model. https://www.venstar.com/thermostats/colortouch/update5/
If you’d rather debug as-is (given it doesn’t look like this new release applies to older models). That’s ok too- I just know I had other issues with the humidifier settings with that version of the api too.
Let me know if you want to test as is and I’ll send instructions for some further debug logging that should get us what we need.
I’ll try to get the firmware updated, thanks
Did the upgrade, the version downloaded by the desktop app and currently installed is 5.1
Root response:
{“api_ver”:7,“type”:“commercial”,“model”:“COLORTOUCH”,“firmware”:“5.1”}
Getting the following errors:
root@ha1:~# grep venstar /var/log/syslog
Jan 30 14:28:59 ha1 hass[967]: #033[32m2018-01-30 14:28:59 INFO (MainThread) [homeassistant.loader] Loaded climate.venstar from homeassistant.components.climate.venstar#033[0m
Jan 30 14:29:02 ha1 hass[967]: #033[32m2018-01-30 14:29:02 INFO (MainThread) [homeassistant.components.climate] Setting up climate.venstar#033[0m
Jan 30 14:29:02 ha1 hass[967]: #033[31m2018-01-30 14:29:02 ERROR (MainThread) [homeassistant.components.climate] venstar: Error on device update!#033[0m
Jan 30 14:29:02 ha1 hass[967]: File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/venstar.py”, line 75, in update
Jan 30 14:29:02 ha1 hass[967]: File “/srv/homeassistant/lib/python3.5/site-packages/venstarcolortouch/venstarcolortouch.py”, line 139, in update_info
Jan 30 14:29:02 ha1 hass[967]: File “/srv/homeassistant/lib/python3.5/site-packages/venstarcolortouch/venstarcolortouch.py”, line 173, in get_info
Not sure if this helps:
/
{“api_ver”:7,“type”:“commercial”,“model”:“COLORTOUCH”,“firmware”:“5.1”}
query/info
{“name”:“HVAC@upstairs”,“mode”:2,“state”:0,“fan”:0,“fanstate”:0,“tempunits”:0,“schedule”:1,“schedulepart”:0,“holiday”:0,“override”:0,“overridetime”:0,“forceunocc”:0,“spacetemp”:76.0,“heattemp”:72.0,“cooltemp”:78.0,“cooltempmin”:70.0,“cooltempmax”:99.0,“heattempmin”:35.00,“heattempmax”:65.0,“activestage”:0,“hum_active”:0,“hum”:50,“hum_setpoint”:0,“dehum_setpoint”:60,“setpointdelta”:1.0,“availablemodes”:3}
query/sensors
{“sensors”:[{“name”:“Thermostat”,“temp”:76.0,“hum”:50},{“name”:“Space Temp”,“temp”:76.0}]}
query/runtimes
{“runtimes”:[{“ts”:1516838400,“heat1”:0,“heat2”:0,“cool1”:658,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0},{“ts”:1516924800,“heat1”:0,“heat2”:0,“cool1”:44,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0},{“ts”:1517011200,“heat1”:0,“heat2”:0,“cool1”:95,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0},{“ts”:1517097600,“heat1”:0,“heat2”:0,“cool1”:171,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0},{“ts”:1517184000,“heat1”:0,“heat2”:0,“cool1”:271,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0},{“ts”:1517270400,“heat1”:0,“heat2”:0,“cool1”:250,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0},{“ts”:1517323192,“heat1”:0,“heat2”:0,“cool1”:11,“cool2”:0,“aux1”:0,“aux2”:0,“ov”:0}]}
query/alerts
{“alerts”:[{“name”:“Air Filter”,“active”:false},{“name”:“UV Lamp”,“active”:false},{“name”:“Service”,“active”:false}]}
Ahh ok perfect yeah that will help a ton. I’m out and about at the moment but I’ll take a closer look when I get home. Seems like the attribute I was expecting to be missing is indeed there- so will have to compare closely to see what else is missing.