• Popular
  • Users
  • Login
Flic Home

Community

  • Login
  • Search
  • Popular
  • Users

Unpair buttons form Device Managed Flic HUB

Flic Hub SDK
2
3
1.2k
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.
  • sasha.milic
    sasha.milic last edited by 16 Aug 2021, 08:00

    Is there a way to create module that, when applied to Device Managed Flic HUB, can unpair all the buttons from that HUB (some code example is appreciated)?

    Something like issuing command in HUB SDK Command Prompt:

    • deleteButton [bdaddr] ===> Delete button
    • clearAllButtons ===> Delete all buttons

    I can go over the buttons array and get (bdaddr) one by one, but I don't know what should I use to actually unpair them.

    Is there a way to use Command Prompt commands in module it self (main.js)..?

    Thank you in advance!

    1 Reply Last reply Reply Quote 0
    • Emil
      Emil FlicTeam last edited by 16 Aug 2021, 08:58

      We have a method "deleteButton(bdaddr)" on the buttons module that apparently is missing in the documentation that you can use.

      If you use the FDM configuration to remove all buttons you should probably write [] in the field to specify an empty array and then check Exclusive.

      1 Reply Last reply Reply Quote 0
      • sasha.milic
        sasha.milic last edited by sasha.milic 16 Aug 2021, 08:28 16 Aug 2021, 08:19

        I notice in FDM configuration there is field "Exclusive". Is that mean, if we remove everything from field "Button pairings JSON" and check "Exclusive", that managed HUB will unpair all the buttons..?

        When I try that and update configuration. I wait for update to be confirmed in "HUB" menu.. and when I double check in Flic app on my phone, I can see that buttons are still connected to managed HUB.

        When I try to connect them to other HUB (bulkScan) they are able to connect. Is it a bug in Flic app or..?

        Screenshot 2021-08-16 at 10.14.30.png

        1 Reply Last reply Reply Quote 0
        2 out of 3
        • First post
          2/3
          Last post