Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Remote Control Macro Enable? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 15 2008 at 16:16 | IP Logged Quote GadgetGuy

Now that I have SMS Messaging set up to work (triggered
by motion detected on a video camera that fires a PH
macro) is there a way I can remotely turn notification
ON/OFF?

It appears that email remote control is possible but
that is not a Push approach but must be recognized thru
timed event polling.

It seems that it would be better to use the Web
interface on PH to do this, as it would be real-time
control, just as I can now turn on/off my home lighting
that way.

The easiest way I can think of is to make two macros. .
.one to turn on messaging, the other to disable it. I
could fire these as needed via accessing the web
interface (which is simple with my iPhone).

I currently have a simple macro triggered by camera
motion, but am a bit fuzzy on how to implement an
enablement sequence.

Any thoughts or ideas would be greatly appreciated.



__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 15 2008 at 19:56 | IP Logged Quote TonyNo

You can create a Global Variable (GV), put it in the Boolean field of the trigger, and change the GV with a URL saved in your Favorites, like this...

Clear:
http://yourserver/ph-cgi/eval?formula=ph_setglobal_a("TEST FLAG",0)

Set:
http://yourserver/ph-cgi/eval?formula=ph_setglobal_a("TEST FLAG",1)
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 15 2008 at 22:12 | IP Logged Quote GadgetGuy

Thanks Tony -

I played around before seeing your message and came up
with a somewhat similar solution. This was my first
serious foray into the bowel's of PH, so it was s good
learning experience.

I created a Global Variable and then created several
macros to turn it on and off.

Then added a SMS tab to my Control Center page of
lighting with buttons to set the Global Var ON or OFF.
I can also just execute the on/off macros in the Macro
run field on the Control web page.

I set the GV to the Off state upon PH initialization so
it's state is always known.

I was going to use the Boolean field in the Trigger line
but I already have a value in that field as a safety
check against false camera triggering and could not
figure out a way to AND two expressions together. There
does not seem to be a ph_AND function that I could find
that will handle two expressions that must both evaluate
to True.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 15 2008 at 22:41 | IP Logged Quote grif091

You can use "and" and "or" in an if statement

if((ph_relativetime(now(),0)>=time("22:00:00") and ph_relativetime(now(),0)<=time("23:59:59")) or ph_relativetime(now(),0)< ph_relativetime(time("00"),long(ph_getsystemvar("SUNRISE"))) ,1,0)

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 15 2008 at 23:05 | IP Logged Quote TonyNo

Just so you know, GV's are persistent.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 16 2008 at 08:25 | IP Logged Quote GadgetGuy

Tony - By "persistent" I assume you mean GV's are saved
around program starts both in name and value? (which is
what I want.a)

I reboot the computer every night at 3AM to restart
everything as I have had times when an Application hung
up when we were away for an extended time and I was
locked out. With the reboot I have not had any
subsequent problems.

That said though, I have had an issue with PH and
device comm failures with power line disturbances (PH is
on an UPS the devices are not), thus triggering the
"Failed" threshold and disabling the device. To get
around it I set the PLM Controller's "Maximum Failures"
count to 100, but that is way too high for good
practice.

I'd like to set that back to the normal 10, but need a
way to reset the Failure counts with my 3AM restart
process. That way I'll never be locked out for more
than a day.

I can't find a PH Function to reset the Failure counter.
Is there one, and what is its protocol?

Thanks

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 16 2008 at 08:39 | IP Logged Quote grif091

Look at ph_insteonclearfailed(""). This was posted as clearing that column when there was an earlier problem which 2.1a fixed.

__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: December 16 2008 at 08:49 | IP Logged Quote BeachBum

Lee, is that the same area that when Max Counts is exceeded is checked? If so that may help answer some of the questions in this thread.
http://www.myx10.com/forum/forum_posts.asp?TID=1994&PN=1


Edited by BeachBum - December 16 2008 at 09:14


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 16 2008 at 09:05 | IP Logged Quote GadgetGuy

Lee - Perfect

That did exactly what I wanted!

I was looking for a "ph_clear..."function and it never
dawned on me to look for a "ph_insteonclear..."

I will be much more savvy now!

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: December 16 2008 at 09:12 | IP Logged Quote grif091

Pete, The ph_insteonclearfailed("") was originally posted by "Viper" as a work around for the repeated Group Cleanup Direct commands that were being ACKed but counted as failures in 2.1 (fixed by 2.1a). That is the column that gets shaded in Red when the Max Failures count is exceeded, then Checked to clear. Don't know if a device is marked Red when PH cannot communicate with the PLM because it has lost power. If so then the function could be used to clear up the debris from a power outage.

Edited by grif091 - December 16 2008 at 09:13


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: December 16 2008 at 09:34 | IP Logged Quote GadgetGuy

Pete -

I posted what I did in the above noted forum thread, as
it seemed relevant and might help others.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum