Flic Hub integration

I did the exact same thing. The best part is that the Maker API and Flic hub work over LAN so the results are instantaneous!

thx @jason-lane, that sorted me out with a new doorbell button :slight_smile:
I didn't realise that the White Flic buttons glow in the dark a little so now I've got a Glow in the Dark Doorbell button !!
Very nice.

1 Like

Cool!! I've also used one as my doorbell :slight_smile: Thought I didn't realize (or forgot) that the white ones glow. Good to know!!

GREAT write up! I've got one button all setup and working perfect. Now to find a use for the other 5 buttons I got with the flic hub. :thinking:

2 Likes

Same.
I wondered if I could train my dog to press one when he wants out :laughing:

I was reading the top of the thread and the first thing I thought was the same thing, funny I saw your comment when I got to the bottom of the thread :slight_smile:

1 Like

you have to have the Flic hub, right? I've only got buttons...

Hey Jason,

Is there any way you could help me out? I'm new to all of this, and have a Flic Hub that I'd like to use. This is what I've done so far.

Using the Flic Hub, I assigned a click to do an Internet Request. I put "http://[HubitatIP]/apps/api/23/devices/[thedeviceID]/push/?access_token=[theaccesstoken]"

Then on Hubitat, I added the Maker API. I created a virtual button called Flic and selected it in the preferences of the Maker API.

Then I used the Rule engine to create an action. When the Flic virtual button is pushed, then something will happen. Not sure what else to do. I noticed you used 81 in between the api and devices slashes in the HTTP GET request, but in my Maker API it was saying 23. Not sure what that number represents anyway.

Any ideas or ways you could help me? I am a teacher and I'm trying to integrate the Flic buttons in my classroom. Thanks in advance for any help you can offer!

Dan

Hi Dan. I believe the 81 (for me) and 23 (for you) are the app ID of the Maker API on our installations. You should stick to whatever the Maker API shows in the generated URLs.

It looks like you may have left out the button number, also known as the 'Secondary Value' for the command. It's the last parameter, just before the "?access_token"

Try adding the button number and see how you go.

Sorry for the slow reply. I haven't tried it without the Hub, and I'm away from home now, so can't really test this out, but you could see if the Flic app on your phone will also allow Internet Requests to be triggered by Flic Buttons without a Hub.

Of course, these buttons will only work if the phone is within Bluetooth range of the buttons.

Looks like you've missed the button number from your Flic string.
My strings look like this:
http://HUB IP ADDRESSS/apps/api/615/devices/1314/push/1?access_token=3c80987e-c91b-49ba-b785-74dde0541978

note the " push/1? "
Give that a go.
My Flic Doorbell (with Flic Hub) works great.

Just wanted to circle back to this thread and mention the Flic for Mac app. It's been publicly available since September of last year, but I have not been up to speed on what they were doing, since I am so over my love of their ridiculously expensive button, in favor of mesh capable Xiaomi Zigbee buttons, or even a Samsung SmartThings button.

However, when I was about to order another Xiaomi button last night, it occurred to me to find out what was happing in the Flic world. So I was quite pleased to discover their Mac app. For me personally, this make quite a lot of sense. I hated the Idea that I needed to either kill a perfectly good battery on a spare iPhone by leaving it plugged in all the time. And it was laughable that I would every spend over $100 US for their hub to serve a single $35 flic button.

To my delight, there is now a Mac app which can run in the background of my MacBook Pro, which is always running anyway to serve Homebridge, Google Home Assistant, Castweb API and Insteon Server for HE Insteon support. So this is a no brainer for me, as I already own this button that was previously pretty useless to me. Just as the iOS app and their hub does, the Mac app works perfectly with HE local end points! Much faster and more reliable than was previously possible with cloud end points.

thanks, very helpful :+1:

1 Like

@jason-lane Hi Jason, I'm very new with hubitat and also has got flic hub.
I've read your instructions, but since I'm very new with hubitat, I'm slightly confused with the Maker API bit.

I've created the virtual button as you have put in you instruction. I put 2 because I only have 2 buttons.
but this is where I'm slightly lost....Is it correct that I can only create 1 action per Maker API? because I can only enter 1 url (for 1 action)
If you can send me some of screenshots, then that'll be much appreciated.

Edited:
Do I then enter the same URL in both Maker API and the button?
Do I leave the Allowed Hosts (for CORS) blank?
Do I still need to select the delivery for the "Allow Endpoint to Control These Devices" section?

sorry for the many questions

Hi All, just wondering if anyone can help me on this? Cheers

Sorry for the delay, I was travelling and didn't get a chance to read your post.

First of all, did you read the updated part of my post, where I recommended creating one Virtual Button device for each button? This makes things a little simpler. eg. I have one Flic button that I'm using as a doorbell, so I created a Virtual Button device in Hubitat called "Doorbell Flic Button", and specified that it has 1 physical button.

Now, I'm not sure what you mean about creating 1 action per Maker API? You don't create any actions there. The Maker API just exposes a device to API commands. You need to select the button (eg. Doorbell Flic Button) in the "Allow Endpoint to Control These Devices."

I did not use the "Allowed Hosts" section.

Once you specified your devices in Maker API, look for the URL near the bottom, which says "Send Device Command (replace [Device ID] with actual subscribed device id and [Command] with a supported command. Supports optional [Secondary value]"

Mine looks like http://192.168.xxx.xxx/apps/api/81/devices/[Device ID]/[Command]/[Secondary value]?access_token=abcdefgh

Copy this URL, then edit it with the Device ID of you virtual button device, the Command (push/doubleTap/held), and Secondary Value (physical button). This is the URL that you paste into the Flic app as an Internet Request action. For me, it would look something like:

http://192.168.1.123/apps/api/81/devices/130/push/1?access_token=abcdefgh

Note that the number 81 will be different for you. This is the App ID for the Maker API in my Hubitat.

2 Likes

Thanks @jason-lane, I had to learn and understand how maker-api works. Have just now circled back around and got it working! Cheers

1 Like

I came here to write this, It is worth noting that you can replace push with held and doubleTap to add all the button functions.

Flic have released their SDK for on hub coding. Allows buttons to do specific TCP HTTP UDP and IR actions based on various press types. Executed locally on hub. Includes UDP broadcast TX and RX it seems too. Should allow some interesting integration possibilities with HE.

https://flic.io/flic-hub-sdk

I'm trying to figure out what improvement this sdk would bring since my flics are allready fully integrated into hubitat as buttons with local calls to the hub.

I can't find any. Anyone has a better view?