Please login or register.

Login with username, password and session length
Advanced search  

News:

The Buster PiX10Hub is here! Created by the Community, for the Community.:)% #:)

Pages: 1 [2]

Author Topic: Program code to arm/disarm HG security control?  (Read 827 times)

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1513
Re: Program code to arm/disarm HG security control?
« Reply #15 on: January 13, 2020, 07:50:47 PM »

Not really. The Custom API command option covers everything for automation and saves having to navigate all those options. Itís actually easier to test the API command on a the browser bar first before trying it in the Wizard. You have all the info you need on the API commands in the HG documentation. The next step would be to create your own C# scripts and incorporate all the logic in one place.

Iím assuming my solution resolved your problem. Youíre over thinking everything. Keep it all simple. Write down what you want to achieve before attempting to create a solution. Youíll save yourself hours of frustration.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 271
  • Posts: 10064
  • I don't work for X10, I use it successfuly!
    • Tuicemen Forum
Re: Program code to arm/disarm HG security control?
« Reply #16 on: January 14, 2020, 07:04:07 AM »

I actually find my self going back to the documentation more and more lately. My memory isn't  what it was think I have a leak  rofl
Thats one reason why I post & share some of my creations.
Glad to see you got everything worked out mike.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 959
Re: Program code to arm/disarm HG security control?
« Reply #17 on: January 14, 2020, 10:16:32 AM »

Yes, I too am clicking on the program help more too  :)

I looked at the api info but couldnot find anything on Control.Disarm or armhome armaway commands so went my other way.    Petera, your suggestion to pick program security came too late;  I already solved it by modifying the other programs to do what I needed.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 959
Re: Program code to arm/disarm HG security control?
« Reply #18 on: January 22, 2020, 11:06:20 AM »

I have a new problem with this program...   It works fine MANUALLY but the ARM program stopped triggering - I think when I added the the 3 time lines...

The DISARM program still works fine and triggers at the appropriate 06:21 time.
But the ARM one refuses to run at its appointed 20:40 time... 

So I manually send ARM command at 20:45 or so, then the DISARM shuts it off again in the morning

Anyone see the error of my ways?
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 20
  • Posts: 1513
Re: Program code to arm/disarm HG security control?
« Reply #19 on: January 22, 2020, 01:55:30 PM »

Maybe just post some pseudo code of what you are trying to do so the bigger picture can be seen.

Keep the logic as simple as possible and maybe just call a program to run when the logic is met.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 959
Re: Program code to arm/disarm HG security control?
« Reply #20 on: January 24, 2020, 11:43:49 AM »

I don't believe we need a bigger picture here;  issue is trigger code on program does not operate as I expected.  I might be wrong in my expections.

So Since it used to work by Scheduler.Time in old program I deleted (without the rawdata or sensor.key triggers - which worked in their own program) I decided to try moving the Scheduler.Time lines to the TOP of the trigger list.

That solved it.  They now fire as expected at the alloted time.   

So just some quirk in the HG code for trigger code I assume.  No problem, I believe I got around it.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 271
  • Posts: 10064
  • I don't work for X10, I use it successfuly!
    • Tuicemen Forum
Re: Program code to arm/disarm HG security control?
« Reply #21 on: January 24, 2020, 12:00:12 PM »

If your using the sensor key value from a Keyflob I'd (for security ) remove that from your macro.
HG a flaw in that all x10 key flobs send the key value signal  thus any security flob (even a strangers) will be seen by HG and turn on off your system. Not all key flobs send the same RF code though making that route more secure.
 >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

Find extra info @ My forum

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 959
Re: Program code to arm/disarm HG security control?
« Reply #22 on: January 24, 2020, 12:05:50 PM »

Thanks for the reminder.  I knew that from your past research.  I even think about it whenever I see that trigger, but never hit me to delete it!  dah!  Thanks.
Logged
Pages: 1 [2]
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.