Flic Hub integration

I would love to get my Flic hub integrated into Hubitat for two reasons. First, I'd like to have my Flic buttons' battery statuses sent back to Hubitat. I have some alert notifications set up for my battery-driven devices, and I would like to see them all in one place. The Flic app does provide a low battery warning, but it's very vague and doesn't provide a specific percentage of useable life left.

The additional thing I'd like to do is to be able to control the Flic's connected IR blaster. I'd like to set up some routines so it automatically fires at certain times of the day, or under certain conditions.

It looks like someone has done some work to integrate the Flic hub with Home Assistant, and I've tried mucking about with that code, but with the most minimal success so far. It seems like it would be a pretty straightforward integration if it was done by someone who actually knew what they were doing. :slight_smile:

3 Likes

Hi Thanks for the detailed instructions and sorry for digging up an old thread.
I was able to get all this to work for the push and doubleTap commands, but for some reason when I try to do a HELD command, I get this following error in the hubitat log for the Maker API instance:

java.lang.NullPointerException: Cannot invoke method getAt() on null object on line 460 (method sendDeviceCommandSecondary)

This happens if I try to execute the HOLD from the flic app or the flic button itself.
But if I go to the device in hubitat and do a manually initiate a "Hold" it works fine(turns on a light in my case using Basic Rule app).

Any ideas? Is this a maker API thing? Thank you

Here are the 3 strings I'm using with the same physical button. First 2 work(push double tap) work fine, but the 3rd(held) doesn't. 3 different instances of Maker API and 3 different virtual buttons

http://192.168.86.68/apps/api/54/devices/18/push/1?access_token=cbc99a49-55a5-486e-991b-4150e462XXXX

http://192.168.86.68/apps/api/55/devices/21/doubleTap/1?access_token=e0406084-9efc-4f32-8272-bc1e8e3bXXXX

http://192.168.86.68/apps/api/266/devices/290/held/1?access_token=bfada940-4de5-46c9-8667-8b675f72XXXX

ok I feel stupid answered my own question - the command options are actually push, doubleTap, hold, release. HELD is not a valid command, and release can't be programmed into the flic button