If I use an address of say 192.168.1.255 with udp.send to broadcast a message to my subnet, or anything ending in 255, I am getting the following
Error: EACCES (permission denied)
Specific non broadcast IP address do work.. and RX is working OK from broadcast. What am I doing wrong ?
As with so many technical requests your question isn't really clear enough as to what the problem is. It looks like you're using Postman to generate the code and wanting to post a multipart form. I can only point you to
You have my sympathies, curl is not the easiest to understand and API documentation rarely makes it easy to understand exactly what's necessary.
Ok, I assume that channel.auto_disconnect_time unit is seconds.
But I think that I eventually found out what was draining the batteries, in the python scan wizard exemple in the is_private case, the scanner is never removed. I suspect this forces all the buttons to stay active if no-one press on the foreign button for 7 sec. Since I fixed that with a timeout, batteries are felling much better :-)
@JoeJoe unfortunately not. We have HID on iOS but it didn't work out well on Android due to a huge amount of bugs in the Android Bluetooth stack. Also the onscreen keyboard is hidden when a HID device is connected which is quite bad for the user experience.
If you cannot record the audio on your device, please check the microphone and the sound settings firstly. Then, try another audio recorder app. When you tend to record the audio on your computer, you should find the app, like FonePaw Screen Recorder, supporting microphone and system sound.
I cannot seem to get a valid batterystatus from my old flic buttons.
Please see issue the issue I reported on github: https://github.com/50ButtonsEach/fliclib-linux-hci/issues/84
Does the batterystatus require an firmware update of the buttons?
I know this is a little old, but here is one way to approach this.
Create a webhook endpoint on the server, then use a websocket to push messages to the frontend.
Register the buttons with the database, giving them a UUID.
Split the API route based on button actions, passing the button's UUID as the parameter.
Assign the URL as an action to the botton, i.e. ".../button/action/uuid
Hope that helps
Thank you for your help!
I got a syntax error but I managed to repair it with this code:
cc = fliclib.ButtonConnectionChannel(bd_addr)
cc.on_button_single_or_double_click = \
lambda channel, click_type, was_queued, time_diff: \
keyboard.press(Key.right) if click_type == fliclib.ClickType.ButtonSingleClick else keyboard.press(Key.left)
cc.on_connection_status_changed = \
lambda channel, connection_status, disconnect_reason: \
print(channel.bd_addr + " " + str(connection_status) + (" " + str(disconnect_reason) if connection_status == fliclib.ConnectionStatus.Disconnected else ""))
It works perfectly and it seems I don't need to release the key.
But it seems Windows Universal Apps don't recognize key presses sent by Python... Key presses are recognized everywhere else. Anybody knows why or how to get around it?
The next step to have a fully functional Windows integration would be to make the script work with Eventghost. I will try either by capturing the keystroke event and by sending http requests to it's built-in webserver. I will let you know!