Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

[SCENE] Universal alarm {v1.0}


Sankotronic

Question

Universal alarm v1.0

 

Please login or register to see this image.

/monthly_2017_01/58834681666f4_Universalalarmgui.jpg.874b18ee8bdfbeb0b6c7baaf96837dc6.jpg" alt="Universal alarm gui.jpg" />

 

Hello everyone!

 

Here is one simple scene that can be used for FIRE, FLOOD or OTHER ALARM purpose. When triggered by sensor it will send you popup, push and e-mail notification. It can also activate additional alarm sounders. You can also add additional actions to turn On lights, lower blinds or whatever action you like to happen when alarm is breached and also when sensor get back to safe state.

 

There is no global variables needed! If you use HomeTable then you can just uncomment line where this table is read to the scene.

 

SCENE SETUP

First you need to decide for what you will use this scene. You can use it for FIRE ALARM or for FLOOD ALARM or for any other purpose that you can think off. Just for setup example I will show here how to set it up for FIRE alarm. Same setup can be done for FLOOD alarm.

 

First you need to add all your smoke detectors to scene header so that it is triggered when any of this sensors detects fire and get breached:

Please login or register to see this code.

Then you can setup devices to which you want this scene to send push notifications. As already mentioned in my other threads, to find ID of your mobile devices you can enter this link in your browser:

 

http://<YOUR_HC_IP>/docs/#!/iosDevices/getIosDevices

 

and then press on button TRY IT! You will get ID numbers of all mobile devices that you can enter here:

Please login or register to see this code.

 

Then you can setup messages text, translate it to your language:

Please login or register to see this code.

Here you can setup users that will receive e-mail message. Same as for mobile devices, you can find users ID by entering following link in your browser:

 

http://<YOUR_PC_IP/docs/#!/users/getUserss

 

and then press button TRY IT!. You will get ID numbers of all users that you can enter here:

Please login or register to see this code.

In above settings you can also setup first part of the e-mail message. Scene will on that part add room and name of the sensor that is breached!

 

If you want to activate additional sounders because fire and flood sensor sounder is not enough then you can setup here additional sounders to be activated when alarm is activated:

Please login or register to see this code.

And for the end, if this is not enough for you and you want more action to be executed when alarm is breached, like close water valves, close blinds or turn on some lighting then you can add that code yourself. There are three functions where you can add code:

Please login or register to see this code.

If you want some action before notifications are send and sounders activated then you add code to function extraUserCodeBreachFirst(). If you want some action to be executed after notifications are sent and sounders activated then you add code to function extraUserCodeBreachLast(). When sensor goes back to safe state scene is activated again. It will not send any messages but will stop sounders and if you want some more action then you can add code to function extraUserCodeSafe().

 

So, one copy of this scene you can setup for FIRE ALARM. Another copy you can setup for FLOOD ALARM, and if you have something else then you can setup third copy for that OTHER ALARM.

 

NOTE!

This scene is tested on my HC2 with software 4.110 by breaching FIRE & FLOOD sensors and found to work flawlessly. If you encounter any problems then please first check your settings and look for typos. If you are still unable to make it work then please send me copy of complete scene code and screenshot of debugging window to my private message and I will help you to make it work!

Please, I will appreciate very much any feedback and requests for additional features!! Example of debug window when scene is activated:

 

Please login or register to see this attachment.

 

ICONS DOWNLOAD

Icons for this scene you can find here:

SCENE DOWNLOAD FILE

 

Please click bellow to download:

[SCENE] Universal alarm scene {v1.0} as TXT file -------------------->  

Please login or register to see this attachment.

[SCENE] Universal alarm scene {v1.0} as LUA file --------------------> 

Please login or register to see this attachment.

 

NOTE

LUA version of scene code is saved by ZeroBrane Studio v1.50. You can download it at this link: 

Please login or register to see this link.

 

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

Thanks @Sankotronic, will try them.

 

I'm waiting for my first Sonos speaker to be delivered, I'm going to try to get that to act as the sounder (after I get it to work on the HC2). I think I must add the code to this part of the code: 

Please login or register to see this code.

And after that I'll try to edit the scene to also work as a CO2 alarm for my Netatmo's.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hello @jimicr,

     

    yes you are right, you can add code to sound alarm on Sonos either to function extraUserCodeBreachFirst() or extraUserCodeBreachLast(). To stop alarm sound add code to function extraUserCodeSafe().

     

    I use this code for FIRE and FLOOD alarms. To use it with CO2 sensor from Netatmo weather station it will require a little change in code to work properly. This is because smoke and flood sensors give value 1 when breached, but to check CO2 sensor you need to check measured value with some level value at which you want alarm to be triggered.

    Link to comment
    Share on other sites

    • 0
    9 minutes ago, Sankotronic said:

    Hello @jimicr,

     

    yes you are right, you can add code to sound alarm on Sonos either to function extraUserCodeBreachFirst() or extraUserCodeBreachLast(). To stop alarm sound add code to function extraUserCodeSafe().

     

    I use this code for FIRE and FLOOD alarms. To use it with CO2 sensor from Netatmo weather station it will require a little change in code to work properly. This is because smoke and flood sensors give value 1 when breached, but to check CO2 sensor you need to check measured value with some level value at which you want alarm to be triggered.

    I was thinking to do it this way:

    Have your main scene for time based events run a scene let say every 10 minutes that puts the value of my 3 CO2 sensors in a global. Then use this global to run this (or another) scene .  that triggers the alarm scene.

     

    Please login or register to see this code.

    Something like this ":)

    Edited by jimicr
    Link to comment
    Share on other sites

    • 0

    P.s. a small tip from me to any one who wants to use this:

     

    To test this scene, add a door or window sensor in the header. Open the door or window and see if the actions you want to happen really happen. 

    Don't forget to remove the door/ window sensor after your done testing ;)

     

    Jim

    Link to comment
    Share on other sites

    • 0

    HI 

    Has anyone down a rule to turn the alarm on via remote control - for example using a remote control to say a Z wave binary sensor that turns the alarm on to arm away etc 

    to save going into app when you leave the house ?

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 02/02/2017 at 8:58 PM, jimicr said:

    P.s. a small tip from me to any one who wants to use this:

     

    To test this scene, add a door or window sensor in the header. Open the door or window and see if the actions you want to happen really happen. 

    Don't forget to remove the door/ window sensor after your done testing ;)

     

    Jim

     

    @jimicr,

     

    Well for fire alarm I tested it with fire sensors. You just need to press button on fire sensor and keep it pressed until led glows white then release button and briefly press it again. Sensor will then test itself and also send breached status to controller and that will trigger scene.

     

    For flood alarm is even easier, you just put flood sensor on wet rag and it will send breached status to controller triggering scene.

    For this safety alarms it is always better to test with related sensors than with something else. 

    Link to comment
    Share on other sites

    • 0

    I do my initial test with a door sensor. To keep it quite. I test my sensors every month 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 5 hours ago, Vic said:

    HI 

    Has anyone down a rule to turn the alarm on via remote control - for example using a remote control to say a Z wave binary sensor that turns the alarm on to arm away etc 

    to save going into app when you leave the house ?

     

     

    Hi @Vic and welcome to Fibaro forum.

     

    This universal alarm scene is meant to be used for fire and flood alarms or any similar alarm but not for burglar alarm. There is no panel that covers fire and flood alarms on HC so it has to be done with scenes and VD's. Burglar alarm on the other hand has alarm panel but it is not scope of this thread. I hope I will post more about burglar alarm in future.

    Link to comment
    Share on other sites

    • 0
    Guest fat
    11 hours ago, Sankotronic said:

     

    Hi @Vic and welcome to Fibaro forum.

     

    This universal alarm scene is meant to be used for fire and flood alarms or any similar alarm but not for burglar alarm. There is no panel that covers fire and flood alarms on HC so it has to be done with scenes and VD's. Burglar alarm on the other hand has alarm panel but it is not scope of this thread. I hope I will post more about burglar alarm in future.

    I would love to see a decent burglar alarm with these notifications and triggering of sirens

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 12 hours ago, fat said:

    I would love to see a decent burglar alarm with these notifications and triggering of sirens

     

    @fat,

     

    solution for burglar alarm I will also post when I finish with testing. It is safety matter so it is important and it has to work properly so extensive testing is required.

    Link to comment
    Share on other sites

    • 0
    Guest fat

    No rush. I am just happy that you will have a solution that will make things easy. Thanks!

    Link to comment
    Share on other sites

    • 0

    Good afternoon @Sankotronic,

     

    I'm home sick with the man flu, and every now and then I get some energy to start working on this project and set it up as FIRE alarm.

    Was just wondering how you set this up in Very smart light scene? I am thinking of setting this up as the by me not used "projectorState" and set everything to 100% for an hour or so.

     

    P.s. Still waiting on the admins to approve my CO2 alarm vd and scene since last sunday...

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 1 hour ago, jimicr said:

    Good afternoon @Sankotronic,

     

    I'm home sick with the man flu, and every now and then I get some energy to start working on this project and set it up as FIRE alarm.

    Was just wondering how you set this up in Very smart light scene? I am thinking of setting this up as the by me not used "projectorState" and set everything to 100% for an hour or so.

     

    P.s. Still waiting on the admins to approve my CO2 alarm vd and scene since last sunday...

    Hi @jimicr,

     

    I don't quite understand you what you want to achieve with VSL scene regarding to this alarm scene? If you want to turn on lights in the room where alarm is triggered then you can do that by using global variable eg. named "FireAlarmTrigger" that is added to VSL scene header and to section MOTION DETECTED WITH GLOBAL VARIABLE like this:

    Please login or register to see this code.

    Please login or register to see this code.

    Then you add this code in Universal alarm scene when alarm is triggered:

    Please login or register to see this code.

    and this code when sensor is back to safe state:

    Please login or register to see this code.

    So, now when fire alarm sensor is breached and Universal alarm scene is run, it will change value of global variable FireAlarmTrigger to 1 and that will trigger VSL scene to turn on lights in the room. Lights will remain on until sensor change state back to safe when Universal alarm scene will be triggered again and set global variable FireAlarmTrigger to 0. VSL scene will then still keep lights on until set duration if there is no motion detected and turn lights off. Brightness of the lights will be set according to the current situation but in next release I can change code so that brightness is set to 100% if triggered by alarm.

     

     

    Link to comment
    Share on other sites

    • 0
    1 minute ago, Sankotronic said:

    Hi @jimicr,

     

    I don't quite understand you what you want to achieve with VSL scene regarding to this alarm scene? If you want to turn on lights in the room where alarm is triggered then you can do that by using global variable eg. named "FireAlarmTrigger" that is added to VSL scene header and to section MOTION DETECTED WITH GLOBAL VARIABLE like this:

    Please login or register to see this code.

    Please login or register to see this code.

    Then you add this code in Universal alarm scene when alarm is triggered:

    Please login or register to see this code.

    and this code when sensor is back to safe state:

    Please login or register to see this code.

    So, now when fire alarm sensor is breached and Universal alarm scene is run, it will change value of global variable FireAlarmTrigger to 1 and that will trigger VSL scene to turn on lights in the room. Lights will remain on until sensor change state back to safe when Universal alarm scene will be triggered again and set global variable FireAlarmTrigger to 0. VSL scene will then still keep lights on until set duration if there is no motion detected and turn lights off. Brightness of the lights will be set according to the current situation but in next release I can change code so that brightness is set to 100% if triggered by alarm.

     

     

    That is exactly what I want to achieve, I use VSL for all rooms and in case of a fire I want them as bright as possible.

    When we're awake the first seconds of the fire we still can see something.

    The alarm scene will turn off everything that is not a light :) 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 3 hours ago, fat said:

    @Sankotronic do you have any updates on the burglar alarm with siren activation/deactivation etc?

     

    Hi @fat,

     

    No updates on burglar alarm, sorry. At this moment I'm busy with creating Pool State VD to control my swimming pool. I'm forced to do that now because old automation failed and I replace it with new one that requires our HC2 to take over control. I will try to keep you inform with regular posts here:

     

    Link to comment
    Share on other sites

    • 0

    @Sankotronic, I have question. Is it difficult to include a tamper function for both the water- and smoke sensor? For instance if somebody is moving the watersensor you will get notified.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...