| Author | 
         | 
         
      
        
         
         traviskleckner Senior Member 
          
  
  Joined: February 26 2007 Location: United States
 Online Status: Offline Posts: 118
          | 
        
         
          
           | Posted: March 06 2013 at 13:00 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
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 | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: March 06 2013 at 13:34 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
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 | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         traviskleckner Senior Member 
          
  
  Joined: February 26 2007 Location: United States
 Online Status: Offline Posts: 118
          | 
        
         
          
           | Posted: March 06 2013 at 13:47 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
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 | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: March 06 2013 at 15:00 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
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 | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: March 06 2013 at 21:55 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
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 | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         traviskleckner Senior Member 
          
  
  Joined: February 26 2007 Location: United States
 Online Status: Offline Posts: 118
          | 
        
         
          
           | Posted: March 07 2013 at 05:48 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Pete, Dave, Thanks!
 
 This forum is awesome.
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |