Thanks for all your effort Nick, I’ll test it out in the next release. I have also discovered a bug in my D16X panel where if a zone is in a unsealed state for around 10min it reports the zone as sealed. Initially I thought my program was failing but on further logging I discovered that the panel itself is sending a sealed status back for that input even though the panel still declares the zone as unsealed. I’ve only tested on one input at the moment but am going to test another input today.
Interesting, I have the same module but don’t have the same issue. Maybe it’s something like an echo reply settings. The only difference I can see in mine is that I have RESET checkbox turned off.
For reference this is my “Expand Function” page, perhaps yours is slightly different config too?
I found an interesting bug last night that caused my state updates to stop working - there is a bug in the panel that causes state & event updates sent exactly on the hour to send an “invalid time” - i.e. 17:60:00 I have released a fix for this, so hopefully will land in the next HA release too.
Nick, TBH I think the serial in general is very flaky going by what I am seeing. I havent seen the 60th minute bug on my panel and I have been monitoring my alarm for I’d say 4 years. So maybe different firmware. What version do you get when you issue a Status 17? That should return the Panel Software Version.
Nice find. I have tried my other fix and added to line 71 of packet.py
data += '\r\n'
This has broken apart the messages but just for some reason I am seeing the keep alive message echoed back to HASSIO so that this happens:
019-02-26 13:10:12 WARNING (MainThread) [nessclient.client] Failed to decode packet
Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/nessclient/client.py”, line 121, in _recv_loop
event = BaseEvent.decode(pkt)
File “/config/deps/lib/python3.6/site-packages/nessclient/event.py”, line 39, in decode
return StatusUpdate.decode(packet)
File “/config/deps/lib/python3.6/site-packages/nessclient/event.py”, line 147, in decode
request_id = StatusUpdate.RequestID(int(packet.data[0:2], 16))
ValueError: invalid literal for int() with base 16: ‘S0’
Your update means the component keeps soldiering on which is great but it is odd. My “expand function” page is the same as yours. Is my firmware version the same as yours?
The only other thing I am seeing is an unsealed state even when there is no movement but I think this might be a dodgy PIR so I will try and replace it.
Again thanks Nick for putting this together it is a great addition to Home Assistant.
Interesting, didn’t realise there was a command to get firmware version - it’s not documented in the protocol spec. I have panel version 7.8 I believe. The version of my IP module is V4018 which is the same as yours I think (based on that screenshot you sent)
If I telnet into it and press a key I get an echo. So not sure yet if its the panel doing that or the adapter. Anyone else with V7.0 panel that can try and telnet to it. Press 1 and see if 11 appears in the window?
Wow thanks, is that publicly available from ness? Or did you have to contact them?
I’ve been working off a very old revision (rev 5) that is missing a handful of details / has incorrect documentation that appears to have been fixed in that revision (judging by the changelog).
I have created a patch to add the carriage return/newline to each outgoing message, which should hopefully resolve this issue for you. Tested the patch on my panel and it didn’t seem to have any issues. (After all, the protocol specifies that you need to send a \r\n anyway)
FINISH. This is always CR, LF (Carriage Return, Line Feed).
@nickw444 , rev 5 is what is linked on Ness’ website. I got this rev some time ago from a guy of Austech forums, who I think was the guy that wrote it. I have requested the latest version, if its newer than 11 I’ll upload it.
Was about to upload the latest rev 13 but you beat me to it.
Anyways I updated to the latest HA beta (0.89.0b1) which should contain the latest Ness stuff. and it still crashes after a minute or so with this.
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/nessclient/client.py”, line 148, in keepalive
self._update_loop(),
File “/usr/local/lib/python3.7/site-packages/nessclient/client.py”, line 131, in _recv_loop
self.alarm.handle_event(event)
File “/usr/local/lib/python3.7/site-packages/nessclient/alarm.py”, line 50, in handle_event
self._handle_system_status_event(event)
File “/usr/local/lib/python3.7/site-packages/nessclient/alarm.py”, line 81, in _handle_system_status_event
return self._update_zone(event.zone, True)
File “/usr/local/lib/python3.7/site-packages/nessclient/alarm.py”, line 113, in _update_zone
zone = self.zones[zone_id - 1]
IndexError: list index out of range
@OzGav can you provide some debug log lines before the exception was logged? Would be good to show the raw data as it was received so I can see what was being decoded exactly.
@nickw444 Happened to notice you had submitted a PR with the inclusion of a configurable scan_interval, so I fired up a quick HA dev branch container to try it out.
It works wonderfully, thank you for the component and this latest inclusion for those of us who have older panels!
I’ve set mine at 2 seconds which is nice and responsive. However, by having it update that frequently (not knowing the ins and outs of HA) is there any downside?