set_control is incorrect with regard to mode
Closed this issue · 9 comments
The comment above set_control is not quite correct with the docs. From the API:
All control calls with mode must include heattemp and cooltemp parameters.
If you are in mode auto, it is perfectly legal to set ONLY heattemp and cooltemp. The document is saying that heattemp and cooltemp must be supplied when we SET mode. Not that mode needs to be supplied for heat/cool.
This is causing homeassistant (and the main.py test that ships with your library) to fail when trying to set the temp. When I remove fan and mode from the urlencode line, and ONLY send heattemp and coldtemp, I am able to change my settings.
before:
set_control Fail {'error': True, 'reason': 'Mode change is not allowed when running schedule'}.
Heat setpoint is 72.0
Cool setpoint is 79.0
set_control Fail {'error': True, 'reason': 'Mode change is not allowed when running schedule'}.
Heat setpoint is 72.0
Cool setpoint is 79.0
after:
set_control Success!
Heat setpoint is 60.0
Cool setpoint is 90.0
set_control Success!
Heat setpoint is 72.0
Cool setpoint is 79.0
I believe the correct thing to do is this:
When setting fan, only set fan.
When setting heat/cool, set both heat cool and nothing else.
When setting mode, set mode, heat and cool.
No other set of operations works for me.
{"api_ver":3,"type":"residential"}
A voice from my NetBSD days! Hi Tim!
Feel like submitting a patch? I mean it seems reasonable.
Ha, I was wondering! Lemme try to throw one together.
BTW, if you own one of these, which I assume you do, you might be interested in:
https://github.com/garbled1/gnhast-python-collectors/tree/master/venstar_influx
It's a tool that feeds the runtime data into influx.
I've been meaning to do something like that. Looks better than what I was doing with my old RCS rs485 thermostat (shoving data into mysql and then worrying about it later).
If you do a pull request, I'll just approve it and then push a new release to pypi in the next day or two.
oh nevermind. just saw the pull request. It's merged. (I'm far away from my Venstar thermostat so I can't test it).
Cool, once you push the new release, we should do a pullup req to hass to require that version. :) Thanks!
I might tackle discovery for it in hass. I had that working with SSDP in gnhast, so it should be easy to do in python.
ok. Just looking at Grafana and it's going to require some concerted effort.
Sweet. Thanks Tyler.