Announcement

Collapse
No announcement yet.

HomeSeer machine refuse to service the remote request

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HomeSeer machine refuse to service the remote request

    Stipus

    I still need your help I am afraid! I have installed the software on both the HSPro machine (got your plug in, payed and installed it) and one of my remote machines. I have connected the remote Script client to HSPro and when I check in HSPro the machine shows as connected.

    When I run MSSCRIPT from the CMD line on the remote machine and for testing run the write in log script I get an error : Can not connect because target-machine refuse connection 1:16234 (translated form Norwegian)

    I am on my LAN and I have tried to turn off the firewalls etc but I am out of ideas?

    I have also tried to run the MSSCRIPT on the HS machine and the it works fine. (This includes testing the running of scripts triggered by an event and opening a message box on the remote machine)

    I am really looking forward to get this to work as it will enable me to implement a lot of my plans that I did not know how to do. GREAT PLUGIN

    Rgrds
    Ole
    Last edited by Elo; May 11, 2010, 04:51 PM.

    #2
    The program to run is HsScript.exe (not MsScript.exe) but I think it might be a typo in your message.

    I can't see any other program than a firewall that would block communication btween HomeSeer and the remote computer.

    - Did you turn-off the firewall on both computers ?

    The error message is strange. Refuse connection from 1:16234
    It should be the ip address of the HomeSeer server.

    - Can you post the logs, the script client log, and the homeseer log.
    --
    stipus

    Comment


      #3
      yes it is a typo.. Where do I find the script client log? Is it the lower part of the Script Client window?

      I did turn off both firewalls! I will try to reinstall everything on the remote machine. DID and it did not help!!!

      The error is a HSScript.exe error

      HSLog
      28.04.2010 18:52:21 Startup Settings Loaded.
      28.04.2010 18:52:21 Startup Loading configuration file ...
      28.04.2010 18:52:22 System Loading device types file...
      28.04.2010 18:52:22 Database Opening (Mode=Read) up HomeSeer database: C:\Program Files\HomeSeer HSPRO\config\sample.mdb
      28.04.2010 18:52:22 Database Loading Devices...
      28.04.2010 18:52:22 Load Config 30 total devices loaded.
      28.04.2010 18:52:22 Load Config Checking device type settings for all devices...
      28.04.2010 18:52:22 Load Config Finished checking device type settings.
      28.04.2010 18:52:22 Load Config Loading Events...
      28.04.2010 18:52:22 Load Config 55 total events loaded.
      28.04.2010 18:52:22 Database HomeSeer configuration database C:\Program Files\HomeSeer HSPRO\config\sample.mdb has been closed.
      28.04.2010 18:52:22 Startup HomeSeer version is: 2.4.0.36
      28.04.2010 18:52:22 Startup Starting remoting (Remote client connection monitor)
      28.04.2010 18:52:22 Startup Creating Speaker Client Interface Object...
      28.04.2010 18:52:22 Startup Initializing phone interface...
      28.04.2010 18:52:22 HSPhone HomeSeer Phone Web Interface initializing.
      28.04.2010 18:52:22 Startup Restoring Device Status
      28.04.2010 18:52:22 Z-Wave :- :- :- :- :- :- :- :- Initializing Z-Wave Interface -: -: -: -: -: -: -: -:
      28.04.2010 18:52:22 Z-Wave Initializing Z-Wave Interface on COM port: 3 at 115K baud.
      28.04.2010 18:52:24 Network Remote client connected from: 192.168.1.102
      28.04.2010 18:52:26 Z-Wave Z-Wave interface version: 5
      28.04.2010 18:52:26 Z-Wave Z-Wave interface node ID: 1, Home ID: 11111120
      28.04.2010 18:52:26 Z-Wave Found 17 Z-Wave nodes
      28.04.2010 18:52:26 Z-Wave Controller firmware version: 3.7
      28.04.2010 18:52:26 Z-Wave This Z-Wave PC Controller Library Version is: Z-Wave 2.78 (ZDK Version 5.02 Patch 3)
      28.04.2010 18:52:26 Z-Wave This Z-Wave PC Controller is Type: ZW_LIB_CONTROLLER_STATIC
      28.04.2010 18:52:26 Z-Wave Z-Wave services for communications to nodes utilizing the SECURITY COMMAND CLASS were successfully started.
      28.04.2010 18:52:26 Z-Wave -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      28.04.2010 18:52:26 Startup Checking for available plug-ins
      28.04.2010 18:52:26 Plug-In Found plug-in: X10 CM11A/CM12U, version: 1.0.1.0
      28.04.2010 18:52:26 Plug-In Found plug-in: X10 CM15AUSB, version: 1.0.0.3
      28.04.2010 18:52:26 Plug-In Found plug-in: HSTouch Server, version: 1.0.0.10
      28.04.2010 18:52:26 Plug-In Found plug-in: HSTouch iPhone, version: 1.0.0.0
      28.04.2010 18:52:26 Plug-In Found plug-in: Insteon, version: 1.1.52.1
      28.04.2010 18:52:26 Plug-In Found plug-in: IRTrans, version: 1.2.15.0
      28.04.2010 18:52:26 Plug-In Found plug-in: iTunes, version: 2.4.0.36
      28.04.2010 18:52:26 Plug-In Found plug-in: Media Player, version: 2.4.0.36
      28.04.2010 18:52:26 Plug-In Found plug-in: Script Connector, version: 1.23.2.4
      28.04.2010 18:52:26 Plug-In Found plug-in: USB-UIRT Interface, version: 1.1.0.0
      28.04.2010 18:52:26 Plug-In Found plug-in: UPB, version: 1.0.2.7
      28.04.2010 18:52:26 Startup Initializing Plug-Ins
      28.04.2010 18:52:26 HSTouch Server Register callback completed
      28.04.2010 18:52:26 Plug-In Initializing Plug-in: HSTouch Server
      28.04.2010 18:52:26 HSTouch Server Registered for STATUS CHANGE callback.
      28.04.2010 18:52:26 HSTouch Server Registered for STRING CHANGE callback.
      28.04.2010 18:52:26 HSTouch Server Registered for CONFIG CHANGE callback.
      28.04.2010 18:52:26 HSTouch Server Registered for CALLER-ID callback.
      28.04.2010 18:52:26 HSTouch Server Registered for VALUE CHANGE callback.
      28.04.2010 18:52:26 HSTouch Server Registered for GENERIC EVENT callback.
      28.04.2010 18:52:26 Plug-In Finished initializing plug-in HSTouch Server
      28.04.2010 18:52:26 HSTouch iPhone Register callback completed
      28.04.2010 18:52:26 Plug-In Initializing Plug-in: HSTouch iPhone
      28.04.2010 18:52:26 HSTouch iPhone HSTouch iPhone plugin initialized.
      28.04.2010 18:52:26 Plug-In Finished initializing plug-in HSTouch iPhone
      28.04.2010 18:52:26 Remote Script Script Connector 1.23.2.4 Copyright 2007-2008 stipus@stipus.com
      Last edited by Elo; April 28, 2010, 12:53 PM.

      Comment


        #4
        I don't see any error in your log
        --
        stipus

        Comment


          #5
          Neither do I. The strange thing is thatit all works from the server towards the client but not the other way.

          I have a number of other machines and I will try instaling on a different machine.

          The server is a W7 machine and the Client is a Vista machine.The network setup is one router between the internett and all internal machines with a number of switches connected after the router distributing to local machines ( 4 additional desktops).

          The one I have been trying out i imperative to get to work...

          WHat port is used?

          Ole

          Comment


            #6
            HsScript.exe uses a local port 16234. Maybe there is another application using this port on your remote system.

            You might try to change it by using regedt32.exe on your remote computer

            HKEY_CURRENT_USER\Software\Stipus\HsScriptClient\HsScript
            Key= InternalPort (You have to add this key using the same exact spelling and case)
            Default Value = 16234 (REG_DWORD)

            Try to exit the HsScript client, create the key in the registry, set it to another port than 16234, and restart HsScript

            --
            stipus

            Comment


              #7
              I have instaled everything on a second computer (Vista).
              It behaves differently but does not work either.

              When I run

              HSscript (placed in a directory Homeseer 2 with two arguments remote_messagebox.vb My tekst

              The box appears on the same machine and not on the HS server machine!

              If I run a script that does not exsist I get an error log in the HS log Comile Error etc...

              This should indicate that the communication works

              I might have installed wrong?

              I copy the HSscript.exe hspi_script.dll Stipus.Script..... and place them in directory Homeseer 2 on the client machine. I also place the SetupHSscriptClient.msi in this directory.

              Then I install the speaker client from the down-loadable version on the homesser web page and run the update that has been released with the last version of HSPro.
              Then I run the HSscript setup (msi file) and instales

              When I rum HSscript i run it with cmd and from the Homeseer 2 directory

              Can u see anything wrong with this?

              I will look into the port issue now. (I notice that the number in the error message is the same as the port number). When giving the server IP in the Script config program should the IP include the port as "192.168.1.104ortnumber" ?

              Update: Tried to change the port with the same result only that the number in the errormessage changes to the new port number?????

              Rgrds
              Ole
              Last edited by Elo; April 28, 2010, 03:03 PM.

              Comment


                #8
                Communication between the client and the server looks fine.

                The error message that you got, is not a communication error between the client and the server, but a communication error between client instances on the same computer.

                When you run HsScript.exe, and another HsScript.exe is already running, the second HsScript.exe sends the command line parameters to the first instance using port 16234.


                1) Can you send a PRINT SCREEN of the error message to my email address ? (stipus at stipus dot com).

                2) I don't understand what you are trying to achieve. If you run a script on a remote computer using HsScript.exe, the result or message box is not going to show-up on the HomeSeer computer.

                You could create a remote script that would trigger another script on the HomeSeer computer.
                --
                stipus

                Comment


                  #9
                  Stipus

                  First I would like to thank you for your help and dedication to find a solution. I am sorry if I, due to lack of understanding the plug-in, am trying to do impossible things, please bear over with me. It seems from your post that I have misunderstood how the plug-in works.

                  Here is what I am trying to achieve:

                  I want the establish the ability of sending event triggers from the client machines to the HSPro server machine via the house LAN. All events are defined in HSPro on the server machine. This was the content of my original posting that you responded to.

                  I also want the ability to display messages both on the server machine display and/or on the clients displays. The triggers of such messages should originate either on the server or on one of the client machines

                  The reason for these requests is that I have one machine with HSPro that controls a Zwave network ALL over the house, i.e. light, HVAC, security etc. At the same time we have separate machines for local AV. Data and content for those are streamed from centralized NAS.
                  In this setup it is difficult to control the "house" functions locally with the remote that is dedicated to that specific local zone. The ability above will make it possible to control the centralized HSPro installation from any local machine in the house. I know that there are other ways of achieving this but they will require costs and be less elegant.

                  I was of the impression that your plug-in made it possible to:

                  1. Instruct the server to trigger a certain HS event from the client [remote_runevent.cs](Have not tested this yet)
                  2. To instruct the server to display messages on the screen (through your demo scripts) At the command prompt being localized int the directory where HSCRIPT resides give the following command: Hsscript remote_messagebox.vb "My text". This does not work!
                  3. To instruct the client machine to display messages on the screen (also through your demo scripts). Setting up a event in HSPro to run the same script as above and giving the address of the client machine. THIS WORKS
                  4. To instruct the client machine to run a specific script that indirectly starts programs or is included as part of another system (like Girder fx) (Have not tested this yet)

                  Please let me know if I am attacking this the wrong way.

                  I will make screen dumps when geting home from work this evening


                  ADDED: It is obviously something I do not fully understand here. If I run the remote_runevent.cs script on the remote machine like > hsscript remote_runevent.cs HS Event Name then it works if the HSSCRIPT client is not running and set to auto connect. So you are obviously correct in your last post. How can I deal with this??


                  Thx
                  Ole
                  Last edited by Elo; April 29, 2010, 09:48 AM.

                  Comment


                    #10
                    What you want to do can be done. I already did something very similar (The remote media player control scripts in scripts/media/*).

                    The HsScript.exe client must be running on both computers, and connected to homeseer.

                    From the remote computer, if you want to display a message on the HomeSeer server, it can be done using the plugin API.

                    Create a script on the remote computer such as the following:

                    remote_display.cs
                    Code:
                    void Main( object param )
                    {
                       sh.ExecRemoteSub( "HOMESEER", "remote_messagebox.vb", param.ToString() );
                    }
                    Replace "HOMESEER" with the name of the script client running on the HomeSeer server.

                    When you run this script on the remote computer, this instructs the plugin to run the script "remote_messagebox.vb" on the HOMESEER Script Client, with the same parameter.

                    This should work fine.
                    --
                    stipus

                    Comment


                      #11
                      Thx again...
                      I am afraid i do not fully understand. You say to run the HSScript on both machines. Do i then run the remote_display script as > HSSCRIPT remote_display.cs ? Would that not create the same problem as before?

                      What about item 1.? Is that solved in the same manner: by invoking a script on the server?

                      Ole

                      Comment


                        #12
                        I am afraid i do not fully understand. You say to run the HSScript on both machines. Do i then run the remote_display script as > HSSCRIPT remote_display.cs ? Would that not create the same problem as before?
                        HsScript must be running, and we need to find the reason for this error.
                        Please send me the logs when the error happens, and a print screen of the error.

                        Also try to run HsScript as administrator. This might be necessary to open the Internal connection between HsScript.exe instances ?

                        What about item 1.? Is that solved in the same manner: by invoking a script on the server?
                        For your first need, you just need a small script on the remote computer to trigger a HomeSeer event.

                        Code:
                        void Main( object param )
                        {
                           string eventString = param.ToString();
                           if( hs.EventExists( eventString ) )
                           {
                              hs.TriggerEvent( eventString );
                           }
                        }
                        --
                        stipus

                        Comment


                          #13
                          I feel completely stupid. Even though I have done programing in C and C++ for several years I have trouble in following your lingo..

                          Replace "HOMESEER" with the name of the script client running on the HomeSeer server.
                          What is the name of the script client (on the server) ?

                          ADDED: It is obviously something I do not fully understand here. If I run the remote_runevent.cs script on the remote machine like > hsscript remote_runevent.cs HS Event Name then it works if the HSSCRIPT client is not running and set to auto connect. So you are obviously correct in your last post. How can I deal with this??
                          I did try this method and it works as long as the script client is not running on the client machine

                          I tried your last method. Same error as before when the script client is running, if not I get an error on the server because I have not understood what the name of the script client is (tried machine name as found in the connection list in HS and tried the name of the exe file)

                          Comment


                            #14
                            Did you try to run the first instance of HsScript.exe as administrator ?

                            If you open the script client window, you'll find the name. It's the first field. The default name is the computer name I think.

                            Please send me the logs when you get the error, and a PRINT SCREEN of the error message.
                            --
                            stipus

                            Comment


                              #15
                              Sorry. Had two sytax errors the name must of course be written as "Name".

                              It is working as long as the HSSCRIPT is NOT running on the client and started by the running of the script itself with the Auto Connect enabled. Otherwise the error is same as before.

                              So basically two methods work, both when the HSCRIPT is not running initially.

                              I will no do as you require. To make a screen dump when the error occurs. And send you both the logs.

                              The script client log being what is in the lower part of the window when the client is restored?

                              The HS log will not show anything new since communication between the client and the server never occurs.

                              OK?

                              Comment

                              Working...
                              X