Simple security system

Hi all

I would like to make a simple security system just for test, using a magnetic contact and a presence sensor.
The magnetic contact is installed on the front door and i would like it to work like this:
Using an app as for eg. Rotini to activate the “system” using a code 1234 and to have a few seconds to leave the house. After this point the system should be in arm mode and if someone opens the door the alarm system will send me an email. When i come back home, i need to deactivate the alarm in a few seconds using my code 1234 or whatever (disarm mode).
Can someone please point me a way to start this? I have read some topics in here but couldn’t find a way to start.
Thanks for any advice.
All the best!

The challenging part will be entering the code. There is no simple way to do that with the built in user interfaces. However, I know nothing about Rotini, maybe that supports it.

Assuming you can get the code into a Number or String Item, you can write rules with Timers to do all of the above without too much effort.

I recommend downloading and exploring the demo and reading the docs/wiki to start understanding how the various parts of OH work together.

Take a look bere:

My major concern would be reliability. What happens if your keypad (physical or software) can’t send? What happens then? (That’s obviously up to you) Blares sirens? Calls the police? If you wanted a physical keypad, you could use two Arduinos to transport the information to your OH server. The question is how and keeping that info secure. I looked at Rotini and it doesn’t seem like it supports a keypad feature. I do see a PIN feature but that only looks like it unlocks portions of the UI.

@villaRob’s solution looks pretty cool if you are looking for the software side. A tad clunky but the best work around that I have seen.

Well, if implementing this DIY with Arduinos, keeping the information secure is an exercise left for the DIYer.

Clearly some sort of encryption and authentication between OH and the keypad would be required which isn’t going to be all that simple. Though I’d look into MQTT for that since it allows TLS, ACLs and username/password to connect to the broker.

Correct, I was leaving the definition of secure to the user. Using Ethernet might be secure enough for some in that you aren’t broadcasting stuff through the air. Others may want MQTT over TLS. You could also run the keypad wires all the way to an Arduino setting next to the OH server and use serial… For MQTT over TLS with Arduino I’ve looked into the Paho stuff but haven’t needed to try it. Paho port

Hi guys!
Thanks for the answers. I found a way to go here where @jcid1 posted a nice config and its nearly close to what i would like to do.
@awsnap the Rotiti app its free for the moment and i have it already installed on a 7" tablet. This is @Igor Gladkov work here and wiki. The pin that allows you to lock different parts of tue UI is all you need. You can secure the Alarm item so you can use that item only with a predefined code which you need to set it manually. Unfortunately at this moment the app its available only for android and hopefully it will be developed for IOS too.
@villaRob your example can be used in IOS OH mobile app because as i said at this moment Rotini app cant be installed on IOS devices so I think i can use this in OH only for the alarm but first i need to figure out how to set this small “alarm system” using 3 magnetic contacts and 3 lights!