Monitor smartwatch battery level for charger

Hello!

I’ve been wanting to do a project involving my Galaxy watch and charging it. It’s a bit of a silly one, and i don’t know how hard it is, but it seemed fun to try.

Basically i want my smartwatch charger to only charge when it’s needed. I can use my Galaxy watch for around 4 days untill i need to charge it again, and at night it sits on it’s charger to not scratch my nightstand. Usually i just pull out the plug, and when needed i put it back in. But then i got myself an IKEA smart plug. Now i could turn it on and off quickly on my phone when it needed charging.

But i want to make it smarter. I want it to read my smartwatch battery level like once in the evening, and if it’s below a certain percentage, it switches on the plug so i don’t have to do anything. I have looked around, but i can’t really find anything on tracking smartwatch’s battery, especially not on a Samsung watch.

So i came here looking for advice and/or help. Hope someone knows a way to do this.

Thanks!

It seems there is an intent you can listen for, if I understand this correctly.


I’m not an android developer but it seems listening for this should give you the value, then it’s “just” a matter of sending it to HA. Possibly by MQTT?

If you look in this thread: Android Intents - Sending & Receiving List (Starting Activities too!) then I believe you can get it working using the method I tried.
But possibly something is wrong with my app/phone so that I can’t get it to work on my phone.

I tried many of intents and none of them works with Samsung Galaxy Watch.
Maybe someone made this?

I tried:

android.bluetooth.device.BATTERY_LEVEL_CHANGED
android.bluetooth.device.extra.BATTERY_LEVEL
com.samsung.android.gearoplugin
android.bluetooth.BluetoothAdapter

None of them doesn’t appears in history, or event listener.

The Galaxy Watch uses Tizen, so I think you can’t use the android packages you mention. Battery capacity of the watch can be monitored in Galaxy Wear app on a Samsung phone, but I don’t know how this works and if it’s possible to read this value somewhere. Since I have that combination, I’m very interested if you manage to find out a way to do this.

The Galaxy Watch 4 runs Android Wear, so it might be possible to use a more generic option for that. Maybe someone uses a comparable script to determine if an Android phone needs to be charged or not?

I don’t think i’m smart enough to try and read the battery level out of the phone app :laughing:

I’m getting a GW4 soon probably, so i’ll look into if there’s a scrip for that.

1 Like