Help build binding for Paradox Alarm Panel with IP150

ip150
paradox
alarm
Tags: #<Tag:0x00007fe058e2de58> #<Tag:0x00007fe058e2dc50> #<Tag:0x00007fe058e2dae8>

(Arie Van Wyk) #122

Does anybody have experience with Mono on linux maybe a option to use the sdk and build a binding to .net.

Just a idea :slight_smile:

I’m trying to look into all options here to see where one could go. Your thought’s maybe Jean


(Psyciknz) #123

Which headers are different? The keepalive or login ones or all? Have you looked at the ParadoxMap.py file to see if you can put them in there?

I haven’t figured out how to make a new Map for a new panel type


(Arie Van Wyk) #124

All of them are different. Ihave started changing the ParadoxMap.py file and have manage to get some stuff pulling in but my limited knowledge of python is not helping much


(Psyciknz) #125

Yeah i haven’t figured out how to spin off a new map file.

Send me some of the header differences (how did you work them out?)
I’ve forked the project and have been playing with it.

I’d like to update the map for my spectre - but could only use babyware and that seem to use different requests.


(Tertius Hyman) #126

Hi guys

Sorry for going completely MIA on this. I’ve been terribly busy with personal things and won’t have much time in the future to spend on the project. I am more than willing to explain any of my code and help out where I can - albeit with some delay, but I’ll really try to get back asap. I’ll keep an eye out in the next few days if there’s any pressing questions on my code.

On a side note - I’m contemplating to open-source the Alarmin app as I also don’t have much time to spend on it. If I do go that route then most of the code needed is in there (works on all models I believe). Managing of the backend for push notifications will have to stay with me for security reasons (for now at least), but the app’s code will be open. Is there anyone with AngularJS / Ionic v1 experience that would be able to contribute / take over? I have quite a few pressing features that will add value, just no time to implement them. Please let me know if you’re interested. thanks


(Arie Van Wyk) #127

Hi Tertius

All understandable in the busy life we are leading.

Unfortunately i dont have have enough programming skills to help but would greatly appreciate all the help i can get in getting the current code running for evo.

With that said I have manage to get the header for zonelabels but the binary returning is 87 and there is 4 zone per return.

