Announcement

Collapse
No announcement yet.

How to enable/disable a plugin from script?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to enable/disable a plugin from script?

    I want to send some commands to my Xanura PIMX35 interface everytime I start HS.

    This requires me to temporarily disable the ACT TI103 plug in because otherwise I cannot open the com port for the interface.

    My question:

    How do I enable/disable a plugin from a script?

    Francois

    #2
    Hi Francois

    The reference for scripting is here:

    http://www.homeseer.com/support/home...2/homeseer.htm

    Go to using scripts and then scripting functions, events are covered. There are several functions depending on what you are doing

    Good luck

    Paul
    Paul

    Comment


      #3
      Originally posted by pbibm View Post
      Hi Francois

      The reference for scripting is here:

      http://www.homeseer.com/support/home...2/homeseer.htm

      Go to using scripts and then scripting functions, events are covered. There are several functions depending on what you are doing

      Good luck

      Paul
      Paul,

      thanks for the reply. I consider it best practise to look at the manuals and search the usual channels before I post a question. This is what I did but I am still unclear. I cannot find a reference to plugin enable/disable in the help file. Have I overlooked something? Pls. let me know

      Francois

      Comment


        #4
        As far as I'm aware, there is no scripting command to enable/disable plugins.
        Jon

        Comment


          #5
          That's a pitty, I have tested by using the Web interface and disable the plugin, this will free up the com port and make it possible to use it in another program.

          For my understanding, is the web interface in anyway related to the scripting functions? In other words does the Web interface use the scripting command set or is this a totally different hook into HS? If yes, I like to findout what commands the enable/disable button on the setup/interface page calls .....

          Francois

          Comment


            #6
            Originally posted by fvhemert View Post
            I want to send some commands to my Xanura PIMX35 interface everytime I start HS.

            This requires me to temporarily disable the ACT TI103 plug in because otherwise I cannot open the com port for the interface.

            My question:

            How do I enable/disable a plugin from a script?

            Francois
            Do these devices share a com port?
            -Rupp
            sigpic

            Comment


              #7
              Aren't plugins windows processes? If so, would the Jon00 Remote Computer Control & Network Monitor or similar plugin allow you to stop the plugin (windows process), do what you need to do in RS232, and then restart that plugin (windiows process)?

              Or would that break homeseer?
              Paul

              Comment


                #8
                Originally posted by pbibm View Post
                Aren't plugins windows processes? If so, would the Jon00 Remote Computer Control & Network Monitor or similar plugin allow you to stop the plugin (windows process), do what you need to do in RS232, and then restart that plugin (windiows process)?

                Or would that break homeseer?
                No, plugins run in the same memory space as the HomeSeer.exe so this will not work. I'm still trying to figure out why the plugin needs to be disabled?
                -Rupp
                sigpic

                Comment


                  #9
                  Originally posted by Rupp View Post
                  No, plugins run in the same memory space as the HomeSeer.exe so this will not work. I'm still trying to figure out why the plugin needs to be disabled?
                  I think he wants to send some serial commands to the device for some capability that the plugin does not provide, and then go back to the plugin once its done
                  Paul

                  Comment


                    #10
                    Originally posted by pbibm View Post
                    I think he wants to send some serial commands to the device for some capability that the plugin does not provide, and then go back to the plugin once its done
                    Ah. Gotcha.
                    -Rupp
                    sigpic

                    Comment


                      #11
                      There are methods in the plugin that communicate to the RS232 port. Maybe the those methods can be (or are) exposed public so that you could use them to communicate through the plugin itself?

                      As an example, the insteon plugin from msandler exposes public methods and also allows a script to be run to communicate through it to your insteon network. This same idea might apply?
                      Paul

                      Comment


                        #12
                        Originally posted by pbibm View Post
                        I think he wants to send some serial commands to the device for some capability that the plugin does not provide, and then go back to the plugin once its done
                        Exactly right, what I am seeing is that if there is a power failure the PIMX35 (USB/RS232 to X10) will fall back to default settings. Top overcome this I want to send an initialization string every time HS starts. I am looking at:

                        1. Start HS
                        2. Disable the ACT plugin to free the com port
                        3. Open the com port from script and send init string
                        4. Close com port
                        5. Enable ACT plugin

                        I Like the suggestion of methods being exposed by the plug in, not sure if these are published though.

                        Any suggestions where to look (not really familiar with this)

                        Francois

                        Comment


                          #13
                          can't see a particularly easy way of doing this, although i've got two ideas;

                          1) Instead of double clicking the homeseer icon to launch instead you create either a batch file or a small vb console application (AFAIK you can send serial commands in batch files). This file/app would do the serial port stuff and then launch homeseer after this had completed. On any startup files you would point to the app/file instead of the main homeseer exe.

                          2) Re-write or get whoever wrote the plugin to add the function to it, depends on your programmer ability as to whether you could re-write it...if it already has a interfacing DLL then it's probably not hard to get it talking to HS.

                          Comment


                            #14
                            Can't you script the serial commands you want sent into a shortcut to run when you start up HS? Or does the plugin initialization stomp on them?

                            Comment


                              #15
                              Can't you create a NEW homeseer configuration that has the plug-in disabled (copy your existing homeseer configuration to homeseer2_someplugin_disabled.mdb). Open up homeseer at boot up with that plug-in disabled configuration in a startup script something like this:

                              Code:
                              @echo off
                              c:
                              cd \program files\homeseer 2\
                              homeseer.exe homeseer2_someplugin_disabled.mdb
                              homeseer.exe homeseer2_normal.mdb
                              In the homeseer2_someplugin_disabled configuration, have a script run that does the initialization process, save the status of the serial init to a file, then force homeseer to exit.

                              Now the real homeseer fires up using the plugin already initialized.

                              Kind of complicated, but also kind of a simple concept.

                              If you don't like this, you can use something like AutoIt to bring up the configuration screen, disable the plugin, shut down homeseer, restart homeseer with the plug-in disabled, toggle some bit to trigger your init script to run, and at the end of the script, trigger auto-it to continue and enable the plugin, shutodown, then restart homeseer. That's a lot more difficult to bullet-proof IMHO unless you're an AutoIt! wizard.

                              Please post your final solution!
                              huggy_d1

                              Automating made easy

                              Comment

                              Working...
                              X