Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users
    1. Home
    2. anton
    • Profile
    • Following 1
    • Followers 0
    • Topics 2
    • Posts 91
    • Best 10
    • Controversial 0
    • Groups 1

    anton

    @anton

    FlicTeam

    12
    Reputation
    2125
    Profile views
    91
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    anton Unfollow Follow
    FlicTeam

    Best posts made by anton

    • RE: What differences between "set passive mode" and "set active mode"?
      • With Passive Mode the Flic button will disconnect the bluetooth LE link 10 seconds after each press in order to save battery power. The downside of this is that the link has to be established again the next time you press the button so the click latency will be worse.

      • With Active Mode the Flic button stays connected for as long as possible while the phone is within range and will automatically reconnect once the phone comes into range. The idea of this is that the button should be ready to send the button events immediately when you press it. This may sound wasteful, but in reality this mode will still allow for a long battery life due to the conservative connection parameters we use.

      So if you experience poor battery life on your Flic then you can try out Passive Mode. Keep in mind that either of these modes will not affect the Phone’s battery consumption. Also, I should mention that the setting is only applied on the next disconnect of the Flic (the next time you go out of range) since the connection parameters are negotiated during the connection phase.

      I know that this information would have been hard to figure out on your own since it is not really documented anywhere.

      /Anton

      posted in General Discussion
      anton
      anton
    • RE: MQTT Integration

      This is noted. Once we are done with all the features promised in the Hub LR campaign we will look into implementing additional features. So we will take a look at it then!

      posted in Developers
      anton
      anton
    • RE: Flic Hub features

      It is on our list, but I can not comment on a release date. Right now we are working hard on adding more features to the hub (as well as fixing any bugs that may arise during this initial release phase). We will have a Hub release coming out soon that adds more actions, but the Change Configuration action will not be part of that release.

      Hopefully we will get to it soon though.

      /Anton

      posted in Flic Hub
      anton
      anton
    • RE: No longer able to "Build" actions ?

      I'll submit a bug and make sure we take a look at it as soon as possible. Thank's for reporting!

      posted in General Discussion
      anton
      anton
    • RE: Make flic button send keyboard input to Android

      @brainstimulationab Actually we did implement functionality a while ago that enabled Flic to send generic keyboard events to the Android system using the HID profile. The problem that we noticed though was that Android had a lot of bugs/issues that caused bluetooth to become very unstable when using the HID profile. Actually the bugs were so severe that it would cause the phone to randomly crash and reboot. On some occasions it would even drop bonding keys randomly.. Due to this we had to make the decision to not release it. Apart from this I unfortunately do not have a good solution.

      posted in Developers
      anton
      anton
    • RE: Play sound file or play basic sounds on hub

      A play sound action will be made available in a later update. Our main focus now that the hubs are being shipped out is to gradually increase the functionality. We will have a V1.2.0 release of the Hub coming out shortly that adds more actions, but unfortunately Play sound will not be available in that update. However, It is likely that it will be available in the one after that.

      /Anton

      posted in Flic Hub
      anton
      anton
    • RE: Play Spotify Playlist on Android

      @f.ganninger We have found out what the issue is and hopefully we can fix it soon. Our Android developer responsible for the actions is unfortunately on vacation at the moment so it might be a few weeks before you hear anything regarding this. But I just want to ensure you that it is a high priority for us as well 🙂

      posted in General Discussion
      anton
      anton
    • RE: Compatible Bluetooth LE dongles (for older Macs)

      Hello,

      I am actually using the Cambridge Silicon Radio CSR8510 A10 dongle with my Mac Pro 2010 and it works great, although the range is not very impressive. I also know that a colleague of mine is using the Broadcom BCM20702 for his MacBook and supposedly it works great as well, but I don't have any first hand experience with it.

      One thing to keep in mind is that for some dongles the Mac will not automatically switch over and use the USB dongle as the primary HCI controller. If that is the case then you will need to manually switch it over. Here is a guide on how to do that. Unfortunately Apple has just recently removed the Xcode Hardware IO tools download from their website, but if you end up needing it then I can send you a copy of it. Also, since bluetooth pairings are stored on the bluetooth controller itself it means that you will need to re-pair current bluetooth devices that you might have, such as a wireless mouse or keyboard. It can be handy to have a USB mouse at hand since the wireless one will stop working as soon as you switch the controller 😛

      /A

      posted in Flic Mac Client
      anton
      anton
    • RE: Medicine Given Alert / Email Sender

      Thank you for posting this! It is really nice for us to hear about good use-cases like this.

      I think bt .tn closed down (or similar) about a year ago unfortunately.

      To your questions:

      1. I believe that the output from both stderr and stdout is consumed within the Flic app. This is if I recall correctly. If so, no output is available. This could be changed in a future release, but for now it is the case.

      2. To be honest with you, this is largely a business decision rather than a technical requirement. Sure, some features, such as IFTTT, Zapier, Microsoft Flow, need a Flic account in order to work, but in reality the app does not really need a login for most features. What I can say though is that once you are logged in, the app will not rely on our backend in order to work locally (at all). If our backend goes down your app will continue to work fine, unless of course you log out (in which case you would not be able to log back in again). I do understand your concern and if you truly want to have an offline solution with full control, then I recommend that you take a look at our https://github.com/50ButtonsEach/fliclib-linux-hci. Using that you could yourself fully implement Flic into a Raspberry Pi, for example. If you feel really motivated and don't even want to use our SDK, then you can also take a look at the Flic 2 Open Protocol Specification, but maybe that would require a fair bit of work.

      3. This is mostly due to Apple’s App Sandbox . Basically the Flic app can not access any folder on your computer other than exactly /Library/Application Scripts/com.shortcutlabs.FlicMac. The app also does not have write access, only read and execute, which is why you have to manually place the files there.

      Anyhow, I think it is cool what you have implemented. However, I will say that if reliability is critical to your use-case, then a purposefully build Raspberry Pi server might be a better way to go. It is more difficult to guarantee uptime on a Mac since it can go to sleep mode, software updates, etc.. I mentioned the fliclib-linux-hci earlier and I don’t think it would be very difficult for you to set that up, judging by the code you have already written 🙂

      posted in Flic Mac Client - Plugins
      anton
      anton
    • RE: Status of Apple HomeKit Support

      @b-bech-l

      The reason why we cannot give you transparency is because we simply don’t know ourselves how long it will take. We are currently working with the MFi Test labs to certify our product. This MFi process is under NDA so we cannot simply share all the details on what’s going on and where we are at.

      What I can say is that we have had some setbacks due to improper implementation on our end, but also due to delays caused by Covid19. Having said that, my hope is that we will have submitted all the materials/documents/samples needed by next week. After that your guess is as good as ours as to how long time it will take. We have never completed a HomeKit (or MFi) certification before, so this process is completely new to us as well.

      I know that this is not what you want to hear, but it is the truth.

      I also feel the need to say that even though communication with Apple has not always been the quickest, they have been very professional and helpful towards us. So I will not put any blame on them.

      posted in Flic Hub
      anton
      anton

    Latest posts made by anton

    • RE: Cannot choose keyboardmaestro macros in flic-app

      I just tested it on my computer running macOS 11.3.1.

      Maybe double check that Flic has the correct Automation permission in the Mac settings?

      Go to "System Preferences -> Security & Privacy -> Automation" then check that Keyboard Maestro.app is selected under Flic.app

      posted in Flic Mac Client
      anton
      anton
    • RE: Error code 1 on scan

      @anton said in Error code 1 on scan:

      @info-6 All flic2lib.buttonscanner error codes are documented here: https://github.com/50ButtonsEach/flic2lib-ios/wiki/Documentation#flicbuttonscannererrorcode

      error 1 appears to be "The scan could not be started since bluetooth was not in the powered on state."

      Also keep in mind that the state will not be "in the powered on state" if you have forgotten to request for bluetooth permissions in your app, or if the user has rejected the request.

      posted in Developers
      anton
      anton
    • RE: Error code 1 on scan

      @info-6 All flic2lib.buttonscanner error codes are documented here: https://github.com/50ButtonsEach/flic2lib-ios/wiki/Documentation#flicbuttonscannererrorcode

      error 1 appears to be "The scan could not be started since bluetooth was not in the powered on state."

      posted in Developers
      anton
      anton
    • RE: Flic Hub with Mac app

      @ddcaruso7 Don't worry about flooding with questions.

      • First, start by verifying that the Flic Hub is connected to the same network. Go into the settings view of the Flic app while connected to a hub and see what IP you have. The first 3 numbers should match your Mac's IP. You can also try the "TEST INTERNET ACCESS" button. Also, try to execute the action manually from within the app (by pressing the three-dot-icon next to the action). This is to rule out if there are any troubles with the connection between the Flics and the Hub. After doing this, if still not working, check in the terminal window on the mac to see if the program has output any error messages.

      • Regarding the IP, you are correct that it can change, and it would be an issue in that case. I forgot to mention it, because usually the router will give the same address to the same computer, but it is possible that your router to re-use addresses for other devices.

        Anyhow, to solve this, you can set a Static (permanent) IP in your mac settings. You can have a look at this guide: https://www.linksys.com/my/support-article?articleNum=142254 . Only change the IPv4 address field and the first 3 numbers must match the old address. So if you had 192.160.2.10, you can set it manually to, for example, 192.168.2.150. Use a last number in the range of 10-250.

      • The server program I created does not support https. It could be updated to support it, but that I can't help you with right now.

      Hope it helps 🙂

      /A

      posted in Flic Hub
      anton
      anton
    • RE: Flic Hub with Mac app

      @ddcaruso7 Great! I was a little bit worried that it was too technical, but good to hear that you got it working 🙂

      The next step (configuring the Hub and the Buttons) should be the easy part:

      1. Delete the buttons from the Mac app (or any other application that you have paired them to) so that they are free to use with the Hub.

      2. Login to the the Flic app for iOS (or Android). You will only need to use the app during configuration.

      3. Make sure that you are within range, say 5-10 meters, of the hub and then press the “Add Hub” on the main screen.

      4. Once you are inside the hub in the app, follow the instructions in the app to scan all your buttons. Make sure that you name them something so that you can remember which button is which. It is not guaranteed that they will be ordered in the correct way in the UI. Alternatively you can choose to start with only 2-3 buttons just to try it out and then add the rest later on.

        Screenshot 1.png

      5. On one of the buttons, add the “Internet Request” action to the “Click” trigger. Input the same URL that you verified earlier. Once you have saved the action you should be able to try it out by pressing the button and see if your Mac reacts with a keypress.

        Screenshot 2.png

        Screenshot 3.png

      6. Once verified, use the “Clone Config” feature to copy this action config to all the other buttons (so that you don’t have to manually add them). This can be done via the settings menu (gear icon up to the right). Make sure you select all the other buttons as the target.

        Screenshot 4.png

        Screenshot 6.png

      7. Once copied to all other buttons, you will now need to manually go into each of the buttons and update the last number in the URL /1 - /18.

      That should be it!

      Let me know how it goes! If you are happy with it then we can add the program to Autostart so that you don't have to start it from the terminal. Unless you are ok with doing it manually.

      /A

      posted in Flic Hub
      anton
      anton
    • RE: Flic Hub with Mac app

      @ddcaruso7 Ok, I have written a really simple web server program in Python that translates web requests into local keyboard presses. However, I must mention that you need to keep in mind that this server will be accessible by any device on your same WiFi network. So anyone who knows the URL can also send the same requests to your computer. You need to decide if you trust your own network.

      Instructions:

      1. Download the program file (You may need to right click an selectSave As...) If you want to you can also view the code if you are interested in how it works: https://misc-scl-cdn.s3.amazonaws.com/FlicServer.py
      2. Place the program file in a folder on your Mac. For example ~/Documents/Flic or similar.
      3. Open Mac’s Terminal program and type cd ~/Documents/Flic to move into the folder where you saved the program.
      4. Start the program by typing python2.7 FlicServer.py
        . If it starts successfully then it should write out “Started Flic Button server on port 4343” (The program can be terminated by pressing ctrl+c
      5. The program is now running. To use it, you need to find the IP address of your Mac so that we can configure the Flic Hub to send the events correctly. Open System Preferences -> Network and make a note of the IP address (something similar to 192.168.1.10). The program will listen to requests on the URL: http://192.168.1.10:4343/api/v1/button/1 (remember to change the IP address correctly). The last number "1" in the URL can be changed between 1-18 for the buttons.

      Now, before we configure the Flics, we want to see if it actually works. So, open a text editor on your Mac and make sure that the window is selected. This way you will be able to see if the keyboard presses are working as they should. Using another computer/phone on your network, open a web browser and type the URL. If it works, then confirm the URL for all 18 buttons.

      Let me know once you have gotten this far and I can help you with setting up the Flic Hub (if you don’t figure it out for yourself)

      For reference, here is the code:

      #!/usr/bin/python2.7
      
      import sys
      import time
      import threading
      
      from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
      from Quartz.CoreGraphics import CGEventPost
      from Quartz.CoreGraphics import kCGHIDEventTap
      from Quartz.CoreGraphics import CGEventCreateKeyboardEvent
      
      #   Button 1:	'8' -> 28
      #   Button 2:	'9' -> 25
      #   Button 3:	'b' -> 11
      #   Button 4:	'n' -> 45
      #   Button 5:	'm' -> 46
      #   Button 6:	'j' -> 38
      #   Button 7:	'k' -> 40
      #   Button 8:	'l' -> 37
      #   Button 9:	'z' -> 6
      #   Button 10:	'x' -> 7
      #   Button 11:	'c' -> 8
      #   Button 12:	'e' -> 14
      #   Button 13:	'r' -> 15
      #   Button 14:	'v' -> 9
      #   Button 15:	'q' -> 12
      #   Button 16:	'w' -> 13
      #   Button 17:	'6' -> 22
      #   Button 18:	'7' -> 26
      
      PORT_NUMBER = 4343
      
      def keyPress(keyCode):
          print "Sending Keycode..."
          eventDown = CGEventCreateKeyboardEvent(None, keyCode, True);
          eventUp = CGEventCreateKeyboardEvent(None, keyCode, False);
          CGEventPost(kCGHIDEventTap, eventDown);
          CGEventPost(kCGHIDEventTap, eventUp);
      
      class handleRoutes(BaseHTTPRequestHandler):
          # GET request handler
          def do_GET(self):
              if (self.path.startswith('/api/v1/button/')):
                  keyCode = self.keyCodeForPath(self.path)
                  if (keyCode != None):
                      threading.Thread(target=keyPress, args=(keyCode,)).start()
                      return self.sendResponse('{"status": "success"}', 200, 'application/json')
                  else:
                      print "Could not find keycode for this button number."
                      return self.sendResponse('Not found.', 404, 'text/plain')
              else:
                  return self.sendResponse('Not found.', 404, 'text/plain')
          
          def sendResponse(self, res, status, type):
              self.send_response(status)
              self.send_header('Content-type', type)
              self.end_headers()
              self.wfile.write(res)
              return
          
          def keyCodeForPath(self, button):
              if (button.endswith('/1')):
                  return 28
              elif (button.endswith('/2')):
                  return 25
              elif (button.endswith('/3')):
                  return 11
              elif (button.endswith('/4')):
                  return 45
              elif (button.endswith('/5')):
                  return 46
              elif (button.endswith('/6')):
                  return 38
              elif (button.endswith('/7')):
                  return 40
              elif (button.endswith('/8')):
                  return 37
              elif (button.endswith('/9')):
                  return 6
              elif (button.endswith('/10')):
                  return 7
              elif (button.endswith('/11')):
                  return 8
              elif (button.endswith('/12')):
                  return 14
              elif (button.endswith('/13')):
                  return 15
              elif (button.endswith('/14')):
                  return 9
              elif (button.endswith('/15')):
                  return 12
              elif (button.endswith('/16')):
                  return 13
              elif (button.endswith('/17')):
                  return 22
              elif (button.endswith('/18')):
                  return 26
              else:
                  return None
      
      try:
        server = HTTPServer(('', PORT_NUMBER), handleRoutes)
        print 'Started Flic Button server on port ', PORT_NUMBER
        server.serve_forever()
      
      except KeyboardInterrupt:
        print '\nClosing Flic Button server...'
        server.socket.close()
      
      
      posted in Flic Hub
      anton
      anton
    • RE: Flic Hub with Mac app

      @ddcaruso7 Ok, thank you, now I understand what you are trying to do! I'll try to figure out something that you can try, but I cant promise that it will be perfect.

      Regarding "make the hub findable in the Mac app", this will not help you, since the Hub is stand-alone and the app is only used for setup of the hub. Once it is setup the events are not routed via the app.

      So my idea is that I create a simple web server program that you can run on your mac. This program can emulate keyboard presses (just like Keyboard Maestro). Then you can setup the Hub via the iOS/Android app and configure it to send the press events to your computer via your local network. (Don't worry, I can make step-by-step instructions).

      Can you give me a list of the keystrokes that you want to use? That way I can pre-configure the program for this.

      Keep in mind, the requirements would be:

      1. The Mac and the Hub are connected to the same local network (WiFi / Ethernet) during operation.
      2. That you make sure that you start the server program on your Mac every time you reboot it (or assign it to auto start).
      3. The Hub is positioned within reach of the Flic buttons.

      I can't say for sure if the click latency will be good enough for your use case, you will have to try that out for yourself.

      /Anton

      posted in Flic Hub
      anton
      anton
    • RE: Flic Hub with Mac app

      @ddcaruso7 I need to understand better how you integrate the buttons. Im guessing that Hauptwerk is some sort of VST / Software Instrument that receives midi events from your connected midi controller, correct? Then, on the same machine, you run the Flic app and want to integrate that with the VST. How do you want to achieve this? Does Hauptwerk have some sort of API that you integrate with, or is it all through midi?

      You are correct that the Mac app does not see the Hub, but you can still configure the Hub via an iOS device and have it send the click events to the Mac via HTTP requests. The iOS app would then only be needed during initial setup.

      Like I said, I'll try to help you out, but I need to understand better.

      /Anton

      posted in Flic Hub
      anton
      anton
    • RE: Status of Apple HomeKit Support

      @b-bech-l

      The reason why we cannot give you transparency is because we simply don’t know ourselves how long it will take. We are currently working with the MFi Test labs to certify our product. This MFi process is under NDA so we cannot simply share all the details on what’s going on and where we are at.

      What I can say is that we have had some setbacks due to improper implementation on our end, but also due to delays caused by Covid19. Having said that, my hope is that we will have submitted all the materials/documents/samples needed by next week. After that your guess is as good as ours as to how long time it will take. We have never completed a HomeKit (or MFi) certification before, so this process is completely new to us as well.

      I know that this is not what you want to hear, but it is the truth.

      I also feel the need to say that even though communication with Apple has not always been the quickest, they have been very professional and helpful towards us. So I will not put any blame on them.

      posted in Flic Hub
      anton
      anton
    • RE: On iOS, disconnecting a button works but without messages.

      Strange. I tested it just now on iOS 13.3.1 and it works.

      Calling:

      [button disconnect];
      

      Causes:

      - (void)button:(FLICButton *)button didDisconnectWithError:(NSError *)error;
      

      And you are sure that the delegates are set properly and that you are not accidentally calling on a nil-object or something?

      posted in Developers
      anton
      anton