I recently started experimenting with automation by purchasing a Flic-2 hub and smart buttons. Flic uses BlueToothLE to communicate. There are apps for configuring Flic via Android, iOS or Mac. But so far a Windows app is just an empty promise. They have finally released a windows SDK, but it is beyond my capabilities (and will) to setup the environment and then develop my own app.
There are several integrations built into the Flic system, but most rely on cloud services like IFTTT, Microsoft Flow or Zapier. For my purposes, I do not want to rely on cloud connectivity. I want to control from within my own LAN. It seems my lowest common denominator for Flic is its ability to make HTTP requests.
After much web searching for rules engines and control hubs, I came across Hubitat. It looked promising, so I bought the Elevation hub and have spent many hours experimenting with it.
So far I have figured out how to make an HTTP request from Flic to HE and trigger a Rule-4 app to log the event.
But here is my problem:
Since there is no Windows interface to program the Flic buttons, I can't just copy and paste the Hubitat endpoint URLs. I must manually type them into the Flic app on my Android phone. Considering I have multiple buttons and each button has three functions, that is a lot of endpoints to type in manually. (Yikes!)
I'm thinking rather than have multiple endpoint URLs, can I use a single endpoint URL but append two additional parameters for button ID and single-click, double-click or hold action? That way I can copy/paste the same long URL within the smartphone, but just edit the short, custom parameters at the end.
That single Hubitat rule would have to parse out the custom parameters to determine which rule actions to execute.
So here are my questions:
Is this do-able?
- Can I append additional parameters to the endpoint URL without breaking it?
- If so, how do I go about capturing the incoming HTTP request string in order to parse out my parameters?
- Is this best accomplished with Rule machine, Maker API or some other app?
Any help or pointers to possible solutions are appreciated!