| HomeSeer HS2™ Specific General discussion about HomeSeer HS2. |

November 12th, 2009, 11:41 AM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
HS2 Remote control access problem - sloved :)
I have an opportunity for someone to shine. It appears that when HS2 is installed, that it sets up DCOM for local access to the HomeSeer2.application only. I would like to have remote client access to HS2. Someone who understands the install process could write an executable to enable and disable remote access on the HS2 server, or alternately to do the same function for client systems. Proof of concept. Write a simple VBS to access HomeSeer2.application locally, test it and store the script on a network share. On a network linked PC, using VPC generate two hosted copies of WinXP in unregistered (trialware) mode, link to the HS2 server and the network share containing the VBS. Execute the VBS on either or both of the hosted OSs. The scripts should fail to link to the HS2 server. Install HS2 in trialware mode, (OOB install) is all that is required. Then run the VBS again, the one that executes on the VPC containing OOBI HS2 will run, and the other will not connect to the HS2 server. Note: 1) The HS2 server name must replace the localhost entry in the VBS for it to connect. 2) the server name entry in the CreatObject is useless until the HS2 server recognizes remote access. 3) The IP addresses and names for the three machines entered in the C:\WINXP\system32\drivers\etc\hosts files of all the machines, makes the code more readable, and easier to modify. Sample code (no error checking), and sample host file enteries follow.
Dim hs,hsi
Set hsi = createobject("HomeSeer2.application", "localhost")
hsi.SetHost "localhost"
Set hs = hsi.GetHSRef
hs.speak "Hello World"
hosts file entries
# HS2 server
192.168.x.x dogwood
# VPC 1
192.168.x.x boxwood
# VPC 2
192.168.x.x redwood
|

November 12th, 2009, 11:43 AM
|
 |
OverSeer
|
|
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
|
|
If you want access to the client system install the speaker app and you can use the same script to access the remote system.
__________________
-Rupp
|

November 12th, 2009, 11:58 AM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
Well, I still get the same error message, can't create the object. I want to use more than just the speaker, EXECX10, and other commands. It's a runtime error, the remote object is not visible. (access denied)
Last edited by Twisted; November 12th, 2009 at 12:11 PM.
|

November 12th, 2009, 12:11 PM
|
 |
OverSeer
|
|
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
|
|
You have to use the remote ipaddress ie
Set hsi = CreateObject("HomeSeer2.application")
hsi.SetHost("remoteipaddress:8742")
rval = hsi.Connect("username", "password")
If rval <> "" Then
MsgBox(rval)
End If
Set hs = hsi.GetHSRef
hs.speak("Hello World")
__________________
-Rupp
|

November 12th, 2009, 12:16 PM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
The error occurs trying to create the object from the remote machine. If the object is available locally, then the link to the remote HS server host is fine. The error occurs at run time trying to create the object, access denied). If you use dcomcnfg.exe and look in the Component services / computers / My Computer / DCOM Config, and HomeSeer2.&clsString is listed then the code that you provided will work without a problem. If it's not listed, then the server parm of the createobject must be used to direct the command to the remote system. If the object on the remote system is setup as local access only, the remote system will refuse to grant permission to create the object. By installing the HS2 application on the local machine, a local object is available to use, once that is done, it can be redirected to the remote system, and connected without a problem. This works, but, it is not a very elegant solution, it maybe a little fuzzy in the licencing department,(installing software but not using it). I submitted a help desk ticket on the acceptable use of the software. It appears that multi computer links is a little too far outside the box for what was origionally the design scope for the product. For me this is not the puzzle, only one piece. The other pieces include computer vision(where are my car keys), robotics(well, bring them to me), face recognition(find me in the crowd at the party), and face tracking(head nods and shakes in response to questions). You may have thought that home automation was an expensive hobby, but thirty years in computers, has shown me just what wetware can do to software, firmware, and hardware.
Last edited by Twisted; November 13th, 2009 at 10:45 AM.
|

November 13th, 2009, 11:00 AM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
If the help desk doesn't lose the ticket, I will post the results, a mod, a patch, a feature, an enhancement, a change, or acceptable use, whatever it is called today. 
|

