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

It seems like the packet doesn’t match the conditions in the IF statement:

                if packet[:2] == b'\x82\x01':

There is also no ELSE statement. When I make one to output the packet…

                else:
                    _LOGGER.info("JabloDebug: packet: ", format(packet[:2]) )

HA log puts lines like:

2019-05-01T19:40:07.659264566Z Arguments: ('b\'Q"\'',),
2019-05-01T19:40:07.778032913Z Arguments: ("b'\\xd0\\x08'",),
2019-05-01T19:40:08.313103757Z Arguments: ("b'\\xd2\\x06'",)

usbtty0 -> ttyUSB0 corrected, thanks

Thanks for the detailed info, I’m using Rpi model B+ too, but am on Hassio, so we have a similar enough configuration.

Yours is a Jablotron 100 series alarm. Its good to see there is a serial interface available too so I think we have a hope of getting this working.

The way I found out the codes for my alarm was dumping the output from the serial.

I did it using a mix of Putty (Windows) and hexdump /dev/hidraw0 (linux). For my alarm on my usb connector, I see every incoming packets starting \x82 (I wonder if the 82 refers to my alarm model or serial model!?). After this byte, there is a byte which is one of \x01 through \x07. I quickly deduced by trial and error that the packets starting \x82\x01 were providing the setting/unsetting status information. I did this by setting the system in various states and noticed that the 3rd byte of the packet changed predictably.

To see the pattern, I’d say you need a second or twos stream for each state and then the trace should be decipherable, so if you could post some further trace info, we can try to decipher together. If you are up for it, I suggest one trace in unset for 2 seconds and one trace in a setting state. Hopefully that will allow us to pick out the difference.

Hi,

Sorry for late response.
That is all I found in my log file regarding to jablotron:

2019-05-02 09:59:24 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for jablotron which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

2019-05-02 09:59:24 INFO (MainThread) [homeassistant.loader] Loaded jablotron from custom_components.jablotron
2019-05-02 09:59:24 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel
2019-05-02 09:59:24 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.manual
2019-05-02 09:59:25 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.jablotron
2019-05-02 09:59:25 DEBUG (ThreadPoolExecutor-0_1) [custom_components.jablotron.alarm_control_panel] Sending startup message
2019-05-02 09:59:25 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=alarm_control_panel.jablotron_alarm, old_state=None, new_state=<state alarm_control_panel.jablotron_alarm=unavailable; friendly_name=Jablotron Alarm @ 2019-05-02T09:59:25.467884+01:00>>
2019-05-02 10:02:03 DEBUG (SyncWorker_11) [homeassistant.util.json] JSON file not found: /config/custom_components/jablotron/.translations/alarm_control_panel.pl.json
2019-05-02 10:02:05 DEBUG (SyncWorker_14) [homeassistant.util.json] JSON file not found: /config/custom_components/jablotron/.translations/alarm_control_panel.en.json
2019-05-02 10:02:05 DEBUG (SyncWorker_4) [homeassistant.util.json] JSON file not found: /config/custom_components/jablotron/.translations/alarm_control_panel.en.json

Thanks @mattsaxon,

This is what I did:
I created a script “test.py” and I assumed that the start message for JA-80 series would be the same for the 100 series. Well at least it looks like this message is triggering a response.

fp = open('/dev/hidraw0', 'wb', 64)
fp.write(b'\x00\x00\x01\x01')
fp.close()

Then I started 2 putty sessions. One for writing to hidraw0 and one for reading it.
So in session 1 I’m executing the script:

$ sudo python test.py

And in session 2 I’m catching the response:

$ sudo cat /dev/hidraw0 | hexdump -C

I repeated above steps 5 times and these are the results:

1st:

00000000  d0 08 9c 68 80 3f 30 25  c9 0a 00 00 0b 00 00 00  |...h.?0%........|
00000010  0a 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000020  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000030  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000040  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000050  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000060  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00000070  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000080  d2 06 56 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |..V.............|
00000090  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
000000a0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
000000b0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

2nd

000000c0  d0 08 9c 68 80 3f 50 2a  09 0b 00 00 0b 00 00 00  |...h.?P*........|
000000d0  0b 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
000000e0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
000000f0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000100  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000110  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000120  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00000130  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000140  d2 06 58 d4 01 00 00 00  00 55 00 10 14 55 00 10  |..X......U...U..|
00000150  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000160  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000170  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

3rd

