Jablotron JA-80 series and JA-100 series alarm integration

One of the applications with the sensors when your alarm system is off anyway:
Get a notification when the heating is on and the windows are open.

Build with Node-RED, interacting with Home Assistant platforms such as binary sensors.

I like the use case and I have similar ones. My concern is that I also have the use case of smoke alarms which need to trigger when the house is occupied and unset. For my system, to get the sensor status codes via the USB serial connection, my alarm has to be in a state where smoke alarms would not trigger. That is the case for the series 80 when in either Service or Maintenance mode.

Since you are logging on with Maintenance code via your serial connection, are you sure you system is not in a state where other similar functionality is disabled? Another example I can think of is that a panic alarm should trigger even when the house is unset.

Good question. For sure I need to test that. I donā€™t think my system is in some kind of maintenance mode, but who can tell. Only one way to find out, right? :rotating_light: I needed to sniff those packets anyway, right :wink:

Sorry, my mistake, I thought you said you were sending you code to the alarm via the HA component and the code was a ā€˜maintenanceā€™ user, i.e. not a regular one.

@Ladegro, would you mind raising a specific issue here https://github.com/mattsaxon/HASS-Jablotron80/issues? Iā€™ll try to help you get to the bottom of this. Today Iā€™ve split the 80 and 100 series code so it is simpler.

@thoky, do you have any outstanding issues that youā€™d like help on or is it all working?

Yeah will do that somewhere next week, thanks.

Alarm went on this afternoon. So now we know 2 things:

  • alarm system is still working when jablotron_system plugin is active
  • we got a new unknown packet which represents a state where the alarm or sirene is going on:
2019-06-16 11:21:54 INFO (ThreadPoolExecutor-0_0) [custom_components.jablotron_system.alarm_control_panel] Jablotron state changed: arming to armed_away,
2019-06-16 14:50:51 INFO (ThreadPoolExecutor-0_0) [custom_components.jablotron_system.alarm_control_panel] Unknown status packet is x51 x22 b'\x1b',
2019-06-16 14:51:05 INFO (ThreadPoolExecutor-0_0) [custom_components.jablotron_system.alarm_control_panel] Jablotron state changed: armed_away to disarmed

@mattsaxon Hi. Well the alarm is working. What I am struggling is, how to connect the usb to VM on FreenNas and get rid of the raspberry where I run the clean HA setup just for the Jablotron. @Ladegro can you help me with the ser2net setup pls?

Thanks, understood and good news. Can you confirm you setup, so I can add it to the GitHub wiki page as a confirmed working configuration? I think you have JA-80T cable, correct? What path does the serial port appear under?

Sure,
here is my setup:

Cable JA-82T
Alarm JA-80 OASIS

If I connect the cable to RPi Hassio server it appears as /dev/hidraw0.
alarm_control_panel:

  • platform: jablotron
    serial_port: /dev/hidraw0
    code: !secret alarm_code
    code_arm_required: True
    code_disarm_required: True

The only think, if you remember, is that the alarm is arming/arming home/disarming without the code entered in HA alarm card - just the buttons.

@thoky thanks for the info, if youā€™d like to continue to discuss the arming without code, would you mind raising an issue on my GitHub repo? https://github.com/mattsaxon/HASS-Jablotron80/issues

Iā€™ve just this week done a fairly major restructure of the series 80 code to deal with a couple of issues I was having. 1) Occasionally, Iā€™d get a spurious state returned momentarily which was triggering automations I had setup. Iā€™ve resolved this by waiting for the state to be confirmed on the next packet before sending a revised state to HA. 2) I was having the occasional failure for the control panel to recognise sent commands. Iā€™ve resolved this with some retry logic.

I have tagged this as a stable release following a few days of testing in my installation. https://github.com/mattsaxon/HASS-Jablotron80/releases/tag/V1.0

@plaksnor and @mattsaxon :
I have been watching this thread for some time now, and I can not express the appreciation I have for you guys figuring this out. As I am already been working with Jablotron since their early days (JA-60, JA-80 & JA-100), you can call me a Jablotron fan :slight_smile: . (If you ever need any info of how the system technicaly works, or need some testing to be done, be sure to ask, I am glad to help!)
Of course at home now I have the JA-100 system (JA-106KR-LAN control panel) with several components connected. You can imagine the smile on my face as I was reading your work here :smiley:
Only I have this one problem now: I just can nog get the connection between my HA and Jablotron control panel working. Since my HA is running using docker on a Synology NAS, I think it has something to do with directing it to the correct USB serial output. The example states:

" Note: Because my serial cable presents as a HID device there format is /dev/hidraw[x], others that present as serial may be at /dev/ttyUSB0 or similar. Use the following command line to identify the appropriate device:

$ dmesg | grep usb
$ dmesg | grep hid

"
but neither helps me connecting to the control panel. I just canā€™t seem to figure out which port is my USB cable (which is directly connected to the control panel btw).
These are some outputs:


I was hoping one of you could help me here?

It is mapped as hiddev0, you can see that in the 3rd line of your output.

On my Rpi, I can see this at /dev/usb/hiddev0. Try running ā€˜ls /dev/usbā€™ to see if it is there. Not sure why yourā€™s isnā€™t mapped as a raw device, mine maps as both a raw at /dev/hidraw0 and as a dev at /dev/usb/hiddev96.

Once you have identified the path to hiddev0, try that in the configuration.yml and see if it works.

Hi @mattsaxon,

When I run ls /dev/usb/, it only shows hiddev8 and no hiddev0:
usb%20jablo
I tried defining that path in th configuration.yaml file, but no success.

I keep getting this (very basic configuration just yet):

Any idea?

Did you try hiddev8 or hiddev0 in your config?

Can you also try ā€˜ls /dev/hid*ā€™ and tell me what the output is

@mattsaxon

I tried hiddev8 because there was no hiddev0 showing.
I get this output after ā€˜ls /dev/hid*ā€™ :
usb%20jablo

So Iā€™ve tried to configure my machine to use hiddev0 and it doesnā€™t work, the byte stream is formatted differently. Therefore with this code, you need to find the hid device, but it seems that doesnā€™t exist. I presume the drivers are missing, my dmesg output has this line which yours doesnā€™t

usbserial: USB Serial support registered for generic

Iā€™m afraid you will need someone with better Linux skills than I to work out why that is not there.

Can you provide me a shortish hexdump as follows;

cat /dev/usb/hiddev8 | hexdump

then we can validate if it looks similar to mine and it will probably be fairly easily refactor the code to cope with the different format. However note that presently, the codebase for series 80 and 100 are split because of the very different behaviour, so it will probably come down to someone else to do the series 100 coding (as I have a series 80)

Hey @mattsaxon
I appreciate the help!
But I am not going to bother you with al this extra work. I was hoping to get it running from my Synology NAS because it is on 24/7.
So unless there is some linux specialist that kan help me with the current issue, I am thinking it wil maybe be easier for you and me to get a raspberry and start from there.