Announcement

Collapse
No announcement yet.

Jon00 Homeseer Plugin Enable/Disable utility

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

    Okay, I've solved it by using the tip provided by Jon00.
    As Jon00 is using HttpWebRequest, it should not using the IE settings at all (exept for proxy settings).

    I wrote a simple script for testing. It seems that running a script locally gives some different results based on how you've set up permissions. Here's the results. Notice the wrapped web page in the log.



    Aha! Yes, the user "data" was set as "Normal+Local" in the Tools -> Setup -> Network page. I set that user to "Normal" (I had another local user aswell), and wouldn't you know:



    So, no: It's not ESXi (of course) or any other strange issues. But:
    You need to have just one local user, and that user needs to have admin rights (of course).



    If you want to test this yourself you can use this script:
    Code:
        Sub Main(parm As Object)
            Dim request As System.Net.HttpWebRequest = DirectCast(System.Net.WebRequest.Create("http://localhost/interfaces"), System.Net.HttpWebRequest)
            Dim response As System.Net.HttpWebResponse = DirectCast(request.GetResponse, System.Net.HttpWebResponse)
            Dim reader As New System.IO.StreamReader(response.GetResponseStream)
    
            Dim output As String = reader.ReadToEnd
            hs.Writelog("Test interface page", output)
        End Sub
    HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
    Running on Windows 10 (64) virtualized
    on ESXi (Fujitsu Primergy TX150 S8).
    WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

    Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

    Comment


      Moskus -> This is EXACTLY it!!! I changed my settings and it worked!!


      Okay to re-phrase as I followed what Moskus was saying but it was a little opaque.
      ------------------

      In order for Jon00's script to work, you can only have ONE Homeseer/HS3 user account that has Local privileges assigned to it. Out of default I had created additional HS3 user accounts for different folks to have access to our system, and I had made them User + Local, Admin + Local, etc.

      I changed all the HS3 user accounts that I had created to NOT have Local account group type included, and then made sure the HS3 'default' user account was Admin + Local (and thus the only user to have Local). Then restarted HS3, boom all my plugs came up in the dropdown for Jon00's script. Perfect. Obviously what's happening is John00's script essentially runs under the 'default' user creds since they're the one with Local rights.

      Jon00 I would HEARTILY recommend adding this to the documentation, Moskus you're the MAN!!!!!!

      Originally posted by Moskus View Post
      Okay, I've solved it by using the tip provided by Jon00.
      As Jon00 is using HttpWebRequest, it should not using the IE settings at all (exept for proxy settings).

      I wrote a simple script for testing. It seems that running a script locally gives some different results based on how you've set up permissions. Here's the results. Notice the wrapped web page in the log.



      Aha! Yes, the user "data" was set as "Normal+Local" in the Tools -> Setup -> Network page. I set that user to "Normal" (I had another local user aswell), and wouldn't you know:



      So, no: It's not ESXi (of course) or any other strange issues. But:
      You need to have just one local user, and that user needs to have admin rights (of course).



      If you want to test this yourself you can use this script:
      Code:
          Sub Main(parm As Object)
              Dim request As System.Net.HttpWebRequest = DirectCast(System.Net.WebRequest.Create("http://localhost/interfaces"), System.Net.HttpWebRequest)
              Dim response As System.Net.HttpWebResponse = DirectCast(request.GetResponse, System.Net.HttpWebResponse)
              Dim reader As New System.IO.StreamReader(response.GetResponseStream)
      
              Dim output As String = reader.ReadToEnd
              hs.Writelog("Test interface page", output)
          End Sub

      Comment


        Good work Moskus

        Thanks for your detective work on this. I have now added this information to the documentation.
        Jon

        Comment


          Originally posted by fksk View Post
          Moskus you're the MAN!!!!!!
          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
          Running on Windows 10 (64) virtualized
          on ESXi (Fujitsu Primergy TX150 S8).
          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

          Comment


            Where To Find This Plugin?

            Just wondering where this plugin is located for download? Thanks....Rick

            Comment


              Originally posted by Rick Bonari View Post
              Just wondering where this plugin is located for download? Thanks....Rick
              Click on the graphic under Jon’s signature in the post at the top of this page.
              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

              Comment


                Hello Jon00,

                I installed the script in the HS3 Program scripts directory and created an event that is triggered manually. I told the event to run script in the script directory that you show in your example when triggered manually. I then did as you said to do using Sub or Function: Main and Parameters: Plugin;0.

                It created the two devices on the device management page after I first ran this script and when I enable and disable the plugins from the device management page or HS3Touch page they disable and enable just fine.

                I am puzzled about one thing. When I first ran the script, with Parameter: Plugin;0, why when I went to the plugin management screen was the plugin still enabled? I thought we were supposed to be able to create events that would disable or enable plugins depending on various conditions such as time, etc. Again when I do a manual trigger of this event from the events creations page, it did give me the two devices in the device management screen but it did not when first run disable the plugin as I would have expected.

                What am I missing here? I think maybe I don't understand exactly how the plug-in works. I do like this plugin. Thanks much !!!!!! Rick
                Last edited by Rick Bonari; July 8, 2018, 12:29 AM. Reason: Additonal Information

                Comment


                  It looks like you installed version 1 of the script. You need to use V2. Both are included in the same zip. If you unzip the folder to a temporary directory, preserving the file structure, you will see 2 folders called V1 and V2. Use the scripts & documentation in the V2 folder.
                  Last edited by jon00; July 8, 2018, 02:53 AM.
                  Jon

                  Comment


                    Jon00,

                    I believe I did install v2. To install v2, do I need to remove two devices on device management page and the event I created and then remove current script and load version 2 script in scripts folder?
                    What if v2 is currently loaded? How can you tell what version is loaded? Thanks much....Rick
                    Last edited by Rick Bonari; July 8, 2018, 08:58 AM. Reason: Additional Information

                    Comment


                      Rick,

                      If you have 2 virtual devices but using notation Plugin;0 in a script then it appears you have installed V2 but reading both sets of documentation for V1 and V2.

                      Once version 2 is setup correctly, then it is only called from events.

                      Please only read the pdf document called 'Jon00 PluginV2.pdf' and ensure you have followed the install instructions. The script Jon00Plugin.vben has a last modified date of June 1st 2018.
                      Jon

                      Comment


                        Hello Jon00,

                        This plugin was working until I installed the MyQ Plugin. There is a problem with the MyQ Plugin where it shows in the plugin manager page and it enables and disables but in the status area it says that plugin start is pending for MyQ Plugin. The MyQ Plugin doesn't show in the plugin drop down list either. This seems to have broken your plugin from working.
                        Any ideas on what I might do to resolve this issue? Again your plugin was working fine until I installed the MyQ Plugin which appears to have a problem starting. Thanks Much....Rick

                        Comment


                          I assume you restarted Homeseer to update the plugin list in the drop down?
                          Jon

                          Comment


                            Hello Jon00,

                            Yes, I restarted homeseer software and no luck. Even though the MyQ Plugin shows in the device manager and can not be enabled it doesn't show up in the plugin dropdown list nor in your plugin drop down list for enable and disable devices. Not sure if MyQ Plugin is messing up your plugin or not. Help on resolving this issue is much appreciated.....Rick

                            Comment


                              I'm still not quite sure what you are saying. If you go to HomeSeer's 'Interfaces and Add-on' page (where you normally enable/disable plugins) can you see and enable/disable the MyQ Plugin correctly there? If not, it won't work with mine either. If you can see it on that page but saying that you cannot see the MyQ plugin in my enable and disable drop down lists after a restart and device management page refresh, does it still control other plugins OK?
                              Jon

                              Comment


                                No, it doesn't enable or disable any of the plugins in your dropdown list for enable and disable devices. I made sure password protection was off also. I can't help feeling that the myq plugin is the problem. It doesn't show up in the dropdown for either homeseer plugin dropdown or your dropdowns. It does not start. The author of plugin says homeseer requires .NET framework 4.6 or higher for the plugin to work. The myq plugin does show in device manager and I can enable or disable it but it will not start up. It says startup pending but never starts. Any further help is much appreciated...Rick

                                Comment

                                Working...
                                X