Announcement

Collapse
No announcement yet.

Events for New Versions? - Implemented

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

    Events for New Versions? - Implemented

    Have you considered adding events to your plugin? Trying to create HS events to monitor device changes for the number of plugins I'm running and keep up with them as they change is a lot of extra work that this plugin could make much easier.

    I'd love to see something like:
    • Updates: New Plugin Version Is Available
      • A plugin has released a new stable version
      • A plugin has released a new beta version
    To go along with that, a PluginFunction that would return a "summary" string that could be used in notificaitons would be awesome, too. Something like:
    • GetPluginSummary(includeBeta As Boolean) As String
      • hs.PluginFunction("Updates", "", "GetPluginSummary", true) = "Plugin A (1.2.3.4); Plugin B (2.4.6.8 BETA), Plugin C (3.0.0.0)"

    For symmetry purposes you could add an "HS" version for both of those things, but if you condense it to a single device (instead of two, 1 for regular and 1 for beta) per my other thread, it wouldn't be strictly necessary since I could just setup my own event to monitor the HS Version device.

    #2
    I like the trigger suggestion, so I just put it on the todo list. Right behind the version comparison fix.

    As for the summary, HS4 already has a JSON for something similar: https://docs.homeseer.com/display/HSPI/pluginlist
    Would that work for you?
    Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
    Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

    Comment


      #3
      Actually I should have taken it further and asked for a "Plugin Summary" device that already has that string in it that just gets updated whenever you check the status. That way I could just use a string replacement token like $DSR:123$ to reference it in a push notification or email. I could certainly roll my own by using that function, but that seems like it fits nicely with this plugin and would benefit others who perhaps aren't as comfortable with development...

      Comment


        #4
        Well, I can certainly put it on the todo list. Although with the current features you could also use multiple replacement variables to create a (custom) summary, I guess.
        Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
        Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

        Comment


          #5
          I just uploaded beta 1.0.1.2, which has pretty much all of the above, with some slight changes:

          1. Added GetSummary to use in scripts. It can be used like this:
          Code:
          hs.PluginFunction("Updates Plugin", "", "GetSummary", New Object() {true, true})
          First parameter is to include HS4 in the string it returns, second is to include beta version.

          String example:
          Code:
          HS4 4.2.17.0 (4.2.18.5), MiLight 1.0.2.0 (1.0.4.0), OpenTherm Gateway 1.0.5.0 (1.0.5.0), Updates 1.0.1.2 (1.0.1.0, BETA 1.0.1.2), Volvo 1.0.7.0 (1.0.6.0)

          2. Added a summary feature, which can be added/configured to be added, include HS4 and/or include betas

          3. Added a trigger in which you can select HS4 and plugins, with subtriggers for release version or beta version. It will trigger (after polling) if an available version is different than a previous version. So, it does not compare to the installed version. I have briefly tested it (while someone is using a jackhammer outside, which did not help.. And while writing this I'm realizing the beta subtrigger will also trigger when a plugin's beta is removed, so I will add a check for that before it's released..).

          If you have time, let me know what you think. And then in a few days I'll submit 1.0.2.0 as a release.
          Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
          Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

          Comment


            #6
            This afternoon 1.0.2.0 has been released.
            Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
            Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

            Comment


              #7
              Sorry for the slow feedback, this fell off my radar while I was redoing a bunch of my own plugins! But I got it all configured today and I really appreciate the capabilities. On the Trigger, it would be nice if there was an "Any" option, and on the Summary function/DeviceString, it would be nice if that was just things that had updates available. That way I could have a single event that was "If any device has an update available, send me a push notification with the list of available updates" basically. I don't mind getting the string from the function if I need to include it in the script, but in that case I would say having 2 parameters for GetSummary would be very useful: 1 for "OnlyUpdates" (Boolean) and 1 for "IncludeBeta" (Boolean). That way I could choose what to do with any given use.

              Comment


                #8
                No problem. I saw you were busy, especially last few days. Also saw you were waiting for a plugin to be approved.. I'm waiting for a new one to be approved since last Thursday..

                Anyway, thanks again for your feedback. I already had an "Any" option on my todo list for a while, so I just built it. And it became more than that. I added "Any plugin" and "Any plugin and HS4" for the trigger and "There is a new release OR beta version for" for the subtrigger. That should cover every situation, I think.

                Liked your idea for the summary, so I've added a third parameter for ShowOnlyUpdates.

                I just want to test, add, modify and document a few more things before I'll be submitting it (both as beta and release, I guess..). Will post here.
                Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                Comment


                  #9
                  Originally posted by Bernold View Post
                  No problem. I saw you were busy, especially last few days. Also saw you were waiting for a plugin to be approved.. I'm waiting for a new one to be approved since last Thursday..

                  Anyway, thanks again for your feedback. I already had an "Any" option on my todo list for a while, so I just built it. And it became more than that. I added "Any plugin" and "Any plugin and HS4" for the trigger and "There is a new release OR beta version for" for the subtrigger. That should cover every situation, I think.

                  Liked your idea for the summary, so I've added a third parameter for ShowOnlyUpdates.

                  I just want to test, add, modify and document a few more things before I'll be submitting it (both as beta and release, I guess..). Will post here.
                  Sounds awesome - this will really help with my secondary installs (office and rental home), which I pay a lot less attention to on a regular basis.

                  Comment


                    #10
                    Originally posted by Bernold View Post
                    No problem. I saw you were busy, especially last few days. Also saw you were waiting for a plugin to be approved.. I'm waiting for a new one to be approved since last Thursday..

                    Anyway, thanks again for your feedback. I already had an "Any" option on my todo list for a while, so I just built it. And it became more than that. I added "Any plugin" and "Any plugin and HS4" for the trigger and "There is a new release OR beta version for" for the subtrigger. That should cover every situation, I think.

                    Liked your idea for the summary, so I've added a third parameter for ShowOnlyUpdates.

                    I just want to test, add, modify and document a few more things before I'll be submitting it (both as beta and release, I guess..). Will post here.
                    I still can't get this to work on Linux. All of the dropdowns in the setup questions don't show any available options.

                    [moved this to its own topic - Bernold]

                    Comment


                      #11
                      I have just submitted 1.0.4.0 and beta 1.0.3.9 is already available. They are the same, except for version numbers. Manual has also been updated online and in the zip (unzipped to Docs folder).

                      Code:
                      hs.PluginFunction("Updates Plugin", "", "GetSummary", New Object() {true, true, true})
                      First parameter is to include HS4 in the string it returns, second is to include beta version, third is optional (ShowUpdatesOnly).
                      Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                      Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                      Comment


                        #12
                        It just became beta 1.0.4.9 (and release 1.0.5.0 submitted).

                        Click image for larger version

Name:	afbeelding.png
Views:	70
Size:	20.7 KB
ID:	1628796
                        Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                        Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                        Comment


                          #13
                          Took a while, but 1.0.5.0 is in the updater now.
                          Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
                          Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

                          Comment

                          Working...
                          X