Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Status of a Group Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
kev21986
Senior Member
Senior Member
Avatar

Joined: April 04 2007
Location: United States
Online Status: Offline
Posts: 199
Posted: February 03 2010 at 15:35 | IP Logged Quote kev21986

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 View kev21986's Profile Search for other posts by kev21986 Visit kev21986's Homepage
 
syonker
Senior Member
Senior Member
Avatar

Joined: March 06 2009
Location: United States
Online Status: Offline
Posts: 212
Posted: February 08 2012 at 12:59 | IP Logged Quote syonker

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 View syonker's Profile Search for other posts by syonker Visit syonker's Homepage
 
grif091
Super User
Super User


Joined: March 26 2008
Location: United States
Online Status: Offline
Posts: 1357
Posted: February 08 2012 at 19:51 | IP Logged Quote grif091

Kevin

What are you looking at to conclude PH is tracking Scene status?


__________________
Lee G
Back to Top View grif091's Profile Search for other posts by grif091
 
kev21986
Senior Member
Senior Member
Avatar

Joined: April 04 2007
Location: United States
Online Status: Offline
Posts: 199
Posted: February 09 2012 at 07:21 | IP Logged Quote kev21986

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 View kev21986's Profile Search for other posts by kev21986 Visit kev21986's Homepage
 

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