Flic button integration success story

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.

Did you get the message “Accepted new client” inside the log of the flicd?
If you don’t get it, it won’t work!

I had flicd running on my Home Assistant Pi before I choose to let it run on another Pi (because this has a better place in my house). And it worked there also without a problem.

So lets see what you have done to get them to work.
You installed flicd from pschmitts addon repository, configured it (don’t know if there is any configuration) and started it.
Then you inserted the lines:

binary_sensor:
  - platform: flic

into you configuration.yaml
Then you restarted Home Assistant.

Then you see something like this in the log of flicd:

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

Correct?
Then you pressed a flic button when you are near to the Pi where the Bluetooth receiver is for more as seven seconds.
When you press it afterwards for a short time is the button flashing red or is it dark?

This is a description for Flic 1 buttons. I don’t know how the Flic 2 buttons behave!

1 Like

Yes, everything is as you listed except I never get the “Accepted new client” line.

Ok. That has nothing to do with the type of buttons.
Then it is no wonder that you can not connect a button!
This line is the message that the flic integration has contacted the flicd.

So are you really sure that you have the line for the flic integration in your configuration.yaml and restarted Home Assistant to get the integration started?
There has to be a problem!

I have the config portion:

binary_sensor:
  - platform: flic
    discovery: true

I have the repository installed. I have tried every combination of restarting the repository and HA. Nothing.

That look good, the last line is not really neccessary as that is the default, but it‘s OK.

And it is running and not crashing at the end?

I really have no clue why this should not work. Maybe you can open an issue at the github repository of flicd. Maybe the author can help better.

I was having a similar problem. I have a separate file for my binary sensors.
After I added:

  • platform: flic
    I forgot to save the binary file, then I rebooted HA. The flicd log stopped after the Initialization line.

I re-wrote the platform line in the binary folder, then saved this time.
Now the flicd log shows the new client accepted and also “Download firmrware ok”.

Now in the events part of developer tools, I subscribed to event:
flic_click and stated listening.
with each button click or hold I get and event fired notification that gives me the button name, address, qued time and click type.

Now to put in an automation.

So I’m not clear on “forgot to save the binary” and “re-wrote the platform line in the binary.” Can you elaborate. You’re the first person who has had my issue who seems to have fixed it.

I neglected to hit the “save” icon after I added: platform: flic to my binary_sensor file. After re-booting HA, that mistake on my part resulted in the flicd log not showing anything after:
Initialization of Bluetooth controller done!

When I re-entered:
platform: flic
to my binary_sensor file and rebooted HA, the flicd log showed:
Initialization of Bluetooth controller done!
Accepted new client
Download firmrware ok

After holding the button for 7+ seconds and listening for flic_click in the developer tools events, it shows me the button name, address, and click type:
“event_type”: “flic_click”,
“data”: {
“button_name”: “flic_80*********”,
“button_address”: “:::::”,
“queued_time”: 0,
“click_type”: “single”
},

and the button can be used in automations.

Do you have any error with binary_sensor in your log files?

Maybe you have defined binary_sensor at two places in your configuration files.

Yes! That was the issue. I put the flic binary sensor at the beginning of my configuration but way at the bottom was an old ring doorbell binary sensor that is no longer needed. I didn’t even think about that being a problem. Now I get the “Accepted new client” line. I will test when I get home. Thanks so much for the help!

That is great! I am confident that the rest will work now also.

Yup. Everything works great and I’ve got it built into my Node Red flows. Thanks again!

Great to hear that it works!

Hi Guys
Great thread!

How on earth do I add the repository to get the flic files installed?

I am running through a VM, I’ve gone to adons, and add repository using this method. Common Tasks - Operating System - Home Assistant
I get an "invalid repository message.

I am sure it’s something super simple!

Invalid Add-on repository!

I ended up adding 8.8.8.8 to my DNS settings and it worked :slight_smile:

Ok
I have flicd running now but I can’t seem to add buttons.

I am running a windows VM with a bluetooth adapter which I assume is working.

+++

flicd

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! Accepted new client


No response / change when I push my Flic.