HISE Logo Forum
    • Categories
    • Register
    • Login

    Implementing an auto updater/notifier?

    Scheduled Pinned Locked Moved General Questions
    56 Posts 11 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey @Christoph Hart
      last edited by

      @Christoph-Hart

      Save the time of the last update request and make sure to only call it once a day.

      Do you mean save the timestamp on the user's machine?

      What about when the user loads an existing DAW session that has multiple instances, will the plugins all trigger the check for updates at the same time, before the timestamp has been recorded?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        The project takes a few seconds between instantiating multiple instances, so it should be fine. Worst case would be that you end up with two calls.

        d.healeyD 1 Reply Last reply Reply Quote 1
        • d.healeyD
          d.healey @Christoph Hart
          last edited by

          @Christoph-Hart Perfect, thanks. And should I use @ustk new time API additions or is there an alternative method for recording the time stamp?

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          1 Reply Last reply Reply Quote 0
          • Casey KolbC
            Casey Kolb
            last edited by

            @d-healey Have you made any progress on the auto-updater? I'm looking into this functionality as well and I'm curious if it's working for you.

            Casey Kolb
            Founder & CEO of Lunacy Audio
            Composer | Producer | Software Developer

            d.healeyD 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey @Casey Kolb
              last edited by

              @Lunacy-Audio I haven't started yet, been too busy with other projects.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              1 Reply Last reply Reply Quote 0
              • Casey KolbC
                Casey Kolb
                last edited by

                Gotcha, I'll report back if I make any progress.

                Casey Kolb
                Founder & CEO of Lunacy Audio
                Composer | Producer | Software Developer

                1 Reply Last reply Reply Quote 1
                • Casey KolbC
                  Casey Kolb
                  last edited by

                  @d-healey Can confirm the updater is possible with the current Server API!

                  Working Example

                  With WooCommerce you can set a product attribute that contains the current version of your product. Once you retrieve this in HISE, you can compare it to the current local version. If there's a newer version, you just download the file directly from the server.

                  However, the download API still needs some work. I posted about this elsewhere, but some things still need to be worked out before it can be used in production I think.

                  Casey Kolb
                  Founder & CEO of Lunacy Audio
                  Composer | Producer | Software Developer

                  LindonL 1 Reply Last reply Reply Quote 1
                  • LindonL
                    Lindon @Casey Kolb
                    last edited by Lindon

                    @Lunacy-Audio so whats the URL string you are using to get the version number product attribute from woocommerce? I cant seem to get the REST API to work...

                    HISE Development for hire.
                    www.channelrobot.com

                    1 Reply Last reply Reply Quote 0
                    • Casey KolbC
                      Casey Kolb
                      last edited by

                      @Lindon My call looks something like this:

                      Server.setBaseURL("https://lunacy.audio");
                      const var woocommerceCallParameters = {
                      	"consumer_key": YOUR_KEY,
                              "consumer_secret": YOUR_SECRET
                      };
                      
                      // This gets all of the data for the product (ID #20)
                      Server.callWithGET("wp-json/wc/v3/products/20", woocommerceCallParameters, function(status, response) {});
                      

                      The response will contain an object with a key called attributes, which is an array of attribute objects. In my case it looks like this:

                      Screen Shot 2021-01-16 at 11.04.52 AM.png

                      Casey Kolb
                      Founder & CEO of Lunacy Audio
                      Composer | Producer | Software Developer

                      orangeO LindonL 2 Replies Last reply Reply Quote 0
                      • orangeO
                        orange @Casey Kolb
                        last edited by orange

                        @Lunacy-Audio

                        Looks great. What about the security? Can R2R team or others hack the website with this? Is it secure? :)

                        develop Branch / XCode 13.1
                        macOS Monterey / M1 Max

                        NatanN Casey KolbC 2 Replies Last reply Reply Quote 1
                        • NatanN
                          Natan @orange
                          last edited by Natan

                          @orange Right On Time 👏

                          Not A Good Idea At All, If One Of Your Plugins Get Hijacked By Those Teams, They Will Get Life Time Access, And In Other Hand The Download Rate Can Break Your Aws Sever And Your Bank ⚡️ Think Twice Guys.

                          1 Reply Last reply Reply Quote 1
                          • Casey KolbC
                            Casey Kolb @orange
                            last edited by Casey Kolb

                            @orange said in Implementing an auto updater/notifier?:

                            Looks great. What about the security? Can R2R team or others hack the website with this? Is it secure?

                            That's a good question. Everything is sent over https, so I think the only way it could be hacked is if someone gets a hold of your API keys. I'll need to do some more research though. This is no less secure than any other plugin that uses an external API, and it seems lots of companies are beginning to do this (see PercX :winking_face: )

                            @Natan There's always going to be a trade off between security and convenience, but you're right that there's a risk. However, the AWS Server is not a real concern. It's no different than someone going to your site to download the update, and you want your customers to always be on the most up to date version anyway.

                            Casey Kolb
                            Founder & CEO of Lunacy Audio
                            Composer | Producer | Software Developer

                            1 Reply Last reply Reply Quote 2
                            • Casey KolbC
                              Casey Kolb
                              last edited by

                              Also, it's worth mentioning that if someone does get a hold of your API keys, you can immediately revoke the keys.

                              Casey Kolb
                              Founder & CEO of Lunacy Audio
                              Composer | Producer | Software Developer

                              orangeO 1 Reply Last reply Reply Quote 1
                              • orangeO
                                orange @Casey Kolb
                                last edited by

                                @Lunacy-Audio There is a woocommerce plugin called License Manager.

                                It has an API key. So the connection between plugin and server should be done with that? Or do we need to modify woocommerce anyway?

                                develop Branch / XCode 13.1
                                macOS Monterey / M1 Max

                                1 Reply Last reply Reply Quote 0
                                • Casey KolbC
                                  Casey Kolb
                                  last edited by Casey Kolb

                                  There's a free and super robust Woocommerce License Manager with all 5-star reviews that I use. I'm still in alpha testing for my plugin, but the license API has been tested on probably 20 different machines with varied operating systems without any issues. You have to set up your API keys with that plugin and I'd strongly suggest you make your keys Read-Only. I don't think there's ever a reason to Write from the HISE plugin in this case.

                                  For the actual server file downloads, that's a separate API. You interact directly with the Woocommerce REST API, so you need a different pair of keys, which you make through the Woocommerce Settings.

                                  Casey Kolb
                                  Founder & CEO of Lunacy Audio
                                  Composer | Producer | Software Developer

                                  1 Reply Last reply Reply Quote 2
                                  • LindonL
                                    Lindon @Casey Kolb
                                    last edited by

                                    @Lunacy-Audio said in Implementing an auto updater/notifier?:

                                    wp-json/wc/v3/products/20

                                    Thanks Casey, it turned out mine was a postman issue...so having sorted it to work there I will now try in HISE

                                    HISE Development for hire.
                                    www.channelrobot.com

                                    LindonL 1 Reply Last reply Reply Quote 1
                                    • LindonL
                                      Lindon @Lindon
                                      last edited by

                                      • hmm, I can get a lot of data back from this call.....very very useful....for expansions...

                                      HISE Development for hire.
                                      www.channelrobot.com

                                      1 Reply Last reply Reply Quote 2
                                      • Casey KolbC
                                        Casey Kolb
                                        last edited by

                                        Definitely! And once the download function is improved, I think it would super easy to set up preset packs to be downloaded right from the plugin without the user ever needing to restart

                                        Casey Kolb
                                        Founder & CEO of Lunacy Audio
                                        Composer | Producer | Software Developer

                                        LindonL 1 Reply Last reply Reply Quote 0
                                        • LindonL
                                          Lindon @Casey Kolb
                                          last edited by

                                          @Lunacy-Audio said in Implementing an auto updater/notifier?:

                                          Definitely! And once the download function is improved, I think it would super easy to set up preset packs to be downloaded right from the plugin without the user ever needing to restart

                                          Presets yes - and expansions, but ... I'm trying to work out a meaningful way to authorise/authenticate expansions when they install -without having to know (perhaps years) ahead what expansions I will be shipping...

                                          HISE Development for hire.
                                          www.channelrobot.com

                                          ustkU 1 Reply Last reply Reply Quote 2
                                          • ustkU
                                            ustk @Lindon
                                            last edited by

                                            @Lindon It's a big question that definitely needs to be addressed! ;)

                                            Can't help pressing F5 in the forum...

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            49

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.9k

                                            Posts