Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Mobile
 PowerHome Messageboard : PowerHome Mobile
Subject Topic: iPhone with PH integration... Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ficklma1
Groupie
Groupie


Joined: December 08 2007
Location: United States
Online Status: Offline
Posts: 59
Posted: January 07 2008 at 16:57 | IP Logged Quote ficklma1

Just read a blurb about Promixis
http://www.promixis.com/forums/showthread.php?t=17822
has developed an interface for the iPhone with Girder 5.0

Also another company Lagotek has something very similar
http://www.ubergizmo.com/15/archives/2008/01/iphonecontrolle d_home_automation_with_lagotek.html

Is there any development or the possibility of someone interfacing to PH with a iPhone app (AJAX, etc.)?

I'd would love too, but currently do not have an iPhone or iPod touch, I think this would be a great app to develop.
Back to Top View ficklma1's Profile Search for other posts by ficklma1
 
TonyNo
Moderator Group
Moderator Group
Avatar

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

If you can launch a browser, it can be done now.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
jaysonc
Newbie
Newbie


Joined: October 21 2007
Location: United States
Online Status: Offline
Posts: 26
Posted: January 08 2008 at 01:23 | IP Logged Quote jaysonc

Yep browser is the way. I started a set of custom, iPhone web pages to
monitor my PH system this past weekend.

One evening and I already have a draft format and basic status of PH, my
ELK and my 1-wire devices. Easy as pie. User interface approvals from the
wife are taking more time than coding the web app.

The only challenge I ran into was the PH web development
documentation. It is...well...sparse. Search the forums and you should
find everything you need.

I would like to make use of a more interactive web interface, but I am not
sure of the full capabilities of the integrated web server in PH. Maybe
after the first version I can look into integrating an external web server
and using something like ruby on rails. At this point though I have no
idea if this will even be feasible.

__________________
--
Jayson
Back to Top View jaysonc's Profile Search for other posts by jaysonc
 
ficklma1
Groupie
Groupie


Joined: December 08 2007
Location: United States
Online Status: Offline
Posts: 59
Posted: January 08 2008 at 08:59 | IP Logged Quote ficklma1

Good ideas. It might be possible to write a widget on the iPhone and send and recieve information using the socket server, don't know.
Back to Top View ficklma1's Profile Search for other posts by ficklma1
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 15 2008 at 16:03 | IP Logged Quote dhoward

Socket Server should definately be doable or even integrating with another, more full-featured webserver.

The PowerHome webserver itself is capable of serving standard HTML pages, graphic images, and text files. It also has it's own set of built-in web pages accessible through the ph-cgi functions. The last type of page it can serve is a PSP type of page which is typically a standard HTML file with PowerHome formulas sprinkled in. However, since the formulas can get beastly sometimes, Ive even written entire webpages in VBScript (more familiar for ASP programmers) and just had a PSP page that consisted of:

<%ph_rtne(ph_runscript_0("test.vbs","vbscript",0,0,"main" )) + ph_getvar_s(1,1)%>

and nothing else. What this basically does is call a VBScript file in the webserver directory named "test.vbs" and executes the main subroutine called "main". This VBS file builds an HTML output string and saves it to [LOCAL1]. After the script terminates, the complete HTML page will be in [LOCAL1] which is then displayed by the ph_getvar_s function.

For even more added flexibility, you could run IIS, on a different port of course, in conjunction with the PowerHome webserver and can embed calls to the PowerHome webserver ph-cgi functions or even PSP pages for PowerHome specific control.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
niels
Newbie
Newbie


Joined: September 23 2007
Location: United States
Online Status: Offline
Posts: 12
Posted: January 31 2008 at 20:56 | IP Logged Quote niels

I've been using the iPod touch, the browser of which is functionally identical to the iPhone. In case it helps someone, here's the approach I took:

- In addition to the PowerHome web server, I run a secondary server on the machine that is the ONLY server that directly communicates to clients over HTTPS.
- The PowerHome server only listens to requests coming from the apache server hosted scripts on the local machine
- The secondary server (I use Apache) takes all requests and services them. It basically uses Scriptalicious/Prototype stuff to implement an AJAX app that is run on the iPod touch (And for that amtter any other client)
- Commands and requests are sent to the Apache server, which has a small (PHP) application running that 'translates' requests and sends them to powerhome and converts powerhome answers into JSON to send back to the app. It's also responsible for caching, security, logging etc.

I have gotten this to show a rudimentary interface which will show for switches whether they are on or off (different background color) and which, when a switch is tapped will issue the right command and show the new status, will show dim levels, and allow you to change them.

When multiple devices (iPod touch, Windows PC with a browser or my Nokia N95) have the same page up, changing a light on one device will in near real-time update the status on all others... Oh and of course, when a local switch is used to change a light, or a powerhome macro fires and changes state, that's all reflected too.

Took a bit of work, but it can be done! When I get it looking pretty, I'll send some screen shots.

Niels.
Back to Top View niels's Profile Search for other posts by niels
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 513
Posted: November 21 2008 at 11:28 | IP Logged Quote MrGibbage

Resurecting an old thread here. I have the new t-Mobile G1 phone, which is similar to the iPhone in a lot of ways. I very much would like to be able to control my PH installation with my phone. I have a fair amount of html/php and powerhome experience, but it doesn't hurt to see what others have done. Would anyone care to post some screenshots of their mobile-sized apps/websites, or possibly share some code?
Back to Top View MrGibbage's Profile Search for other posts by MrGibbage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 21 2009 at 09:37 | IP Logged Quote GadgetGuy

This is what I have implemented for my iPhone.

.   

I used a graphics program (ACDC's Canvas) to create the entire background rather than using PH's CC Design Tool, and then used the design tool to just put the control buttons in place.

Overall it works beautifully except that the screen does not update unless you Refresh, which is a pain.

I can now easily control and sense most of my main lighting, as well as the furnace, and enable/disable motion senseing alerts from the camera to SMS or email me of intrusions

__________________
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
 
williammanda
Groupie
Groupie


Joined: December 03 2008
Location: United States
Online Status: Offline
Posts: 84
Posted: January 21 2009 at 19:50 | IP Logged Quote williammanda

Very nice!
Back to Top View williammanda's Profile Search for other posts by williammanda
 

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