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
Question
Sankotronic 2,246
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.
29 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.