Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Integration with other apps... 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: August 07 2008 at 12:28 | IP Logged Quote traviskleckner

Hello,

I've downloaded the app to send data to PH via windows messaging. Has anyone written an app that gets data back from PH? I'd like to be able to poll for the status of variables and light levels.

I'm certain it's doable, and in fact I would imagine that given the time I could figure it out as well. But, knowing this forum someone's already done it and is happy to share.

For what it's worth I'm using VB.Net 2008.

Anyone?

Thanks in advance.
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
rboyleiii
Newbie
Newbie


Joined: January 15 2008
Location: United States
Online Status: Offline
Posts: 11
Posted: August 07 2008 at 20:12 | IP Logged Quote rboyleiii

I have a sample that gets the returned data back from PH.
It is in VB6 though, as I have switched to the socket server for external communication.

HTH

2008-08-07_201129_PH_WM_VB6_Sample.zip
Back to Top View rboyleiii's Profile Search for other posts by rboyleiii
 
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: August 12 2008 at 16:39 | IP Logged Quote traviskleckner

Thanks.

I was going to ask you if you had the socket code, but a little research turns up many examples.

For those of you who have done sockets with VB, take note that .net makes it MUCH easier. I've got my sample app communicating with PH quite happily now.

Edited by traviskleckner - August 12 2008 at 16:59
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: August 12 2008 at 19:48 | IP Logged Quote TonyNo

Do share!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: August 13 2008 at 08:45 | IP Logged Quote traviskleckner

Here you have it. Source is all in VB.Net 2008. Right now it's nothing more than a form that allows you to enter a PH Function and it gives you the return value.

http://www.tekconsultingllc.com/PHSocket.zip

As you may have gathered from my other posts, I recently purchased a Squeezebox Duet. You can write applications to run on the controller...so I decided that I needed an Insteon scene controller application. The problem is that the controller has no ability to send sockets, only to read/write to text files...so I'm creating an app to monitor the text file dir and send the commands to PH. Seems like an overly convoluted solution, so we'll see. Mostly it's a fun little play project while the weather is crazy hot.
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
TonyNo
Moderator Group
Moderator Group
Avatar

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

Thanks!

I believe Dave already created a plug-in to monitor a file as you describe.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: August 13 2008 at 15:28 | IP Logged Quote traviskleckner

Maybe this is a total noob question, but any idea where I might find that? I considered (and am still considering) a plug-in as well.
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
TonyNo
Moderator Group
Moderator Group
Avatar

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

Took some digging to find...

dhoward wrote:
Alrighty, I went ahead and created a generic PowerHome plugin for file monitoring. You can download it here: http://www.power-home.com/download/phfilemonitor.zip.

This plugin will create no load on PowerHome and will fire a generic plugin trigger when any monitored file is changed (based upon file date/time stamp). You can pre-specify the files to monitor or add/change them at runtime.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
onhiatus
Senior Member
Senior Member
Avatar

Joined: May 12 2004
Location: United States
Online Status: Offline
Posts: 279
Posted: August 14 2008 at 16:59 | IP Logged Quote onhiatus

I use Dave's file monitor plug in all over the place.

It works great and is easy to configure.
Back to Top View onhiatus's Profile Search for other posts by onhiatus Visit onhiatus's Homepage
 
kev21986
Senior Member
Senior Member
Avatar

Joined: April 04 2007
Location: United States
Online Status: Offline
Posts: 199
Posted: May 01 2009 at 10:09 | IP Logged Quote kev21986

traviskleckner wrote:
Here you have it. Source is all in VB.Net 2008. Right now it's nothing more than a form that allows you to enter a PH Function and it gives you the return value.

http://www.tekconsultingllc.com/PHSocket.zip

As you may have gathered from my other posts, I recently purchased a Squeezebox Duet. You can write applications to run on the controller...so I decided that I needed an Insteon scene controller application. The problem is that the controller has no ability to send sockets, only to read/write to text files...so I'm creating an app to monitor the text file dir and send the commands to PH. Seems like an overly convoluted solution, so we'll see. Mostly it's a fun little play project while the weather is crazy hot.


Thanks for sharing your code. That should get me going. I did find a bug in it though. Your SendToPH function has your user and password hard coded instead of using the user and password that gets passed to it.

__________________
Kevin Smith
@respectTheCode
Back to Top View kev21986's Profile Search for other posts by kev21986 Visit kev21986's Homepage
 
traviskleckner
Senior Member
Senior Member
Avatar

Joined: February 26 2007
Location: United States
Online Status: Offline
Posts: 118
Posted: May 01 2009 at 10:41 | IP Logged Quote traviskleckner

True enough. I added some of the settings info before I
posted it. I actually fixed that bug when I did my
normal password changes (you know, and the application
didn't work any more!)
Back to Top View traviskleckner's Profile Search for other posts by traviskleckner
 
Brandon
Newbie
Newbie
Avatar

Joined: December 29 2009
Location: United States
Online Status: Offline
Posts: 36
Posted: January 20 2010 at 18:29 | IP Logged Quote Brandon

dhoward wrote:
Alrighty, I went ahead and created a generic PowerHome plugin for file monitoring. You can download it here: http://www.power-home.com/download/phfilemonitor.zip.

This plugin will create no load on PowerHome and will fire a generic plugin trigger when any monitored file is changed (based upon file date/time stamp). You can pre-specify the files to monitor or add/change them at runtime.


(Quick Note for Vista Users)

To install the PowerHome File Monitor plugin you will have to run regsvr32.exe to manually register the ActiveX control.

If you receive an error code 0x80004005 you need to disable User Account Control (UAC).

Example Error Text:

The module "c:\Program Files (x86)\powerhome\plugins\ph_filemon.ocx" was loaded but the call to DllRegisterServer failed with error code 0x80004005

Disable UAC Control Tutorial
Back to Top View Brandon's Profile Search for other posts by Brandon
 

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