home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.65k stars 29.94k forks source link

Honeywell REDlink Internet Gateway - not showing thermostat in HASS #9001

Closed mmotley999 closed 6 years ago

mmotley999 commented 7 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.51.2

Python release (python3 --version): Python 3.4.2

Component/platform: Honeywell Thermostat (climate), US version

Description of problem: I have a 4-zone system with 3 wired thermostats and 1 wireless thermostat (by wireless I mean using Honeywell's REDLink proprietary protocol).

So far I replaced 2 of the wired thermostat with WiFi models, and they are working great.

I just added a Honeywell REDLink Internet Gateway for the REDLink thermostat. I can see the thermostat on mytotalconnectcomfort and the phone app and control it fine, however it is not showing up in HASS.

I've tried to decipher the API protocol from somecomfort, as I do notice that on the mytotalcomfort website some features are "missing" with these REDLink thermostats (such as fan condition). I'm just not good enough in Python (although trying desperately to learn!) to make much sense of it.

Expected: The additional thermostat showing up in HASS.

Problem-relevant configuration.yaml entries and steps to reproduce:

climate:
  - platform: honeywell
    username: <redacted>
    password: <redacted>
    region: us
    scan_interval: 600
    cool_away_temperature: 83
    heat_away_temperature: 66

Traceback (if applicable):

Aug 15 16:43:11 hass1 hass[23549]: #033[32m2017-08-15 16:43:11 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_
state=None, new_state=<state climate.office=idle; operation_mode=cool, current_temperature=81, away_mode=off, unit_of_measurement=°F, fan_list=[
'auto', 'on', 'circulate', 'follow schedule'], temperature=83, fan=idle, friendly_name=Office, operation_list=['emheat', 'heat', 'off', 'cool',
'auto', 'auto'], min_temp=45, fan_mode=auto, max_temp=95 @ 2017-08-15T16:43:11.154608-07:00>, entity_id=climate.office>#033[0m
Aug 15 16:43:11 hass1 hass[23549]: #033[32m2017-08-15 16:43:11 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_
state=None, new_state=<state climate.living_room=idle; operation_mode=cool, current_temperature=78, away_mode=off, unit_of_measurement=°F, fan_l
ist=['auto', 'on', 'circulate', 'follow schedule'], temperature=86, fan=idle, friendly_name=Living Room, operation_list=['emheat', 'heat', 'off'
, 'cool', 'auto', 'auto'], min_temp=45, fan_mode=auto, max_temp=95 @ 2017-08-15T16:43:11.162434-07:00>, entity_id=climate.living_room>#033[0m
Aug 15 16:43:11 hass1 hass[23549]: #033[31m2017-08-15 16:43:11 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never
 retrieved#033[0m
Aug 15 16:43:11 hass1 hass[23549]: Traceback (most recent call last):
Aug 15 16:43:11 hass1 hass[23549]: File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
Aug 15 16:43:11 hass1 hass[23549]: result = next(coro)
Aug 15 16:43:11 hass1 hass[23549]: File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_componen
t.py", line 381, in async_process_entity
Aug 15 16:43:11 hass1 hass[23549]: new_entity, self, update_before_add=update_before_add
Aug 15 16:43:11 hass1 hass[23549]: File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_componen
t.py", line 238, in async_add_entity
Aug 15 16:43:11 hass1 hass[23549]: yield from entity.async_update_ha_state()
Aug 15 16:43:11 hass1 hass[23549]: File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", lin
e 239, in async_update_ha_state
Aug 15 16:43:11 hass1 hass[23549]: state = self.state
Aug 15 16:43:11 hass1 hass[23549]: File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/climate/__in
it__.py", line 412, in state
Aug 15 16:43:11 hass1 hass[23549]: if self.current_operation:
Aug 15 16:43:11 hass1 hass[23549]: File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/climate/honeywell.py", line 265, in current_operation
Aug 15 16:43:11 hass1 hass[23549]: oper = getattr(self._device, ATTR_CURRENT_OPERATION, None)
Aug 15 16:43:11 hass1 hass[23549]: File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/somecomfort/client.py", line 273, in equipment_output_status
Aug 15 16:43:11 hass1 hass[23549]: return EQUIPMENT_OUTPUT_STATUS[self._data['uiData']['EquipmentOutputStatus']]
Aug 15 16:43:11 hass1 hass[23549]: TypeError: list indices must be integers, not NoneType#033[0m

Additional info: The two thermostats in the traceback above (Office and Living Room) are WiFi wired thermostats and appear to be discovered fine. It seems to crash when trying to discover the REDLink thermostat.

I know this is probably not a common setup, and I'm willing to help troubleshoot if somebody could point me in the right direction with regards to the API. I also don't know if this belongs here or on the somecomfort side.... thanks in advance for an awesome piece of software.

mmotley999 commented 7 years ago

I've found a workaround by modifying somecomfort client.py to return "idle" if the equipment output status is "None". I'll verify that I have control over the temperature setpoints tonight, and then post this over at the somecomfort github site. Frankly, I have no clue if "idle" is even the correct thing to return here, but at least the thermostat did magically appear in HASS upon restart.

    @property
    def equipment_output_status(self):
        """The current equipment output status"""
        if self._data['uiData']['EquipmentOutputStatus'] == 0:
            if self.fan_running:
                return "fan"
            else:
                return "off"
        if self._data['uiData']['EquipmentOutputStatus'] == None:
            return "idle"
        else:
            return EQUIPMENT_OUTPUT_STATUS[self._data['uiData']['EquipmentOutputStatus']]
mmotley999 commented 7 years ago

Actually, the issue is resolved in version 0.5.0 of somecomfort, more elegantly:

    @property
    def equipment_output_status(self):
        """The current equipment output status"""
        if self._data['uiData']['EquipmentOutputStatus'] in (0, None):
            if self.fan_running:
                return "fan"
            else:
                return "off"
        return EQUIPMENT_OUTPUT_STATUS[self._data['uiData']['EquipmentOutputStatus']]

Any reason why the HASS honeywell component can't require 0.5.0 instead of 0.4.1?

balloobbot commented 6 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

mmotley999 commented 6 years ago

Closing.. I originally hacked somecomfort to fix this, but was resolved for good in 0.59 with somecomfort 0.5.0.