Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: HouseBot as a Front-End Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 13 2006 at 12:00 | IP Logged Quote TonyNo

I think I have enough to post a general view of what I am doing.

Like others, I have been looking for a better front-end for PH. I have set up web pages that do a good job, but updates, page creation, and getting good performance is a PITA. Maybe I'll learn Ajax techniques eventually, but this was a quicker route to gratification.

HouseBot is an actual HA app, but lacks some of the things I need. It does support graphic "remotes" which can be run on PC's/PocketPC's and talks with the main HB app.

Unlike the XLobby project, I found that talking to PH via phcommand/phsscmd won't work. HB wraps the data sent in quotes and PH chokes on them. I found that using curl worked, so I have started with that (curl talks HTTP). One item of note, since curl uses HTTP, spaces in anything sent need to be url encoded (changed to "%20").

PH will talk to HB via the included hb_control app.

My initial plan was based on the above, but I just realized that I'll be running HB on the same machine, and I think I have seen Windows Messaging implemented in VBScript, which HB supports.

Buckle up! This gets complicated! ;)

First, I created "null devices" that represent each PH device to monitor/control. I then added properties to these devices. For my purposes, I chose to add Level, Power State, and Time.



Next, I created a PH Connector device (Execute Program) that runs curl to talk to PH.



After that, I created a Task (think macro) to activate the PH Connector device (run the application) whenever the arguments change. HB is event driven, and Tasks only run when the parameter being tested changes. To get an Action to always happen, you create a condition that will always result in a True result, in this case, not equal to "").



I then built a Remote and Theme (screen) that contained the controls for the devices.



For the level slider, I had to create a Task to send the dim level to PH when it changed and update the Device Time.



Off and On states were similar, so I created a Task to send the info to PH an update the Device Time.



All of the above must be repeated for each device!

At this point, communication is only one way, so I'll have to add triggers in PH to update each Device in HB and try to figure out how to not have commands bouncing back and forth (for example: PH changes the state of a device, HB sees the change, tells PH, and the cycle continues ).


Edited by TonyNo - August 13 2006 at 12:08
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
Manny
Senior Member
Senior Member
Avatar

Joined: March 23 2003
Location: United States
Online Status: Offline
Posts: 172
Posted: August 13 2006 at 13:25 | IP Logged Quote Manny

Nice.
Was the slider control built-in or something you already had?
It's going to be good for everyone once a lowcost(no cost)/easy as pie solution is found.

Still, at $60 bucks, I'd still rather wait on DH and his future solution.
(I know , I know,I'm cheap.)

What I'm hoping for if it turns out that PowerBuilder 11 can't compete with alternative front ends is that some code jockey make a vb or dotnet frontend to make use of the tools DH has already provided.

For example I tried using phsscmd with PowerPoint with mixed results. I'll post the excercise in another thread.

Anyway, if there's anyway you can post your finished work as a video it would be much appreciated. I can better visualize myself using my lunch money on another piece of sw once I see the end result.
Back to Top View Manny's Profile Search for other posts by Manny
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 13 2006 at 13:45 | IP Logged Quote TonyNo

Quote:
Was the slider control built-in or something you already had?


Built-in. Here are the control types that you can place...



There are also other skins (collections of items) that you can download, but I have not looked at them yet.

I have not paid the $60 yet; just playing with the trial. I, too, have high hopes for the new CC.

What do you want to see in this video?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
Manny
Senior Member
Senior Member
Avatar

Joined: March 23 2003
Location: United States
Online Status: Offline
Posts: 172
Posted: August 13 2006 at 14:03 | IP Logged Quote Manny

No special requests, just whatever comes from your trial use of the sw.
From what I've read and have been slowly trying to duplicate:
A video showing your use of

  • motion detectors
  • ir
  • music (winamp) control
  • home entertainment control
  • curtains / blinds control
  • any WAF items
Back to Top View Manny's Profile Search for other posts by Manny
 
PH Guy
Newbie
Newbie


Joined: July 10 2006
Online Status: Offline
Posts: 10
Posted: August 14 2006 at 08:00 | IP Logged Quote PH Guy

A very interesting exercise to say the least! I don't understand why you chose to use a Home Automation application (HouseBot) to drive another HA app (PowerHome).

Your example demonstrates that a lot of work is required to get uni-directional control of each PH function and more work is required to get bi-directional control. It seems to me that all this effort is better spent either:
1) porting everything to HouseBot or some other HA app.
2) using a graphical front-end like MainLobby, NetRemote, or XLobby.
3) throw together a VB.NET app that drives PH.

I commend the work you've put in this project, I just question if learning and using HouseBot to drive PH is a practical approach for existing PH users.



Back to Top View PH Guy's Profile Search for other posts by PH Guy
 
Manny
Senior Member
Senior Member
Avatar

Joined: March 23 2003
Location: United States
Online Status: Offline
Posts: 172
Posted: August 14 2006 at 12:03 | IP Logged Quote Manny

From a Rube Goldberg fan perspective I think it's cool.
The effort is part of the fun.

Seriously though, I'm still looking for the Holy Grail of interface making, for non coders.

I'm not giving up the power of PH (including controlling by way of cell phone), or switching to anything else, unless it's free and extremely sexy.
(what I tell my wife )

Edited by Manny - August 14 2006 at 12:03
Back to Top View Manny's Profile Search for other posts by Manny
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 14 2006 at 17:32 | IP Logged Quote TonyNo

Quote:
I don't understand why you chose to use a Home Automation application (HouseBot) to drive another HA app (PowerHome).

As I stated, HB does not do all that I need, PH is only lacking with regard to a front-end, and HB seems to have a decent front-end. Think of it along the lines of using MainLobby/NetRemote to drive HS.

Also, keep in mind that there are people using PH just for Insteon linking. As long as they paid for it, who cares how they use it?

Your other points:

1. See above.
2. This is no different! HB is more expensive than XLobby, but cheaper than MainLobby and NetRemote. Plus, Dave has not yet created a plugin interface and my efforts to get support from Promixis went nowhere.
3. That is more coding than I want to do.

Quote:
I just question if learning and using HouseBot to drive PH is a practical approach for existing PH users

Again, no different than it would be with other front-end apps.

Edited by TonyNo - August 14 2006 at 17:33
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 14 2006 at 21:14 | IP Logged Quote TonyNo

I think I'll try mashing up my old VB CID and Serial Out programs to create a program to send a formula in a WM_COPYDATA message from HB to PH to be executed with ph_formula...
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 14 2006 at 21:45 | IP Logged Quote TonyNo

OK, I just found the PowerHome Windows Message Command Line Controller. Let's see if that works first!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo'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