Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users
    1. Home
    2. Popular
    Log in to post
    • All categories
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month
    • Ultim8

      Remote Configuration of Virtual Devices and Action Messages
      Developers • • Ultim8

      3
      0
      Votes
      3
      Posts
      49
      Views

      Ultim8

      https://community.hubitat.com/t/release-flic-hub-integration-for-flic-twist-flic-button/161287

    • Wand7698

      Unable to Get RSSI from Flic 2 Using fliclib-linux-hci on Raspberry Pi
      Developers • • Wand7698

      3
      0
      Votes
      3
      Posts
      59
      Views

      Wand7698

      @Emil Ya it be a great help write now i am using a python progame on pi to run 24/7 to recive signal for flic device i have provide the code below

      #!/usr/bin/env python3 import fliclib from datetime import datetime button_rssi = {} def now_ts(): return datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] # Advertisement RSSI (best-effort) def on_advertisement_packet(scanner, bd_addr, name, rssi, is_private, already_verified, already_connected_to_this_device, already_connected_to_other_device): button_rssi[bd_addr] = rssi print(f"{now_ts()} ADV {bd_addr} RSSI={rssi} dBm") def on_button_event(channel, click_type, was_queued, time_diff): click_name = str(click_type).split(".")[-1] rssi = button_rssi.get(channel.bd_addr, "N/A") print(f"{now_ts()} BUTTON {channel.bd_addr} {click_name} RSSI={rssi}") def got_button(bd_addr): print(f"{now_ts()} Found verified button {bd_addr}") cc = fliclib.ButtonConnectionChannel(bd_addr) cc.on_button_single_or_double_click_or_hold = on_button_event client.add_connection_channel(cc) # ---- MAIN ---- client = fliclib.FlicClient("localhost") #scanner = fliclib.ButtonScanner(client) scanner = fliclib.ButtonScanner() scanner.on_advertisement_packet = on_advertisement_packet client.add_scanner(scanner) client.on_new_verified_button = got_button client.handle_events() dietpi@DietPi:~$