November 18th, 2009, 06:32 PM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
For anyone planning to run HS2 control scripts on a system other than the HS2 server. An example, the HS2 server is in the basement with its bundle of controls and wires purring merrily along. You are in your second floor den at your computer, on that computer you have installed the remote speaker client, so that you can use the network rather than run a microphone cable to the basement. So far so good, you have a weather station, or some other software running on that computer, and you would like to have HS2 respond to some event that happens on the den computer. You can run a script on the den computer, using the den computers resources that will act the same as running the script on the HS2 server. This is how its done.
Install HS2 on the den computer. That is it, of course you can not run the copy of HS2 on the den computer, but you don't need to run it, ever. The registry entries done by the install is all that's required. Now it is time to write the script, pick your language, as long as it supports "CreateObject" it can be used. You need a preamble on your script, an example follows, then just write the script as if were to run on the HS2 server. You will have access to all HS2 functions and features.
This example is in VBScript because that language has support built into windows.
Dim hs,hsi
Set hsi = createobject("HomeSeer2.application", "HS2host")
hsi.SetHost "HS2host"
Set hs = hsi.GetHSRef
Where "HS2host" is the name of the HS2 server running in the basement, as it appears in My Network Places (Ref. WinXP). Follow this preamble with your script. As to the second installed copy of HS2. From the help desk, in response to a question about the 'acceptable use of software' addressing the installation of mutiple copies of HS2 on different systems, I received this reply. The key word in this reply is 'used'.
I'm not sure what you are stating here but as long as HomeSeer is only used on one server you are within the license agreement
Greg Hughes
|

November 18th, 2009, 07:09 PM
|
 |
OverSeer
|
|
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
|
|
Also as shown in post 4.
__________________
-Rupp
|

November 18th, 2009, 08:49 PM
|
|
OverSeer
|
|
Join Date: Aug 2003
Location: FRANCE
Posts: 3,715
|
|
You could also try the "Script Connector plugin", that can run any VB.NET or c# HomeSeer script on any computer over the network.
|

November 19th, 2009, 12:41 AM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
If you read post #1 in detail, it gives a proof of concept. A proof of concept, is a simple reproducible framework that will prove or disprove a claim. The claim that the current install of HS2 creates the HomeSeer2 object with only local visability when installed on a WinXP system, is proven by that framework.
Post #4 gives a sample of access to the HomeSeer2 object, but only if run on the machine that HS2 is installed on. This is verified by the missing parmeter in the createobject statement. It is the one that refers to the remote HS2 server. That code will only work if HomeSeer was at one time installed on the system, and built the required registery entries. Look at post #5 for the Dcom configuration check, this can be used to determine if HomeSeer was ever installed on a machine. On a clean WinXP install that entry will not exist, and without it the code will get a run time failure. By including the remote HS2 server name, the failure will still be at run time but it will now be a permission denied error. This is caused by attempting to access a remote object, that has local (to the remote machine) only access. Details in post #5.
The HS2 install may at one time given both local and remote access to the HomeSeer2 object but not any more. But this is academic, as you may install as many copies of HS2 on as many machines as you desire, and not be in violation of the EULA, given the caveats of post # 7.
A fix to the install would be the simplest solution, saving the multiple product installs, but that may not be forthcoming. The solution works, and doesn't require any additional software.
Note:
WinXP doesn't require activation for thirty days
HS2 is a free download, it doesn't run any way.
VPC 2007 is free from Microsoft
VBScript is natively supported on windows
That's all you need to run the proof of concept. Oh, and also a bit of time to set it up.
|

November 19th, 2009, 08:37 AM
|
 |
OverSeer
|
|
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
|
|
Quote:
Originally Posted by Twisted
If you read post #1 in detail, it gives a proof of concept. A proof of concept, is a simple reproducible framework that will prove or disprove a claim. The claim that the current install of HS2 creates the HomeSeer2 object with only local visability when installed on a WinXP system, is proven by that framework.
Post #4 gives a sample of access to the HomeSeer2 object, but only if run on the machine that HS2 is installed on. This is verified by the missing parmeter in the createobject statement. It is the one that refers to the remote HS2 server.
|
This is incorrect. The line hsi.SetHost(" remoteipaddress:8742")
tells the code which machine to connect to. remoteipaddress can be the name or ipaddress of the server you want to communicate with. I use this from work to set device status at home all the time. You are also going to a lot of trouble installing HomeSeer when all you need to do remoting is to install just the speaker application.
__________________
-Rupp
|

November 19th, 2009, 09:58 AM
|
|
Seer
|
|
Join Date: Nov 2009
Location: Wisconsin
Posts: 20
|
|
Rupp is correct, installing either the speaker or HomeSeer application will work to establish the required registery entries to make the HomeSeer object available locally. If the speaker application will connect to the HomeSeer server, then the sample preamble will allow any script to work. It is a double click either way. Along those lines, Rupp, how do you get through the firewall that protects your HS server from the internet? Do you use a port redirecting proxy, VPN, or some other method?
|

November 19th, 2009, 10:50 AM
|
 |
OverSeer
|
|
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 33,803
|
|
Quote:
Originally Posted by Twisted
Rupp is correct, installing either the speaker or HomeSeer application will work to establish the required registery entries to make the HomeSeer object available locally. If the speaker application will connect to the HomeSeer server, then the sample preamble will allow any script to work. It is a double click either way. Along those lines, Rupp, how do you get through the firewall that protects your HS server from the internet? Do you use a port redirecting proxy, VPN, or some other method?
|
None of the above. You can't connect unless you have a valid username/password. My website is exposed to the public as well.
__________________
-Rupp
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:12 PM.
|