I guess the same can be done with other alarms of the same brand.
I have seen others doing similar things with RS485.
Why in general ?
Loxone is not and will never be a “certified” alarm system, insurances and so on will never fully approve anything you wuild based on loxone. In Belgium alarm systems need to be INCERT approved. Strangely an alarm system that is VDS3 approved (maximum security for banks etc but for some country called Germany) is not automatically safe enough for a house in Belgium. One option would have been a KNX alarm from gira or jung, but these are not approved in Belgium. Also only certified installers may install alarm systems, these installers will only install components that are approved, ... difficult discussion.
So I found a certified installer to install me an alarm system, with motion detectors in most rooms, with magnetic contacts on most doors windows, ... This system works autonomously and is designed to protect my house, insurance companies approve this type of alarm if I want insurance for theft.
Typically the alarm systems that are certified will not send you emails or notification in loxone on you iphone, all this is considered unreliable. You need to pay an "alarm central service" to phone you to tell you zone 2 was triggered, but they cannot typically tell you what this zone is named, what was triggerred just before, if it is still triggered, ... However an email or possibilty to view details in a user frinendly app like loxone is what I wanted, and after the message that there is an alarm we open loxone to see which zone was triggered when. The alarm system installer will not do emails and notifications, but emails and notifications in a nice UI is what I wanted. I also wanted to use the detectors for my "smart home". The alarm system does not come with an app to see the status, ...
Motion detectors used to put a lamp outside on/off or the ones loxone offers, are different to the ones in alarm systems. In alarm systems they need to be sure there is motion, it needs to avoid false alarms, there is also tampering and sabotage detection. All wiring of all these detectors goes into the alarm system, if someone cuts the wires there is also an alarm. You cannot access the sensors in loxone or in KNX or anything else, for security purposes.
If you put a magnetic contact on a door/window for you alarm, you will not put a second magnetic contact for loxone in the same door/window, and wire this into loxone.
NX8V2 or Caddx alarms are made by GE and are relatively standard alarms, I have seen the same alarm system everywhere. To allow serial communication you need the module NX-584. I think the same could have been done with a USB module nx-586E, and might be easier. Alternatively there are modules with dry/binary contacts, but you would need as many as you have “detectors”, it will use the same amount of contacts in loxone. The RS232 gives complete information of all detectors and the full status of the alarm, with no big delays/almost in real time, with only 2 wires, and the link is bi-directional.
I use this only to read the status of my sensors. Typically arming the alarm system can be done without code or verification, arming is not a risk. Disarming the alarm always requires the code, it is not recommended to disarm the alarm from the loxone UI, only from the alarm system, disarming from loxone is making security weaker.
The protocol:
See attachment with protocol details.
The solution
Solution is not based on programming, I tried but could not make a decent pico-c script. My solution is based on loxone programming blocks, it takes lots of them, but is in the end working nicely. This is much easier and works perfectly for years now.
You will not see much communication on the RS232 if you do not reply with ACK messages. Whenever Loxone receives the end character of a message ‘\r’, loxone replies with an ACK message, \n011D1E1F\r. After that the next message arrives. I will add a PDF describing how this can be done.
Each message needs to be recognised and decoded. That can be done with a binary decode. I will add a pdf file with details on how this is done.
The rest of the solution
I can use any motion detector from the alarm to put the light in a room off after a while (if no one is in the room).
I can switch of the heating (in frost protection) if someone opens the window in a room.
After doing all this one can use standard components such as the "burglar alarm" block from loxone in loxone config, I also have a tracker.
Note that I do not feel comfortable giving all the details, this is still some protection system.
The formula
You might find the formulas I used weird. Look for example at:
\n0A8500\.\1\w\r
This bit looks for a message starting with "\n0A8500" then take the second single character which is the value we look for.
With this second character we continue into the formula:
INT((70-I1)/12)*(I1-48)+INT((I1-48)/17)*(I1-55)
You may note the figure 48 in the formula. Char 48 is zero "0", char 49 is one "1", 50 is "2", ...
Suppose the character received is "0" or char(48) , this formula give you the number zero, "1" ->1, ..., etc.
It is just a formula to do what you would do with the function "value" to convert strings to numbers in excel.
It looks complicated but it is not. It's just a way to program this decoding.