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
69.79k stars 28.93k forks source link

Heatmiser integration failing on startup - CRC error #51508

Closed tomtokic closed 3 years ago

tomtokic commented 3 years ago

The problem

Hi, I have a Heatmiser UH1 and have had it successfully serially integrated into an existing Indigo Domotics home automation with a plugin that I wrote by modifying the same base code that you have used for the Heatmiser integration.

I am now migrating to Home Assistant and have used the Heatmiser integration, but it is failing to startup. It is giving me a server error log stating the CRC is INCORRECT. I have it connected via an ethernet to serial device. The below is the full extent of the error messages.

Logger: homeassistant.components.climate Source: components/heatmiser/climate.py:73 Integration: Climate (documentation, issues) First occurred: 7:07:52 PM (1 occurrences) Last logged: 7:07:52 PM

Error while setting up heatmiser platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 60, in setup_platform [ File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 61, in HeatmiserV3Thermostat(heatmiser_v3_thermostat, thermostat, uh1_hub) File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 73, in init self.therm = therm(device[CONF_ID], "prt", uh1) File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 108, in init self.read_dcb() File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 314, in read_dcb self.dcb = self._hm_read_address() File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 295, in _hm_read_address response = self._hm_send_address(self.address, 0, 0, 0) File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 286, in _hm_send_address verification = self._hm_verify_message_crc_uk( File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 171, in _hm_verify_message_crc_uk dest_addr = datal[0] IndexError: list index out of range

Logger: root Source: /usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py:167 First occurred: 7:07:52 PM (1 occurrences) Last logged: 7:07:52 PM

CRC is INCORRECT

2021-06-05 19:07:52 ERROR (SyncWorker_6) [root] CRC is INCORRECT 2021-06-05 19:07:52 ERROR (MainThread) [homeassistant.components.climate] Error while setting up heatmiser platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 60, in setup_platform [ File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 61, in HeatmiserV3Thermostat(heatmiser_v3_thermostat, thermostat, uh1_hub) File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 73, in init self.therm = therm(device[CONF_ID], "prt", uh1) File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 108, in init self.read_dcb() File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 314, in read_dcb self.dcb = self._hm_read_address() File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 295, in _hm_read_address response = self._hm_send_address(self.address, 0, 0, 0) File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 286, in _hm_send_address verification = self._hm_verify_message_crc_uk( File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 171, in _hm_verify_message_crc_uk dest_addr = datal[0] IndexError: list index out of range

What is version of Home Assistant Core has the issue?

core-2021.6.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Heatmiser

Link to integration documentation on our website

https://www.home-assistant.io/integrations/heatmiser/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.climate
Source: components/heatmiser/climate.py:73
Integration: Climate (documentation, issues)
First occurred: 7:07:52 PM (1 occurrences)
Last logged: 7:07:52 PM

Error while setting up heatmiser platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 60, in setup_platform
    [
  File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 61, in <listcomp>
    HeatmiserV3Thermostat(heatmiser_v3_thermostat, thermostat, uh1_hub)
  File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 73, in __init__
    self.therm = therm(device[CONF_ID], "prt", uh1)
  File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 108, in __init__
    self.read_dcb()
  File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 314, in read_dcb
    self.dcb = self._hm_read_address()
  File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 295, in _hm_read_address
    response = self._hm_send_address(self.address, 0, 0, 0)
  File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 286, in _hm_send_address
    verification = self._hm_verify_message_crc_uk(
  File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 171, in _hm_verify_message_crc_uk
    dest_addr = datal[0]
IndexError: list index out of range

Logger: root
Source: /usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py:167
First occurred: 7:07:52 PM (1 occurrences)
Last logged: 7:07:52 PM

CRC is INCORRECT

2021-06-05 19:07:52 ERROR (SyncWorker_6) [root] CRC is INCORRECT
2021-06-05 19:07:52 ERROR (MainThread) [homeassistant.components.climate] Error while setting up heatmiser platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 60, in setup_platform
[
File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 61, in <listcomp>
HeatmiserV3Thermostat(heatmiser_v3_thermostat, thermostat, uh1_hub)
File "/usr/src/homeassistant/homeassistant/components/heatmiser/climate.py", line 73, in __init__
self.therm = therm(device[CONF_ID], "prt", uh1)
File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 108, in __init__
self.read_dcb()
File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 314, in read_dcb
self.dcb = self._hm_read_address()
File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 295, in _hm_read_address
response = self._hm_send_address(self.address, 0, 0, 0)
File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 286, in _hm_send_address
verification = self._hm_verify_message_crc_uk(
File "/usr/local/lib/python3.8/site-packages/heatmiserV3/heatmiser.py", line 171, in _hm_verify_message_crc_uk
dest_addr = datal[0]
IndexError: list index out of range

Additional information

climate:

probot-home-assistant[bot] commented 3 years ago

heatmiser documentation heatmiser source (message by IssueLinks)

tomtokic commented 3 years ago

@andylockran Hi Andy, wondering if this is something you can assist with? Thanks in advance.

andylockran commented 3 years ago

apologies Tom but I've lost access to the hardware (moved house) - so handed over the project on github to a new maintainer.

Can you open an issue against https://github.com/andylockran/heatmiserV3 please

On Mon, Jun 7, 2021 at 11:45 PM tomtokic @.***> wrote:

@andylockran https://github.com/andylockran Hi Andy, wondering if this is something you can assist with? Thanks in advance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/51508#issuecomment-856310353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY33ZBNGZPO3I5J3U63CDTRVDYDANCNFSM46EJ5A6A .

tomtokic commented 3 years ago

Will do mate. Thanks for the prompt reply.


From: Andy Loughran @.> Sent: Tuesday, 8 June 2021 6:44 PM To: home-assistant/core @.> Cc: tomtokic @.>; Author @.> Subject: Re: [home-assistant/core] Heatmiser integration failing on startup - CRC error (#51508)

apologies Tom but I've lost access to the hardware (moved house) - so handed over the project on github to a new maintainer.

Can you open an issue against https://github.com/andylockran/heatmiserV3 please

On Mon, Jun 7, 2021 at 11:45 PM tomtokic @.***> wrote:

@andylockran https://github.com/andylockran Hi Andy, wondering if this is something you can assist with? Thanks in advance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/51508#issuecomment-856310353, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKY33ZBNGZPO3I5J3U63CDTRVDYDANCNFSM46EJ5A6A .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/51508#issuecomment-856581299, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQUKQBQ26GUYFHYP4XVGD63TRXJ6LANCNFSM46EJ5A6A.

tomtokic commented 3 years ago

Closing issue here. Moving issue to https://github.com/andylockran/heatmiserV3 as requested.