Unable to connect to iZone

I’ve been attempting to connect to an iZone controller without much luck.

I can access the controller from the iZone app but I’m unable to connect it into Home Assist. I just get an error that no iZone devices can be found.

I can see in the logs that it finds the iZone controller, but then it fails.

An extract from the debug file is below. Any help would be appreciated.

[pizone.discovery] Datagram Recieved b'ASPort_12107,Mac_000005231,IP_192.168.1.6'
2020-07-03 11:20:20 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 975, in _read_ready
    self._protocol.datagram_received(data, addr)
  File "/usr/local/lib/python3.7/site-packages/pizone/discovery.py", line 355, in datagram_received
    self._process_datagram(data, addr)
  File "/usr/local/lib/python3.7/site-packages/pizone/discovery.py", line 372, in _process_datagram
    self._discovery_recieved(data)
  File "/usr/local/lib/python3.7/site-packages/pizone/discovery.py", line 377, in _discovery_recieved
    or not message[3] in ('iZone', 'iZoneV2')):
IndexError: list index out of range

Details below of the Home Assist Setup
System Health

arch armv7l
chassis embedded
dev false
docker true
docker_version 19.03.8
hassio true
host_os HassOS 4.10
installation_type Home Assistant OS
os_name Linux
os_version 4.19.126-v7
python_version 3.7.7
supervisor 228
timezone Australia/Sydney
version 0.112.0
virtualenv false

I’m getting the same results. Wondered if anyone had any further suggestions on how to troubleshoot?

2020-10-05 07:23:17 INFO (MainThread) [pizone.discovery] Starting discovery protocol
2020-10-05 07:23:17 DEBUG (MainThread) [pizone.discovery] Sending discovery message to addr 192.168.201.255
2020-10-05 07:23:17 DEBUG (MainThread) [pizone.discovery] Sending discovery message to addr 172.30.33.255
2020-10-05 07:23:17 DEBUG (MainThread) [pizone.discovery] Sending discovery message to addr 172.17.255.255
2020-10-05 07:23:17 DEBUG (MainThread) [pizone.discovery] Datagram Recieved b'ASPort_12107,Mac_000014489,IP_192.168.201.72'
2020-10-05 07:23:17 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 1019, in _read_ready
    self._protocol.datagram_received(data, addr)
  File "/usr/local/lib/python3.8/site-packages/pizone/discovery.py", line 355, in datagram_received
    self._process_datagram(data, addr)
  File "/usr/local/lib/python3.8/site-packages/pizone/discovery.py", line 372, in _process_datagram
    self._discovery_recieved(data)
  File "/usr/local/lib/python3.8/site-packages/pizone/discovery.py", line 377, in _discovery_recieved
    or not message[3] in ('iZone', 'iZoneV2')):
IndexError: list index out of range
2020-10-05 07:23:37 INFO (MainThread) [pizone.discovery] Close called on discovery service.
2020-10-05 07:23:37 DEBUG (MainThread) [pizone.discovery] Connection Lost
2020-10-05 07:23:37 DEBUG (MainThread) [homeassistant.components.izone.config_flow] No controllers found

My system:
System Health

arch armv7l
chassis embedded
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.13
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7
python_version 3.8.5
supervisor 245
timezone Australia/Adelaide
version 0.115.6
virtualenv false

Python is not my area - but at face value the variable message should contain (based on the broadcast response):

message[0] = ASPort_12107
message[1] = Mac_000014489
message[2] = IP_192.168.201.72

so line 377 where it checks if message[3] exists in (‘iZone’, ‘iZoneV2’) would seem to logically fail. However I added immediately prior to the check:

if len(message) < 3: message.append("iZone")

which I understand should add an additional list item

message[3] = iZone

however it still didn’t work - I suspect my changes were not applying correctly within the HassIO docker containers. Is there anyone that can advise how this could be tested without too much difficulty?

Making that line:
if len(message) < 4: message.append("iZone")

fixed the error.

i’m getting this error when attempting to setup the integration for the first time:

 Logger: pizone.discovery
Source: /usr/local/lib/python3.8/site-packages/pizone/discovery.py:378
First occurred: April 27, 2021, 7:32:19 PM (456 occurrences)
Last logged: 9:22:47 AM
Invalid Message Received: ASPort_12107,Mac_000040471,IP_192.168.1.134,X,iLight,iDrate,iPower