Giter Site home page Giter Site logo

tertiush / paradoxip150v2 Goto Github PK

View Code? Open in Web Editor NEW
73.0 73.0 35.0 180 KB

Python-based IP150 'middle-ware' that uses the IP module's software port for monitoring and control of the alarm via an MQTT Broker.

License: Eclipse Public License 1.0

Python 100.00%

paradoxip150v2's People

Contributors

papaiatis avatar psyciknz avatar tertiush avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paradoxip150v2's Issues

Cyrillic zone labels

Hi Tertiush,

I've managed to run what you have done in hassbian as a daemon. I am reading from MQTT. However I am having some problems because my Zone Labels are in Cyrillic and it does not seem to recognize what needs to be printed. This is the error I am getting.

 Get zone definitions
Alarm Name:  Your Paradox System
Area Names:  ['"A\xe2\x85\x93ap\xc2\xbca\xc2\xb6e\xc2\xbd\xc2\xbc"', '"o\xc6\x92ap"', '"Area 3"', '"Area 4"', '"Area 5"', '"Area 6"', '"Area 7"', '"Area 8"']
Zone Names & Partition assignment:  ['1', '"Bxo"', '0', '" "', '1', '"Xo"', '0', '" "', '2', '"o\xc6\x92ap Xo"', '1', '"Kyx\xc2\xbd"', '2', '"o\xc6\x92ap Kyx\xc2\xbd"', '0', '" "', '1', '"\xc3\x8eoc\xc2\xbc\xc2\xbda"', '0', '" "', '1', '"e\xc2\xbcc a"', '0', '" "', '1', '"C\xe2\x85\x93a \xc2\xbd"', '0', '" "', '2', '"o\xc6\x92ap Bxo"', '0', '" "', '1', '"Bpa\xc2\xbca Kyx\xc2\xbd"', '1', '"\xc3\x8eo  \xc2\xb6a Bpa\xc2\xbca Xo"', '1', '"po\xc2\xa3 Kyx\xc2\xbd"', '1', '"po\xc2\xa3 Xo"', '1', '"Bpa\xc2\xbca C\xe2\x85\x93a \xc2\xbd"', '1', '"po\xc2\xa3 C\xe2\x85\x93a \xc2\xbd"', '1', '"po\xc2\xa3  e\xc2\xbcc a"', '1', '"Bpa\xc2\xbca  e\xc2\xbcc a"', '1', '"po\xc2\xa3 \xc3\x8eoc\xc2\xbc\xc2\xbda"', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '1', '"Bxo \xc2\xbda Bpa\xc2\xbca"', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '']
Zone Names (Total: 48):  ['1', '"Bxo"', '0', '" "', '1', '"Xo"', '0', '" "', '2', '"o\xc6\x92ap Xo"', '1', '"Kyx\xc2\xbd"', '2', '"o\xc6\x92ap Kyx\xc2\xbd"', '0', '" "', '1', '"\xc3\x8eoc\xc2\xbc\xc2\xbda"', '0', '" "', '1', '"e\xc2\xbcc a"', '0', '" "', '1', '"C\xe2\x85\x93a \xc2\xbd"', '0', '" "', '2', '"o\xc6\x92ap Bxo"', '0', '" "', '1', '"Bpa\xc2\xbca Kyx\xc2\xbd"', '1', '"\xc3\x8eo  \xc2\xb6a Bpa\xc2\xbca Xo"', '1', '"po\xc2\xa3 Kyx\xc2\xbd"', '1', '"po\xc2\xa3 Xo"', '1', '"Bpa\xc2\xbca C\xe2\x85\x93a \xc2\xbd"', '1', '"po\xc2\xa3 C\xe2\x85\x93a \xc2\xbd"', '1', '"po\xc2\xa3  e\xc2\xbcc a"', '1', '"Bpa\xc2\xbca  e\xc2\xbcc a"', '1', '"po\xc2\xa3 \xc3\x8eoc\xc2\xbc\xc2\xbda"', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '1', '"Bxo \xc2\xbda Bpa\xc2\xbca"', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '0', '" "', '']
Going to State_Machine  3
Connected and polling data every 0.5s
.
Error within State_Machine: 3: UnicodeDecodeError('ascii', 'S:CLOSED,P:2,N:"o\xc6\x92ap Xo"', 17, 18, 'ordinal not in range(128)')
Going to State_Machine: 2
Attempting connection to IP module: 192.168.0.106:80
No connection to IP Module, are you already logged in? Attempting logout and trying again... (3)
Disconnect OK received from IP Module

This is the part that is problematic:
Error within State_Machine: 3: UnicodeDecodeError('ascii', 'S:CLOSED,P:2,N:"o\xc6\x92ap Xo"', 17, 18, 'ordinal not in range(128)')

Can you lend a hand of encoding with utf-8 when I'm reading the lables.

Thanks,
Plamen

PGM signal conflicts with remote

Hi!

Using this software integrated into my Home Assistant I'm able to open or close the motorized fence, however when I do so the remote controllers does not work anymore. I have to shut down this software in order to make the remotes work again.

Does anyone else have this same problem? Is there any solution for it?

Thanks!

3rd Party Connections - disconnect not working?

I'm using a MG5050 panel - everything seems to be working fine, except the disconnects with 3rd Party Connections (AlarmIn).

I see this in the log when I try to connect from Alarmin:

2018-02-11 10:56:17,876 DEBUG 32<- 0xaa 0x3 0x0 0x1 0x72 0xf6 0x0 0x0 0x0 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x42 0x14 0x0 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
2018-02-11 10:56:17,878 DEBUG Event data: 0x42 0x14 0x0 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee

On the Alarmin side I almost immediately get:
Error with login -
Internal error: Cannot read property 'split' of undefined.
OR
Internal error: Error: Request for alarm data timed out.

(I repeatedly try to connect for about 2min)

hmmm running the script seems to break InsiteGold loging and web login.

