Announcement

Collapse
No announcement yet.

Uninstalling plugin - removing interface to release the devices.

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

  • Uninstalling plugin - removing interface to release the devices.

    Hi guys, if my plugin sets the interface for my devices - when the plugin gets uninstalled I need to remove the interface setting to release the devices back to HS. But I suspect there's no any function to let the plugin know that it gets uninstalled? What's the solution?

  • #2
    Originally posted by alexbk66 View Post
    Hi guys, if my plugin sets the interface for my devices - when the plugin gets uninstalled I need to remove the interface setting to release the devices back to HS. But I suspect there's no any function to let the plugin know that it gets uninstalled? What's the solution?
    For most devices it doesn't make sense to remove the interface, e.g. if I have a Hue light bulb device setting it back to nothing means a device that will never do anything. So you don't set this back this way if the plugin is reinstalled later the devices start working again.

    Do you have a plugin where it would make sense to remove the interface (e.g. the device would still be useable in some way after that?)

    Comment


    • #3
      Originally posted by bsobel View Post
      Do you have a plugin where it would make sense to remove the interface (e.g. the device would still be useable in some way after that?)
      Hi Bill, yeah, in my SmartDevice plugin if the user enables the timer or trigger group for the existing device - I take control of this device (if it doesn't belong to another plugin, i.e. virtual device). If the user unselects all timer/trigger groups - I release the device back (remove interface setting).

      Comment


      • #4
        Unfortunately today you’d probably need an uninstall button in your config page. Their isn’t a model to uninstall. That said; doesn’t this limit you to just virtual devices? Can you modify your plugin to not need ownership at all?

        Comment


        • #5
          Originally posted by bsobel View Post
          Can you modify your plugin to not need ownership at all?
          Yeah, I can. It's just more convenient when HS thinks that the device belongs to my plugin - so it calls SetIOMulti. But I can live with SEvent instead.

          Comment


          • #6
            So utilities like you and I write are a fairly new thing for HS. Rich seems open to API changes to enable us, so as you work through this if there are things you need you should ask him.

            Comment


            • #7
              Originally posted by alexbk66 View Post
              Yeah, I can. It's just more convenient when HS thinks that the device belongs to my plugin - so it calls SetIOMulti. But I can live with SEvent instead.
              So as I asked in the other thread. If you are taking over the SetIOMulti, what about the Device's original owner? Are you redirecting and calling their SetIOMulti yourself?
              Thanks,
              Frank

              Comment


              • #8
                Originally posted by sirmeili View Post
                So as I asked in the other thread. If you are taking over the SetIOMulti, what about the Device's original owner? Are you redirecting and calling their SetIOMulti yourself?
                I explained in this thread - I take control of this device (if it doesn't belong to another plugin, i.e. virtual device). If the user unselects all timer/trigger groups - I release the device back (remove interface setting

                Comment

                Working...
                X