Announcement

Collapse
No announcement yet.

Disable / Enable Plugin via Script?

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

  • Disable / Enable Plugin via Script?

    Is it possible to disable then re-enable a plugin via script? I'm having issues with one that needs to be restarted on a regular basis. I don't see anything in the scripting section of the docs to disable and re-enable plugins. There must be a way?

  • #2
    No, there isn't. This is something I've wanted all along. I guess we need to put it in as a feature request.

    Bill

    Comment


    • #3
      You could most certainly do it, but there is a trick, and a little bit work to pull it off.

      Using fiddler, you could capture the web request that does the disable, also capture the web request when you're enabling the plugin.

      If you replay these requests, it does in fact work.

      In my case, the request to interfaces consisted something like this:
      enabled_5 unchecked
      id enabled_5_ID598385

      Sending that, disabled the plugin

      Scraping to make sure you have the right ID, is going to be a trick, since it could change if you add or remove plugins.

      With a little bit of parsing of the data that comes back from the interfaces page, you could figure out exactly what to send.
      Joe (zimmer62)

      BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

      Comment


      • #4
        I do have a HS3 Plugin Enable/Disable script for download on my site. It has had very limited testing....
        Jon

        Comment


        • #5
          Originally posted by jon00 View Post
          I do have a HS3 Plugin Enable/Disable script for download on my site. It has had very limited testing....
          Jon00: I am trying to use said plugin, and no matter what, I get an error saying the plugin is not in the list, for example: Plugin "AquaConnect" not located in plugin list.

          Code:
           
            May-16 11:21:05 PM         Jon00_PluginSet    Plugin "AquaConnect" not located in plugin list   
            May-16 11:21:05 PM         Event    Running script in background: C:/Program Files/HomeSeer HS3 PRO/scripts/Jon00PluginSet.vben   
            May-16 11:21:05 PM         Event    Event Trigger "Pool Disable Plugin"   
            May-16 11:21:05 PM         Event    Event Pool Disable Plugin triggered by the event page 'Run' button.
          I have copied the plugin directly from the list. The name is also spelled and cased correctly from the startup log. I have tried parameters with and without quotes without luck. Thoughts?

          -BD

          Comment


          • #6
            Hmmm strange as the plugin author has tried it and it works fine with him: http://board.homeseer.com/showpost.p...70&postcount=6

            Can you try enabling/disabling another plug-in to see if that works?
            Jon

            Comment


            • #7
              Originally posted by jon00 View Post
              Hmmm strange as the plugin author has tried it and it works fine with him: http://board.homeseer.com/showpost.p...70&postcount=6

              Can you try enabling/disabling another plug-in to see if that works?
              Yes, you are correct. It is working for him, not me.

              I tried Insteon and it also fails.

              Code:
               
               May-17 12:28:34 PM         Jon00_PluginSet    Plugin "Insteon" not located in plugin list   
                May-17 12:28:34 PM         Event    Running script in background: C:/Program Files/HomeSeer HS3 PRO/scripts/Jon00PluginSet.vben   
                May-17 12:28:34 PM         Event    Event Trigger "Pool Disable Plugin"
              I am stumped!

              -BD

              Comment


              • #8
                I would say the issue is that the script cannot access the plugins page. Do you have multiple NIC's or something that would prevent HS from detecting its correct IP Address?
                Jon

                Comment


                • #9
                  Originally posted by jon00 View Post
                  I would say the issue is that the script cannot access the plugins page. Do you have multiple NIC's or something that would prevent HS from detecting its correct IP Address?
                  No but I have both HS2 and HS3 running. HS2 web port 80, HS3 is on port 81, though I doubt that matters. Could that do it?

                  -BD

                  Comment


                  • #10
                    No, that should not matter.

                    I think I added a method to add the IP address of HS manually but cannot quite remember what I did ( can't check at the moment)

                    For the parameters try:

                    AquaConnect;0;IPAddress

                    And

                    AquaConnect;0;;IPAddress

                    Where IPAddress is the IP Address of your HS3 Webserver without the port.
                    Jon

                    Comment


                    • #11
                      Originally posted by jon00 View Post
                      No, that should not matter.

                      I think I added a method to add the IP address of HS manually but cannot quite remember what I did ( can't check at the moment)

                      For the parameters try:

                      AquaConnect;0;IPAddress

                      And

                      AquaConnect;0;;IPAddress

                      Where IPAddress is the IP Address of your HS3 Webserver without the port.
                      No luck... Tried AquaConnect;0;192.168.1.200 and AquaConnect;0;;192.168.1.200 and get same notice that the plugin is not in the list.

                      -BD

                      Comment


                      • #12
                        Sorry, I missed this. I'll put in some debug code and send you a copy next week. Are you on the latest version of HS3?
                        Jon

                        Comment


                        • #13
                          V1.0.1 is now available

                          My HS3 Plugin Enable/Disable Utility has been updated to V1.0.1 to make it compatible with Linux versions of HS3.

                          There is no need to update if you run this under Windows.
                          Jon

                          Comment

                          Working...
                          X