I just bought two Flic 2 buttons and wanted to use them to trigger advance flows in Homey Pro.
Spoiler alert: It will not work (I didn’t know that when I set out on this journey.
Should probably delete the entire post :- )
My setup:
- Flic 2 Smart buttons
- Installed the Flic app on my android phone (Pixel 6)
- Installed the Flic app on my Homey Pro 2019
Added device
In Homey, added a device…
It found a device…
…but “Flic1”? Is that just a generic number or indicates it that it’s for a “Flic 1” model button? Let’s see…
It got it added and I renamed it to “flic1Music”.
Opened the settings and changed the “ButtonName on Flic App” to the same, “flic1Music”.
Copied the wekhooks for click, dblclick and hold so I can paste them somewhere in the Flic app on the phone, as it says in the Flic app for Homey:
Saved the setting changes. At this point we’re done with step 2. in list above.
On the PHONE!
Opened the Flic app on the phone.
Since I don’t have the Flic hub, I had to choose “Phone” (Getting a bad taste in my mouth… Does this mean that the button requires my phone or the app installed on the phone all the time? Let’s find out…)
Followed the instructions for the pairing process…
I then went on to add an action for the button’s click event:
and went straight for “Advanced”!!! That’s where we’re heading. I hope. Selected “Internet Requests” 'cause I’ve seen others writing that here on the forum
Then I pasted the “Click” webhook I copied in the settings screen for the button in Homey and pasted it under “URL” and selected request method “GET”. Again with the bad taste in my mouth. Prior experience with webhooks tells me that my homey’s ID should be in the link if going over internet - or my LAN address if going locally - this URL’s got a unfamiliar ID in there… well, have to follow the guidance given… Paste:
Didn’t fiddle with anything else as it seemed “Post” related. Ended up looking like this:
Before adding the others, I though I’ll give the “Click” event a go. Clicking the button yielded nothing (of course, I would say). I need a listener for the hook in Homey, but what to listen for? The URL is odd compared to what I’m used to (space inserted intentionally):
https:/ /webhooks.athom.com/webhook/xxxx/?id=0kRZHKFEDb&action=click&flic=1
This is what we’re taught it should look like:
https:/ /webhook.homey.app/[homey-cloud-id]/my_event?tag=my_tag
I’ll try setting up a listener on the “xxxx” (actually a long hex string).
Saved it and clicked the button once… waited… silence…
It would surprise me if it worked. My logic says that I should put the correct webhook into the button and I should be able to do that in the buttons device setting screen in Homey.
If that would work, that would mean that the button talks directly to Homey over zigbee or something. However, it turns out that my research before I bought the #¤%&/ buttons was waaaaay under par:
BT? BT? Really? Anyone want to buy 2 unused buttons for 30% of the new price?
My motivation is out the window…
There is however a very simple way to get the button to work by using the app on the phone, and instead of selecting “Advanced > Internet Request”, I could have selected “Smart Home > Homey > (select a simple flow)”. Here’s a video that explains all this.
The simple flows was however not part of may use-cases… And the BT thing makes the button 100% dependent of the phone, I think. I hope I’m not right and can anyone tell me:
- Is the button dependent on the phone or a Flic hub?
- Can I get it to call an advanced flow?
I’m going to bed