Ness DX8/DX16 Alarm

Anyone updated to 2022.7.2? Im currently on 2022.6.7 and the NESS addon works fine, updated to 2022.7.2 and it is broken. I rolled back to 2022.6.7 and all is functional again. I didnt note down the errors in the logs but I think it might have to do with the update to Python

Matt

Yes I have. Here are the errors:

2022-07-09 12:21:57 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/nessclient/client.py", line 158, in keepalive
await asyncio.gather(
File "/usr/local/lib/python3.10/site-packages/nessclient/client.py", line 116, in _recv_loop
await self._connect()
File "/usr/local/lib/python3.10/site-packages/nessclient/client.py", line 92, in _connect
await self._connection.connect()
File "/usr/local/lib/python3.10/site-packages/nessclient/connection.py", line 52, in connect
self._reader, self._writer = await asyncio.open_connection(
File "/usr/local/lib/python3.10/asyncio/streams.py", line 47, in open_connection
transport, _ = await loop.create_connection(
TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'loop'

2022-07-09 12:21:57 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved

Traceback (most recent call last):

File "/usr/local/lib/python3.10/site-packages/nessclient/client.py", line 76, in update
await asyncio.gather(
File "/usr/local/lib/python3.10/site-packages/nessclient/client.py", line 109, in send_command
await self._connect()
File "/usr/local/lib/python3.10/site-packages/nessclient/client.py", line 92, in _connect
await self._connection.connect()
File "/usr/local/lib/python3.10/site-packages/nessclient/connection.py", line 52, in connect
self._reader, self._writer = await asyncio.open_connection(
File "/usr/local/lib/python3.10/asyncio/streams.py", line 47, in open_connection
transport, _ = await loop.create_connection(
TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'loop'

Hi, I have the same issue with Ness DX16 not working after updating the core, I tried 2022.7.2 and the latest 2022.7.3 and the issue still persists. Iā€™ve rolled back to 2022.6.7 and itā€™s working fine.
Unfortunately Iā€™m heading away for a couple of weeks so I wonā€™t be able to help with fixes/testing.
Cheers Flatstrap

I believe I know what the problem is but I donā€™t know where the libraries are installed now. They used to be in /config/deps/lib/python3.x But I am thinking I might need to SSH into the OS nowā€¦?

Hey all, can see thereā€™s an issue in the latest release. Iā€™m currently overseas so wonā€™t have access to debug this myself until early August. If anyone does find the root cause, and can provide code change to fix the issue and can confirm the fix themselves, I can push a new release as necessary to nessclient or make changes to Home Assistant core to support.

As soon as I find where the library is now I will!!

OK PR submitted https://github.com/nickw444/nessclient/pull/43

For those wanting to fix it now you should have a nessclient directory under /config/deps/lib/python3.x/site-packages Copy the python3.x directory and name it python3.10. Then go into site-packages/nessclient directory and edit connection.py Remove the line (about line 56) loop=self._loop,. Reboot and test.

1 Like

Iā€™ve raised a PR to core with a fix if anyone is game on testing it: https://github.com/home-assistant/core/pull/75298

2 Likes

Hi all, the latest release (2022.7.6) includes the code to fix this bug.

Thanks Nick, installed yesterday and can confirm it works great.

Yeah can also confirm working on my side too :smiley: thanks for the quick fix guys!

Sharing my solution for a panel that wonā€™t accept commands. I wanted to be able to arm and disarm the panel and trigger the alarm. After going through a few ideas on another forum I was pointed to this:

So if like me you have zone 8 spare then you can use this to achieve what i wanted. I constructed this:

I 3D printed a simple box with external dimensions of 94x54x29mm (I used 2mm wall thickness and also a 2mm thick lid made the total height 31mm) to house it and that fits perfectly to the left of the battery. Running ESPHOME on the D1 mini with this config:

esphome:
  name: ness-alarm-control-d1
  platform: ESP8266
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "12345678901234567890123456789012"

wifi:
  ssid: "your_ssid"
  password: "your_password"

  manual_ip:
    static_ip: 192.168.1.97
    gateway: 192.168.1.254
    dns1: 192.168.1.206
    dns2: 192.168.1.165
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ness-Alarm-Control-D1"
    password: "some_password"

captive_portal:

switch:
  - platform: gpio
    pin: D5
    id: momentary_keyswitch
  - platform: gpio
    pin: D7
    id: panic_button
  - platform: template
    name: "Ness Momentary Keyswitch"
    icon: "mdi:shield-key"
    turn_on_action:
    - switch.turn_on: momentary_keyswitch
    - delay: 1000ms
    - switch.turn_off: momentary_keyswitch
  - platform: template
    name: "Ness Panic Button"
    icon: "mdi:alarm-bell"
    turn_on_action:
    - switch.turn_on: panic_button
    - delay: 1000ms
    - switch.turn_off: panic_button
    
sensor:
  - platform: wifi_signal
    name: "Ness Alarm Control WiFi Signal Strength"
    update_interval: 60s

text_sensor:
  - platform: template
    name: "Ness Alarm Control Wifi Channel"
    lambda: |-
      std::string out;
      char buffer[64];
      sprintf(buffer, "%u", wifi_get_channel());
      out.append(buffer);
      return out;
    update_interval: 60s

I have two switches which I can use to dis/arm the panel and trigger the alarm. I am using ha-floorplan to build my own alarm control panel. This is where I am currently at (The disarmed on the left is the NESS panel and on the right is the HA automations):

1 Like

Hi all,

Iā€™ve just set up HA Blue and want to integrate my NESS D8XD. Looking at the pics, everyone has been able to connect via serial, but, not sure if itā€™s because I have an RJ45 plug, my serial pins have a sort of cover over them to prevent a plug being inserted?

Images attached.

Can anyone point me in the right direction for Australianā€™s to be able to get this working?
I have an Ethernet plug to HA right next to the panel, so would prefer that, as the nearest PC is light years away.

Oh yeah, for anyone opening their box in the futureā€¦
THE ALARM BOX HAS A TAMPER SWITCH WHICH WILL SOUND THE SIREN!
Have someone ready to disarm the alarm, and donā€™t keep your head next to the siren.



Get yourself one of these

Remove the cover from the serial port of your alarm board, plug the appropriate cable supplied with the above into it, then plug this into the IP232, connect this to your network and configure to suit.

Hope that helps

Matt

1 Like

Perfect, thank you!

I thought they were blocking it out for a reason, guess that reason was to stop me messing with it :sweat_smile:

I havenā€™t had an opportunity to have a good look at the serial output from the panel, but from reading through the ASCII protocol document, it seems as though the packets indicate which user has disarmed the panel.

Is there any possibility of expanding on this integration to report the user code that has disarmed to HA?

I imagine it could be an attribute that retains the last identified user code seen in a packet that includes the user code.

Iā€™m good with serial comms but I wouldnā€™t know where to start with contributing code to HA.

The envisioned application is along the lines of implementing contractor codes, eg: provide a specific code to a cleaner, and when they use their code to disarm the panel, HA identifies the user code and can do things like open roller blinds and turn on lights, etc.

The serial comms abstraction is handled by my client library ā€œnessclientā€.

The code for handling the area events is here:

Currently it handles them in a generic way that doesnā€™t actually pull any additional information (like user ID) out of them, so some additional tweaks would first be required in the library to support it.

Once there is support, more work would need to be done in Home Assistant core to handle and provide that information to make use of it for automations, etc.

Although looking further (sorry am on mobile), looks like the second part of the payload (user ID) might already be coerced into the ā€œzoneā€ field for the event class instance:

(Please forgive my lack of knowledge - I wrote this library 5 years ago and have rarely needed to make changes since then!)

Hi All,

Firstly, thank you to those involved in getting this to work, in particual Nick for writing the library. It was nice to find out I can somewhat make my dumb alarm smarter.

My question is, what is the method to see when the alarm is going off so that I can get HA to notify me? From looking at the library Nick wrote, it appears the library is aware of different events and the Ness integration page states it reports on alarm status. I just canā€™t figure out where to find the alarm status in the list of triggers when creating an automation via the UI.

e.g. I know how to create an automation where the trigger is a state, and it is for when a motion sensor that changes state, then the action is to send a notification.

Thanks,
Adrian

Do you have the alarm_control_panel.alarm_panel entity? That shows the alarm state