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

I suspect others will have a similar issue, so I’d be very happy to look over the dump. If we can fix your issue, it will probably help others. For example I have a suspicion that the JA-80T adapter might have a similar byte stream as others users are not able to get that working.

If you think it can help, I would love to help too.
Reply when running cat /dev/usb/hiddev8 | hexdump returns an error:
image

Ok, your distro doesn’t have ‘hexdump’ can you try ‘xxd’ instead or if not ‘od’.

To be sure: Does something has to happen after giving that command? Od do I have to first give the command and next connect the USB cable before anything happens?
Because when I give the command, it’s like it is waiting for something to happen, but nothing does. Have to control + x to stop it.

Great if ‘od’ Exists, the full command is

Cat /dev/usb/hiddev8 | od

If there is some communication going on, you should see packets incoming. For example:

$ sudo cat /dev/hidraw0 | hexdump
0000000 08d8 0000 0080 0000 0000 0000 000b 0000
0000010 0000 0000 2954 1000 0000 0000 0000 0000
0000020 290c 1000 d3bd 0000 0000 0000 0464 1000
0000030 000b 0000 457c 1000 0000 0000 5297 0003

Also with xxd you should see any data:

$ sudo cat /dev/hidraw0 | xxd
00000000: 9019 009c 160a 888a 0087 0000 8a10 8800  ................
00000010: 008a 1187 0000 8a01 8800 0000 0c00 0000  ................
00000020: 0100 0000 d9d3 0000 0000 0000 6404 0010  ............d...
00000030: 0b00 0000 7c45 0010 0000 0000 9752 0300  ....|E.......R..

But these kind of packets probably only appear if you have triggered the system to send anything. Afaik the JA-100 series is not sending data by default, that’s why the Jablotron_system component is sending messages.

If you’re submitting the cat command on the right device and it is waiting for something to happen, then it’s listening to a connected device (which might be the right device). However, if you get an immediate response like ‘File or folder doesn’t exist’, you’re trying to read a device which doesn’t exist.

So what you could do is try several USB devices like this:

  1. In one session you’re going to listen for packets with: sudo cat /dev/usb/hiddev8 | xxd
  2. In another session you’re going to try to communicate with the control panel with: echo -ne "\x52\x02\x13\x05\x9a" > /dev/usb/hiddev8

Change /dev/usb/hiddev8 into whatever device you think that might work.
It doesn’t matter what kind of response you’ll get as a result of step 2, as long as you see data incoming.

I think your device is connected, but not recognized, something @mattsaxon already presumed. I’ve done some research and maybe this topic will help you out configuring your USB device properly:
https://www.raspberrypi.org/forums/viewtopic.php?t=160400

The result of your dmesg | grep hid is:
hid-generic 0003:16D6:0008.0001: hiddev0: USB HID v1.11 Device [Jablotron ltd JA-100 Flexi] on usb-0000:00:14.0-3/

The result of my dmesg | grep hid is:
hid-generic 0003:16D6:0008.0002: hiddev96,hidraw0: USB HID v1.11 Device [Jablotron ltd JA-100 Flexi] on usb-3f980000.usb-1.2/input0

I also see something like this in my log:

[   46.514293] usb 1-1.2: New USB device found, idVendor=16d6, idProduct=0008
[   46.514303] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   46.514307] usb 1-1.2: Product: JA-100 Flexi
[   46.514311] usb 1-1.2: Manufacturer: Jablotron ltd

…which I don’t see in your dmesg log.
So it looks like your system doesn’t recognize the USB device vendor or product. This might be resolved by following the thread in the URL above.

Hi @plaksnor ( love the nickname :wink: )

I have tried your suggestion, no succes yet.
I have found something might cousing the ttyUSB not to be loaded:


‘Module verification failed: signature and/or required key missing - tainted kernel’
As far as I have found searching the web for hours, it might be something with the usbserial.ko file.
Might it be an idea you send me a copy of the usbserial.ko file you have (on which the Jablotron is recognised) so I add it to my system?
What do you think?

Hm, I think you need to compile these modules. I’ve found something which might help:
https://hallard.me/how-to-install-kernel-modules-on-synology-ds1010-dsm-4-1/

I was looking through the topic on the link you send me… I don’t think I am capable to manage that:
image
Also the topic is outdated and I cannot sem to find the recent version files I need for my DSM on the links in that topic… Never the less I deeply appreciate the help!
But I am concidering to give op on getting this resolved, and maybe put my efforts now in compiling a raspberry and use that… My knowledge of Linux is to little to solve this I’m afraid…

Thank you so much for this component! @mattsaxon. I have previously worked with a fibaro z wave sensor connected to the alarm in order to swith of lights when turning on the alarm, but this seems much better. Unfortunately it does not work completely. I have a jablotron 100 series connected to a Rpi by usb. the RPI uses HA in a virtual environment. I can see an alarm panel that can be used to turn the alarm on and off (only a specific zone). However I do not need to enter a code to turn off the alarm, is this by design? And also no sensor is found. I think it has something to do with the jablotron_devices.yaml file in the HA folder. Does the plugin create this file or do I need to create it? If I do not create it, I get an error stating “jablotron_devices.yaml not found”. If I create it, no error message but an empty file.

