Announcement

Collapse
No announcement yet.

Jon00 Homeseer Plugin Enable/Disable utility

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

    A few people are getting this error in Linux and I'm still not sure why.

    Try the following. Open up Jon00Plugin.ini in your config folder and add the following under [settings]:

    UseInterface=2

    If that fails try:

    UseInterface=3

    Let me know the results.

    Jon

    Comment


      For those of you who have had issues with this under Linux (only one or 2 operations before errors in the log), please try V1.0.8 on my site.
      Jon

      Comment


        I downloaded the file and instructions and I think I followed them. However, the virtual devices were not created.

        I did the following:

        1. Copied the "Jon00Plugin.vben" file to the scripts folder under my main HS directory
        2. I edited the "startup.vb" file to add "hs.RunScript("Jon00Plugin.vben", False, False)"
        3. I do not require a password to login locally
        4. There is only user that has "admin-local" (or any other "local" privileges)

        A few observations:
        1. the startup.vb files contains "You may also have Startup.vb and it will be run instead of this script.". I thought this is the startup.vb file. see below for review.
        2. The HS3 Device List filters now include the Floor "Utility" and the Room "Jon00 Plugin". That was not the case before I did the 4 steps above.

        Your assistance is greatly appreciated and I will gladly donate once I have a working plugin. It will be worth every penny!

        ' This is the startup script
        ' It is run once when HomeSeer starts up
        '
        ' You may also have Startup.vb and it will be run instead of this script.
        '
        Sub Main(Parm As Object)

        hs.WriteLog("Startup", "(Startup.vb script) Scripting is OK and is now running Startup.vb")

        Dim SpeakClients As String = ""
        SpeakClients = hs.GetInstanceList
        If SpeakClients Is Nothing Then SpeakClients = ""
        If String.IsNullOrEmpty(SpeakClients.Trim) Then
        hs.WriteLog("Startup", "(Startup.vb script) No speaker clients detected, waiting up to 30 seconds for any to connect...")
        ' There are no connected speaker clients, so let's wait 30 seconds
        ' (which is the default re-connect interval for a speaker client)
        ' to see if we can get one connected, otherwise the two speak
        ' commands below will not be heard.
        hs.WaitSecs(1)
        Dim Start As Date = Now()
        Do
        SpeakClients = hs.GetInstanceList
        If SpeakClients Is Nothing Then SpeakClients = ""
        If String.IsNullOrEmpty(SpeakClients.Trim) Then
        hs.WaitSecs(1)
        Else
        Exit Do
        End If
        Loop Until Now.Subtract(Start).TotalSeconds > 30
        End If


        ' Speak - comment the next line if you do not want HomeSeer to speak at startup.
        hs.Speak("Welcome to Home-Seer", True)

        ' speak the port the web server is running on
        Dim port As String = hs.GetINISetting("Settings", "gWebSvrPort", "")
        If port <> "80" Then
        hs.Speak("Web server port number is " & port)
        End If


        ' You may add your own commands to this script.
        ' See the scripting section of the HomeSeer help system for more information.
        ' You may access help by going to your HomeSeer website and clicking the HELP button,
        ' or by pointing your browser to the /help page of your HomeSeer system.

        hs.RunScript("Jon00Plugin.vben", False, False)
        ' The above line was added by Michael to enable to the Jon00 plugin

        End Sub


        Comment


          It is nice to see such a detailed post describing your issue 👍

          If you have entries in the device management filters for 'Jon00 Plugin' and 'Utility' then I suspect they have been created. In addition to Floor/Room filters, make sure 'Virtual' is ticked under the device type filter.
          Jon

          Comment


            Originally posted by jon00 View Post
            It is nice to see such a detailed post describing your issue 👍

            If you have entries in the device management filters for 'Jon00 Plugin' and 'Utility' then I suspect they have been created. In addition to Floor/Room filters, make sure 'Virtual' is ticked under the device type filter.
            That was it. Now I feel like an idiot

            Thanks so much for the assistance. I'll test it with the plugin that I want to enable / disable and if it works I will make a donation. Thanks again.

            Comment


              Originally posted by mgonzales100 View Post

              That was it. Now I feel like an idiot

              Thanks so much for the assistance. I'll test it with the plugin that I want to enable / disable and if it works I will make a donation. Thanks again.
              I tested it and it works flawlessly. Great little utility.

              Just made a donation!

              Comment


                Jon,

                I am trying to get this utility working again. Not sure when it failed, but I am pretty sure it was due to me fixing another issue with my settings.ini and scriptingreference line.

                I am seeing these errors in the linux log upon startup: Which prevents this utility from working at all.
                Code:
                Nov 8 10:41:47 bessel-homeseer mono[9894]: 10:41:47:2834:[Error]->Compiling script Jon00Plugin.vben: The import 'System.Core' could not be found.
                Nov 8 10:41:47 bessel-homeseer mono[9894]: 10:41:47:2849:[Error]->Compiling script Jon00Plugin.vben: 'Dispose' is not a member of 'System.Net.HttpWebResponse'.
                Nov 8 10:41:47 bessel-homeseer mono[9894]: 10:41:47:2867:[Error]->Compiling script Jon00Plugin.vben: 'Dispose' is not a member of 'System.Net.HttpWebResponse'.
                Nov 8 10:41:47 bessel-homeseer mono[9894]: 10:41:47:2880:[Error]->Compiling script Jon00Plugin.vben: Function without an 'As' clause; Object return type assumed.
                Nov 8 10:41:47 bessel-homeseer mono[9894]: 10:41:47:2892:[Error]->Compiling script Jon00Plugin.vben: Function without an 'As' clause; Object return type assumed.
                hs log:
                Nov-08 10:41:47 AM Error Compiling script Jon00Plugin.vben: Function without an 'As' clause; Object return type assumed.
                Nov-08 10:41:47 AM Error Compiling script Jon00Plugin.vben: Function without an 'As' clause; Object return type assumed.
                Nov-08 10:41:47 AM Error Compiling script Jon00Plugin.vben: 'Dispose' is not a member of 'System.Net.HttpWebResponse'.
                Nov-08 10:41:47 AM Error Compiling script Jon00Plugin.vben: 'Dispose' is not a member of 'System.Net.HttpWebResponse'.
                Nov-08 10:41:47 AM Error Compiling script Jon00Plugin.vben: The import 'System.Core' could not be found.

                my settings.ini scripting reference line:
                Code:
                ScriptingReferences=Newtonsoft.Json;Newtonsoft.Json.dll,System.Web;System.Web.Extensions.dll
                startup.vb
                Code:
                ' This is the startup script
                ' It is run once when HomeSeer starts up
                '
                ' You may also have Startup.vb and it will be run instead of this script.
                '
                sub Main(parm as object)
                
                hs.WriteLog("Startup", "Scripting is OK and is now running Startup.vb")
                
                
                hs.RunScript("Jon00Plugin.vben", False, False)
                
                
                End Sub
                here is my output from mono --version
                Code:
                Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 13:58:50 UTC 2020)
                Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
                
                TLS: __thread
                SIGSEGV: altstack
                Notifications: epoll
                Architecture: amd64
                Disabled: none
                Misc: softdebug
                Interpreter: yes
                LLVM: yes(610)
                Suspend: hybrid
                GC: sgen (concurrent by default)

                Comment


                  Originally posted by sbessel View Post
                  Jon,

                  I am trying to get this utility working again. Not sure when it failed, but I am pretty sure it was due to me fixing another issue with my settings.ini and scriptingreference line.

                  I am seeing these errors in the linux log upon startup: Which prevents this utility from working at all.
                  <snip>
                  Looks like it was a version issue. I downloaded the latest from your website and it is working just fine now.
                  I couldn't tell what version I had so I just updated it anyway.

                  Comment


                    Good to hear you got this sorted.

                    FYI, the version number is stored in Jon00Plugin.ini file
                    Jon

                    Comment

                    Working...
                    X