00000180  d0 08 9c 68 80 3f 00 2c  49 0b 00 00 0b 00 00 00  |...h.?.,I.......|
00000190  0b 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
000001a0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
000001b0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
000001c0  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000001d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000001e0  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000001f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000200  d2 06 5a d4 01 00 00 00  00 00 00 00 0b 00 00 00  |..Z.............|
00000210  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000220  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000230  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

4th

00000240  d0 08 9c 68 80 3f d0 2e  89 0b 00 10 14 55 00 10  |...h.?.......U..|
00000250  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000260  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000270  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000280  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000290  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000002a0  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000002b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000002c0  d2 06 5c d4 01 00 00 00  00 00 00 00 0b 00 00 00  |..\.............|
000002d0  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
000002e0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
000002f0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

5th

00000300  d0 08 9c 68 80 3f 50 31  c9 0b 00 10 14 55 00 10  |...h.?P1.....U..|
00000310  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000320  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000330  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000340  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000350  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000360  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00000370  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000380  d2 06 5e d4 01 00 00 00  00 55 00 10 14 55 00 10  |..^......U...U..|
00000390  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000003a0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000003b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

So they all start with \xd0\x08, but when I change ‘alarm_control_panel.py’ with this combination of bytes…

                if packet[:2] == b'\xd0\x08':

… it seems like the HA log is not making any difference.
It looks like the switcher array in ‘alarm_control_panel.py’ also needs to be updated in order to find the right commands/patterns for the JA-100 series.

So looks like the consistent header is 5 bytes as follow d0 08 9c 68 80 3f

Then there is variance, and in the 5 packets there is;

50 twice
30 once
d0 once
00 once

Since the 50 repeats, I’d expect if you ran a longer trace you’d find this 6th byte repeats frequently (just as my 3rd byte does).

Is there any reason for you to rerun the test.py (5 times in your example), for my system once the start message is sent, it just keeps sending data non stop. If this is also the case for you, can you send a single longer trace and then another trace whilst the alarm is in another state, e.g. setting… then we can look for the differences between those 2 traces.

I’ve pushed an updated script to GitHub, which should give a better error message in the logs, would you minding deploying that and reporting back your findings?

Also, can you tell me the model number of your control panel?

I don’t receive a stream of data, but just a bunch of lines (12).
Maybe it depends on the startup message and of course the Jablotron system.

I’ve deployed the updated script and this is my HA log:

2019-05-03 11:56:44 ERROR (ThreadPoolExecutor-0_0) [custom_components.jablotron.alarm_control_panel] Unrecognised data stream, device type likley not a not JA-82 control panel?b'Q"\x01\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x07\x00\x00\x00\x00;\x08 \x0b\x00\x00\x00oI\x03\x00\x01\x00\x00\x00d\x04\x00\x10\x0b\x00\x00\x00\xd9R\x03\x00'

Model number of control panel: JA-101KL
Or do you mean some other kind of number?

Thanks @plaksnor, but sorry that last message was for @aryu. I wasn’t expecting my new code to resolve your issue as we are further through diagnosing

With regard to your trace, your device is giving very different info to mine, but I’m happy to continue trying to decipher it. Would you mind doing another set until you can see some sort of recurring pattern? You’ll need to do this in different settings (set vs unset or setting), or we won’t be able to see the difference.

Sure, no problem.
So to be clear: I’ve manually submitted a startup message in order to trigger a response from the system. For each message I send, I made a little note what kind of state the alarm was and what the iteration of the message was.

Sit tight :slight_smile:

alarm off (state) 1 (iteration)

00000b00  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000b10  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000b20  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00000b30  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000b40  d0 08 9c 68 80 3f 30 8a  8e 13 00 00 0b 00 00 00  |...h.?0.........|
00000b50  13 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000b60  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000b70  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000b80  d2 06 9c d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00000b90  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000ba0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000bb0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000bc0  d8 08 00 00 00 00 00 00  00 00 00 10 14 55 00 10  |.............U..|
00000bd0  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000be0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000bf0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm off 2

00000c00  d0 08 9c 68 80 3f 80 8b  ce 13 00 10 14 55 00 10  |...h.?.......U..|
00000c10  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000c20  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000c30  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000c40  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000c50  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000c60  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00000c70  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000c80  d2 06 9e d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00000c90  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000ca0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000cb0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000cc0  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000cd0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000ce0  07 00 00 00 00 d3 00 00  00 00 00 00 64 04 00 10  |............d...|
00000cf0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000d00  d0 08 9c 68 80 3f 10 8e  0e 14 00 00 0b 00 00 00  |...h.?..........|
00000d10  14 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000d20  1e 00 00 00 a0 86 01 00  0a 00 00 00 14 00 00 00  |................|
00000d30  55 2b 05 00 af 52 03 00  e0 52 03 00 00 a0 00 01  |U+...R...R......|
00000d40  d2 06 a0 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00000d50  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000d60  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000d70  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