zoneLabel = {“Header”: “\xaa\x08\x00\x04\x08\x00\x00\x14\xee\xee\xee\xee\xee\xee\xee\xee”,
1: {“Send”: “\x50\x08\x00\x00\x04\x30\x40”, “Receive”: {“Start”: 20, “Finish”: 36}},
2: {“Send”: “\x50\x08\x00\x00\x04\x30\x40”, “Receive”: {“Start”: 37, “Finish”: 53}},
3: {“Send”: “\x50\x08\x00\x00\x04\x30\x40”, “Receive”: {“Start”: 53, “Finish”: 70}},
4: {“Send”: “\x50\x08\x00\x00\x04\x30\x40”, “Receive”: {“Start”: 70, “Finish”: 87}},
5: {“Send”: “\x50\x08\x00\x00\x04\x70\x40”, “Receive”: {“Start”: 20, “Finish”: 36}},
6: {“Send”: “\x50\x08\x00\x00\x04\x70\x40”, “Receive”: {“Start”: 36, “Finish”: 53}},
7: {“Send”: “\x50\x08\x00\x00\x04\x80\x40”, “Receive”: {“Start”: 53, “Finish”: 70}},
8: {“Send”: “\x50\x08\x00\x00\x04\x80\x40”, “Receive”: {“Start”: 70, “Finish”: 87}},

But for the love of me the code only returns the first 2

Regards Arie


(Tertius Hyman) #128

Hi Arie

I’m baffled myself! The code looks at the mapping file and counts all the elements of the dictionary which has an integer as a key. So the 1, 2, 3, 4, etc. keys should all be counted up to 8, and then the code should step through each 8 keys. As to why it gets stuck at 2 I don’t know. If you set the debug level to 2, the following line should print the total detected integer keys, what are you seeing for this?

print "Amount of numeric items in dictionary to read: " + str(total)


(Arie Van Wyk) #129

Ok let me start of with what I have done
On line 399 of the code i had to change 36 to 0 do get it running and get response.

Nothing else is change

When run the code Partition Lables return but not zone lables since I’m only recieving 20 bytes instead of the 87 it should be.

Reading from alarm: partitionLabel
Amount of numeric items in dictionary to read: 8
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3a 0x6b 0x10 0xd 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3a 0x6b 0x42 0x69 0x6e 0x6e 0x65 0x20 0x48 0x75 0x69 0x73 0x20 0x20 0x20 0x20 0x20 0x20 0x73
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3a 0xd6 0x10 0x78 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3a 0xd6 0x42 0x75 0x69 0x74 0x65 0x20 0x48 0x75 0x69 0x73 0x20 0x20 0x20 0x20 0x20 0x20 0xeb
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3b 0x41 0x10 0xe4 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3b 0x41 0x41 0x72 0x65 0x61 0x20 0x33 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xf1
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3b 0xac 0x10 0x4f 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3b 0xac 0x41 0x72 0x65 0x61 0x20 0x34 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x5d
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3c 0x17 0x10 0xbb 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3c 0x17 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xbc
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3c 0x82 0x10 0x26 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3c 0x82 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x27
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3c 0xed 0x10 0x91 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3c 0xed 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x92
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x3d 0x58 0x10 0xfd 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
39<- 0xaa 0x17 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x17 0x0 0x0 0x3d 0x58 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0xfe
Labels detected for partitionLabel:
{1: ‘Binne Huis’, 2: ‘Buite Huis’, 3: ‘Area 3’, 4: ‘Area 4’, 5: ‘’, 6: ‘’, 7: ‘’, 8: ‘’}

Reading from alarm: zoneLabel
Amount of numeric items in dictionary to read: 32
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0x30 0x40 0xcc 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0x30 0x40 0xcc 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0x70 0x40 0xc 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0x80 0x40 0x1c 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0xb0 0x40 0x4c 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0xb0 0x40 0x4c 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0xf0 0x40 0x8c 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0xf0 0x40 0x8c 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
20<- 0xaa 0x4 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x70 0x4 0x10 0x84

Now looking at this it is checking each line and moving on to the the next.

Now this is where i strarted playing around with the code and cleary have no idea what im doing. but for whats it’s worth I added “header[1] = ‘\x25’” underneath line 411 and got the follwoing result when the code checked for zone lables you will notice it is returning the 87 bit it should but

Reading from alarm: zoneLabel
Amount of numeric items in dictionary to read: 32
32-> 0xaa 0x8 0x0 0x4 0x8 0x0 0x0 0x14 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x50 0x8 0x0 0x0 0x4 0x30 0x40 0xcc 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0xee
87<- 0xaa 0x47 0x0 0x2 0x72 0x0 0x0 0x0 0x3 0xee 0xee 0xee 0xee 0xee 0xee 0xee 0x52 0x47 0x0 0x0 0x4 0x30 0x56 0x6f 0x6f 0x72 0x20 0x44 0x65 0x75 0x72 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x53 0x6b 0x75 0x69 0x66 0x20 0x44 0x65 0x75 0x72 0x20 0x20 0x20 0x20 0x20 0x20 0x47 0x61 0x72 0x61 0x67 0x65 0x20 0x44 0x65 0x75 0x72 0x20 0x20 0x20 0x20 0x20 0x5a 0x6f 0x6e 0x65 0x20 0x30 0x30 0x34 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x5c
Failed to load supported function’s mapping: TypeError("‘str’ object does not support item assignment",)

but ya it does not like what i did with the header


(Denis Lambert) #130

Great piece of software! Thank you Tertius_Hyman :slight_smile:.

My Paradox system mainly consists of a SP6000 V4.94 with an IP150 V3.01

I installed the Python stuff on my Raspberry Jessie, modified the config.ini and launched it. Here some log lines that I got:

    Logging into alarm system...Connected to MQTT broker with result code 0
    Login to alarm panel successful
    Labels detected for wirelessKeypadLabel:
    {1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '', 8: ''}
    Labels detected for wirelessSirenLabel:
    {1: '', 2: '', 3: '', 4: ''}
    Labels detected for siteNameLabel:
    {1: ''}
    Labels detected for partitionLabel:
    {1: '', 2: ''}

    and so on ....

I got no labels of any kind neither any ARMing was possible although I was able to Enable / Disable polling thru an MQTT publishing (Paradox/C/Polling/Disable)

Then I did a login directly to my IP150 keeping the web interface displayed in my browser. I relaunched the Python script and voilà! Got all zone labels displayed and Arming / Disarming was available.

The question is: Do I need to have the IP150 web interrface logged in to sucessfully interact with my system and get some data from the Python script ?


(Jean Henning) #131

Would the following link of documents possibly help?

The one of interest is this one:

There is a file called EVO_48_192_Advanced_Memory.xls


(Angelos) #132

I just received my IP 150 module and I will start playing with my Paradox system (SP7000 v5.18) also

More news soon :slight_smile:


(Psyciknz) #133

Awesome find. Pity there’s no release notes for the IP150 firmwares.
Also I notice the DotNet SDK has been updated. Wondering if I need to switch from the (working) python binding to one based on the offical SDK.


(Jean Henning) #134

Yeah it seems the .NET SDK has been updated to v2.18. Just wish there was a better way to check for updates other than to just alter the download URL to see if a newer version is downloadable.

The .NET SDK works quite nice but it’s dependable on WinForms. I’m currently using it in a Windows Service and it was quite a challenge to get it to work as I had to simulate the WinForms environment since it’s designed to work in a STA Thread Apartment model. v2.18 creates an even stronger WinForms dependency which is kind of annoying. You cant easily use it in any other .NET environment (like e.g. ASP.NET, Windows Service, WPF, etc) without trying to simulate the environment or include one or more WinForms dependencies.

The documentation on the API is also not that great. E.g. I’m currently trying to use the WriteUser API call. Some of those fields use a predefined list of values but they are not in the documentation. Another thing I’ve picked up is when trying to read events from the .NET SDK the method to read only the newer events is documented but missing in the API. You can only request X amount of events, but no way to get an EventID and only get the new ones. This is something that BabyWare seems to do currently.


(Psyciknz) #135

thought the python code is working. I’ve got one bug where i lose connection to the panel, and can’t get it to restart.

But 90% of the time it’s going well. This would be my fork from Tertius


(Jean Henning) #136

What does your fork from Tertius’ code do differently?

I’m keen to also revisit the Python code (having only worked with the .NET SDK), but I cannot figure out how Tertius got to those mappings, e.g. zoneLabel = {“Header”: “\xaa\x25\x00\x04\x08\x00\x00\x14\xee\xee\xee\xee\xee\xee\xee\xee”,
1: {“Send”: “\x50\x00\x00\x10”, “Receive”: {“Start”: 20, “Finish”: 36}},

What do those hex numbers mean? And how would I find this for the EVO192? Supposedly the mappings for the existing code came from http://www.imotionsecurite.com/pdf/paradox/MGSP-EP20.pdf but that does not contain these hex numbers. I have also scanned the EVO manuals up and down and could not find anything that would help. It almost seems as if the only way to do this for the EVO is to do some wiresharking which seems like quite a mission. Pity the .NET SDK isnt truly .NET. It’s a Delphi DLL with a .NET Wrapper. IF it was pure .NET we could have reverse engineered the code. Really would love to see the actual communication protocol in a document.


(Psyciknz) #137

Mostly just deals with MQTT topics differently and grabs the name from the event and how it logs.

In terms of creating a new mapping file, I’m not sure anyone has been able to create a new mapping, or figure out the hex. There is no protocol doco, paradox are pretty closed in that respect.


(Jean Henning) #138

Does the following links help at all? Seems to document the serial protocol for the EVO as well as SP/MG range. Even as a programmer i’m struggling to make sense of these documents but the more eyes are on them the better:


(Jean Henning) #139

I’ve really hit a bit of a brick wall with this Paradox SDK. Seems their WriteUser function has a bug where it doesnt write the actual UserName (the user’s label) to the panel. Simply ignores it. Paradox is also uninterested in dealing with the public. Pity they are so reluctant for people to interface with their hardware. In my opinion it would be beneficial to the sales of their products if people could easily interface with it. I cant even report the bug in their API because you have to be a distributor. :frowning:


(Psyciknz) #140

I’m not sure how much of that relates to the IP communication. I tried doing a wireshark from babyware to my panel, but the messages were different to what others were getting. I think they used winload.


(Angelos) #141

By the way: If any developer needs access to the Paradox Software (BabyWare 4.7, WinLoad 5.71, firmware for IP150 module, etc) drop me a PM. I have reseller access to their website.

I have also tried to contact Paradox to get more info on their API but they don’t respond so easily…

I just got the new IP150S module with firmware v1.39 and I will start using it with the python solution to integrate my SP 7000 system with OH2.