sia icon indicating copy to clipboard operation
sia copied to clipboard

[Honeywell FX020] Failed to Communicate

Open Alexwijn opened this issue 3 years ago • 13 comments

I'm trying to use this component with my Honeywell Galaxy Flex 20 (FX020), firmware version 3.0.2.

Version of the custom_component and HA setup (version, OS, etc)

HA: 0.116.4 Component: master, but also tested beta

Configuration

Not relevant.

Describe the bug

The alarm system also reports that it can't communicate with the server (FTC). And the component also got a task exception that it can't read the test message, I think.

Debug log

2020-10-28 19:14:25 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pysiaalarm/aio/sia_server.py", line 50, in handle_line
    line = str.strip(data.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 2: invalid start byte

Alexwijn avatar Oct 28 '20 18:10 Alexwijn

Hi @Alexwijn I don't know what is going on there, what you could try (if you know a bit of python) is to run the underlying package (https://github.com/eavanvalkenburg/pysiaalarm) code and see what kind of messages are being sent by the alarm, before all the parsing happens, the protocol used is quite specific, so if they implemented it slightly differently then that might cause issues!

eavanvalkenburg avatar Oct 30 '20 11:10 eavanvalkenburg

I also noticed that my encryption was turned on. I turned it off and I'm receiving this: bytearray(b'D#0192\x92')

And the exception: UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 6: ordinal not in range(128)

I don't know anything about the SIA protocol, but I imagine the received line should be a lot longer than that.

Alexwijn avatar Dec 31 '20 10:12 Alexwijn

@Alexwijn give the latest a try, I changed something in the underlying package that might fix this!

eavanvalkenburg avatar Feb 01 '21 16:02 eavanvalkenburg

Thanks for the update. Got the following error now: Last line could not be parsed as a SIAEvent, line was: D#0192

Alexwijn avatar Feb 01 '21 18:02 Alexwijn

so it seems there is something else going on with your alarm systems, normally a line is a lot longer, do you have some documentation about the alarm system?

eavanvalkenburg avatar Feb 02 '21 11:02 eavanvalkenburg

No, this alarm system came pre-installed when I moved into this house. Did you find out anything out yet?

Alexwijn avatar Jun 16 '21 08:06 Alexwijn

I just noticed but the numbers 0192 are the first numbers of the account id. My account id is six digits long.

Alexwijn avatar Jun 16 '21 09:06 Alexwijn

Also note that the docs give me an example of how the account Id could look like, eg. AAA. But I can only enter numbers not letters.

Alexwijn avatar Jul 14 '21 14:07 Alexwijn

@Alexwijn do you mean you can only enter numbers in your alarm? that should work, but you might not to translate that number to a base16 number (which includes A-E), like here: https://www.rapidtables.com/convert/number/decimal-to-hex.html

eavanvalkenburg avatar Jul 15 '21 07:07 eavanvalkenburg

I'm trying to get this working with Honeywell Flex100 centrale. 2022-04-25 15:17:47 DEBUG (MainThread) [pysiaalarm.base_server] Incoming line: F#123456 2022-04-25 15:17:47 WARNING (MainThread) [pysiaalarm.base_server] Last line could not be parsed succesfully. Error message: No matches found, event was not a SIA or ADM Spec event, line was: %s. Line: F#123456

where 123456 is the account number defined on the Galaxy. The company that installed the system confirmed that SIA protocol was selected for communication. Anything I can do at my end to debug this ?

compunix-be avatar Apr 25 '22 15:04 compunix-be

@eavanvalkenburg, I've been able to test further and gather some network traces of communications between my Flex 100 and another app. One communication exchange looks like follow #123456 Nti10:20/id001/CG A DEELB.ING 0

Each of the above lines were send separately, and required acknowledgement.

First line is the account number, second line matches a SIA event block, third line is some additional ASCII text, last line is 0 or end of communication. This messages correspond with the sia_content_regex, but does not get matched. At least for the account line, because the initial 'F' is included in the pattern matching. For your information, I've used https://github.com/dklemm/FlexSIA2MQTT to generate the network traces. Any idea what is going wrong here ?

PS: Or might it be that 4 lines should be concatenated and then matched against the sia_content_regex ?

compunix-be avatar Apr 29 '22 14:04 compunix-be

@compunix-be thank you so much for this effort! It indeed looks like it is spreading things out over multiple messages so this gives me a starting point to see if I can build something for this!

eavanvalkenburg avatar Apr 30 '22 06:04 eavanvalkenburg

@eavanvalkenburg did you had time to research this ? If you want me to debug something, let me know.

compunix-be avatar Jul 02 '22 10:07 compunix-be