Flic - Wireless Smart Button

I think the two apps in the screenshot only work with a “simulated switch,” which is binary.

Alexa Helper or Rule Machine can also work with a momentary switch.

@JDRoberts Thank You, works good. I went with rule machine for when a switch is turned on, I used the “Momentary Button Tile” for my virtual switch and used the REST endpoint to have the get http request using the to the toggle switch URL. Works just how i want it to.

1 Like

i don’t recall if anyone mentioned this in the thread, but i just set up a flic to work with tasker and sharptools on a fire tablet that i installed the play store on.

it’s super easy, after installing the apps, just pop into tasker, set up a profile with the flic plugin for the button press, then the action is the sharptools plugin for toggle on/off.

i haven’t set up the double click or the hold yet, but i can’t imagine that they’ll be difficult.

the tablet is always by the flic, so while there has been a touch of lag when it’s sleeping, it’s been pretty reliable.

1 Like

@All:

FYI, you can “double” the capacity of your flic using Smartthings and IFTTT to make it toggle switches on and off with a single click, a single double click, or a single long click by doing the following:
*

    1. Create a Simulated Switch in SmartThings, Save and Publish it For Me - will now available in My Device Types
    1. In My Device Types, edit the code for the new Simulated Switch.
    1. Replace the on() section as follows:
  •    def on() {
    
  •        def deviceDisplayName = device.displayName
    
  •        def switchattr = device.currentValue("switch")
    
  •        log.debug "$deviceDisplayName is currently $switchattr"
    
  •        if ( switchattr == "on" ) {
    
  •            sendEvent(name: "switch", value: "off")
    
  •        } else {
    
  •            sendEvent(name: "switch", value: "on")
    
  •        }
    
  •        def newswitchattr = device.currentValue("switch")
    
  •        log.debug "$deviceDisplayName is now $newswitchattr"
    
  •    }
    
    1. Make sure standardTile within metadata/tiles is as follows:
  •     standardTile("switch", "device.switch", width: 2, height: 2, canChangeIcon: true) {
    
  •        state "off", label: "OFF", action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
    
  •        state "on", label: "ON", action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#79b821"
    
  •     }
    
    1. Create a new device in My Devices with the Type assigned to the modified Simulated Switch. Give it any Name and Label you desire, and make up a random Device Network Id
    1. Make the New Switch Name available as a Switch to IFTTT in your SmartThings SmartApps.
    1. In IFTTT, create a new recipe that makes your flic click (if you click a flic) “on” (then switch on) the new device/switch you have created.
    1. In Smartthings, make the new device/switch turn on (and off as well) a light or set of lights using the “Smart Lighting” smartapp.
  • Click your flic once, and it will turn the light(s) on, Click again, and light(s) go off!
1 Like

Why not just use the rest endpoint and use the toggle? This way you don’t have to have IFTTT in the middle. I love IFTTT but if I don’t need to have it as a middle man I will avoid it.

This is the way I went with to trigger my goodnight routine. Instead of using a switch I use a Momentary Button Tile, which is a virtual switch that always returns to a off state after it is toggled. Rule machine keeps and eye on the switch and when it is on it triggers my routine.

I now have the double press of my flic toggle my group of ge link bulbs in my bed room. So double click of the Flic toggles the lights on or off depending on the state they are currently in. Works quick being its using the API.

Forgive me, but what is the “rest endpoint” (I do not see it as a flic trigger option) and how do you link directly from a flic to a smartthings and avoid IFTTT?

Post 47 above…

Wow! Thanks Tom. How cool. Assume the http request is effectively as direct a link to smarthing control as you can get w/out going straight to the hub?

1 Like

Correct. Though I’m not sure if Flic is running that via a cloud or direct from the phone. It still remove IF from the picture.

Also don’t thank me. Thank @nelemansc

Alternatively, if you are an Android user, you can take the approach @WylieGraham mentioned and use Tasker + SharpTools.

SharpTools handles the direct integration with SmartThings and Tasker hands off the button press from Flic to SharpTools.

upgraded my flic to use endpoints as described above by @nelemansc

Amazing.

3 Likes

What’s the lag like in that scenario?

it’s pretty minimal, since everything ends up getting triggered through your device vs being sent out to the cloud and back. that said, i didn’t try IFTT as part of a solution.

Hi all,
I’m not sure what happened, but the endpoint app is gone from my ST. When I go to authorize it again, I get the following error from IDE:

“Client is not associated with a SmartApp in location Our house.”

Has endpoint access recently changed?

Its working for me. I just checked I’m not getting that error in the IDE and my endpoints are working

Weird. I never had to create a smart app in the IDE originally. I just followed the link provided by @nelemansc and authorized the devices I wanted to use. Then the app just appeared.

I don’t know why it’s looking for an app now.

I don’t have an app in my IDE, just in my installed app list on the mobile device. do you see it there? For reference the link nelemansc provided works for me.

I don’t believe stock ST apps show up in the IDE unless you manually install them.

Sorry, that’s what I meant. I don’t see it in my installed apps list on the phone. Did you simply authorized your devices then it showed up.

I used to have it in my installed apps list, but it’s gone now. WAF taking a beating…

It’s been awhile since I installed it but yes I believe that’s how it happened.

Hey guys,

FYI I wrote up a flic device handler and a smart app to do exactly what you guys are trying to do. You can find it out more here: Flic button

3 Likes