alarm off 3

00000d80  d0 08 9c 68 80 3f e0 90  4e 14 00 10 14 55 00 10  |...h.?..N....U..|
00000d90  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000da0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000db0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000dc0  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000dd0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000de0  07 00 00 00 00 d3 00 00  00 00 00 00 64 04 00 10  |............d...|
00000df0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000e00  d2 06 a2 d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00000e10  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000e20  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000e30  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm off 4

00000e40  d0 08 9c 68 80 3f b0 92  8e 14 00 00 ff 50 03 00  |...h.?.......P..|
00000e50  14 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000e60  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000e70  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000e80  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000e90  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000ea0  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00000eb0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000ec0  d2 06 a4 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00000ed0  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000ee0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000ef0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000f00  d8 08 00 00 00 00 00 00  00 00 00 00 0b 00 00 00  |................|
00000f10  00 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00000f20  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00000f30  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

alarm off 5

00000f40  d0 08 9c 68 80 3f 90 93  ce 14 00 10 14 55 00 10  |...h.?.......U..|
00000f50  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000f60  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000f70  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00000f80  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00000f90  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00000fa0  07 00 00 00 00 d3 00 00  00 00 00 00 64 04 00 10  |............d...|
00000fb0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00000fc0  d2 06 a6 d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00000fd0  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00000fe0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00000ff0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

Now arming alarm (probably some pending state?)


00001000  d0 08 9c 68 80 3f c0 95  8e 15 00 00 0b 00 00 00  |...h.?..........|
00001010  15 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001020  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001030  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001040  51 22 83 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001050  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001060  07 00 00 10 00 d3 00 00  00 00 00 00 64 04 00 10  |............d...|
00001070  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001080  51 22 83 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001090  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000010a0  07 00 00 10 50 04 00 00  00 00 00 00 6f 49 03 00  |....P.......oI..|
000010b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000010c0  d2 06 ac d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
000010d0  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000010e0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000010f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001100  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001110  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001120  07 00 00 10 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00001130  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001140  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001150  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001160  07 00 00 10 50 04 00 00  00 00 00 00 64 04 00 10  |....P.......d...|
00001170  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

After a couple of seconds…
alarm on 1

00001180  d0 08 9c 68 80 3f 50 98  ce 15 00 10 14 55 00 10  |...h.?P......U..|
00001190  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000011a0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000011b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000011c0  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000011d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000011e0  07 00 00 10 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000011f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001200  d2 06 ae d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00001210  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00001220  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00001230  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001240  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001250  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001260  07 00 00 10 50 04 00 00  00 00 00 00 6f 49 03 00  |....P.......oI..|
00001270  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm on 2

00001280  d0 08 9c 68 80 3f d0 99  0e 16 00 10 14 55 00 10  |...h.?.......U..|
00001290  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000012a0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000012b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000012c0  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000012d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000012e0  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000012f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001300  d2 06 b0 d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00001310  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00001320  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00001330  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001340  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001350  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001360  07 00 00 00 50 04 00 00  00 00 00 00 6f 49 03 00  |....P.......oI..|
00001370  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm on 3

00001380  d0 08 9c 68 80 3f 00 9b  4e 16 00 00 0b 00 00 00  |...h.?..N.......|
00001390  16 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
000013a0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
000013b0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
000013c0  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000013d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000013e0  07 00 00 00 00 d3 00 00  00 00 00 00 64 04 00 10  |............d...|
000013f0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001400  d2 06 b2 d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00001410  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00001420  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00001430  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001440  d8 08 00 00 00 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001450  00 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001460  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001470  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001480  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001490  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000014a0  07 00 00 00 50 04 00 00  00 00 00 00 6f 49 03 00  |....P.......oI..|
000014b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm on 4

000014c0  d0 08 9c 68 80 3f 50 9c  8e 16 00 10 14 55 00 10  |...h.?P......U..|
000014d0  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000014e0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000014f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001500  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001510  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001520  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00001530  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001540  d2 06 b4 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001550  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001560  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001570  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001580  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001590  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000015a0  07 00 00 00 50 04 00 00  00 00 00 00 64 04 00 10  |....P.......d...|
000015b0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

