Thought to share this and also in the hope to get some help on some points.

I use Domoticz to control lights and more in and around my house. The second step is to setup security so I can phase out my current security system.
Since I hate the pinpad I am making my system with a RFID reader which I can place everywhere or make multiple of them.
Current challenges
Its a struggle to create a decent entry and leave delay. When a token is scanned I want a 30 seconds delay before the alarm is activated. When entering (opening a door) I want a 30 seconds delay that gives me the time to scan a token before the alarm sounds. Anyone knows how to achieve this based on the status of the SecPannel?!

How it works
I'm using a Particle Core as the controller. Its a small ARM Cortex M3 microcontroller with WiFi on-board. Completely configurable and flash-able trough web interface and connected to the cloud.
The Core has the following connected to it;
- - RC522 RFID module
- Quad Level-Shifter (3V to 5V)
- 2x WS2811 addressable leds
When a token is scanned the Core sends a webhook to the Particle cloud which on its turn creates a HTTP POST towards the Raspberry PI running Domoticz. On the Raspberry a web-server + PHP + MySQL forms the brains of the system.
The MySQL has several tables containing all known tokens, uses and cores. Also a table for logging and a table where token IDs are coupled to users.
The PHP scripts contain the logics which executes a particular action when a token is scanned. It for example sends a HTTP POST towards Domoticz to set the SecPannel.
When the system is armed and a intruder is detected by a PIR/Door or other sensor the GPIO switches a relay that sounds a alarm. Unless when someone enters trough a door and scans its token within 30 seconds.
Example
User1 = out
User2 = in
User1 comes home and scans its token. Now User1 + User2 are in.
User2 go's away and scans its token. Now User1 + User2 our out. The PHP logically will give a callback on the scan and lets LED1 flash RED because the token is checked out. It also sends a HTTP POST to Domotcz to set the SecPannel on Armed.
Current project status
- - PHP code finisched
- Core code finisched
- Entry and leave delay. Not yet achieved. Seems to be difficult with Blockly
- Web frontend to manage users, tokens, cores and view log. Not yet started