Hmmm,
running the script, well firstly entering the pin at both pin and password, it's not logging in, it complains that i have to check if someone else is logged in which i know is not.
and then also, it stops the app and web page from working, killing the script and waiting 5-10 min seem to make the system restart itself.
SP6000 + IP150 (fw: 4.40.04)
G

Request - move config.ini to ./setup folder - to improve working with Docker

Hi Tertius, how difficult will it be to have a command line argument that can be used when starting up the script IP150-MQTTv2.py to tell it where to get the config.ini file, or hardcode it to always be in a sub directory ./setup? Then I can map a volume to the docker image when running the container on the host - so that the config.ini can be changed when it is run. The python:2 image has a problem to copy the config file over the one brought down with git clone.

Possible enhancement - event to topic translation

So you'll see in some of my code I added specific events to topics. Eg zone status to their own topics and a arm/disarm state to a topic.

I've got occasion now, to add a button press as a topic so I can alert on it (son pressed a button which opened the garage door this morning by accident, so I want to get a notification of this event).

I started thinking of ways to do it. It seems you've already got a lot of event defined in the Map files. So I'm thinking of some sort of event to topic translation in the config.

Something like

[events]
<eventcode>:events/<topicname>
eg:
11:events/disarm
12:events/arm

which replicates this code:

elif ord(message[7]) == 2 and ord(message[8]) == 11:   #Disarm
    logging.info("Publishing event \"%s\" =  %s" % (Topic_Publish_ArmState, "disarm"))
    client.publish(Topic_Publish_ArmState ,"OFF", qos=0, retain=False)
elif ord(message[7]) == 2 and ord(message[8]) == 12:   #arm
    logging.info("Publishing event \"%s\" =  %s" % (Topic_Publish_ZoneState, "arm"))
    client.publish(Topic_Publish_ArmState ,"ON", qos=0, retain=False)

Or the other way we could do it is actually post evetn event to a numeric topic rather than do a text conversion. It means that the events can be assigned to switches or contact items.

Thoughts?

Heart beat event

I've added a reply to the heartbeat message (keepalive).
2018-05-31 08:15:23,945 DEBUG 64-> 0xaa 0x25 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x0 0x80 0x4 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0xd4 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xe
The important bits of this are the 50 0 80 04 - which from the SPxxxx protocol document is supposed to be panel status message 04.

But the reply that all the status messages gets is an 70 0 10 - which I think is an error, or a panel disconnect....but it's recording event to it's fine.

2018-05-31 08:15:24,200 DEBUG 53<- 0xaa 0x25 0x0 0x2 0x72 0x0 0x0 0x0 0x0 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x0 0x10 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0 x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x80

I've wiresharked this, and I can't see anything wrong with our keepalive call but the response is wrong. I'd like to get this sorted so I can understand the arm/disarm commands. I think I've got a fairly good handle on the protocol now.

@Tertiush

IP150 V4.42 Login issue

Firmware version 4.42 seems to have changed the way login works. Now only asks for panel code. Something needs to be updated to fix login. Any idea how to find out what though?

SP6000 Panel Control - Disarm/Arm

Here's the debug log when attempting to disarm Partition 1. Looks like the command is being accepted.

2017-08-31 10:21:17,086 DEBUG 0->
2017-08-31 10:21:20,339 DEBUG 0->
2017-08-31 10:21:23,593 DEBUG 0->
2017-08-31 10:21:26,845 DEBUG 0->
2017-08-31 10:21:30,098 DEBUG 0->
2017-08-31 10:21:33,350 DEBUG 0->
2017-08-31 10:21:36,604 DEBUG 0->
2017-08-31 10:21:38,863 INFO MQTT Message: Paradox/C/P1 disarm
2017-08-31 10:21:38,865 INFO Alarm control partition: 1
2017-08-31 10:21:38,865 INFO Alarm control state: disarm
2017-08-31 10:21:39,857 DEBUG 0->
2017-08-31 10:21:41,858 INFO State04: Alarm Control Action: Alarm loging and starting events
2017-08-31 10:21:41,859 INFO Logging into alarm system...
2017-08-31 10:21:42,109 INFO Login to alarm panel successful
2017-08-31 10:21:44,114 INFO Sending Alarm Control: Partition: 1, State: disarm
2017-08-31 10:21:44,114 INFO Sending generic Alarm Control: Partition: 1, State: DISARM
2017-08-31 10:21:44,115 INFO Control message: @
2017-08-31 10:21:44,115 DEBUG 64->   0xaa 0x25 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x40 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x45 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
2017-08-31 10:21:44,365 DEBUG 53<-   0xaa 0x25 0x0 0x2 0x72 0x0 0x0 0x0 0x0 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x0 0x10 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x80
2017-08-31 10:21:44,366 INFO State04:Listening for events...
PuTTY2017-08-31 10:21:45,617 DEBUG 0->
2017-08-31 10:21:48,872 DEBUG 0->
2017-08-31 10:21:52,125 DEBUG 0->
2017-08-31 10:21:55,379 DEBUG 0->
2017-08-31 10:21:58,632 DEBUG 0->
2017-08-31 10:22:01,885 DEBUG 0->
2017-08-31 10:22:05,138 DEBUG 0->
2017-08-31 10:22:08,393 DEBUG 0->

EVO compatibility

Hello,
I've got an EVO192, and tried your great code, but of course, it won't work perfectly :)
(Of course it works fine at a friend of mine, who has a MG5050)

I modified the config, to skip the label-readings, because it's not a big issue to enter them manually.
I've concentrated on the events.
I've got the programming documents, describing the event codes (which are totally different to the MG5050). Modified the eventGroupMap array, but it still seems to work bad, the "decoded" events are not the ones, that are really happening...

Do you have some kind of SDK or other info about the EVO192?
Or only the Wireshark reverse-engineering could work?

thanks,
MN

Pseudo proxy

Hi bud. Great work.
Busy with my selection of HomeAutomation platforms, keep sidestepping between Home Assistant on Open Hab.
Either way mqtt would be my way forward, great job.

