Hello everyone,
since I'm also working on thermostat widget, I'm sharing some thoughts so we can discuss them.
I've setup a codepen page where the widget can be edited:
http://codepen.io/anon/pen/bNbLQj?editors=101inside this editor we can edit both the widget html and json files and also have a live preview with almost all functionalities.
The widget should be compatible with previous mike version, but it is not completed. Here some considerations:
1) it should support both Cool setpoint and Heat setpoint with own values (
Thermostat.HeatSetPoint and
Thermostat.CoolSetPoint fields)
2) it should hide various fields automatically when not in use by current module
3) it should support mixed Cool+Heat mode as well
4) it should set the unit to celsius or fahrenheit by reading the
Sensor.Temperature.Unit field (with 'Celsius' or 'Fahrenheit' value)
5) it should store human-readable values into high-level field like
Thermostat.OperatingState and
Thermostat.Mode, so numbers will be replaced by the matching word value
6) images used to display heat/cool/fan are currently fetched from external sites, but these wiil be locally copied to
homegenie/generic/images folder
7) the currently implemented api Therm.* should be renamed to reflect MIG/HomeGenie logic. these names should be fully human readable and should be usable not just for Z-Wave. So to have a syntax like:
Thermostat.Mode.Get
Thermostat.Mode.Set
Thermostat.Status.Get
Thermostat.Temperature.Get
Thermostat.FanMode.Get
Thermostat.FanMode.Set
Thermostat.HeatPoint.Get
Thermostat.HeatPoint.Set
Thermostat.CoolPoint.Get
Thermostat.CoolPoint.Set
please feel free to help with your thoughts and considerations.
I'm also attacching a very very preview of the "Generic Thermostat" APP that will let use any temperature sensor module and any switch/relay module to implement a thermostat within HomeGenie (this will be used with Eden Sensor Board). This app is also using the generic thermostat widget.
Cheers,
g.
UPDATE #1: updated generic thermostat app with some comments
UPDATE #2: implemented heat mode logic in generic thermostat app
UPDATE #3: changed api commands as discussed above