Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users
    1. Home
    2. superkikim
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 1
    • Controversial 0
    • Groups 0

    superkikim

    @superkikim

    1
    Reputation
    340
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    superkikim Unfollow Follow

    Best posts made by superkikim

    • Trigger a serie of actions on a single click with time intervals

      Hi there.

      1st of all, I have to tell you that your forum is not working well with Firefox Quantum. During registration, the reCaptcha failed and then I could not validate it. I finally registered through Safari. Same now to post a new topic. The New Topic button didn't had any result. Back to Safari for it to work o_0

      That said, it's not the topic of my message.

      I just ordered 8 Flic buttons and I'm looking forward to receive them. I would like to know if, and how, I can have a sequence of command triggered by the button, without using IFTTT.

      For example, I'd like to send an HTTP request, and then, activate an Harmony activity after a specific time in between.

      posted in General Discussion
      superkikim
      superkikim

    Latest posts made by superkikim

    • RE: Flic for pi3..

      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
      
      posted in Developers
      superkikim
      superkikim
    • RE: TP-Link HS100 Wi-Fi Smart Plug

      If you're a bit of a geek, you may also find the power on/power off API command by yourself. Check out my article (I just wrote today). It might help you.

      It's in french, but google might do a good job translating it

      https://translate.google.com/translate?sl=fr&tl=en&js=y&prev=_t&hl=fr&ie=UTF-8&u=https%3A%2F%2Fakim.sissaoui.com%2Finformatique%2Fmaxsmart-resapi%2F&edit-text=&act=url

      Basically, I used a packet catcher on my android phone, and activated the power action on my power outlet (not a TP-Link but it does not matter). The Packet Catcher will show you what has been sent from the application, hence the link sent to power on or off your socket.

      Then you will have the direct action.

      Now, I don't know if this will be helpful for TP-Link. MaxSmart is using http on port 80. It's not encrypted in direct connection. Makes it easy.

      In the end, if you get an URL, you can then use the HTTP request action to power on or power off your Smart Plug.

      posted in General Discussion
      superkikim
      superkikim
    • Trigger a serie of actions on a single click with time intervals

      Hi there.

      1st of all, I have to tell you that your forum is not working well with Firefox Quantum. During registration, the reCaptcha failed and then I could not validate it. I finally registered through Safari. Same now to post a new topic. The New Topic button didn't had any result. Back to Safari for it to work o_0

      That said, it's not the topic of my message.

      I just ordered 8 Flic buttons and I'm looking forward to receive them. I would like to know if, and how, I can have a sequence of command triggered by the button, without using IFTTT.

      For example, I'd like to send an HTTP request, and then, activate an Harmony activity after a specific time in between.

      posted in General Discussion
      superkikim
      superkikim