Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Flic for pi3..

    Developers
    15
    21
    33758
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • giannis.yt
      giannis.yt last edited by

      As a non-coder I can't actually keep up with your conversation, but I would like to ask what's the cheapest board I could use to run the flic skd? I want to experiment a little during the summer and I will have some help so I'd like to know what I should order.

      Emil 1 Reply Last reply Reply Quote 1
      • nlivor
        nlivor last edited by

        Would be great if somebody could implement this for use on a Synology NAS..

        1 Reply Last reply Reply Quote 0
        • superkikim
          superkikim last edited by

          FLIC buttons can be integrated with home assistant thanks to the flic binary sensor component. For that you need the flic Linux SDK. There are already some topics on this forum about it.

          Unfortunately, if you deploy this SDK on the same server as you deploy Home Assistant, the bluetooth device is then usable only for the flic buttons. Currently, there is now way to use Bluetooth for flic SDK AND for other purpose like bluetooth trackers.

          Despite what you can read on some occasion, even if you have two USB chips (i.e. embedded and a USB dongle), it will conflict with bluetoothd. And currently, there is no possibility to implement flic with bluetoothd. This is the reason why it is for now also impossible to run any flicd implementation on home assistant if bluetoothd is running (i.e. if you use bluetooth_tracker).

          As an alternative, I have deported flicd on a dedicated Raspberry PI 3 as a container.

          The Raspberry PI 3 is deployed with Raspbian Stretch (raspbian-stretch-lite.zip)

          You can then install docker. DO NOT INSTALL NOR RUN BLUEZ or any kind of instance of bluetoothd.

          Once your RPI3 network is configured, you can get the docker on my repository by running the following command:

          docker run -d --restart unless-stopped --cap-add NET_ADMIN --net=host --name="flicd" -v /home/autoadmin/flicd:/config superkikim/flicd-rpi3
          

          The -d start the container in background
          The --restart parameter ensure the container start at boot, unless it was stopped before reboot
          The --cap-add NET_ADMIN allows the container run as a non-root user
          The --net parameter indicate to bind the container to the host network
          The --name parameter define the name of the container and can be whatever you want
          The -v allows to save the flicd database to persistent storage, otherwise, the database will be deleted everytime the container is stopped

          To check the docker log, and ensure it's up and running, run the following command:

          docker logs flicd
          

          The result should be:
          Available HCI devices found:
          hci0

          Trying hci0
          Successfully bound HCI socket
          Flic server is now up and running!
          Initialization of Bluetooth controller done!
          

          You can then add the following in your home assistant configuration:

          binary_sensor:
            - platform: flic
              host: <ip address>
          

          where <ip address> is the IP address of your flicd RPI3.

          Restart home assistant. You can then go back to the raspberry pi, and check the container log again. You should see a new line saying "Accepted new client"

          Available HCI devices found:
          hci0
          
          Trying hci0
          Successfully bound HCI socket
          Flic server is now up and running!
          Initialization of Bluetooth controller done!
          Accepted new client
          

          To pair a button for the first time, click and hold for at least 7 seconds.

          If you're using home assistant, check your Home Assistant log to find the name of your new button. You should find a line saying "Found new button"

          2018-01-01 06:28:01 INFO (Thread-2) [homeassistant.components.binary_sensor.flic] Found new button 80:e4:da:XX:XX:XX
          

          The name of the button is flic_macaddress without column. i.e. flic_80e4daXXXXXX

          You can then add the button in your automation. Below is an example of a series of action linked to one of my FLIC button. It turns on with single click the power switch where my three monitors and my port replicator are powered, and on double click, it switch them off:

          - alias: 'Switch on Mac Desktop Zone'
            trigger:
              platform: event
              event_type: flic_click  
              event_data:
                button_name: flic_80e4daXXXXXX
                click_type: single
            action:
              - service: switch.turn_on
                entity_id: switch.bureau_1
              - service: switch.turn_on
                entity_id: switch.bureau_2
              - service: switch.turn_on
                entity_id: switch.bureau_3
              - service: switch.turn_on
                entity_id: switch.bureau_4
          - alias: 'Turn off Mac monitors'
            trigger:
              platform: event
              event_type: flic_click  
              event_data:
                button_name: flic_80e4da7XXXXXX
                click_type: double
            action:
              - service: switch.turn_off
                entity_id: switch.bureau_1
              - service: switch.turn_off
                entity_id: switch.bureau_2
              - service: switch.turn_off
                entity_id: switch.bureau_3
              - service: switch.turn_off
                entity_id: switch.bureau_4
          
          1 Reply Last reply Reply Quote 0
          • lu
            lu last edited by

            I bump this old topic to say that i can now use my first flic from the first kickstarter compaign with a rpi3.
            I use node-red-contrib-flic-buttons and with this i can very easily interact with my domoticz installation.
            It's very simple to use and it's work very good!

            1 Reply Last reply Reply Quote 0
            • Sawtaytoes
              Sawtaytoes last edited by

              I was thinking about how the newer Flic buttons allow for firmware updates. Since I'm assuming these would normally be done through the Android or iOS app, how would we handle these if we've got our buttons paired with a bunch of Raspberry Pis?

              1 Reply Last reply Reply Quote 1
              • aconrad2
                aconrad2 @Emil last edited by

                @Emil Hi, thanks you for your answer. So how does it works with the Linux SDK ? I suppose only "Single click" event comes from the button, isn't it ?

                thanks you,

                1 Reply Last reply Reply Quote 0
                • Sawtaytoes
                  Sawtaytoes @hafager last edited by

                  @hafager @aytekcan The Linux SDK project is ready to go with the Raspberry Pi 3. The repo on GitHub's been getting updates even this year and I submitted an issue I was having and got a response within an hour.

                  From my own experience testing it last night, it works with websockets using Node.js. There are a bunch of Python files in there, and I assume those are working too!

                  I was running Ubuntu Server 16.04 on my Raspberry Pi 3 until I found that it has issues with Bluetooth drivers. After flashing the latest Raspbian JESSIE Lite, I had no further issues. Bluez is not required with the newer SDK.

                  1 Reply Last reply Reply Quote 0
                  • Emil
                    Emil FlicTeam @aconrad2 last edited by

                    @aconrad2 Hi. You can use Flic Single just like any other Flic with the Linux SDK.

                    aconrad2 1 Reply Last reply Reply Quote 1
                    • aconrad2
                      aconrad2 last edited by

                      Hi everybody,

                      I'm a new user of Flic buttons.

                      I'm using a Rapsberry PI 3 with internal bluetooth controler for other bluetooth items (Xiaomi Mi Flora) and a dedicated USB Bluetooth controler for the Flic service, and a Node-Red flow. It works fine for my only one button 🙂

                      I'd like to use some other buttons but... do you know if the Single Flic can be use with the Linux SDK ? Can the action be selected as I want with the Node-Red flow like a standard Flic Button.

                      If I correctly understand the Single Flic button have only "Single Clic" event, not "Double clic" and hold on event.

                      Thanks for you answer,
                      Have a good day.

                      Emil 1 Reply Last reply Reply Quote 0
                      • aytekcan
                        aytekcan last edited by

                        Hi All,

                        Is there any updates on this project?

                        1 Reply Last reply Reply Quote 0
                        • hafager
                          hafager last edited by

                          Hi,
                          Same as @alex, I am curious as to what state the flic - rpi environment is in today.
                          Is it easy to set up, or easy to work with using linux bluetooth api or abstractions of it through Python or similar? Is it possible at all without being online?
                          Coding skills is not an issue.

                          Thanks!

                          Sawtaytoes 1 Reply Last reply Reply Quote 0
                          • alex
                            alex last edited by

                            Hi there,
                            Is there any update on the ability to connect flics to a raspberry pi.
                            it would open up a world of options for home automation.
                            hopefully with some good step-by-step guides for us with limited code skills 🙂

                            Thanks

                            1 Reply Last reply Reply Quote 2
                            • anton
                              anton FlicTeam @Anshur last edited by

                              @Anshur said in Flic for pi3..:

                              @Emil Hi,

                              I've been trying to make some sort of flic-to-LIFX bridge on my RPi 3, but my very basic coding skills seem to be insufficient.....

                              So I was wondering if you were planning on porting a more beginner friendly flic app to Linux at any point in the future ?

                              Thanks in any case.

                              Hello,

                              Yes, in fact we are currently working on a stand-alone application for linux where a lot of the functionality will be ported over from the mobile apps (LIFX included). I can not comment on a release date yet, but it is definitely a priority for us, so expect some news about it in the (not to distance) future 🙂

                              /A

                              1 Reply Last reply Reply Quote 0
                              • Anshur
                                Anshur @Emil last edited by

                                @Emil Hi,

                                I've been trying to make some sort of flic-to-LIFX bridge on my RPi 3, but my very basic coding skills seem to be insufficient.....

                                So I was wondering if you were planning on porting a more beginner friendly flic app to Linux at any point in the future ?

                                Thanks in any case.

                                anton 1 Reply Last reply Reply Quote 0
                                • Emil
                                  Emil FlicTeam last edited by

                                  Hi.

                                  We have just released a new Linux SDK that should work great on RPi 3!
                                  Check it out at https://github.com/50ButtonsEach/fliclib-linux-hci

                                  Anshur 1 Reply Last reply Reply Quote 0
                                  • Anshur
                                    Anshur last edited by

                                    I would love if anybody would create a step by step tutorial for setting up flic on a raspberry pi 3.

                                    I'm not much of a coder, but I did purchase de RP3 in roder to turn it into a flic HUB for my LIFX (as the iOS app seems to have trouble reconnecting without relaunching the app after being away).

                                    Anyway, keep up the good work : )

                                    1 Reply Last reply Reply Quote 0
                                    • fabian
                                      fabian FlicTeam last edited by

                                      Hi

                                      I am the developer of the Linux SDK so I'll keep a look in this thread at regular intervals.

                                      A quick status update: Since I released the SDK in January I have not had nearly as much time as I expected to work with the SDK. I am thus very grateful that developers continue to report bugs and beta test the library. Instead we have been working with some very exciting improvements of Flic, some of which was released yesterday (The 2.0 release). As soon as this is also completed on Android I'll have more time to work with the SDK. Hopefully the new improvements will also be available on Linux.

                                      Regarding your request: we do indeed aim to make RPi3 the main platform. I recently tested it with the latest release and was able to connect 10 buttons without failure for several days. It's a good idea to try and lower the entry level even more, maybe by providing a installation script for Raspbian.

                                      Cheers, Fabian

                                      bashar_8383 1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post