Author |
|
hotcoffee76 Newbie
Joined: December 04 2009 Location: Canada
Online Status: Offline Posts: 12
|
Posted: December 04 2009 at 23:21 | IP Logged
|
|
|
Hi,
I am planning my home automation project. If I was using Powerhome as my main control centre for an X10-based home automation setup, what would I need to consider if I wanted to have other software respond and send commands via Powehome? I am hoping I can leave the X10 communication within powerhome to centralize all direct X10 activity and then interface the other components into Powerhome.
For example, lets say I have temperature sensors that send their readings out on X10 commands. I assume Powerhome can receive those commands. Now, say I have a Java app that has all the functionality to track historical temperatures, combine with other data, and do other things. How can I get the data received within the X10 command sent from the sensor and received by Powerhome into the Java app?
From Java, I can listen on a socket port, receive HTTP, etc. Just about anything is possible, with a little work.
What are the options in Powerhome for sending commands?
Thanks.
Edited by hotcoffee76 - December 04 2009 at 23:22
|
Back to Top |
|
|
onhiatus Senior Member
Joined: May 12 2004 Location: United States
Online Status: Offline Posts: 279
|
Posted: December 07 2009 at 14:25 | IP Logged
|
|
|
Powerhome can send / receieve on a socket, or serve an active HTML page, or read / write a shared file, or send / receive windows messages. I use pretty much all of the above to communicate between programs / displays / and other machines.
Also of interest is that Powerhome can trigger on any of the above as well.
|
Back to Top |
|
|
hotcoffee76 Newbie
Joined: December 04 2009 Location: Canada
Online Status: Offline Posts: 12
|
Posted: December 07 2009 at 14:32 | IP Logged
|
|
|
onhiatus wrote:
Powerhome can send / receieve on a socket, or serve an active HTML page, or read / write a shared file, or send / receive windows messages. I use pretty much all of the above to communicate between programs / displays / and other machines.
Also of interest is that Powerhome can trigger on any of the above as well. |
|
|
Thanks for the info. Some follow up questions:
1. Can Powerhome process HTML posts? By 'active html page' are you referring to ASP?
2. Can Powerhome poll files, or will it need to be told to read a file by one of the other communication methods?
3. Can data be shared through the Powerhome database? I assume the core tables it uses can have data added/changed/etc. but is there any notion of a DB level API?
Thanks.
|
Back to Top |
|
|
onhiatus Senior Member
Joined: May 12 2004 Location: United States
Online Status: Offline Posts: 279
|
Posted: December 09 2009 at 12:23 | IP Logged
|
|
|
1. Yes, I believe PH can process a POST. No, not ASP - powerhome has it's own http server and it does simple substitutions into the html.
2. There is a plug in that monitors specified files. When there is a change to the file the specified action is run (usually processing the file)My first external processes used Windows Messages, but since this plug in became available it makes interprocess communications so easy...
3. Yes, at least kind of. You can run raw sql which could read / write / create tables.
|
Back to Top |
|
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: December 16 2009 at 14:34 | IP Logged
|
|
|
onhiatus wrote:
1. Yes, I believe PH can process a
POST. No, not ASP - powerhome has it's own http server
and it does simple substitutions into the html.
|
|
|
You can send a GET requests with a formula and it
returns the results. This is how my iPhone app iHome
communicates with PowerHome.
http://{serverURL}/ph-cgi/eval?formula={formula}
Where {serverURL} is the url to the PowerHome web
server and {formula} is the PH formula you want to run.
The request does need basic HTTP Authentication. Your
HTTP Request classes should have a way to do this.
onhiatus wrote:
3. Yes, at least kind of. You can run
raw sql which could read / write / create tables.
|
|
|
Is this fairly easy to do? I am looking to do things like get
the list of devices or macros.
__________________ Kevin Smith
@respectTheCode
|
Back to Top |
|
|