Flic button integration success story

I didn’t need to create input booleans for the buttons, since they are just making a toggle API call.
Here is an example of the Flic config of an “Internet Request”.

Configured as a POST request.

URL;
http://192.168.1.5:8123/api/services/switch/toggle

Headers;
Key; Authorization
Value; Bearer eyJ0…[long-lived access token from HA]…qp5k

Content Type;
application/json

Body;
{“entity_id”:“switch.aeon_labs_zw096_smart_switch_6_dining_lamp_switch”}

I should mention these are a bit of a pain in the butt to set up since you have to use the Flic app UI through your phone. I’ve put in a feature request for them to have the Hub as a webserver for config!

I have a few Flic Buttons here and I am using it with this https://github.com/pschmitt/home-assistant-addons flicd addon.
I need no Hub and no Phone, only the Bluetooth inside the Pi of my HassOS installation.

They are working fine in ca. 10m radius

1 Like

So this means no reliance on any Flic software?
This is good to know in case the Hub or App ever stopped working I’d have an alternative!

Yes, this is correct! To pair it with the Pi you have to press it a few seconds and then you have it inside Home Assistant to use it in automations. That‘s all.

1 Like

Resurrecting an old thread but I’m looking to purchase several of these flic2 buttons. I run hassio in a VM and it’s in a basement a long way from where the buttons would be deployed anyway.

Can I use my esp32s dotted around the house for Bluetooth pairing and therefore HA integration?

You need the flicd running on the device where you pair the buttons. I have a Pi Zero W for this in a central place in my house.
In Home Assistant I only have to add the IP of the Pi Zero W to let the buttons work.

binary_sensor:
  - platform: flic
    host: x.y.z.d
1 Like

Thank you so much for shering!
just made my sonoff switch to toggle on and off via HA with a press of my ‘flic 2’ button (no hub!)

just figured out that with an easy header change it can activate scenes and probably much more.

10X A LOT for this
i’ve been struggling with this for a while…

this means that we can also do this to have multiple z-wave instances right? get a pi0 and attach a z-wave usb, and create the sensor?

Hub SDK released. Maybe worth looking into?

3 Likes

How did you get your buttons to pair with HA. I can’t seem to find anyone who’s been able to.

Simply press them for more than seven seconds. That’s all!
I don’t know where I read this, but it was easy to find. :slight_smile:

Then you can go to the developer tools/events and start to listen to “flic_click”. When you press the button once, twice or hold it you will get different events. You will need the “button_name” for your automation.

Like for eg. ZigBee buttons you will not get any device, you have to create an automations which fires at flic_click like here:

Thanks. That makes things a lot clearer. However. No matter how many times or how long I press, the buttons do not seem to pair because listening never gets a response.

You heared for flic_click? Not for flic_clic or something else?
Is it a Flic 1 or 2. I only have a few Flic 1.
This is my configuration.yaml:

binary_sensor:
  - platform: flic
    host: 192.168.178.111

I have the flicd running on another Pi. But that should make no difference. I don’t know if you can see the flicd.log. It should look like this (after Home Assistant is started):
cat /var/log/flicd.log

Available HCI devices found:

Trying hci0
Flic server is now up and running!
HCI socket busy, bringing down and then retrying
Successfully bound HCI socket
Initialization of Bluetooth controller done!
Accepted new client

If I click on a new button it flashes red. If I press it 7 seconds and the click it afterwards it doesn’t flash red, as it is connected.

Maybe your Bluetooth is not good, so the buttons don’t get it.

1 Like

They are flic 2, just got them. I get the same message in my log up to the part that says “Accepted new client.” They are working fine through Amazon Alexa but I really want to be able to run HA routines with them.
I appreciate your help.

I never get the last line that says, “Accepted new client”

That is not good. That message says that Home Assistant has the connection to flicd.

If you look here: Flic - Home Assistant
You have the documentation where also the automatic discovery is explained!

There is no explanation of anything there. Install the repository, add the lines to config.yaml and press the button for 7 seconds. There are no troubleshooting tips, no way of contacting the author, nothing. I have no idea what to do.

2 Likes

That is correct.

Yes, it is written how to pair a button, that is what I meant. I don’t know why it is working here and not at your installation. There are only a few things to do and they worked directly here. So I didn’t have to search for problems.
I now this doesn’t help you. :frowning:

So I may have a solution (but I’m at work now so I won’t be able to test until I get home). It seems that the repository was added but somehow not active in HA. I was looking through the supervisor integration and saw the flic program but it was inactive. I have activated it now so hopefully that was all it took to make it work. I will test and confirm this evening.

Nope. No luck. Still won’t connect buttons.