I see you are using the JA-100 version of the component, which was forked and is now maintained by @plaksnor. They should be able to advise on the sensor issue.

On the subject of the entering of the code, this was the original design and so a feature of both components. I recently added the option of entering the code (or not) to the JA-80 component, but this has not yet been brought into the JA-100 version. You can see the discussion here https://github.com/mattsaxon/HASS-Jablotron80/issues/5.

Could I ask you to raise specific issues on the appropriate GitHub repository, this thread is for more general discussion as it’s length is getting quite unwieldy to discuss specific issues.

1 Like

Tom,
I’ll see if I have time to integrate matt’s commit into the HASS-JablotronSystem repo shortly.

About the jablotron_devices.yaml: are you sure HA is able to write files in the config folder?
And what if you manually add the file and also chmod for example with 777 only for testing purposes?

If I add a jablotron_devices.yaml file in the config with a chmod of 777 nothing changes. The file remains 0 Kb with no entries

Can you explain how you give permanent acces for the homeassistant account to /dev/hidraw ? I use chown homeassistant:homeassistant /dev/hidraw0. That works (because otherwise root only has permissions). But after a reboot permissions are lost. Have you fixed that?

Just add that command to the bottom of /etc/rc.local
That should execute it during each boot

1 Like

I entered chown homeassistant:homeassistant /dev/hidraw0 to the end of rc.local but that did not do anything.

edit: I found out that it need to be before the line: exit 0, then it works

Hi all,
found some time to upgrade the code and added MQTT support for the JA-100 series.
Now you should be able to remotely control your alarm system by using an MQTT alarm control panel.
Currently I’m using this feature as well, since I’m using a RPi3 as a backend and a RPi4 as a frontend.

Please look at the MQTT demo in the readme for an example how it works.

I’ll try to catch up with @mattsaxon fixes and changes asap! Cheerio

Hi
just love this :slight_smile: I have just setup my Jablotron 100 to HA using your component, and all thins are working I can see all my sensors and all.
But is it possible to have more zones? I have 3 zones on my Jablotron, but as I see it just take the first zone, can this be done??

Hello,
I just started using your component with my Jablotron 100. Alarm control works fine, but just a few sensors was detected. HA shows 3 or 4 of 22 (I tested it few times) sensors, but they don’t send any updates. Any idea whats wrong?
I’m attaching few lines from debug log.

2019-09-03 12:57:58 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:57:59 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:57:59 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:57:59 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] PortScanner._read(): 5509 packet, part 1: 550980a1800370e7
2019-09-03 12:57:59 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:57:59 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] PortScanner._read(): 5509 packet, part 2: 8e2012000b000000
2019-09-03 12:57:59 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] New unknown 5509 packet: 80 a1 80 03
2019-09-03 12:58:01 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:01 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:01 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:02 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:02 DEBUG (ThreadPoolExecutor-1_2) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send activation packet: <blurred>
2019-09-03 12:58:02 DEBUG (ThreadPoolExecutor-1_2) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet: 52 02 13 05 9a
2019-09-03 12:58:02 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:02 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:58:03 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:04 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:04 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:05 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:05 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:05 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:06 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:06 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] PortScanner._read(): 5509 packet, part 1: 550980ad400420e8
2019-09-03 12:58:06 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:58:06 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] PortScanner._read(): 5509 packet, part 2: ae2014000b000000
2019-09-03 12:58:06 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] New unknown 5509 packet: 80 ad 40 04
2019-09-03 12:58:07 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:58:09 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:09 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:09 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] PortScanner._read(): 5508 packet, part 1: 55088095c00250e8
2019-09-03 12:58:09 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:58:09 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] PortScanner._read(): 5508 packet, part 2: ce2000000b000000
2019-09-03 12:58:09 DEBUG (ThreadPoolExecutor-1_0) [custom_components.jablotron_system.binary_sensor] New unknown 5508 packet: 80 95 c0 02
2019-09-03 12:58:11 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:11 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:11 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:12 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:12 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:12 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:13 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:13 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:14 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:14 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:14 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:15 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:15 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:15 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:16 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:16 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:17 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:17 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:17 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:18 DEBUG (ThreadPoolExecutor-1_2) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send activation packet: <blurred>
2019-09-03 12:58:18 DEBUG (ThreadPoolExecutor-1_2) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet: 52 02 13 05 9a
2019-09-03 12:58:18 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:18 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:58:18 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data is flowing, wait 1 seconds before checking again
2019-09-03 12:58:19 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02
2019-09-03 12:58:20 DEBUG (ThreadPoolExecutor-0_2) [custom_components.jablotron_system.alarm_control_panel] Data has not been received for 1 seconds, retry startup message
2019-09-03 12:58:20 DEBUG (ThreadPoolExecutor-1_1) [custom_components.jablotron_system.binary_sensor] PortScanner._triggersensorupdate(): Send packet 52 01 02

Hi
my jablotron_devices.yaml is empty would you share a dump of your file or just part of it, as i would like to try to manually add a sensor and see if that could work…