Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Toothpick] Device Support (battery level) request for Apple Magic Mouse (A1657) #17391

Open
krzemian opened this issue Feb 27, 2025 · 9 comments
Labels
Dont close Won't be closed by stalebot extension: toothpick Issues related to the toothpick extension extension Issues related to one of the extensions in the Store feature request New feature or improvement

Comments

@krzemian
Copy link

Extension

https://www.raycast.com/VladCuciureanu/toothpick

Description

Device brand and model
Apple Magic Mouse (A1657)

Device data
{"device_address":"DC:A9:04:01:55:58","device_firmwareVersion":"3.1.1","device_minorType":"Mouse","device_productID":"0x0269","device_services":"0x800020 < HID ACL >","device_vendorID":"0x004C","device_connected":"true"}

Who will benefit from this feature?

All Magic Mouse users

Anything else?

So it works fine for connectivity, but I've noticed that I'm only seeing battery level for my Magic Keyboard, not for the Magic Mouse:

Image

@krzemian krzemian added extension Issues related to one of the extensions in the Store feature request New feature or improvement labels Feb 27, 2025
@raycastbot raycastbot added the extension: toothpick Issues related to the toothpick extension label Feb 27, 2025
@raycastbot
Copy link
Collaborator

Thank you for opening this issue!

🔔 @VladCuciureanu @briankosw @VladCuciureanu @sxn @pernielsentikaer @rspeicher @VladCuciureanu @AntonNiklasson you might want to have a look.

💡 Author and Contributors commands

The author and contributors of VladCuciureanu/toothpick can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot close as not planned Closes the issue as not planned.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopens the issue.
  • @raycastbot assign me Assigns yourself to the issue.
  • @raycastbot good first issue Adds the "Good first issue" label to the issue.
  • @raycastbot keep this issue open Make sure the issue won't go stale and will be kept open by the bot.

@VladCuciureanu
Copy link
Contributor

VladCuciureanu commented Feb 27, 2025

Hey there! Thanks for the feedback! Sadly this issue is most likely out of my control. As you might notice from the device data you provided above, the Bluetooth utility doesn't return the battery level of the Magic Mouse and the issue might be originating from anywhere between the BT utility and the actual Magic Mouse, so mostly out of my power to fix.

For comparison here's how my Magic Trackpad looks:

{
  "device_address": "<Redacted>",
  "device_firmwareVersion": "<Redacted>",
  "device_minorType": "Magic Trackpad",
  "device_productID": "0x0324",
  "device_services": "<Redacted>",
  "device_vendorID": "0x004C",
  "device_connected": "true",
  "device_batteryLevelMain": "46%"
}

Note the "device_batteryLevelMain" field missing from your device's output :(

Edit: Sometimes power cycling the device or the computer fixes it tho so might be worth trying

@VladCuciureanu
Copy link
Contributor

@raycastbot close this issue

@krzemian
Copy link
Author

@VladCuciureanu yeah that's weird. However, I'm able to see the battery level with a similar extension in Alfred. So there should definitely be a way to get that data – the question being how.

Image

Workflow: https://alfred.app/workflows/zeitlings/bluetooth-device-battery/

@VladCuciureanu
Copy link
Contributor

@raycastbot reopen this issue

@raycastbot raycastbot reopened this Feb 27, 2025
@VladCuciureanu
Copy link
Contributor

@raycastbot keep this issue open

@raycastbot raycastbot added the Dont close Won't be closed by stalebot label Feb 27, 2025
@krzemian
Copy link
Author

I'm just checking how the Alfred extension handles this and it seems it's using the IOKit via:

ioreg -r -n AppleDeviceManagementHIDEventService -k BatteryPercent -f

to retrieve the battery level.

@VladCuciureanu
Copy link
Contributor

VladCuciureanu commented Feb 27, 2025

Using something similar:
ioreg -c AppleDeviceManagementHIDEventService | grep -e BatteryPercent -e DeviceAddress

Could you send me the output of that command when run on your machine with the mouse connected? Either here or via email is fine.

@krzemian
Copy link
Author

krzemian commented Feb 27, 2025

ioreg -c AppleDeviceManagementHIDEventService | grep -e BatteryPercent -e DeviceAddress
    | | |   |       "DeviceAddress" = "70-f0-87-08-a9-be"
    | | |   |       "BatteryPercent" = 95
    | | |   |       "DeviceAddress" = "dc-a9-04-01-55-58"
    | | |   |       "CurrentBatteryPercentNotificationType" = "CurrentBatteryPercent"
    | | |   |       "BatteryPercent" = 84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dont close Won't be closed by stalebot extension: toothpick Issues related to the toothpick extension extension Issues related to one of the extensions in the Store feature request New feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants