Announcement

Collapse
No announcement yet.

Some instructions

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

    #16
    OK. Do you know if the message box is from the Script Connector, or from HomeSeer when you try to create a user/password ?
    --
    stipus

    Comment


      #17
      Originally posted by stipus View Post
      OK. Do you know if the message box is from the Script Connector, or from HomeSeer when you try to create a user/password ?
      It is an Hsscript.exe error

      Comment


        #18
        OK.

        The password is base-64 encoded to the registry.

        If you did change the password field using the registry editor, this error can happen.

        You have to:
        1) Close HsScript.exe (be sure the process is killed).
        2) run "REGEDT32.EXE" and navigate to

        HKEY_CURRENT_USER/SOFTWARE/Stipus/HsScriptClient/HsScript.exe/

        3) Delete everything there (remove the whole HsScript.exe key and subkeys).

        4) Restart HsScript.exe

        5) Use HsScript.exe client window to enter a valid and non blank HomeSeer user/password.
        --
        stipus

        Comment


          #19
          Originally posted by stipus View Post
          OK.

          The password is base-64 encoded to the registry.

          If you did change the password field using the registry editor, this error can happen.

          You have to:
          1) Close HsScript.exe (be sure the process is killed).
          2) run "REGEDT32.EXE" and navigate to

          HKEY_CURRENT_USER/SOFTWARE/Stipus/HsScriptClient/HsScript.exe/

          3) Delete everything there (remove the whole HsScript.exe key and subkeys).

          4) Restart HsScript.exe

          5) Use HsScript.exe client window to enter a valid and non blank HomeSeer user/password.
          Done succesfully!!

          Now it autoconnects at startup and everything seems to be fine, i am very very happy!!

          Ok, now i will begin to study how to use the plugin.

          Thank you very very much for the time you have spent with me.

          Comment


            #20
            Great Job!!

            Great job Stipus!!! I've been monitoring this thread as I'm using Script Connector in trial mode right now. Your perseverance and knowledge showed through in this instance and it makes me feel much better about shelling out my money for your plugin.
            Dick
            HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

            Comment


              #21
              Fine

              I understand you have 2 HomeTroller(s), and you want to communicate some data (device strings, set flags...) between the 2 instances.

              I have never created such a script, but this is something that can be done.

              You have to study VB.NET scripts on how to connect to HomeSeer, and change device strings / values...

              Something like (untested):

              PHP Code:
                        Dim hsinterface As HomeSeer2.application
                        Dim hs2 
              As Scheduler.hsapplication

                        hsinterface 
              = New HomeSeer2.application
                        hsinterface
              .SetHost("localhost")
                        
              hsinterface.Connect("user""password")
                        
              hs2 hsinterface.GetHSRef() 
              You have to create a VB.NET Script Connector Script that uses what you just studied to connect to the second HomeSeer instance, and change what you need.

              The script connector already has a variable called hs that refers to the first HomeSeer instance.

              The code above created a hs2 variable connected to the first instance.

              Then you should be able to do anything between the 2 instances. Here I set the second HomeSeer instance O2 device string to the first instance A1 device string:

              hs2.SetDeviceString( "O2", hs.GetDeviceString( "A1" ) )
              --
              stipus

              Comment


                #22
                Originally posted by stipus View Post
                Fine

                I understand you have 2 HomeTroller(s), and you want to communicate some data (device strings, set flags...) between the 2 instances.

                I have never created such a script, but this is something that can be done.

                You have to study VB.NET scripts on how to connect to HomeSeer, and change device strings / values...

                Something like (untested):

                PHP Code:
                          Dim hsinterface As HomeSeer2.application
                          Dim hs2 
                As Scheduler.hsapplication

                          hsinterface 
                = New HomeSeer2.application
                          hsinterface
                .SetHost("localhost")
                          
                hsinterface.Connect("user""password")
                          
                hs2 hsinterface.GetHSRef() 
                You have to create a VB.NET Script Connector Script that uses what you just studied to connect to the second HomeSeer instance, and change what you need.

                The script connector already has a variable called hs that refers to the first HomeSeer instance.

                The code above created a hs2 variable connected to the first instance.

                Then you should be able to do anything between the 2 instances. Here I set the second HomeSeer instance O2 device string to the first instance A1 device string:

                hs2.SetDeviceString( "O2", hs.GetDeviceString( "A1" ) )
                I need to change some virtual devices-status (on or off).....

                For example Hometroller1 'tells' to Hometroller2 to set 'H90 On'.......

                At the moment i have not understood how to do it, but i am trying.

                Comment


                  #23
                  Assuming the Script Connector plugin is running on HomeTroller1, and you have a Script Connector Client running on HomeTroller2

                  When HomeTroller1 wants to set H90 to "ON" on HomeTroller2, trigger a HomeSeer event.

                  Create the HomeSeer event as "running a Script Connector Script on the HomeTroller2 Script Client.

                  Create the Script Connector Script on the HomeTroller2 to Connect to the local instance (use something similar as the code I posted a few posts ago), and set H90 to ON with the command:

                  hs2.SetDeviceStatus( "H90", 2 )

                  This should work.


                  PS RAM: thanks
                  --
                  stipus

                  Comment


                    #24
                    Originally posted by stipus View Post
                    Assuming the Script Connector plugin is running on HomeTroller1, and you have a Script Connector Client running on HomeTroller2

                    When HomeTroller1 wants to set H90 to "ON" on HomeTroller2, trigger a HomeSeer event.

                    Create the HomeSeer event as "running a Script Connector Script on the HomeTroller2 Script Client.

                    Create the Script Connector Script on the HomeTroller2 to Connect to the local instance (use something similar as the code I posted a few posts ago), and set H90 to ON with the command:

                    hs2.SetDeviceStatus( "H90", 2 )

                    This should work.


                    PS RAM: thanks
                    ....i did something similar, but...... the result is 'H90 on' on the server while i wanted 'H90 on' on the client......
                    I did something very wrong......

                    Comment


                      #25
                      CompilerError[s] : line:2 error:BC30002 'Type 'HomeSeer2.application' is not defined.' line:4 error:BC30002 'Type 'HomeSeer2.application' is not defined.' line:7 error:BC30451 'Name 'hsinterfaceGetHSRef' is not declared.'


                      ..... i think i am too newbie......

                      Comment


                        #26
                        I think you have to import the namespace for HomeSeer 2

                        Add this at the top of the Script Connector Script (must be first line)

                        PHP Code:
                        #USING HomeSeer2 
                        If it still doesn't work try

                        PHP Code:
                        #IMPORT HomeSeer2,c:\Program Files\HomeSeer 2\HomeSeer2.dll 
                        (replace the path to the dll if the above does not apply to your installation of HomeSeer).
                        --
                        stipus

                        Comment


                          #27
                          ....nothing to do....
                          in first case:
                          Compile Error : Scripts\AllarmeDay.vb : CompilerError[s] : line:3 error:BC30035 'Syntax error.' line:5 error:BC30002 'Type 'HomeSeer2.application' is not defined.' line:7 error:BC30002 'Type 'HomeSeer2.application' is not defined.' line:10 error:BC30451 'Name 'hsinterfaceGetHSRef' is not declared.'

                          in second case:
                          Compile Error : Scripts\AllarmeDay.vb : CompilerError[s] : line:3 error:BC30035 'Syntax error.' line:10 error:BC30451 'Name 'hsinterfaceGetHSRef' is not declared.'


                          can you help me again?

                          Comment


                            #28
                            Did you forget the dot (.) between hsinterface and GetHSRef()

                            --> hs2 = hsinterface.GetHSRef()
                            <!-- php buffer end -->
                            --
                            stipus

                            Comment


                              #29
                              Originally posted by stipus View Post
                              Did you forget the dot (.) between hsinterface and GetHSRef()

                              --> hs2 = hsinterface.GetHSRef()
                              <!-- php buffer end -->
                              YES! Because i am really a stupid!!

                              But i continue to have a 'Sintax error' because i am not 'friendly' whit this language......
                              This is what i have scripted:


                              Sub Main ( param as Object )
                              #IMPORT HomeSeer2,D:\Program Files\HomeSeer HS2\HomeSeer2.dll
                              dim hsinterface as HomeSeer2.application
                              dim hs2 as Scheduler.hsapplication
                              hsinterface = New HomeSeer2.application
                              hsinterface.SetHost("localhost")
                              hsinterface.Connect("emabonacchi", "hgv360hgv360")
                              hs2 = hsinterface.GetHSRef()

                              hs2.SetDeviceStatus( "H90",2 )
                              'hs.ExecX10( "H90", "On",0,0,false )
                              End Sub

                              Compile Error : Scripts\AllarmeDay.vb : CompilerError[s] : line:3 error:BC30035 'Syntax error.'

                              Comment


                                #30
                                The #IMPORT line MUST be at the TOP of the script (FIRST LINE, before the Sub Main)


                                #IMPORT HomeSeer2,D:\Program Files\HomeSeer HS2\HomeSeer2.dll

                                Sub Main ( param as Object )
                                dim hsinterface as HomeSeer2.application
                                dim hs2 as Scheduler.hsapplication
                                hsinterface = New HomeSeer2.application
                                hsinterface.SetHost("localhost")
                                hsinterface.Connect("emabonacchi", "hgv360hgv360")
                                hs2 = hsinterface.GetHSRef()

                                hs2.SetDeviceStatus( "H90",2 )
                                'hs.ExecX10( "H90", "On",0,0,false )
                                End Sub
                                --
                                stipus

                                Comment

                                Working...
                                X