Flic button integration success story

add this code to the configurator.yaml file

binary_sensor:
  - platform: flic
    discovery: true

now you need to press and hold the flic button close to the Bluetooth controller till you get a green light on the flic button.

the device is now linked, if you go into home assistant, developer tools, states and search for something like this (binary_sensor.flic_80e4daxxx05c), press the button and see if the state changes from off to on. if this does then all you need to do is set up your automation or scrips as you require.

below is an example to toggle a light with a single click. you can use either single, double, and hold to change the click method you prefer.

button_name: flic_80e4daxxx05c
click_type: single

Trigger

automation.yaml example
will need to change the following to make it your own:
button_name:
click_type: single, double or hold
entity_id:

- id: '0000000000095'
  alias: Button. Flic. Test
  description: Flic single click to toggle light.
  trigger:
  - platform: event
    event_type: flic_click
    event_data:
      button_name: flic_80e4daxxx05c
      click_type: single
  condition: []
  action:
  - service: homeassistant.toggle
    target:
      entity_id: light.lighttjb_main_level_light_color_on_off
  mode: single

Hope this helps and Merry Christmas

Hello and a Merry Christmas to you.

I already have the code in my YAML but no response to the bluetooth.

Iā€™m running HA through a Windows VM and Iā€™ve read that otherā€™s using that setup have issues with FLIC and Bluetooth.

binary_sensor:

  • platform: flic
    discovery: true

If there is no other config to check, then I will wait till my Pi gets here.

There is no other config to check,

install flicd
add binary sensor to config.yaml
pair button with pi4 (press and hold for 7 seconds till you see a green light)
make an automation.

when your pi4 gets here and if you need help post a message or email me ill help.

Not got my PI yet, but checking the logs for some reason today.

Whatā€™s all this about?

Available HCI devices found:
hci0
Trying hci0
hci0 is busy, shutting down and retryingā€¦
Successfully bound HCI socket
Flic server is now up and running!
Initialization of Bluetooth controller done!
HCI socket was closed (EPIPE): Broken pipe
Waiting for HCI device to become available againā€¦
HCI socket busy, bringing down and then retrying
Successfully bound HCI socket
Initialization of Bluetooth controller done!
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
HCI socket was closed (EPIPE): Broken pipe
Waiting for HCI device to become available againā€¦
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client
Accepted new client

Nothing with ā€˜flicā€™ on my Developer Tools > entities > states page.

Struggling myself with this, just to check as the instructions skip over the practical elements:

Setup

  • I have Home Assistant installed on a Raspberry Pi 4
  • I have a Flic hub

Steps:

  • Iā€™ve installed the flicd through adding a repository
  • Iā€™ve added the config.yaml, ie:
binary_sensor:
  - platform: flic
  • And then held a flic button down for seven seconds in front of both the flic hub and raspberry pi (just to check both as instructions not totally clear)

  • Checking developer tools > entities > states shows nothing, have nothing under services looking for ā€˜flicā€™. Also have flicd appear under automations, but no buttons visible?

Thanks for any pointers!

1 Like

Just came here to thank you all! Especially pschmitt!

I am quite new to HA and needed flic to work as a solid replacement for my current setup. Without this thread I would have not been able to make it work and thanks to that, I have been able to take the leap with the rest of my IoT tech.

Thanks again!

1 Like

I am in the same boat as you on this. I havenā€™t come across any posts that showed how to get it working when you actually have a flic hub. I am wondering if you just need to add the ip address or host name of the hub to get this working. Alphabeata, have you been successful with your setup?

You donā€™t to install anything in Home Assistant - you can just use the Flic app for the Hub to make REST API calls to HA. At least thatā€™s what I did.

If you have the Flic Hub, you can just configure your buttons to perform Internet Requests (POST) to the Home Assistant REST API, to call specific services (like /api/services/light/toggle) or scripts which you can then customise in the HA UI.

