Scan for new buttons and connect to HUB over SDK

  • I have hub with enabled SDK. Successfully login to

    Also I have fresh new button that is not connected to anything (aether HUB or the phone).

    When I use COMMAND PROMPT (scan) to scan for single button, it's not showing the anything. It's just scanning until I issue command (stopScan). No buttons are found.

    1. What is procedure (and/or code example) for adding fresh new buttons to HUB..?
    2. Do I need first to add button to hub over phone Flic app, or that is possible over the javascript?
    3. In the MDM solution ( in field "Buttons - Button pairings JSON" what structure I should add. (some example is will be very much helpful)?

    Screenshot 2021-08-11 at 12.14.38.png

    Thank you very much in advance..!!!

  • @Emil Thanks for explanation.
    Works now...
    I also managed to figure out what JSON structure is going for MDM under point 3.
    Basically I export pairings from dev hub and if we use those buttons on managed hub I just paste "buttons pairings" json in to the field.

  • FlicTeam

    1. Just use the scan wizard as you do (call startScanWizard() on the buttons module). What I think you forget is that you must hold down the button for at least 1.5 or 6 seconds depending on if it's brand new or has been paired before. Otherwise it won't be discovered.
    2. No you don't need to pair with phone first.
    3. See under importFlic2Pairings. The "pairings" structure is what you should write. Oskar should have given you the info you need for this.

Log in to reply