alarm on 5


000015c0  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000015d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000015e0  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000015f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001600  d0 08 9c 68 80 3f d0 9d  ee 16 00 10 14 55 00 10  |...h.?.......U..|
00001610  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00001620  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00001630  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001640  d2 06 b7 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001650  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001660  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001670  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

alarm on 6


00001680  d0 08 9c 68 80 3f 20 9f  2e 17 00 10 14 55 00 10  |...h.? ......U..|
00001690  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000016a0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000016b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000016c0  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000016d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000016e0  07 00 00 00 00 d3 00 00  00 00 00 00 64 04 00 10  |............d...|
000016f0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001700  d8 08 00 00 00 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001710  00 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001720  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001730  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001740  d2 06 b9 d4 01 00 00 00  00 55 00 10 14 55 00 10  |.........U...U..|
00001750  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00001760  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00001770  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm on 7


00001780  51 22 03 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001790  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000017a0  07 00 00 00 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000017b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000017c0  d0 08 9c 68 80 3f 70 a0  6e 17 00 10 14 55 00 10  |...h.?p.n....U..|
000017d0  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000017e0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000017f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001800  d2 06 bb d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001810  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001820  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001830  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

Now disarming alarm
alarm off 1


00001840  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001850  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001860  07 00 00 10 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
00001870  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001880  d0 08 9c 68 80 3f 20 a2  2e 18 00 10 14 55 00 10  |...h.? ......U..|
00001890  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
000018a0  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
000018b0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
000018c0  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000018d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000018e0  07 00 00 10 50 04 00 00  00 00 00 00 64 04 00 10  |....P.......d...|
000018f0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001900  d2 06 c1 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001910  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001920  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001930  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001940  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001950  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001960  07 00 00 10 50 04 00 00  00 00 00 00 6f 49 03 00  |....P.......oI..|
00001970  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|

alarm off 2


00001980  d0 08 9c 68 80 3f 30 a3  6e 18 00 00 0b 00 00 00  |...h.?0.n.......|
00001990  18 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
000019a0  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
000019b0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
000019c0  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
000019d0  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
000019e0  07 00 00 10 00 3b 08 20  0b 00 00 00 6f 49 03 00  |.....;. ....oI..|
000019f0  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001a00  d8 08 00 00 00 00 00 00  00 00 00 10 14 55 00 10  |.............U..|
00001a10  55 32 05 00 bb a3 01 00  cc a3 01 00 00 00 00 21  |U2.............!|
00001a20  44 04 00 10 98 3b 08 20  0b 00 00 00 6f 49 03 00  |D....;. ....oI..|
00001a30  01 00 00 00 64 04 00 10  0b 00 00 00 d9 52 03 00  |....d........R..|
00001a40  d2 06 c3 d4 01 00 00 00  00 00 00 00 0b 00 00 00  |................|
00001a50  01 00 00 00 54 29 00 10  00 00 00 00 00 00 00 00  |....T)..........|
00001a60  0c 29 00 10 bd d3 00 00  00 00 00 00 64 04 00 10  |.)..........d...|
00001a70  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|
00001a80  51 22 01 00 07 00 07 00  07 00 07 00 07 00 07 00  |Q"..............|
00001a90  07 00 07 00 07 00 07 00  07 00 07 00 07 00 07 00  |................|
00001aa0  07 00 00 10 50 04 00 00  00 00 00 00 64 04 00 10  |....P.......d...|
00001ab0  0b 00 00 00 7c 45 00 10  00 00 00 00 97 52 03 00  |....|E.......R..|

Most (not all) of the messages start with
d0 08 9c 68 80 3f
Some start with:
51 22

Thanks, that’s great info. Looks to me like the packets are 64 bytes for you just as for me. the header of 51 22 is the state and I can recognise 3 states so far (01, 03 and 83). I’ve posted up a new version of the script, can you test it please?

p.s. I haven’t dealt with the fact that you seem to need to post multiple startup messages, but you may get a status through anyway before it stops.

wow, impressive how you deciphered this, nice work! It seems it recognizes the state now (after a couple of restarts though, because of the startup message as trigger):


