Author |
|
traviskleckner Senior Member
Joined: February 26 2007 Location: United States
Online Status: Offline Posts: 118
|
Posted: August 07 2008 at 12:28 | IP Logged
|
|
|
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 |
|
|
rboyleiii Newbie
Joined: January 15 2008 Location: United States
Online Status: Offline Posts: 11
|
Posted: August 07 2008 at 20:12 | IP Logged
|
|
|
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 |
|
|
traviskleckner Senior Member
Joined: February 26 2007 Location: United States
Online Status: Offline Posts: 118
|
Posted: August 12 2008 at 16:39 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 12 2008 at 19:48 | IP Logged
|
|
|
Do share!
|
Back to Top |
|
|
traviskleckner Senior Member
Joined: February 26 2007 Location: United States
Online Status: Offline Posts: 118
|
Posted: August 13 2008 at 08:45 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 13 2008 at 13:45 | IP Logged
|
|
|
Thanks!
I believe Dave already created a plug-in to monitor a file as you describe.
|
Back to Top |
|
|
traviskleckner Senior Member
Joined: February 26 2007 Location: United States
Online Status: Offline Posts: 118
|
Posted: August 13 2008 at 15:28 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: August 13 2008 at 16:50 | IP Logged
|
|
|
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 |
|
|
onhiatus Senior Member
Joined: May 12 2004 Location: United States
Online Status: Offline Posts: 279
|
Posted: August 14 2008 at 16:59 | IP Logged
|
|
|
I use Dave's file monitor plug in all over the place.
It works great and is easy to configure.
|
Back to Top |
|
|
kev21986 Senior Member
Joined: April 04 2007 Location: United States
Online Status: Offline Posts: 199
|
Posted: May 01 2009 at 10:09 | IP Logged
|
|
|
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 |
|
|
traviskleckner Senior Member
Joined: February 26 2007 Location: United States
Online Status: Offline Posts: 118
|
Posted: May 01 2009 at 10:41 | IP Logged
|
|
|
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 |
|
|
Brandon Newbie
Joined: December 29 2009 Location: United States
Online Status: Offline Posts: 36
|
Posted: January 20 2010 at 18:29 | IP Logged
|
|
|
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 |
|
|