So I was wondering about a pseudo proxy model workaround for the multiple connection limit of the ip150 that I read about.

Would it be possible to create a small proxy server to pretend to be the ip150.
So your mobile app/winload/babyware connects to it, and then it forwards towards the ip that you have a stable connection with.

In effect you are being a router and you Nat the one connection, allowing in effect both multiple connections to the ip150/panel, and still have the ability to parse data towards the mqtt stack.

It is just an idea, I see everyone is having a hard time with this.
It falls in the same front as automating a light, but now you loose your switch, and just ur phone controls it.

Lastly, something I will test as well, but I know when I connect the software to the panel my installer code stops working at the keypad. Will let u know if the software has the same effect.

Like I said Great job!

Getting current sensors status at startup

Hi, I've been using this script with an SP6000 and up to now I've to say it is really working well: really a great job!

Just wondering if it is possible on program start to get the current status of the sensors/alarm system: I'm trying to create an alternative interface for my WinPhone (no official paradox app for Winphones unfortunately) and I need to make sure that it is always up-to-date with system status even in case the script or the PC restart.

Of course if I can help providing wiresharks captures or anything else let me know, I'll be more than glad to collaborate!
Thx,
Bioego

No label report on MG5000

Hi,

When i run this script, the dictionnary send nothing like that 👍

Labels detected for siteNameLabel:
{1: ''}
Labels detected for partitionLabel:
{1: '', 2: ''}

I leave MG5050type in config.ini because it the same programming code that MG5000

If it's necessary, i have capture with wireshark, exchange winload on label request.

Paradox SP3000 support?

Hi guys, I am really in need to get this working on the sp3000 do you think it is compatible?

MG5000 label read issue

Hi,

First of all, thank you for your project. I am using it on a Raspberry Pi2 running Raspbian Jessie (latest Python is 2.7.9 for this platform) for my MG5000 (FW: 4.76) via IP150 (FW: 3.01.00) modul.

I could successfully connect to the alarm system, MQTT broker also connects fine, show events realtime, however I am unable to read out zone, user, etc. labels. Script got empty answers.

I did some research to find out what the problem could be. According to wireshark, your code sends out proper query for the registers, however alarm system answers different than expected.
I have compared your and WinLoad query, it is the same, so I do not really understand why the answer is different. TCP packet size is also different, data payload is the same.

Can you please look into your code? Does the script really need Python 2.7.10+? Maybe it causes the issue..

Another question if I may. Can you please help me how could I connect HAP-NodeJS (Apple Homekit) with MQTT broker to make the alarm system in HomeKit available? :)

Thank you so much.
Lajos


Here is the data from WinLoad query:

