This page has moved
⚠ The wiki has been replaced by the new website - this page has been moved: https://gadgetbridge.org/internals/automations/intents-gadget/?h=intents#huami-gadgets-with-a-button
Configurable button events
Some devices offer a button press to be recognized in the Gadgetbridge and allow assigning actions to these presses. Currently, this is available in MiBand 2, Amazfit Bip and Amazfit Bip Lite. (know about more? Please help with edits).
You can configure Gadgetbridge to trigger an action or send a broadcast message with a variable `button_id, which is a number indicating an id of the triggered event.
Gadgetbridge configuration:
-
In
Device specific settings
go toButton actions
. -
Set Button actions to Enabled
-
Button press count - set to your desired number of consequent presses to form an
Event
, for example 1 -
Maximum delay between presses - time (ms) within which button presses are joined together into an
Event
, for example 500 -
If you set Button press count to 1, to trigger Event 1, you must pres 1x, to trigger Event2, you must press 2x quickly...
-
If you set Button press count to 2, to trigger Event 1, you must pres 2x quickly, to trigger Event2, you must press 4x quickly...
Event action
For each Event, you can choose an action. These include Media Play/Pause, Media Toggle Playback, Next/Previous Track, Volume Up/Down, Skup forward/back and Send broadcast.
Broadcast message
This message can be customized and it also contains a variable called button_id
, with and ID of the Event.
Easer
To make use of these broadcast messages, you need to now catch the sent broadcast message and trigger an action. You need an app to do this, you can install Easer, or Tasker...
Easer configuration
This example shows how to make play/pause toggle to the broadcast nodomain.freeyourgadget.gadgetbridge.mibandButtonPressed
without utilizing the button_id
/at this point, Easer actually does not allow utilizing of message parameters, like device_id
).
-
Allow permissions
-
Create configuration via Menu → Data
-
Profile → + → Title: Toggle → Select an Operation → Android → Media Control → Toggle Play/Pause
-
Event → + → Title: Broadcast → Choose an Event → Android → Receive Broadcast → Action:
nodomain.freeyourgadget.gadgetbridge.mibandButtonPressed
-
Condition → Leave empty
-
Script → +
- Profile: select Toggle
- Event: select Broadcast
-
Profit ;)
Note: "Toggle Play/Pause" via Easer will hang up a phone call.
Tasker example:
NEW WEBSITE
General
- Home
- FAQ
- ReadMe
- Configuration
- Notifications
- ChangeLog
- Widget
- Weather
- Data Backup
- Pairing
- Find phone
- Music info
- Permissions Explained
- Firmware Update
- Automation via Intents
Sports/Activities
- Sports Activities Workouts
- Activity Sessions List
- Activity and Sleep Charts
- Heartrate measurement
- Integrating Sports Tracking apps with Gadgetbridge Sports Activities/Workouts
Smart Device Related
- Bangle.js
- Casio devices
- FitPro
- Fossil Hybrid HR
- Garmin devices
- HPlus
- Huami devices
- Amazfit Active
- Amazfit Active Edge
- Amazfit Balance
- Amazfit Band 5
- Amazfit Band 7
- Amazfit Bip
- Amazfit Bip Lite
- Amazfit Bip S
- Amazfit Bip U
- Amazfit Bip 3 Pro
- Amazfit Bip 5
- Amazfit Cheetah
- Amazfit Cheetah Pro
- Amazfit Cor
- Amazfit Cor 2
- Amazfit Falcon
- Amazfit GTR
- Amazfit GTR 3
- Amazfit GTR 3 Pro
- Amazfit GTR 4
- Amazfit GTR Mini
- Amazfit GTS
- Amazfit GTS 3
- Amazfit GTS 4
- Amazfit GTS 4 Mini
- Amazfit Neo
- Amazfit T-Rex
- Amazfit T-Rex 2
- Amazfit T-Rex Ultra
- Mi Band 1
- Mi Band 2
- Mi Band 3
- Mi Band 4
- Mi Band 5
- Mi Band 6
- Mi Band 7
- MyKronoz ZeTime
- Pebble
- PineTime
- Sony Wena 3
- SMA
- WithingsSteel
Wireless Earbuds
Others
- iTag Keyring trackers
- Nut Keyring trackers
- UM25 USB Voltage meter
- VESC BLDC controller VESC
- Flipper Zero Multi-tool Device for Geeks
- Roidmi Roidmi/Mojietu FM Trans.
- Vibratissimo Private toy
- Shell Racing Toy RC cars
- Femometer Vinca II
Full list of supported devices
Development
- How to Release
- Developer Documentation
- BT Protocol Reverse Engineering
- Support for a new Device
- New Device Tutorial
- Translating Gadgetbridge
- OpenTracks-API
- Intent-API
Feature Discussion
FAQ