X10 Community Forum

📱🖥️PiX10Hub => 💬General Discussion => 📝User created HG Scripts (programs/macros/widgets) => Topic started by: Tuicemen on February 19, 2019, 07:49:26 AM

Title: 🛡Auto Arm HG Security on HG service restart
Post by: Tuicemen on February 19, 2019, 07:49:26 AM
Prior to the latest build HG Security service would disarm on a service restart. This was problematic as I had several scripts(programs) watching the security modules status at my off grid place.
I also was doing a nightly reboot with my 3B+ though right now the reasons for that elude me (I was new to HG when I set things up there)
With HG version 37 the security system now retains its status on a system restart  just like the other modules always have. However I still have the script in place as a fail safe.

I've updated the script with some added things which aren't in my script but others may wish to see.
1: The script watches a Flag's (virtual module) condition and if on it runs. ( Note: Program Fun with Flags (https://forums.x10.com/index.php?topic=31477.0) required)
2: It turns off a security light
3: It sends a email if the script runs
4: It rearms the HG security system.

To use down load and rename to 1012-Auto_Arm_at_Start.hgx
Then in HG config/programs/security import the file and activate.
Be sure to edit the script trigger to specify the email address you wish the notification to go to and change the modules addresses or any thing else you wish.
This is a C#  sample script
Title: Re:🛡 Auto Arm HG Security on HG service restart
Post by: Tuicemen on March 13, 2019, 08:46:45 AM
I'm working on another version of this that adds a option input screen so newbies don't have to edit the code unless they wish to.
Any suggestions are welcome as I'll look at any put forth.