Frame 142: 118 bytes on wire (944 bits), 118 bytes captured (944 bits) on interface 0
Interface id: 0 (\Device\NPF_{F340CBE4-CAB9-4DD9-B5F3-B11E9B2AB9D9})
Encapsulation type: Ethernet (1)
Arrival Time: Dec 16, 2016 12:11:24.400799000 K�z�p-eur�pai t�li id�
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1481886684.400799000 seconds
[Time delta from previous captured frame: 0.027535000 seconds]
[Time delta from previous displayed frame: 0.151794000 seconds]
[Time since reference or first frame: 1.461567000 seconds]
Frame Number: 142
Frame Length: 118 bytes (944 bits)
Capture Length: 118 bytes (944 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:tcp:data]
[Coloring Rule Name: TCP]
[Coloring Rule String: tcp]
Ethernet II, Src: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab), Dst: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
Destination: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
Address: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.80.232, Dst: 192.168.80.2
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
Total Length: 104
Identification: 0x2da9 (11689)
Flags: 0x02 (Don't Fragment)
Fragment offset: 0
Time to live: 128
Protocol: TCP (6)
Header checksum: 0x0000 [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.80.232
Destination: 192.168.80.2
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 49194, Dst Port: 64333, Seq: 257, Ack: 213, Len: 64
Source Port: 49194
Destination Port: 64333
[Stream index: 0]
[TCP Segment Len: 64]
Sequence number: 257 (relative sequence number)
[Next sequence number: 321 (relative sequence number)]
Acknowledgment number: 213 (relative ack number)
Header Length: 20 bytes
Flags: 0x018 (PSH, ACK)
Window size value: 63074
[Calculated window size: 63074]
[Window size scaling factor: -1 (unknown)]
Checksum: 0x2296 [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]
Data (64 bytes)
Data: aa25000408000014eeeeeeeeeeeeeeee5000001000000000...
[Length: 64]

For this IP150 answers with two packets (correct answer):

First:

Frame 143: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Interface id: 0 (\Device\NPF_{F340CBE4-CAB9-4DD9-B5F3-B11E9B2AB9D9})
Encapsulation type: Ethernet (1)
Arrival Time: Dec 16, 2016 12:11:24.425868000 K�z�p-eur�pai t�li id�
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1481886684.425868000 seconds
[Time delta from previous captured frame: 0.025069000 seconds]
[Time delta from previous displayed frame: 0.025069000 seconds]
[Time since reference or first frame: 1.486636000 seconds]
Frame Number: 143
Frame Length: 60 bytes (480 bits)
Capture Length: 60 bytes (480 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:tcp]
[Coloring Rule Name: TCP]
[Coloring Rule String: tcp]
Ethernet II, Src: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7), Dst: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
Destination: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
Address: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
Address: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv4 (0x0800)
Padding: 000000000000
Internet Protocol Version 4, Src: 192.168.80.2, Dst: 192.168.80.232
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
Total Length: 40
Identification: 0xe0ef (57583)
Flags: 0x00
Fragment offset: 0
Time to live: 255
Protocol: TCP (6)
Header checksum: 0xb8a4 [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.80.2
Destination: 192.168.80.232
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 64333, Dst Port: 49194, Seq: 213, Ack: 321, Len: 0
Source Port: 64333
Destination Port: 49194
[Stream index: 0]
[TCP Segment Len: 0]
Sequence number: 213 (relative sequence number)
Acknowledgment number: 321 (relative ack number)
Header Length: 20 bytes
Flags: 0x010 (ACK)
Window size value: 5648
[Calculated window size: 5648]
[Window size scaling factor: -1 (unknown)]
Checksum: 0x5c7d [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]

and the second:

Frame 148: 107 bytes on wire (856 bits), 107 bytes captured (856 bits) on interface 0
Interface id: 0 (\Device\NPF_{F340CBE4-CAB9-4DD9-B5F3-B11E9B2AB9D9})
Encapsulation type: Ethernet (1)
Arrival Time: Dec 16, 2016 12:11:24.485116000 K�z�p-eur�pai t�li id�
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1481886684.485116000 seconds
[Time delta from previous captured frame: 0.019060000 seconds]
[Time delta from previous displayed frame: 0.059248000 seconds]
[Time since reference or first frame: 1.545884000 seconds]
Frame Number: 148
Frame Length: 107 bytes (856 bits)
Capture Length: 107 bytes (856 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:tcp:data]
[Coloring Rule Name: TCP]
[Coloring Rule String: tcp]
Ethernet II, Src: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7), Dst: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
Destination: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
Address: Vmware_f1:5e:ab (00:0c:29:f1:5e:ab)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
Address: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.80.2, Dst: 192.168.80.232
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
Total Length: 93
Identification: 0xe0f0 (57584)
Flags: 0x00
Fragment offset: 0
Time to live: 255
Protocol: TCP (6)
Header checksum: 0xb86e [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.80.2
Destination: 192.168.80.232
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 64333, Dst Port: 49194, Seq: 213, Ack: 321, Len: 53
Source Port: 64333
Destination Port: 49194
[Stream index: 0]
[TCP Segment Len: 53]
Sequence number: 213 (relative sequence number)
[Next sequence number: 266 (relative sequence number)]
Acknowledgment number: 321 (relative ack number)
Header Length: 20 bytes
Flags: 0x018 (PSH, ACK)
Window size value: 5648
[Calculated window size: 5648]
[Window size scaling factor: -1 (unknown)]
Checksum: 0x1e4b [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]
Data (53 bytes)
Data: aa2500027200000000eeeeeeeeeeeeee520000104f6e426f...
[Length: 53]

In hex format:
0000 aa 25 00 02 72 00 00 00 00 ee ee ee ee ee ee ee
0010 52 00 00 10 4f 6e 42 6f 61 72 64 30 31 20 20 20
0020 20 20 20 20 4f 6e 42 6f 61 72 64 30 32 20 20 20
0030 20 20 20 20 2f

Your code does the following query:

Frame 809: 120 bytes on wire (960 bits), 120 bytes captured (960 bits) on interface 0
Interface id: 0 (-)
Encapsulation type: Linux cooked-mode capture (25)
Arrival Time: Dec 16, 2016 12:05:01.132993000 K�z�p-eur�pai t�li id�
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1481886301.132993000 seconds
[Time delta from previous captured frame: 0.010039000 seconds]
[Time delta from previous displayed frame: 0.128212000 seconds]
[Time since reference or first frame: 44.981523000 seconds]
Frame Number: 809
Frame Length: 120 bytes (960 bits)
Capture Length: 120 bytes (960 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: sll:ethertype:ip:tcp:data]
[Coloring Rule Name: TCP]
[Coloring Rule String: tcp]
Linux cooked capture
Packet type: Sent by us (4)
Link-layer address type: 1
Link-layer address length: 6
Source: Raspberr_78:02:79 (b8:27:eb:78:02:79)
Protocol: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.80.226, Dst: 192.168.80.2
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 104
Identification: 0x5122 (20770)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: TCP (6)
Header checksum: 0xc738 [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.80.226
Destination: 192.168.80.2
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 36712, Dst Port: 64333, Seq: 1729, Ack: 1486, Len: 64
Source Port: 36712
Destination Port: 64333
[Stream index: 5]
[TCP Segment Len: 64]
Sequence number: 1729 (relative sequence number)
[Next sequence number: 1793 (relative sequence number)]
Acknowledgment number: 1486 (relative ack number)
Header Length: 20 bytes
Flags: 0x018 (PSH, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgment: Set
.... .... 1... = Push: Set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
[TCP Flags: ·······AP···]
Window size value: 29200
[Calculated window size: 29200]
[Window size scaling factor: -2 (no window scaling used)]
Checksum: 0x2290 [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]
[iRTT: 0.000768000 seconds]
[Bytes in flight: 64]
[Bytes sent since last PSH flag: 64]
Data (64 bytes)
Data: aa25000408000014eeeeeeeeeeeeeeee5000003000000000...
[Length: 64]

Answers are:

First:

Frame 811: 62 bytes on wire (496 bits), 62 bytes captured (496 bits) on interface 0
Interface id: 0 (-)
Encapsulation type: Linux cooked-mode capture (25)
Arrival Time: Dec 16, 2016 12:05:01.193341000 K�z�p-eur�pai t�li id�
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1481886301.193341000 seconds
[Time delta from previous captured frame: 0.038540000 seconds]
[Time delta from previous displayed frame: 0.060348000 seconds]
[Time since reference or first frame: 45.041871000 seconds]
Frame Number: 811
Frame Length: 62 bytes (496 bits)
Capture Length: 62 bytes (496 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: sll:ethertype:ip:tcp:vssmonitoring]
[Coloring Rule Name: TCP]
[Coloring Rule String: tcp]
Linux cooked capture
Packet type: Unicast to us (0)
Link-layer address type: 1
Link-layer address length: 6
Source: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
Protocol: IPv4 (0x0800)
Padding: 00000000
Internet Protocol Version 4, Src: 192.168.80.2, Dst: 192.168.80.226
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 40
Identification: 0xe035 (57397)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 255
Protocol: TCP (6)
Header checksum: 0xb964 [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.80.2
Destination: 192.168.80.226
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 64333, Dst Port: 36712, Seq: 1486, Ack: 1793, Len: 0
Source Port: 64333
Destination Port: 36712
[Stream index: 5]
[TCP Segment Len: 0]
Sequence number: 1486 (relative sequence number)
Acknowledgment number: 1793 (relative ack number)
Header Length: 20 bytes
Flags: 0x010 (ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgment: Set
.... .... 0... = Push: Not set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
[TCP Flags: ·······A····]
Window size value: 5520
[Calculated window size: 5520]
[Window size scaling factor: -2 (no window scaling used)]
Checksum: 0x7b25 [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]
[This is an ACK to the segment in frame: 809]
[The RTT to ACK the segment was: 0.060348000 seconds]
[iRTT: 0.000768000 seconds]
VSS-Monitoring ethernet trailer, Source Port: 0
Src Port: 0

And the second:

Frame 812: 109 bytes on wire (872 bits), 109 bytes captured (872 bits) on interface 0
Interface id: 0 (-)
Encapsulation type: Linux cooked-mode capture (25)
Arrival Time: Dec 16, 2016 12:05:01.220544000 K�z�p-eur�pai t�li id�
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1481886301.220544000 seconds
[Time delta from previous captured frame: 0.027203000 seconds]
[Time delta from previous displayed frame: 0.027203000 seconds]
[Time since reference or first frame: 45.069074000 seconds]
Frame Number: 812
Frame Length: 109 bytes (872 bits)
Capture Length: 109 bytes (872 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: sll:ethertype:ip:tcp:data]
[Coloring Rule Name: TCP]
[Coloring Rule String: tcp]
Linux cooked capture
Packet type: Unicast to us (0)
Link-layer address type: 1
Link-layer address length: 6
Source: ParadoxS_04:e0:b7 (00:19:ba:04:e0:b7)
Protocol: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.80.2, Dst: 192.168.80.226
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 93
Identification: 0xe036 (57398)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 255
Protocol: TCP (6)
Header checksum: 0xb92e [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.80.2
Destination: 192.168.80.226
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 64333, Dst Port: 36712, Seq: 1486, Ack: 1793, Len: 53
Source Port: 64333
Destination Port: 36712
[Stream index: 5]
[TCP Segment Len: 53]
Sequence number: 1486 (relative sequence number)
[Next sequence number: 1539 (relative sequence number)]
Acknowledgment number: 1793 (relative ack number)
Header Length: 20 bytes
Flags: 0x018 (PSH, ACK)
000. .... .... = Reserved: Not set
...0 .... .... = Nonce: Not set
.... 0... .... = Congestion Window Reduced (CWR): Not set
.... .0.. .... = ECN-Echo: Not set
.... ..0. .... = Urgent: Not set
.... ...1 .... = Acknowledgment: Set
.... .... 1... = Push: Set
.... .... .0.. = Reset: Not set
.... .... ..0. = Syn: Not set
.... .... ...0 = Fin: Not set
[TCP Flags: ·······AP···]
Window size value: 5520
[Calculated window size: 5520]
[Window size scaling factor: -2 (no window scaling used)]
Checksum: 0x9104 [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
[SEQ/ACK analysis]
[iRTT: 0.000768000 seconds]
[Bytes in flight: 53]
[Bytes sent since last PSH flag: 53]
Data (53 bytes)
Data: aa2500027200000000eeeeeeeeeeeeee7000100000000000...
[Length: 53]

In hex format:

0000 aa 25 00 02 72 00 00 00 00 ee ee ee ee ee ee ee
0010 70 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00
0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0030 00 00 00 00 80

Support for v5 of panel firmware

I have a 5050 panel that has version 5 firmware installed, how can I contribute to make this plugin compatible with that?

Reading my question again it's not clear what I intended to ask: how can I extract/read the v5 software commands to be able to contribute it back.

No Zone Labels or Panel Control

Hi all, firstly thank you enabling an integration between my Paradox and MQTT. This is awesome!

I have a MG5050 running Firmware version 4.97.001 with a IP150 Firmware version 3.01

I am having 2 issues, but they are definitely related.

The first one is when I start to run the script, it does not pull the labels successfully. I only get:
INFO:root:Logging into alarm system...
2018-05-07 16:29:53,224 INFO Logging into alarm system...
INFO:root:Login to alarm panel successful
2018-05-07 16:29:53,482 INFO Login to alarm panel successful
INFO:root:State02: Logged into IP modeule successfully
2018-05-07 16:29:55,493 INFO State02: Logged into IP modeule successfully
INFO:root:State03: Preading labels
2018-05-07 16:29:55,500 INFO State03: Preading labels
INFO:root:State03:Updating all labels from alarm
2018-05-07 16:29:55,506 INFO State03:Updating all labels from alarm
INFO:root:Labels detected for wirelessKeypadLabel:
2018-05-07 16:29:56,762 INFO Labels detected for wirelessKeypadLabel:
INFO:root:{1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: ''}
2018-05-07 16:29:56,767 INFO {1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/WirelessKeypads1:;2:;3:;4:;5:;6:;7:;8:
2018-05-07 16:29:56,775 INFO updateAllLabels: Topic being published Paradox/Labels/WirelessKeypads1:;2:;3:;4:;5:;6:;7:;8:
INFO:root:Labels detected for wirelessSirenLabel:
2018-05-07 16:29:57,280 INFO Labels detected for wirelessSirenLabel:
INFO:root:{1: '', 2: '', 3: '', 4: ''}
2018-05-07 16:29:57,286 INFO {1: '', 2: '', 3: '', 4: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/WirelessSirens1:;2:;3:;4:
2018-05-07 16:29:57,293 INFO updateAllLabels: Topic being published Paradox/Labels/WirelessSirens1:;2:;3:;4:
INFO:root:Labels detected for siteNameLabel:
2018-05-07 16:29:57,549 INFO Labels detected for siteNameLabel:
INFO:root:{1: ''}
2018-05-07 16:29:57,556 INFO {1: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/SiteNames1:
2018-05-07 16:29:57,562 INFO updateAllLabels: Topic being published Paradox/Labels/SiteNames1:
INFO:root:Labels detected for partitionLabel:
2018-05-07 16:29:57,819 INFO Labels detected for partitionLabel:
INFO:root:{1: '', 2: ''}
2018-05-07 16:29:57,825 INFO {1: '', 2: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/Partitions1:;2:
2018-05-07 16:29:57,832 INFO updateAllLabels: Topic being published Paradox/Labels/Partitions1:;2:
INFO:root:Labels detected for wirelessRepeaterLabel:
2018-05-07 16:29:58,338 INFO Labels detected for wirelessRepeaterLabel:
INFO:root:{1: '', 2: ''}
2018-05-07 16:29:58,345 INFO {1: '', 2: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/WirelessRepeaters1:;2:
2018-05-07 16:29:58,351 INFO updateAllLabels: Topic being published Paradox/Labels/WirelessRepeaters1:;2:
INFO:root:Labels detected for outputLabel:
2018-05-07 16:30:00,359 INFO Labels detected for outputLabel:
INFO:root:{1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: '', 16: ''}
2018-05-07 16:30:00,367 INFO {1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: '', 16: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/Outputs1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:
2018-05-07 16:30:00,372 INFO updateAllLabels: Topic being published Paradox/Labels/Outputs1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:
INFO:root:Labels detected for zoneLabel:
2018-05-07 16:30:04,385 INFO Labels detected for zoneLabel:
INFO:root:{1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: '', 16: '', 17: '', 18: '', 19: '', 20: '', 21: '', 22: '', 23: '', 24: '', 25: '', 26: '', 27: '', 28: '', 29: '', 30: '', 31: '', 32: '', 99: 'Any zone'}
2018-05-07 16:30:04,392 INFO {1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: '', 16: '', 17: '', 18: '', 19: '', 20: '', 21: '', 22: '', 23: '', 24: '', 25: '', 26: '', 27: '', 28: '', 29: '', 30: '', 31: '', 32: '', 99: 'Any zone'}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/Zones1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:;17:;18:;19:;20:;21:;22:;23:;24:;25:;26:;27:;28:;29:;30:;31:;32:;99:Any zone
2018-05-07 16:30:04,398 INFO updateAllLabels: Topic being published Paradox/Labels/Zones1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:;17:;18:;19:;20:;21:;22:;23:;24:;25:;26:;27:;28:;29:;30:;31:;32:;99:Any zone
INFO:root:Labels detected for userLabel:
2018-05-07 16:30:08,410 INFO Labels detected for userLabel:
INFO:root:{1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: '', 16: '', 17: '', 18: '', 19: '', 20: '', 21: '', 22: '', 23: '', 24: '', 25: '', 26: '', 27: '', 28: '', 29: '', 30: '', 31: '', 32: ''}
2018-05-07 16:30:08,417 INFO {1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: '', 16: '', 17: '', 18: '', 19: '', 20: '', 21: '', 22: '', 23: '', 24: '', 25: '', 26: '', 27: '', 28: '', 29: '', 30: '', 31: '', 32: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/Users1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:;17:;18:;19:;20:;21:;22:;23:;24:;25:;26:;27:;28:;29:;30:;31:;32:
2018-05-07 16:30:08,423 INFO updateAllLabels: Topic being published Paradox/Labels/Users1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:;17:;18:;19:;20:;21:;22:;23:;24:;25:;26:;27:;28:;29:;30:;31:;32:
INFO:root:Labels detected for busModuleLabel:
2018-05-07 16:30:10,433 INFO Labels detected for busModuleLabel:
INFO:root:{1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: ''}
2018-05-07 16:30:10,440 INFO {1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: '', 9: '', 10: '', 11: '', 12: '', 13: '', 14: '', 15: ''}
INFO:root:updateAllLabels: Topic being published Paradox/Labels/BusModules1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:
2018-05-07 16:30:10,446 INFO updateAllLabels: Topic being published Paradox/Labels/BusModules1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:
INFO:root:State03:Updating zone and alarm status

The second is I can't control the alarm. So no Arm/Disarm etc control. The script replies with success, but nothing happens on the alarm side.

If I login and logout from the Paradox mobile app before starting the script, I successfully receive all labels and can control the alarm. But, after around 90 seconds, I get a Software Logout message, and then can't control the alarm anymore.
INFO:root:MQTT Message: Paradox/C/P2 Disarm
2018-05-07 16:36:57,503 INFO MQTT Message: Paradox/C/P2 Disarm
INFO:root:Alarm control partition: 2
2018-05-07 16:36:57,509 INFO Alarm control partition: 2
INFO:root:Alarm control state: Disarm
2018-05-07 16:36:57,516 INFO Alarm control state: Disarm
INFO:root:State04: Alarm Control Action: Alarm loging and starting events
2018-05-07 16:37:00,299 INFO State04: Alarm Control Action: Alarm loging and starting events
INFO:root:Logging into alarm system...
2018-05-07 16:37:00,305 INFO Logging into alarm system...
INFO:root:Login to alarm panel successful
2018-05-07 16:37:00,561 INFO Login to alarm panel successful
INFO:root:Sending generic Alarm Control: Partition: 2, State: DISARM
2018-05-07 16:37:02,569 INFO Sending generic Alarm Control: Partition: 2, State: DISARM
INFO:root:State04:Listening for events...

With all of this being said, I always receive Zone events when movement or whatever is detected by a sensor.

IP150 - Evo192 no Change status

I tried this script! MQTT and alarm panel connected successfully, but when I send the commands "Paradox/C/P1/Arm" or Disarm seems to work, but it really does not change the alarm state ...
Any idea?

Custom Payload for Publish

Busy getting my Paradox talking to Home Assistant via their MQTT Alarm Panel component (https://home-assistant.io/components/alarm_control_panel.mqtt/).

I was initially looking to use Paradox/Partition as the state topic, but that just has on/off, so I've switched to Paradox/Events. This sends through a bunch of messages, but the one I'm interested in is the sleep/away/armed SubEvents.

Is there a way that I can change the payload going through to Home Assistant to be one of their accepted types for their control panels? ie 'disarmed', 'armed_home', 'armed_away', 'pending', 'triggered'.

Again, apologies if this is a noob question, I'm new to both MQTT and Python.

Can I access the panel via http/IOS app when script running

I've tried changing the poll_sleep etc, but when trying to connect to the http page I get the please wait message (as something else connected).

I assumed that with polling enabled, that the script would connect and disconnect as per the polling period.

Problem with UTF8 chars

Hi,

I've just run your app first time and tested.
The following problem shown and app is crashed when I entered to a zone has non-ascii character in name.

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 2291, in _thread_main self.loop_forever() File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 1265, in loop_forever rc = self.loop(timeout, max_packets) File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 831, in loop return self.loop_misc() File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 1130, in loop_misc self._message_retry_check() File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 1862, in _message_retry_check self._message_retry_check_actual(self._out_messages, self._out_message_mutex) File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 1850, in _message_retry_check_actual self._send_publish(m.mid, m.topic, m.payload, m.qos, m.retain, m.dup) File "/storage/paradox/ParadoxIP150v2/lib/client.py", line 1688, in _send_publish utopic = topic.encode('utf-8') UnicodeDecodeError: 'ascii' codec can't decode byte 0x9d in position 16: ordinal not in range(128)

Is there a guide on how to set this up?

Final goal: I'm trying to make my MG5050 work with homekit

I'm using Windows 10 and my computer is not on the same network as the alarm system (which is in another house)

I've downloaded this https://www.npmjs.com/package/homebridge-paradox-security-system and installed in homebridge

I've installed mosquitto (when I open it it's just a black screen, is this right?)

I've installed Python

I've downloaded https://github.com/Tertiush/ParadoxIP150 and configured the config file like this
[IP150]
Pincode: mypincode
Password: mypassword
IP: mystaticip
HTTP_Port: 5000

[MQTT Broker]
IP: localhost
Port: 1883

[MQTT Topics]
Topic_Publish_Zone_States = Paradox/ZS
Payload_Publish_Zone_States_1 = OPEN
Payload_Publish_Zone_States_0 = CLOSED
Topic_Publish_Alarm_States = Paradox/AS
Topic_Publish_Siren_Status = Paradox/SS
Topic_Subscribe_Control = Paradox/C/

When I first opened IP150-MQTT.py it wouldn't connect; now I've opened the port on the router (edit: here I mean the router of the house where the alarm system is installed, not my local router) and the window closes a few seconds after I run IP150-MQTT.py, which I guess it means it's working

When I run homebridge, the only thing that I see is an accessory in HomeKit called "Default Room Alarm System" with an exclamation mark and "no response"

I'm sure I'm missing something, but what?

RETAIN flag

first congratulations for your amazing script! is working perfect! , i am trying to bridge with the home assistant component , and the instructions of the component it says it must be RETAIN flag the messages , can you please guide where to edit your code to the messages to be RETAIN flag?

also the instructions says:

The component will accept the following states from your Alarm Panel (in lower case):

‘disarmed’
‘armed_home’
‘armed_away’
‘pending’
‘triggered’

let me know how to edit also the mqtt message that publish with the above commands , so home assistant can regonize the messages.

thanks

george

Log level

Perhaps a bit of a noob question here, I've managed to finally connect (managed to swap out my IP150 v4.10 for a v1.x), but every second I get the following log entry:

2018-01-19 20:15:29,701 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:30,707 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:31,713 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:32,718 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:33,724 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:34,730 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:35,736 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:36,741 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:37,747 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:38,752 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:39,758 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:40,763 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:41,769 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:42,775 INFO Connected to MQTT broker with result code 5
2018-01-19 20:15:43,781 INFO Connected to MQTT broker with result code 5

Is this expected? I've set my debug level to 0, but this strikes me as something that would seriously start taking up space in the log after a day. Or have I maybe missed something in my config?

Shot!

Support for SP5500

The script is running fine, publishing some events to the broker, but as in case of #2 or #3, there are no labels. For zone open/close events, there is no information on which zone is affected. I've also tried using the newer srcipt for SP4000 attached to #2 as well, no dice.

Here's the output of mosquitto_sub -v -t "#":

Paradox/State State Machine 4, Listening for events... Paradox/State State Machine 1, Connected to MQTT Broker Paradox/State State Machine 2, Connecting to IP Module... Paradox/State State Machine 2, Connected to IP Module, unlocking... Paradox/State State Machine 2, Logged into IP Module successfully Paradox/State State Machine 3, Reading labels from alarm Paradox/Labels/WirelessKeypads 1:;2:;3:;4:;5:;6:;7:;8: Paradox/Labels/WirelessSirens 1:;2:;3:;4: Paradox/Labels/SiteNames 1: Paradox/Labels/Partitions 1:;2: Paradox/Labels/WirelessRepeaters 1:;2: Paradox/Labels/Outputs 1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16: Paradox/Labels/Zones 1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:;17:;18:;19:;20:;21:;22:;23:;24:;25:;26:;27:;28:;29:;30:;31:;32:;99:Any zone Paradox/Labels/Users 1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:;16:;17:;18:;19:;20:;21:;22:;23:;24:;25:;26:;27:;28:;29:;30:;31:;32: Paradox/Labels/BusModules 1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15: Paradox/State State Machine 4, Listening for events... Paradox/Events Event:Zone open;SubEvent: Paradox/Events Event:Zone OK;SubEvent:

If you need more logs, I can provide them,

Been playing, and noticed some differences

I've been away fro a while using a windows service based on their SDK, and have looked at coming back to the script as I'm using an odroid C2 now.

I'll reforked my fork (I think), but notice that you use client.publish_with_timestamp now. Any reason for that? How to I pull out just the state and ignore the timestamp.

I also got used to, in the windows service having an alarm heartbeat....so I'll implement that, with an mqtt last will and testament which will show if the connection is alive.

The last thing I got used to on the service was, it would detect my PGM1 being fired via the remote (garage door). Not sure I can get that event, but I did manage to add something for that button being hit message[7] = 9

SP6000 is also supported

Hi Tertiush,

Thank you for sharing this codes! It work like a charm with my SP6000 board + IP150.

MQTT
I wasn't familiar with MQTT so it took a time to find a working server/broker.
The easiest way to try it is a public broker. Choose one from here, enter it's ip to the config.ini.
https://github.com/mqtt/mqtt.github.io/wiki/public_brokers

The README must tell about it.
Thanks again!

Is it working? (IP150-MQTTv2.py running, logging into Alarm working, MQTT logging working, but nothing else?)

Hi Tertius, I am very excited about this development. I loaded the 2nd version, but not sure it is working?

Got all in as per your instructions. I get in MQTT-Spy the standard output, one line for instance:

Paradox/Labels/BusModules 1:;2:;3:;4:;5:;6:;7:;8:;9:;10:;11:;12:;13:;14:;15:

Although this is seams like standard what should be there and not what is on my alarm.

But, I see - even with config.ini having Startup_Update_All_Labels = True, MQTT does not have Topic_Publish_Labels.

See for instance if I query about status of background task below, it seams it is running fine here....

pi@raspberrypi:~ $ sudo systemctl status IP150-MQTTv2.service
● IP150-MQTTv2.service - My Script Service
Loaded: loaded (/lib/systemd/system/IP150-MQTTv2.service; disabled)
Active: active (running) since Fri 2016-05-27 22:27:36 SAST; 15h ago
Main PID: 1753 (python)
CGroup: /system.slice/IP150-MQTTv2.service
└─1753 /usr/bin/python /opt/ParadoxIP150v2/IP150-MQTTv2.py


And, if I start it by hand, "python IP150-MQTTv2.py", I get below, thus seams to be working, logging into MQTT and the alarm.

pi@raspberrypi:/opt/ParadoxIP150v2 $ python IP150-MQTTv2.py
Reading config.ini file...
config.ini file read successfully
Attempting connection to MQTT Broker: 192.168.2.11:1883
MQTT client subscribed to control messages on topic: Paradox/C/#
Connected to MQTT broker with result code 0
Logging into alarm system...
Login to alarm panel successful

Updating all labels from alarm

But, If I try to interact with the alarm via MQTT, for instance, publishing topic "Paradox/C/P1/Arm" in MQTT-Spy, it is received on the console, but does nothing on the alarm? See console feedback:

MQTT Message: Paradox/C/P1/Arm
Alarm control partition: 1
Alarm control state: Arm
.
Logging into alarm system...
Login to alarm panel successful

Sending generic Alarm Control: Partition: 1, State: ARM

Add support for MQTT auth in config.ini

If possible, add in the [MQTT Broker] section, a Username and Password config parameters.
I got it to work by modifying manually:

lib/client.py (and hard-coding in self._username & self._password)

and

lib/publish.py (and hard-coding in):
def single(topic, payload=None, qos=0, retain=False, hostname="localhost", port=1883, client_id="", keepalive=60, will=None, auth= {'username':"user_name", 'password':"pass_word"}, tls=None, protocol=mqtt.MQTTv31):

MG5000 fw 4.76 with IP150 v 4.10 - Problem logging in

Hello Tertius,
First of all, thank you for your work and developing this software.
After managing to configure the MQTT server this is what I am getting when trying to connect to my control panel.

2017-10-01 02:09:53,599 INFO logging complete  
    
2017-10-01 02:09:53,601 ERROR test  
    
2017-10-01 02:09:53,607 INFO Setting loglevel to debug  

2017-10-01 02:09:53,618 DEBUG Logging Set to debug  

2017-10-01 02:09:53,627 INFO logging set to debug  

2017-10-01 02:09:53,635 INFO config.ini file read successfully: 2  

2017-10-01 02:09:53,644 INFO State01:Attempting connection to MQTT Broker: 127.0.0.1:1883  

2017-10-01 02:09:53,658 INFO Connected to MQTT broker with result code 0  

2017-10-01 02:09:53,658 INFO State01:MQTT client subscribed to control messages on topic: Paradox/C/#  

2017-10-01 02:09:53,674 INFO State02:Connecting to IP Module  

2017-10-01 02:09:53,684 INFO Connecting to 192.168.1.19  

2017-10-01 02:09:53,697 INFO Logging into alarm system...  

2017-10-01 02:09:53,736 DEBUG 32->   0xaa 0x8 0x0 0x3 0x8 0xf0 0x0 0xa 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x61 0x73 0x73 0x77 0x6f 0x72 0x64 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee  

2017-10-01 02:09:55,993 ERROR State02:Error attempting connection to IP module (3): string index out of range  

Anybody got this working in Docker?

Anybody got this up and running in Docker? I still get this error:

logging to file /var/log/paradoxip.log
ERROR:root:******************* Error reading config.ini file (will use defaults): No section: 'Application'
reading  config
Traceback (most recent call last):
  File "/usr/src/app/ParadoxIP150v2/IP150-MQTTv2.py", line 955, in <module>
    logging.error( "MQTT connection error (" + str(attempts) + ": " + e.strerror)
AttributeError: 'exceptions.AttributeError' object has no attribute 'strerror'

ip150 frimware update error

merhabalar değerli arkadaşlar elimde ip150 var yazılım yükleme sırasında hata verdi suan içinde yazılım yok gibi yardımcı olursanız sevinirim teşekürler
0
1
2
3
4
5
6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.