africanvilla.blogg.se

Flic button
Flic button






flic button
  1. #FLIC BUTTON INSTALL#
  2. #FLIC BUTTON UPDATE#
  3. #FLIC BUTTON CODE#

#FLIC BUTTON UPDATE#

Next, copy config-sample.json to config.json and update the flicd and home_assistant parameters.

#FLIC BUTTON INSTALL#

Once you’ve captured the Bluetooth addresses for your buttons, it’s time to install and configure the node library that will connect flicd with Home Assistant.įirst, install the Controller, as described in the Install section at. Note: If you’ve upgraded to Home Assistant 0.35, Flic support is now built in, rendering the balance of this post unnecessary. For each button discovered, make note of its MAC address. Now, discover buttons by running the startScanWizard command and following the prompts. From there, run the command make to build the simpleclient binary.

flic button

In the same checkout of the SDK that you copied flicd from, locate the simpleclient directory. Use sudo ps aux | grep "flicd" and sudo netstat -antp | grep "5551" to confirm that flicd is running. If the service isn’t running, check the log at /var/log/flicd.log. To enable the new flicd service, run: sudo systemctl enable /etc/systemd/system/rvice My service is generic so uses Tesla to authenticate, if your Auth token isnt valid, it wont do anything. My phone does the rest of the work, so it sends the HTTP request with an Auth header to my service. Next, open rvice in your favorite editor and add the following: ĮxecStart=/usr/local/bin/flicd -f /home/pi/.flic/daemon.db -s 0.0.0.0 -l /var/log/flicd.log -w The button just emits a Bluetooth signal, and Im using my phone as a slave, so it only works if my phone detects the button press. As my experience is with installing this on a Pi, the following will reflect that. With the binary installed, it’s time to create the directories and init scripts necessary to run the flicd daemon.

#FLIC BUTTON CODE#

All code has been compiled and tested on Ubuntu 15.10 for desktop and Raspbian Jess.Īfter checking out the latest release, copy the appropriate binary from bin//flicd to your device’s /usr/local/bin. The minimum Linux kernel supported is 3.13. The aforementioned Linux SDK includes builds for several platforms:īinaries and libraries ha been compiled for x86_64, i386 and armv6l. Lucky enough to have my second Pi’s Bluetooth controller available, I installed flicd on that device  its central placement in our apartment was an added bonus. Otherwise, you will need a second Bluetooth device. If you aren’t using Bluetooth for other purposes, the Pi’s controller on hci0 will suffice. Rather, because I already had a few Raspberry Pis, I opted for their Linux SDK, which includes pre-built binaries for the Pi, amongst other platforms.īe aware that the SDK requires exclusive access to a Bluetooth controller. Īs I already use Home Assistant, and I had an Amazon Dash Button controller to work from, I wasn’t interested in installing one of the smartphone apps. Flic buttons are Bluetooth-powered smart buttons that can be used to control other devices via their smartphone apps ( Apple, Android), or using any number of integrations they provide on GitHub.








Flic button