2019-05-03 17:42:22 INFO (SyncWorker_7) [homeassistant.loader] Loaded alarm_control_panel from homeassistant.components.alarm_control_panel,
2019-05-03 17:42:24 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel,
2019-05-03 17:42:24 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.jablotron,
2019-05-03 17:42:25 INFO (MainThread) [homeassistant.setup] Setup of domain alarm_control_panel took 0.9 seconds.,
2019-05-03 17:42:26 INFO (ThreadPoolExecutor-0_0) [custom_components.jablotron.alarm_control_panel] Jabltron state change: None to disarmed,

arm Jablotron, then restart HA:

2019-05-03 17:46:09 INFO (SyncWorker_9) [homeassistant.loader] Loaded alarm_control_panel from homeassistant.components.alarm_control_panel,
2019-05-03 17:46:13 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel,
2019-05-03 17:46:13 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.jablotron,
2019-05-03 17:46:13 INFO (ThreadPoolExecutor-0_0) [custom_components.jablotron.alarm_control_panel] Jabltron state change: None to armed_away,
2019-05-03 17:46:14 INFO (MainThread) [homeassistant.setup] Setup of domain alarm_control_panel took 1.1 seconds.,

disarm Jablotron, then restart HA:

2019-05-03 17:47:31 INFO (SyncWorker_11) [homeassistant.loader] Loaded alarm_control_panel from homeassistant.components.alarm_control_panel,
2019-05-03 17:47:34 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel,
2019-05-03 17:47:34 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.jablotron,
2019-05-03 17:47:34 INFO (ThreadPoolExecutor-0_0) [custom_components.jablotron.alarm_control_panel] Jabltron state change: None to disarmed,
2019-05-03 17:47:35 INFO (MainThread) [homeassistant.setup] Setup of domain alarm_control_panel took 1.1 seconds.

I also see more than just a state in HA:

Thanks so far!

Great news, progress. I’ve posted a new version that sends the startup message again when a message is received. Can you test this please, hopefully you shouldn’t need to restart now.

How many settings do you have on your alarm, for example, do you have split mode or partial setting enabled?

Have you tried setting/unsetting it from the HA UI yet? If that doesn’t work, we have some more debugging to do. You will need something that can sniff HID packets. I used a Windows tool Device Monitoring Studio

I then ran the stock Jablotron software (O-Link for me, it will be J-Link for you) on the same device and sniffed the HID device to see what messages were sent when I pressed (the virtual) keys on the virtual keypad to set/unset.

Your script is succesfully sending multiple startup messages:

2019-05-03 19:34:43 DEBUG (ThreadPoolExecutor-0_1) [custom_components.jablotron.alarm_control_panel] Sending startup message,
2019-05-03 19:34:44 DEBUG (ThreadPoolExecutor-0_0) [custom_components.jablotron.alarm_control_panel] Sending startup message

But it seems like it doesn’t always receive a response when you send a message.
I’ve already experienced something like this before: when I send a startup message in about every 10 seconds, I get a response guaranteed. But when there’s like 5 seconds between them, there’s no response. Or well, not always. For example, when I send a message every 1 second, I could get a response after 7 or 8 messages or so.

How many settings I have on my alarm? For now I have just 1 zone if that’s what you mean. I do have multiple sensors, but no PGM’s programmed so far. I’ve used J-Link before online, but since I’m running out of GPRS credits, I need to wire it manually. I’ll see if I can make a direct connection from my pc soon. Thanks for your help so far! :slight_smile: I’ll keep you posted.

Yes I have, but it doesn’t work. I see the actions (and the code) in the log, but it seems like it’s not arming or disarming anything yet.

I’ll have a look at improving the send startup code such that it retries if message don’t come back, but that will be a bit of a harder change, so probably won’t be immediate. If you could try the J-Link meanwhile, that would be appreciated. Do you have access to a Windows machine to run it?

Ok, I’ll appreciate! Yeah, running J-link now as an administrator (not as a Service aka root user :wink: ). In the meanwhile I’m running HID Trace in the background, but I’m not sure if this tool will provide me/you with the data we’re looking for. Is there something specific I need to look out for? I mean, would you like me to sniff all the messages when pressing all buttons? (0-9, * and #) so you can create all bindings?

Using the tool I mentioned, you could trace all messages down a specific HID, so there will be no data flowing down the HID to the Jablotron until you do something in the virtual keypad. Yes, if you could press all buttons in turn that would be great. My panel has specific setting buttons too, but they emulate multi key presses. So for example ABC button means set-all zones and is just the same as pressing *, then 1

New version posted, it has a watcher thread that checks data is flowing every 10 seconds and if not sends another startup message