Author |
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: February 03 2010 at 15:35 | IP Logged
|
|
|
How can I get the status of a group? I know that I can use ph_getinsteonlevel and ph_getinsteonstat for devices but it appears that PowerHome tracks the status of a group as well. Is there a function to get that information?
__________________ Kevin Smith
@respectTheCode
|
Back to Top |
|
|
syonker Senior Member
Joined: March 06 2009 Location: United States
Online Status: Offline Posts: 212
|
Posted: February 08 2012 at 12:59 | IP Logged
|
|
|
Yeah, I'm looking for a way to do this as well...if there was some bitwise and/or that could be applied at the controller level to the devices linked into the group to figure out status, that would be nothing short of AWESOME!
-S
__________________ "I will consider myself having succeeded when my house becomes sentient and attempts to kill me."
><(((º>`·.¸¸.·´¯`·.¸><(((º>¸.
·´¯`·.¸. , . ><(((º>`·.¸¸.·´¯`·.¸><(((º>
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: February 08 2012 at 19:51 | IP Logged
|
|
|
Kevin
What are you looking at to conclude PH is tracking Scene status?
__________________ Lee G
|
Back to Top |
|
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: February 09 2012 at 07:21 | IP Logged
|
|
|
From the web interface you can see a list of devices and groups. I had forgotten I had posted this question.
The answer is that you can find it in the database with a query like
Code:
select id, status, lastchange from insteongroups |
|
|
that will return
Code:
[{"id":"DINING","status":"1","lastchange":"2010-07-21 05:16:39.781000"},{"id":"HALL","status":"1","lastchange":"20 11-10-02 00:31:04.541000"},
{"id":"FR_LAMP","status":"2","lastchange":"2012-02-04 21:22:15"},{"id":"FR_LIGHT","status":"1","lastchange":"2011- 10-05 08:48:42.927000"},
{"id":"FR_FAN","status":"1","lastchange":"2012-02-06 21:10:30.785000"}]
|
|
|
Your results won't be json encoded unless you are using ctrlHome but the status property is 1 for off and 2 for on.
You can play with the query in the web interface or on http://ctrlhome.herokuapp.com/formula
Edited by kev21986 - February 09 2012 at 07:26
__________________ Kevin Smith
@respectTheCode
|
Back to Top |
|
|