In fact, this is what I am now switching to as flicd and the HA flic integration are wholly unreliable and even have a bug that causes HA to push my serverā€™s load average above 100 and trip a reboot by the load watchdog. (flicd loses the USB BT adapter, at which point HAā€™s flic integration goes into a loop trying to get button information, eventually crashing the system.)

2 Likes

I agree, the best way is via the API setup from the forums. Works fine once you get the configuration files correct.

Flic ha addon isnā€™t worth using atm

Want to bump this I do not have a hub so using the API is not an option. I seem to have everything correct except I canā€™t get anything when I go to dev tools. I put event in trigger type, leave event data blank and put flic_click in event to subscribe to and click start listening. I have clicked the button, held the button and I get nothing? I am supposed to get some information that shows the button name so I can then use that in automations correct? What step am I missing? Should the Bluetooth on my phone be on or off so it is talking to app or does that not have anything to do with it?

Are there details anywhere on how to do this? The new BT integration in 2022.8 conflicts with Flic and I would like to be able to send messages this way.

5 Likes

Did you tried that? I do not have any flic buttons, but if it works over bt trough esphome proxy it might be way to go for battery powered buttons.

Iā€™m afraid Flic buttons need their flicd to communicate through at this point (or the Flic Hub which is separate hardware).

so i guess flicd is this Docker Hub and that would NOT work over esphome proxy, correct?

Is there some known working BLE button? I just donā€™t have good experience with zigbee stuff so I try to avoid it.

I see now, that even on the integration page there is addon for this mentioned GitHub - pschmitt/home-assistant-addons: Home Assistant addons by pschmitt

Hello!

Iā€™ve had flic buttons for a long time and find them very convenient. Now that Iā€™m diving into HA, I wanted to ditch the flic-hub and connect them directly to HA. My Home Assistant Yellow doesnā€™t have BlueTooth, so I installed the flicd daemon on a different Raspberry Pi that I have in my home. This works will, however the BlueTooth range is just not quite sufficient for one or two of the flic buttons Iā€™m using to reachā€¦ The flash yellow or yellow and then greenā€¦ And sometimes execution of the action (switching a light on or off) is delayed - if it happens at all.

I tried adding a RPiZero (had one lying around) in close vicinity to the switches that are out of range and added the second IP to my configuration.yaml:

binary_sensor:
  - platform: flic
    host: 192.168.1.15
  - platform: flic
    host: 192.168.1.10

This worksā€¦ for about a day. And then the flic buttons paired to 192.168.1.10 stop working. Restarting HA brings them back. The other host (192.168.1.15) has been performing flawlessly non-stop for weeks - ever since Iā€™ve started integrating the flic buttons into HA - at least when the buttons are in range.

During testing, I noticed that if the RPi reboots for whatever reason, HA needs to be restarted for the buttons to workā€¦ I donā€™t believe the RPiZero (192.168.1.10) is rebooting spontaneously. It has a solid power supply and a fresh install of Raspbian with just the flicd packages installed.

Has anyone experienced something similiar?

Iā€™m thinking it might be easiest to purchase BlueTooth dongle/adaptor for the Home Assistant Yellow and simplify thingsā€¦ Any recommendations for BlueTooth radios with good coverage/range?

Any help would be greatly appreciated - I donā€™t really want to ā€˜admit defeatā€™ and buy more hardware :slight_smile:

Best regards,
Andrew

Hi. I am having trouble getting this to work. Installing it directly on my Pi.

It seems to install okay, I added the sensor to config.yaml and restarted HA, but when I try to start the service, I get this in the log and then it stops.

/run.sh: line 8: /usr/bin/flicd: No such file or directory

Sure enough, if I go to terminal and lookin /usr/bin, there is no flicd there. What am I missing?

I see some issues listed on gitgub when I tried to google this message, but all the ones I see are fairly old and marked as closed.

Thanks to all for the help!
-Todd

2 Likes

Hi
I am forcing trouble to connect my flick too.
I added the rows to config file
Pressed fƶr 7 sec
Couldnā€™t find flic in the development