Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Exporting a list of devices? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: March 06 2013 at 13:00 | IP Logged Quote traviskleckner

Is it possible to export a list of devices in PowerHome?
Excel, CSV, just to the clipboard, doesn't really matter
how.

I'm working on updating all my web pages and think that if
I could get a list of all my devices and their location I
could use that information to generate 95% of my pages, and
from there I would just need to tweak them.
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: March 06 2013 at 13:34 | IP Logged Quote BeachBum

I use the ph_sql formula but you have to know a little about sql and the layout of PH. I find playing with it you can extract quite a bit of info. Example:

ph_sql(0,"select '(''' || id.id || ''' )' from insteondevices id,insteontypes it where id.typeid = it.typeid and id.activeflag = 1 and it.devcat in (1,2)")

OR:

ph_sql(1,"Select distinct id from insteondevices where typeid<>1 and typeid<>18 and typeid<>30 and typeid<>44 order by id")


__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: March 06 2013 at 13:47 | IP Logged Quote traviskleckner

That's very helpful (I'm plenty fluent in SQL to get what I
need from that).

So from the Multi Editor you can run that directly and get
a nicely formatted report, but is there any way to get that
out of PH?

I can directly run the above code in the formula editor,
but then what I get out is a mess (which I can still work
with if needed.)

Is there a better way?
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: March 06 2013 at 15:00 | IP Logged Quote BeachBum

Those formulas came from one of my macros. From there you can edit the results and use ph_writefile to send them on their way.

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 06 2013 at 21:55 | IP Logged Quote dhoward

Travis,

Once you've executed a SQL in the multi-editor (in SQL mode) and you've got the nicely formatted report displayed...with the report the current window, go to menu File->Export and you'll have multiple options for saving the data.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: March 07 2013 at 05:48 | IP Logged Quote traviskleckner

Pete, Dave, Thanks!

This forum is awesome.
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 

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