You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there GEIGEIGEIST! Thanks for making the Totem! It's an awesome board. I'm looking for guidance on getting more accurate battery information through ZMK. I've tried charging both halves of the board via the USB on my PC as well as 5V usb adapters and haven't seen the battery go up higher than ~50% on the right half and ~80% on the left. Do you know the answers to the follow:
Does the power switch need to be turned on for the battery to charge?
Is there a ZMK configuration that can be added for the seeedxiao to get more accurate battery information?
I'm using the below script to check the battery on Linux:
from dbus_next.aio import MessageBus
from dbus_next.constants import BusType
import asyncio
BLUEZ = "org.bluez"
#replace hci0 with your bluetooth adapter name and FF_FF_FF_FF_FF_FF with your keyboard address
BLUEZ_PATH = "/org/bluez/hci0/dev_FF_FF_FF_FF_FF_FF"
GATT_SERVICE = 'org.bluez.GattService1'
GATT_CHARACTERISCITC = 'org.bluez.GattCharacteristic1'
GATT_CHARACTERISCITC_DESCR = 'org.bluez.GattDescriptor1'
BATTERY_UUID = "0000180f-0000-1000-8000-00805f9b34fb"
BATTERY_LEVEL_UUID = "00002a19-0000-1000-8000-00805f9b34fb"
BATTERY_USER_DESC = "00002901-0000-1000-8000-00805f9b34fb"
loop = asyncio.get_event_loop()
async def main():
bus = await MessageBus(bus_type=BusType.SYSTEM).connect()
# the introspection xml would normally be included in your project, but
# this is convenient for development
introspection = await bus.introspect(BLUEZ, BLUEZ_PATH)
device = bus.get_proxy_object(BLUEZ, BLUEZ_PATH, introspection)
for svc in device.child_paths:
intp = await bus.introspect(BLUEZ, svc)
proxy = bus.get_proxy_object(BLUEZ, svc, intp)
intf = proxy.get_interface(GATT_SERVICE)
if BATTERY_UUID == await intf.get_uuid():
for char in proxy.child_paths:
intp = await bus.introspect(BLUEZ, char)
proxy = bus.get_proxy_object(BLUEZ, char, intp)
intf = proxy.get_interface(GATT_CHARACTERISCITC)
level = int.from_bytes(await intf.call_read_value({}))
if BATTERY_LEVEL_UUID == await intf.get_uuid():
props = proxy.get_interface('org.freedesktop.DBus.Properties')
for desc in proxy.child_paths:
intp = await bus.introspect(BLUEZ, desc)
proxy = bus.get_proxy_object(BLUEZ, desc, intp)
intf = proxy.get_interface(GATT_CHARACTERISCITC_DESCR)
name = "Main"
if BATTERY_USER_DESC == await intf.get_uuid():
name = bytearray(await intf.call_read_value({})).decode()
print(name + ": ", str(level))
loop.run_until_complete(main())
The text was updated successfully, but these errors were encountered:
Hey there GEIGEIGEIST! Thanks for making the Totem! It's an awesome board. I'm looking for guidance on getting more accurate battery information through ZMK. I've tried charging both halves of the board via the USB on my PC as well as 5V usb adapters and haven't seen the battery go up higher than ~50% on the right half and ~80% on the left. Do you know the answers to the follow:
Does the power switch need to be turned on for the battery to charge?
Is there a ZMK configuration that can be added for the seeedxiao to get more accurate battery information?
I'm using the below script to check the battery on Linux:
The text was updated successfully, but these errors were encountered: