Page 1 of 1

Home Intruder Alarm using Security Panel

Posted: Monday 25 January 2016 15:34
by TheBod
Hi all

I would like to phase out my old mains powered alarm system and replace with a wireless system. I already use Domoticz to control many LightwaveRF products within the house using the Rfxtrx433e connected to a Raspberry Pi.Obviously I know that Domoticz has a Security Panel built in and this would be ideal, allowing the system to be added to.

My plan is;
1) To have a keypad to allow arming etc
2) To use existing lighting 433 MHz PIRs as motion detectors for the alarm system when the system is armed
3) To use 433 MHz door sensors on each of the external doors (front and rear)
4) System to have an external bell box sounder in the event of an activation
5) When armed, the system allows 30 seconds to exit and close the entry/exit door (internal sounder beeping during this time period)
6) When entering the entry/exit door the system allows for 30 seconds to disarm system (internal sounder beeping during this time period)
7) If door entry is made using any other door (not entry/exit) or PIR detection whilst armed, alarm sounds
8) Would like to have panic buttons within system in key rooms to allow for alarm activation
9) Would like family members to have key fobs also so that they have the option to arm/disarm system easily rather than using keypad

Other Required Parameters;
1) The system should operate as per a standard alarm system
2) Should be able to create zones i.e. so ground floor can be set at night time whilst we are asleep on first floor
3) If activated system to send notifications, email etc
4) UPS required for RaspberryPi and Bell box


Does anybody have any experiences in creating such a system? I would like to keep the programming to the Domoticz Events (blockies) as i am not a programmer (no idea about Lua). If so, I would like to see a hardware list of the keypads, sirens, bell boxes (are they mains?) etc?

Any real examples would be great so that I can understand how is best to create rather than just purchasing expensive Yale or Honeywell systems.


Thanks in advance

The Bod

Re: Home Intruder Alarm using Security Panel

Posted: Tuesday 26 January 2016 22:20
by trekker25
Also working on such.

I think best is to split the project up and built smaller parts. At the end you can start combining / expanding stuff.

First start small and simple: couple of sensors/security panel /siren.
Later work on optimizing the arming/disarming/panic button/key fob

Re: Home Intruder Alarm using Security Panel

Posted: Tuesday 26 January 2016 23:33
by Egregius
I think that you should start learning lua or php. Blockly will also be hard to configure everything.
I do all the things you mention, except that I use remotes instead of keyfobs.

Re: Home Intruder Alarm using Security Panel

Posted: Wednesday 27 January 2016 14:22
by TheBod
trekker25

Many thanks for the reply. When you say that you are working on similar how far have you got? Do you have a keypad system working yet or just internal PIR's?

Any assistance or examples would be greatly appreciated.


The Bod

Re: Home Intruder Alarm using Security Panel

Posted: Tuesday 02 February 2016 22:09
by blitzkneisser
I am using my Z-Wave devices as an alarm system when armed. Once set up, the system can be easily expanded using remotes, switches sirens etc. for arming/disarming/alarming... that's the easy part. Setting up different zones is also no problem.
But you should learn Lua. It's not very complicated and doing even medium complex systems is a pain in the a$$ using blocky, you have waaaay more flexibility, freedom and possibilities with scripts.
And before setting up a full alarm system I'd familiarize myself with Lua and the Domoticz Event system, start with simple stuff like PIR controlled lights then move on to advanced topics like an alarm system.

Re: Home Intruder Alarm using Security Panel

Posted: Wednesday 03 February 2016 22:43
by TheBod
Hi, many thanks for the reply.

I guess it does make sense to learn Lua but where do I start? Is there a good starting place, guide or youtube video that will help?


Many thanks

Re: Home Intruder Alarm using Security Panel

Posted: Thursday 04 February 2016 5:46
by Egregius
PHP is also a possibility, easy and flexible. Once you have http://www.domoticz.com/wiki/PHP:_Store ... _variables running.

Example:

Code: Select all

if(($Saway=='On'||$Ssleep=='On') && $STaway<$threemin && $Snotifications=='On') {
	if($Sgate!='Closed') {
		$msg='Gate open at '.strftime("%H:%M:%S", $STgate);
		$siren=true;
		if($mc->get('alertgate')<$threemin) {
			$mc->set('alertgate', $time);
			telegram($msg);
			ios($msg);
			if($sms==true) sms($msg);
		}
	}
	if($Spirhall!='Off'&&$STsleep<$driemin) {
		$msg='Movement detected in hall at '.strftime("%H:%M:%S", $STpirhall);
		$siren=true;
		if($mc->get('alerthall')<$threemin) {
			$mc->set('alerthall', $time);
			telegram($msg);
			ios($msg);
			if($sms==true) sms($msg);
		}
	}
	if($siren==true) Schakel($SIsiren,'On');
}
Above two parts of my script.
Explanation:
If away or a sleep and away for more than three minutes and notifications enabled, continu with part between { }
Case 1: If status of gate is other (!=) than Closed prepare message, set variable $siren to true, check if the last action for this is more than 3 minutes ago (to avoide repetive notifications). If so send message to telegram, ios and sms if enabled.
Case 2: If status if PIR hall is other than Off and a sleep for more than 3 minutes.....

If variable $siren is set to true, switch siren on. With the script from the wiki all switches, pirs, contacts are saved as variables starting with S, ST for the last update time and SI for their IDX. All scripting happens based on names, no need to know IDX's and no problem when a switch has another IDX for whatever reason.
The possibilities are endless. My script is now 568 lines long, holds 250 IF, 36 else, 39 OR and 166 AND statements. Execution of all that takes less than 0,1 second.

Re: Home Intruder Alarm using Security Panel

Posted: Thursday 04 February 2016 5:56
by Egregius
blitzkneisser wrote:start with simple stuff like PIR controlled lights then move on to advanced topics like an alarm system.
Good point! :D
Whatever language u use for the script, start with small parts and built upon that after testing. I find myself making changes every week, mostly because of new hardware but also to finetune so it reacts exactly like I want and not like how someone else thinks it should react.

Re: Home Intruder Alarm using Security Panel

Posted: Thursday 04 February 2016 8:59
by heggink
search the forum and you will find 95% of what you need. there is an entire thread on this. I have implemented most of what you want with the missing pieces being very simple to add.

Re: Home Intruder Alarm using Security Panel

Posted: Saturday 06 February 2016 14:36
by TheBod
Hi

Does anyone know whether the "Response Wireless Keypad with Flip down Cover 433MHz (SAKP E)" would be compatible with Domoticz? It is 433Mhz but am not sure on the protocol.

http://www.responseelectronics.com/burg ... ApqK8P8HAQ