Announcement

Collapse
No announcement yet.

HS3 Plugin Samples

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

    #61
    Originally posted by Rick Tinker View Post
    Sounds like a bug, but let me look into it. Did anybody report it in Bugzilla? If not, definitely do that because if Rich or I are not subscribed to threads where people report things we do not always see them.
    No I didn't for the sole reason that I don't have a great grasp on the HS3 SDK, I am just not exactly confident whether I report a bug or identify my lack of understanding. If you are happier with that sort of stuff reported as bugs then I of course will.

    I did check Bugzilla and found nothing, oddly enough the bug in willem4ever's post comes back as unauthorised when I try to view it.

    Comment


      #62
      It seems locked, have no clue how to unlock

      Click image for larger version

Name:	Screen Shot 2013-12-07 at 10.13.54.png
Views:	1
Size:	34.0 KB
ID:	1170860

      It looks like you are working on the same functionality when I discovered the problem

      Click image for larger version

Name:	Screen Shot 2013-12-07 at 10.19.09.png
Views:	1
Size:	32.0 KB
ID:	1170861

      Comment


        #63
        Originally posted by Rick Tinker View Post
        No, I am going to completely change that back and add new calls. After the change, the plug-in name will ignore any instance added to it, and it will return ALL triggers from ALL instances (or non instances) of that plug-in, and if you want the triggers just for a specific instance, there will be a new call.

        I will also add the instance to the return value so that when you get all of the triggers or actions, you can see which ones are for instances.

        I am under the impression here that I can make all of these changes without breaking (exception breaking that is) existing plug-ins, but you will definitely have to make a change at your end for any multi-instance plug-ins.
        Rick,

        in version 3.0.0.51, seems like GetTriggers() and TriggerMatches() are broken again. They return the events that were created with older version but I can't get any event that is created with 3.0.0.51.
        I also tried the new GetTriggersInst(), same problem...

        Very frustrating , please have a look asap

        Comment


          #64
          Originally posted by spud View Post
          Rick,

          in version 3.0.0.51, seems like GetTriggers() and TriggerMatches() are broken again. They return the events that were created with older version but I can't get any event that is created with 3.0.0.51.
          I also tried the new GetTriggersInst(), same problem...

          Very frustrating , please have a look asap
          Is this the multi-instance plug-in you are testing with? If so, then use GetTriggersInst and TriggerMatchesInst. GetTriggers and TriggerMatches is for non-instanced plug-ins.
          Regards,

          Rick Tinker (a.k.a. "Tink")

          Comment


            #65
            Originally posted by Rick Tinker View Post
            Is this the multi-instance plug-in you are testing with? If so, then use GetTriggersInst and TriggerMatchesInst. GetTriggers and TriggerMatches is for non-instanced plug-ins.
            I tried GetTriggers and TriggersMatches with a single instance plugin, they don't work.

            As I already said in my previous post, I tried GetTriggersInst as well, same problem

            Comment


              #66
              Originally posted by Rick Tinker View Post
              Is this the multi-instance plug-in you are testing with? If so, then use GetTriggersInst and TriggerMatchesInst. GetTriggers and TriggerMatches is for non-instanced plug-ins.
              The non-Inst versions should have returned all of them - I will have a look.
              Regards,

              Rick Tinker (a.k.a. "Tink")

              Comment


                #67
                Note that the problem only happen for newly created events

                Comment


                  #68
                  Argggggg!!

                  There was a single line of code in there left over from before I made this change that was screwing things up. I will ask Rich to post another build right away.
                  Regards,

                  Rick Tinker (a.k.a. "Tink")

                  Comment


                    #69
                    Originally posted by Rick Tinker View Post
                    Argggggg!!

                    There was a single line of code in there left over from before I made this change that was screwing things up. I will ask Rich to post another build right away.
                    AND it may now PREVENT the events created earlier from appearing and ONLY catch the new ones - let me know if that is the case. I did not have my sample multi instance events saved so I could not test this.
                    Regards,

                    Rick Tinker (a.k.a. "Tink")

                    Comment


                      #70
                      Originally posted by Rick Tinker View Post
                      AND it may now PREVENT the events created earlier from appearing and ONLY catch the new ones - let me know if that is the case. I did not have my sample multi instance events saved so I could not test this.
                      I've just tested .52, and yes it now only catch the new events, all the ones created with an old version are not caught. Is that the desired behavior or are you going to fix this?

                      Comment


                        #71
                        Arrgh - I just spent ages trying to debug my plugins and scratching my head as to why my events all stopped working. How about creating a sticky we can subscribe to that posts new build notifications? Unless I restart HS3, I don't know there's a new build that might address an issue I'm experiencing.
                        Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                        Comment


                          #72
                          Originally posted by beerygaz View Post
                          Arrgh - I just spent ages trying to debug my plugins and scratching my head as to why my events all stopped working. How about creating a sticky we can subscribe to that posts new build notifications? Unless I restart HS3, I don't know there's a new build that might address an issue I'm experiencing.
                          +1
                          huggy_d1

                          Automating made easy

                          Comment


                            #73
                            Minor sample updates

                            A couple minor notes on the plugin samples, specifically I'm working with HSPI_SAMPLE_BASIC.

                            main.vb: the connect retry loop wasn't working for me
                            Code:
                            If ex.Message.ToLower.Contains("timeout occurred.") Then
                            but the exception being thrown has this text (note spelling of occurred):
                            Code:
                            Cannot connect attempt 1: The host failed to connect. Timeout occured. 15000
                            web_config.vb and web_status.vb : I found it very useful to have the standard menus showing as I learned how to work with the plugin. As downloaded the normal header menu buttons were hidden.

                            change
                            Code:
                            stb.Append(hs.GetPageHeader(pageName, "Sample" & instancetext, "", "", True, False))
                            to
                            Code:
                            stb.Append(hs.GetPageHeader(pageName, "Sample" & instancetext, "", "", False, False))
                            HS 3.0.0.435 (PRO)
                            Hardware: Napco GEM-P9600 | VenstarT1800 w/Insteon 2441V adapter | Insteon PLM
                            Plugins HS3: Napco Gemini (mine) | Insteon Thermostat (mine) | Insteon Plug-in (mnsandler) | HSTouch Server (HST)
                            Platform: Windows 10 Pro 64bit, core2 duo 2.0Ghz, 4GB memory
                            http://www.kazteel.com/

                            Comment


                              #74
                              I believe there are a couple off-by-1 errors in the HSPI_SAMPLE_BASIC that had me scratching my head for a bit. Thought I'd post for any other new plugin developers.

                              plugin.vb line 194 in SubTriggerCount()
                              Code:
                              trigger = triggers(TriggerNumber - 1)
                              should be
                              Code:
                              trigger = triggers(TriggerNumber)
                              plugin.vb line 221 in SubTriggerName()
                              Code:
                              Return IFACE_NAME & ": " & trigger.Keys(SubTriggerNumber)
                              should be
                              Code:
                              Return IFACE_NAME & ": " & trigger.Keys(SubTriggerNumber - 1)
                              HS 3.0.0.435 (PRO)
                              Hardware: Napco GEM-P9600 | VenstarT1800 w/Insteon 2441V adapter | Insteon PLM
                              Plugins HS3: Napco Gemini (mine) | Insteon Thermostat (mine) | Insteon Plug-in (mnsandler) | HSTouch Server (HST)
                              Platform: Windows 10 Pro 64bit, core2 duo 2.0Ghz, 4GB memory
                              http://www.kazteel.com/

                              Comment


                                #75
                                Yup, I musta' had Dyslexia that day.

                                The keys collection part is zero based, whereas the object collection part is one based. (a combination of dictionary and collection objects rolled into one.)

                                You could switch that all to a sorted list I think, but I think you would also want to add some error checking to that as well for adding actions and triggers from the events page.


                                I made the changes in the project and checked them in.

                                I'll let Rich know so he can put out a new source code file.
                                Wade

                                sigpic

                                website | products | support | youtube
                                I know nothing...., nothing!!!

                                Comment

                                Working...
                                X