Announcement

Collapse
No announcement yet.

Issue with Sample VB Plugin

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

    Issue with Sample VB Plugin

    Hi,

    It might be just me, But i cant get the VB sample to compile, Below are the errors I get:

    Click image for larger version

Name:	Error2.JPG
Views:	173
Size:	9.1 KB
ID:	1326186Click image for larger version

Name:	Error1.JPG
Views:	162
Size:	17.1 KB
ID:	1326187Click image for larger version

Name:	Error3.JPG
Views:	141
Size:	6.5 KB
ID:	1326188

    Is there something I am missing here?

    Thanks.
    Mat

    #2
    It's impossible to see the images, couple of suggestions:
    1. Copy/paste the error as text
    2. When insert images - always insert "Full Size" and then you can resize the image. But you will be able to click on the image and see it in full size.

    Comment


      #3
      Hi Alexbk66,

      Thanks for your note, They are full size, I think the problem is the Snipping tool, It doesn't like my setup... anyhow... Below are text copys.

      Severity Code Description Project File Line Suppression State
      Error BC30516 Overload resolution failed because no accessible 'New' accepts this number of arguments. HomeSeerSamplePlugin-VB C:\Users\Mat\Desktop\Programming Projects\Sample-Plugin-VB-master - HS4\Sample-Plugin-VB-master\WriteLogSampleActionType.vb 69 Active

      Severity Code Description Project File Line Suppression State
      Error BC30516 Overload resolution failed because no accessible 'New' accepts this number of arguments. HomeSeerSamplePlugin-VB C:\Users\Mat\Desktop\Programming Projects\Sample-Plugin-VB-master - HS4\Sample-Plugin-VB-master\SampleTriggerType.vb 85 Active

      Severity Code Description Project File Line Suppression State
      Error BC30516 Overload resolution failed because no accessible 'New' accepts this number of arguments. HomeSeerSamplePlugin-VB C:\Users\Mat\Desktop\Programming Projects\Sample-Plugin-VB-master - HS4\Sample-Plugin-VB-master\SampleTriggerType.vb 78 Active

      Thanks
      Mat

      Comment


        #4
        Hi All,

        Has anyone else had this happen???? I kinda want to resolve it so i can start porting....

        I can comment these lines out to get it to compile, But i don't think that's the best idea moving forward....

        Thanks
        Mat

        Comment


          #5
          Matt,

          Same here. It seems to many parameters are used in the “New” statement. Remove the last two parameters and you can compile. But when used as plugin in HS4, it will still not work - the sample sticks at initializing plugin. I do not think the VB version is actively tested so far.

          Wim
          -- Wim

          Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

          1210 devices/features ---- 392 events ----- 40 scripts

          Comment


            #6
            I will get this checked on Mon, probably needs an updated due to SDK changes. Does the C# version build ok?
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #7
              Hi All,

              Thanks for the Response w.vuyk... I removed the extra parameters trying that aswell, But no bingo... Also tried commenting out the lines, But no bingo either....

              And No idea on the C#.... I presume it must as other people seem to be coding there plugins... But I use and prefer VB.

              I might use the code converter and convert those routines and see if they are different.

              Thanks
              Mat

              Comment


                #8
                Rich,

                The C# version compiles here and runs fine. The VB version needs updating (check my answer earlier), but once it compiles the plugin will not start (is initialising forever)

                As far I can tell the initialize routine does the same in VB as in C#, so there must be another dependency in HSPI that is fulfilled in the sample C# and not in the sample VB?
                -- Wim

                Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                1210 devices/features ---- 392 events ----- 40 scripts

                Comment


                  #9
                  Rich,

                  I do have to revoke that, both sample plugins C# and VB are throwing errors once I updated to latest versions of pluginSDK and HS4. And once you 'solve' these errors, both do never get initialized anymore:

                  Lines throwing error in SampleTriggerType (at least 3 times)

                  Code:
                   Public Sub New(ByVal id As Integer, ByVal eventRef As Integer, ByVal selectedSubTriggerIndex As Integer, ByVal dataIn As Byte(), ByVal inListener As TriggerTypeCollection.ITriggerTypeListener, Optional ByVal debugLog As Boolean = False)
                          MyBase.New(id, eventRef, selectedSubTriggerIndex, dataIn, inListener, debugLog)
                      End Sub
                  Commenting this code and its callers does end up and trail and see route to get in compiled. Every trigger and action refernce will throw errors at you. Once at the point those errors are solved, debugging lets you run the code and you can get to the sample pages.
                  But when compiled and place in the HS4 directory, the plugin is showing initialised in the log, but plugin page shows initialising still and plugin pages are not shown in the menu.

                  Click image for larger version

Name:	2019-09-15 14_59_01-Plugin Management.png
Views:	145
Size:	21.1 KB
ID:	1326668

                  Wim

                  -- Wim

                  Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                  1210 devices/features ---- 392 events ----- 40 scripts

                  Comment


                    #10
                    Hi Wim,

                    Thanks for the reply's and testing, I'm so glad it was not just me....

                    Looking forward to it being resolved so i can get on with some coding....

                    Thanks
                    Mat

                    Comment


                      #11
                      Originally posted by rjh View Post
                      I will get this checked on Mon, probably needs an updated due to SDK changes. Does the C# version build ok?
                      Rich,

                      Any progress? I have tried with a second plugin and it is also always initialising when compiled, with debug running through visual studio it works just fine? What I also notice is that both HS4 plugins are shown as HS3 plugins?

                      Click image for larger version  Name:	2019-09-17 19_56_06-Plugin Management.png Views:	0 Size:	65.9 KB ID:	1327122

                      And also both plugins are reporting they have initialised well, but in 15+ seconds, wich is very slow and not happening when statred throug visual studio. In compiled status, logs are not shown, while in Visual Studio loglines are written to the log....


                      Click image for larger version  Name:	2019-09-17 19_57_47-Log.png Views:	0 Size:	85.3 KB ID:	1327121

                      Any chance to get this solved?

                      Wim
                      -- Wim

                      Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                      1210 devices/features ---- 392 events ----- 40 scripts

                      Comment


                        #12
                        The problem with the VB sample is that it was missing the .exe.config file. The sample on Github has been updated. If you add that file the plugin should load ok. For your own plugin, make sure you have a plugin.exe.config file, see the sample plugin for the format. The key is the bin path, it has to point to bin/homeseer.

                        Originally posted by w.vuyk View Post

                        Rich,

                        Any progress? I have tried with a second plugin and it is also always initialising when compiled, with debug running through visual studio it works just fine? What I also notice is that both HS4 plugins are shown as HS3 plugins?

                        Click image for larger version Name:	2019-09-17 19_56_06-Plugin Management.png Views:	0 Size:	65.9 KB ID:	1327122

                        And also both plugins are reporting they have initialised well, but in 15+ seconds, wich is very slow and not happening when statred throug visual studio. In compiled status, logs are not shown, while in Visual Studio loglines are written to the log....


                        Click image for larger version Name:	2019-09-17 19_57_47-Log.png Views:	0 Size:	85.3 KB ID:	1327121

                        Any chance to get this solved?

                        Wim
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment


                          #13
                          Rich,

                          Thanks for the hint here. Ofcourse I did not check that part
                          -- Wim

                          Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                          1210 devices/features ---- 392 events ----- 40 scripts

                          Comment

                          Working...
                          X