Alarm system 'wiki'
Moderator: leecollings
-
- Posts: 5
- Joined: Thursday 18 February 2016 18:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
Hello heggink, Unfortunately a few weeks ago I tried to follow up on your wiki whilst not being aware of the existence of this topic and so I ran into the same problems as described here, i.e., only execution of the lua script but no subsequent triggering of the blocky events. Nevertheless, I would be very interested in testing your adapted and upgraded alarm system wiki once available.
JanKarel
JanKarel
-
- Posts: 5
- Joined: Thursday 18 February 2016 18:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
I have a few questions regards the presented blocklies To spyseiko, is yours still set up in combination with a lua script since otherwise I may not understand what turns on your AlarmDetect switch? To maomanno,is your system now only blockly based and could your earlier comment of a less well performing fibaro smoke sensor be related to that it perhaps requires a not on but panic status descriptor?
JanKarel
JanKarel
-
- Posts: 17
- Joined: Sunday 28 February 2016 23:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
Great thread - found this very helpful
I'm having some issues with the Zipato wt-rfid.eu Mini RFID/Z-Wave Keyboard - seems to be integrate correctly and tags work but if I arm and then disarm after a couple of minutes the keypad indicator light goes solid red and the tag does not seem to work. If I wait it seems to work again. I kno it is only a test but not ideal.
Also how are people implementing different alarm profiles - PIR + Door or perhaps just Door are you using two keypads or a different pad
I'm having some issues with the Zipato wt-rfid.eu Mini RFID/Z-Wave Keyboard - seems to be integrate correctly and tags work but if I arm and then disarm after a couple of minutes the keypad indicator light goes solid red and the tag does not seem to work. If I wait it seems to work again. I kno it is only a test but not ideal.
Also how are people implementing different alarm profiles - PIR + Door or perhaps just Door are you using two keypads or a different pad
-
- Posts: 1
- Joined: Wednesday 01 July 2015 8:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
Hi peoples,
I'm new, and almost there with my setup - but I have some probloms.
I'm using the Community Alarm Script v1.0 and it does alert me on my iphone, using Pilot (Domoticz) app perfectly, also alerts me via E-mail. (All sensors working both doors sensors, and Pir sensors)
It also sets my virtuel switch on when motion or door is opened up (vsAlarmDetected)
But i cant seem to get my Events working, so it is working as wrote in the " Community Alarm Script v1.0" im, messing the grafical guidelines for the Events - i need it to work like this:
Blocky:
- Alarm_Detected_Events - This is responsible for the siren and notification
action once Lua parses the device events.
vsAlarmDetected set by Lua is the trigger
- Alarm_Trigger_Sirens - Triggered by the On status of vsSirenTrigger; resp-
onsible for the possible firing of the siren. The
time delay introduced by the previous Blocky gives
users time to disarm before this sets the virtual
switch svFireSiren to ON
- Alarm_Acivate_Sirens - Triggered by svFireSiren. It will send an email notif-
ication to indicate the siren is on and will proceed
to set the virtual switches used here to Off.
- Alarm_Reset_Disarm - When security system is disarmed, it clears all
virtual switches used. It also turns off the siren
if it's accidentally trigged (ie, the delay is
insufficient to disarm the system due to the groceries
and key fumbling)
I'm so close, what's wrong?
I'm new, and almost there with my setup - but I have some probloms.
I'm using the Community Alarm Script v1.0 and it does alert me on my iphone, using Pilot (Domoticz) app perfectly, also alerts me via E-mail. (All sensors working both doors sensors, and Pir sensors)
It also sets my virtuel switch on when motion or door is opened up (vsAlarmDetected)
But i cant seem to get my Events working, so it is working as wrote in the " Community Alarm Script v1.0" im, messing the grafical guidelines for the Events - i need it to work like this:
Blocky:
- Alarm_Detected_Events - This is responsible for the siren and notification
action once Lua parses the device events.
vsAlarmDetected set by Lua is the trigger
- Alarm_Trigger_Sirens - Triggered by the On status of vsSirenTrigger; resp-
onsible for the possible firing of the siren. The
time delay introduced by the previous Blocky gives
users time to disarm before this sets the virtual
switch svFireSiren to ON
- Alarm_Acivate_Sirens - Triggered by svFireSiren. It will send an email notif-
ication to indicate the siren is on and will proceed
to set the virtual switches used here to Off.
- Alarm_Reset_Disarm - When security system is disarmed, it clears all
virtual switches used. It also turns off the siren
if it's accidentally trigged (ie, the delay is
insufficient to disarm the system due to the groceries
and key fumbling)
I'm so close, what's wrong?
- Attachments
-
- 3.png (236.08 KiB) Viewed 7165 times
-
- 2.png (64.22 KiB) Viewed 7165 times
-
- 1.jpg (90.48 KiB) Viewed 7165 times
-
- Posts: 15
- Joined: Saturday 23 January 2016 11:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
Need some help
I am using this script
the line: device = next(devicechanged)
leads to this in the log:
2016-03-13 16:54:00.508 Error: EventSystem: in test alarm: [string "--[[ ..."] bad argument #1 to 'next' (table expected, got nil)
It appears every minute.
The script is working fine for now.
can sombody tell me what is wrong?
I am using this script
the line: device = next(devicechanged)
leads to this in the log:
2016-03-13 16:54:00.508 Error: EventSystem: in test alarm: [string "--[[ ..."] bad argument #1 to 'next' (table expected, got nil)
It appears every minute.
The script is working fine for now.
can sombody tell me what is wrong?
-
- Posts: 7
- Joined: Friday 02 October 2015 8:23
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
I tried to set up my security system as describe here and in the wikihttp://www.domoticz.com/wiki/Alarm_Setup but the "security status" seems not updated when the "Security Panel" object is updated by script.
I have the Domoticz Internal "Security Panel" object in my list of devices.
If I use the security panel and I change the state (Arm or disarm) , the "security status" value is updated and I can fire script on this change.
If I use a script to update the Domoticz Internal "Security Panel" object with or . Then the Domoticz Security Panel display the new value but the "security status" is not updated.
Then I can't use blocky script based on the "security status" value as describe in the wiki http://www.domoticz.com/wiki/Alarm_Setup
I have the Domoticz Internal "Security Panel" object in my list of devices.
If I use the security panel and I change the state (Arm or disarm) , the "security status" value is updated and I can fire script on this change.
If I use a script to update the Domoticz Internal "Security Panel" object with
Code: Select all
commandArray['Domoticz Security Panel'] = 'Arm Away'
Code: Select all
commandArray['Domoticz Security Panel'] = 'Disarm'
Then I can't use blocky script based on the "security status" value as describe in the wiki http://www.domoticz.com/wiki/Alarm_Setup
-
- Posts: 17
- Joined: Sunday 28 February 2016 23:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
@ rgouyet is your script correct - the name is probably Security Panel
-
- Posts: 583
- Joined: Wednesday 16 December 2015 19:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2022.2
- Location: Netherlands
- Contact:
Re: Alarm system 'wiki'
nice thread(if it is still alive)
found out resendly regarding the variables not triggering anything anymore
i however also found out that a PIR sensor sends 2 triggers, one ON and one OFF
you need to revise the lua script so that it only triggers when the PIR goes ON and not again when going off.
The fibaro motion sensor at least works this way so no harm in implementing this, even if yours only sends an ON
this is the change you need to make.(you can add te message commands, i deleted them)
found out resendly regarding the variables not triggering anything anymore
i however also found out that a PIR sensor sends 2 triggers, one ON and one OFF
you need to revise the lua script so that it only triggers when the PIR goes ON and not again when going off.
The fibaro motion sensor at least works this way so no harm in implementing this, even if yours only sends an ON
this is the change you need to make.(you can add te message commands, i deleted them)
commandArray = {}
tc=next(devicechanged)
PIR_switch=tostring(tc)
if (PIR_switch:sub(1,3) == 'PIR') and (devicechanged[PIR_switch] == 'On') then
if(otherdevices['Security Panel'] == 'Arm Away') then
commandArray['Variable:AlarmDetected'] = '1'
end
end
return commandArray
-
- Posts: 7
- Joined: Friday 02 October 2015 8:23
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Alarm system 'wiki'
Hi @starfish001
I changed the name from "Domoticz Security Panel" to "Security Panel'" but it didn't change anything...
Hi @Gravityz,
Thanks for the "On" statuc check to avoid twice alerts.
Do you confirm the "security status" variable is no more updated ?
I changed the name from "Domoticz Security Panel" to "Security Panel'" but it didn't change anything...
Hi @Gravityz,
Thanks for the "On" statuc check to avoid twice alerts.
Do you confirm the "security status" variable is no more updated ?
-
- Posts: 12
- Joined: Tuesday 05 January 2016 14:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2.4967
- Contact:
Re: Alarm system 'wiki'
@JanKarel
I don't use lua scripts, but you're right. The motiondetection blockly is not correct. This should be the correct one, where the AlarmDetect is triggered and reset.
I don't use lua scripts, but you're right. The motiondetection blockly is not correct. This should be the correct one, where the AlarmDetect is triggered and reset.
- Attachments
-
- MotionDetection.JPG (76.96 KiB) Viewed 6879 times
-
- Posts: 48
- Joined: Friday 31 January 2014 14:32
- Target OS: Windows
- Domoticz version:
- Location: Norway
- Contact:
Re: Alarm system 'wiki'
I'm getting the same. (removed the "commented out" lines on two lua scripts to see if that was the problem)Machielw wrote:Need some help
I am using this script
the line: device = next(devicechanged)
leads to this in the log:
2016-03-13 16:54:00.508 Error: EventSystem: in test alarm: [string "--[[ ..."] bad argument #1 to 'next' (table expected, got nil)
It appears every minute.
The script is working fine for now.
can sombody tell me what is wrong?
Any hints?
2016-08-18 00:21:55.617 Alarm aktivert!
2016-08-18 00:21:55.617 EventSystem: Event triggered: Alarm - Aktivert_1
2016-08-18 00:21:55.620 Error: EventSystem: in Bevegelse-alarm: [string "-- Title: script_device_PIRAlarm.lua ..."]:9: bad argument #1 to 'next' (table expected, got nil)
2016-08-18 00:21:55.623 Error: EventSystem: in (LUA) Skall-alarm: [string "commandArray = {} ..."]:3: bad argument #1 to 'next' (table expected, got nil)
2016-08-18 00:21:55.627 Error: EventSystem: in (LUA) Bevegelse-alarm: [string "commandArray = {} ..."]:3: bad argument #1 to 'next' (table expected, got nil)
2016-08-18 00:21:55.627 (Domoticz Internal) Security (Alarm)
- heggink
- Posts: 972
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: Alarm system 'wiki'
Not sure. Can you post the entire script please? devicechanged should be an internal array and it's not recognised.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
-
- Posts: 48
- Joined: Friday 31 January 2014 14:32
- Target OS: Windows
- Domoticz version:
- Location: Norway
- Contact:
Re: Alarm system 'wiki'
Sure. Here they areheggink wrote:Not sure. Can you post the entire script please? devicechanged should be an internal array and it's not recognised.
- Spoiler: show
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Alarm system 'wiki'
You probably still have "All" selected under LUA in stead of "Device".It appears every minute.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 48
- Joined: Friday 31 January 2014 14:32
- Target OS: Windows
- Domoticz version:
- Location: Norway
- Contact:
Re: Alarm system 'wiki'
I assumed that selection was a sorting feature. Changed mine to "device" and i don't get any errors anymore, but the LUA does'nt activate the uservariable though. My sensors are named "PIR_name" and "MSC_name".jvdz wrote:You probably still have "All" selected under LUA in stead of "Device".It appears every minute.
Jos
The "AlarmActive" variable changes as it is supposed to.
- jvdz
- Posts: 2189
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Alarm system 'wiki'
So you mean that no events are triggered when a UserVariable is changed in LUA? If so, that is working as designed as far as I understand and is documented in the Events Wiki page.PABben wrote:I Changed mine to "device" and i don't get any errors anymore, but the LUA does'nt activate the uservariable though. My sensors are named "PIR_name" and "MSC_name".
The "AlarmActive" variable changes as it is supposed to.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- heggink
- Posts: 972
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: Alarm system 'wiki'
Hi Jos,
Correct. After I created the wiki, domoticz behaviour changed such that changes in variables no longer trigger events. Since then I have not had the time to change the wiki.
Easiest is to replace variables with dummy devices and check those. That should be a simple change. At some point I will update the wiki.
H
Correct. After I created the wiki, domoticz behaviour changed such that changes in variables no longer trigger events. Since then I have not had the time to change the wiki.
Easiest is to replace variables with dummy devices and check those. That should be a simple change. At some point I will update the wiki.
H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Re: Alarm system 'wiki'
@Heggink Have you ever been able to arm/disarm the panel via the controller (without touching the pad)?
I think this is a quit crucial ability as my current alarm all works via presence of phones and is very solid. The Panel is an overide for me (eg when the cleaning lady comes) or the phone is broken. But I want to keep them in sync with each other (eg. set the panel in away mode automatically when all are away)
I think this is a quit crucial ability as my current alarm all works via presence of phones and is very solid. The Panel is an overide for me (eg when the cleaning lady comes) or the phone is broken. But I want to keep them in sync with each other (eg. set the panel in away mode automatically when all are away)
- heggink
- Posts: 972
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: Alarm system 'wiki'
I have taken a different approach. Created a main (dummy) switch that switches the alarm on/off (called it TAO) . Everything goes through this switch so I don't use the domoticz alarm panel to switch on/off. This way, it does not matter what state the keypad is in and I can use any mechanism to easily switch on/off through any means (blocky, script, lua). It's no security risk for me since my router does not do any port forwarding, dnz or pnp (I VPN into my home with openvpn).
Verstuurd vanaf mijn HUAWEI NXT-L29 met Tapatalk
Verstuurd vanaf mijn HUAWEI NXT-L29 met Tapatalk
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Re: Alarm system 'wiki'
I was thinking about the same but can't figure out what do do when the alarm mode get's out of sync with the panel as I only want to use the panel when there are individuals that are not part of my general home/away atomation. Example:
- All phones away for x time and no motion for x time>> Assuming all away >> House mode away, alarm mode away (nobody touches the panel and I as I know people will forget and it's an extra thing to do, I don't want people to touch the panel)
- Cleaning lady comes >>> uses Zipato pad with correct RFID >> House mode still Away, Alarm mode off
- Cleaning lady goes away and forget's to use the tag/set away mode in panel
- Now I'm out of sync.
From an automation perspective I could still put the alarm mode on again (no motion, no doors for x , still no phones > set away & alarm mode on again) but the panel still has 'disarm'.
- Then cleaning lady comes again after a few days, house mode is Away and alarm is also in away mode. She enters but a using her correct RFID tag will have no effect as the Panel is still in disarm mode (so no state change). With alarm still in away, alarm will sound...[/list]
If it was just the cleaning lady I could probably handle but there are several other guests like the ironing lady, mother in law etc.
How did you solve this dilemma?
- All phones away for x time and no motion for x time>> Assuming all away >> House mode away, alarm mode away (nobody touches the panel and I as I know people will forget and it's an extra thing to do, I don't want people to touch the panel)
- Cleaning lady comes >>> uses Zipato pad with correct RFID >> House mode still Away, Alarm mode off
- Cleaning lady goes away and forget's to use the tag/set away mode in panel
- Now I'm out of sync.
From an automation perspective I could still put the alarm mode on again (no motion, no doors for x , still no phones > set away & alarm mode on again) but the panel still has 'disarm'.
- Then cleaning lady comes again after a few days, house mode is Away and alarm is also in away mode. She enters but a using her correct RFID tag will have no effect as the Panel is still in disarm mode (so no state change). With alarm still in away, alarm will sound...[/list]
If it was just the cleaning lady I could probably handle but there are several other guests like the ironing lady, mother in law etc.
How did you solve this dilemma?
Who is online
Users browsing this forum: No registered users and 1 guest