Bluetooth Device Battery Display

hutbrummer

New member
Hello,
I have some bluetooth audio devices (speaker and headphone) which have no build in way to display the remaining amount of battery.
within the Bluetooth settings of my phone (Samsung galaxy s8+) it displays the remaining amount of battery in percent.

is there a chance to print that data into a notification or other message when the device disconnects?

Best regards and thanks for your help
 

Pseudocyclic

Well-known member
Try the Baton app - I'm not certain but I think it can do what you want, or something similar which might be acceptable.
 

Snurre

Well-known member
Maybe something here you could use

 

Dm114

Well-known member
Hello,
I have some bluetooth audio devices (speaker and headphone) which have no build in way to display the remaining amount of battery.
within the Bluetooth settings of my phone (Samsung galaxy s8+) it displays the remaining amount of battery in percent.

is there a chance to print that data into a notification or other message when the device disconnects?

Best regards and thanks for your help
Try this one attached...
 

Attachments

  • IMG-20220822-WA0010.jpg
    IMG-20220822-WA0010.jpg
    56.1 KB · Views: 51
  • Screenshot_20220822-065002_MacroDroid.jpg
    Screenshot_20220822-065002_MacroDroid.jpg
    329.6 KB · Views: 51

hutbrummer

New member
I tried both macros but it looks like no intent is received.
how can I monitor the incoming intents?
or send a test intent myself through macrodroid?

when I makes a second macro to send an intent I always get an error:

MacroDroid --> Send Intent Failed --> No Activity found to handle Intent { act=android.bluetooth.device.action.BATTERY_LEVEL_CHANGED flg=0x10000000 (has extras) }
 

Endercraft

Moderator (& bug finder :D)
I tried both macros but it looks like no intent is received.
how can I monitor the incoming intents?
or send a test intent myself through macrodroid?

when I makes a second macro to send an intent I always get an error:

MacroDroid --> Send Intent Failed --> No Activity found to handle Intent { act=android.bluetooth.device.action.BATTERY_LEVEL_CHANGED flg=0x10000000 (has extras) }
Don't really know about Intents but maybe that's because you didn't send any extras with the intent.
 

hutbrummer

New member
hmm, doesn't let me to upload attachments.
However, i have added the two extras:
android.bluetooth.device.extra.BATTERY_LEVEL with value "99"
android.bluetooth.device.extra.DEVICE with value "Test"

I guess that's why the error has the ending "has extras"
 

Dm114

Well-known member
hmm, doesn't let me to upload attachments.
However, i have added the two extras:
android.bluetooth.device.extra.BATTERY_LEVEL with value "99"
android.bluetooth.device.extra.DEVICE with value "Test"

I guess that's why the error has the ending "has extras"
Extra name is:
android.bluetooth.device.extra.BATTERY_LEVEL
Extra value is: *
 

hutbrummer

New member
I think you are mixing things now.

I have a macro, basically a copy from the already posted example, which is triggered by the battery_level_changed intent.


Screenshot_20220822-215747_MacroDroid.jpg

it did not fire when the battery level changed so I tried to create a second macro and send the intent manually, but this returns the error message.

Screenshot_20220822-153415_MacroDroid.jpg

I don't get any of the both macros to work and don't know why.
 

Dm114

Well-known member
I think you are mixing things now.

I have a macro, basically a copy from the already posted example, which is triggered by the battery_level_changed intent.


View attachment 3263

it did not fire when the battery level changed so I tried to create a second macro and send the intent manually, but this returns the error message.

View attachment 3264

I don't get any of the both macros to work and don't know why.
I'm not sure your 2nd Extra intent is correct and necessary.

For me it works for years as I sent it. The only thing is that it fires every 10 level change (100, 90, 80, 70...). As I only have 1 BT device firing, I don't know how it works with other ones.
 

hutbrummer

New member
After changing the last part of the second extra parameter to caps the macro works fine.

Thanks for your help and pointing me into the right direction.
 

x4rfaCe

New member
I'm not sure your 2nd Extra intent is correct and necessary.

For me it works for years as I sent it. The only thing is that it fires every 10 level change (100, 90, 80, 70...). As I only have 1 BT device firing, I don't know how it works with other ones.
Hi,

the first "extra" receives and stores the state (-1[off], 100, 90,..). The second "extra" receives and stores the MAC adress of the device. So I could read out friendlynames from a dictionary.

Works perfectly fine.

GreetZ
x4rfaCe
 

ARME

Active member
Hi,

the first "extra" receives and stores the state (-1[off], 100, 90,..). The second "extra" receives and stores the MAC adress of the device. So I could read out friendlynames from a dictionary.

Works perfectly fine.

GreetZ
x4rfaCe
Could you attach the working macro?
 
Top