- Introduction Into Windows Subsystem for Linux 2 (WSL2) for Beginners | https://git.io/ilyaigpetrov-wsl ★1 9/26/2021
- Windows boot manager asks for BitLocker recovery key on each boot after updating GRUB | How to fix ★1 8/12/2021
- Orange PI PC: My Experience | https://git.io/ilyaigpetrov-orange-pi-pc ★1 9/15/2020
- What's wrong with Nokia 📱 https://git.io/wrong-nokia ★1 11/19/2019
- HOWTO: effectively argue against Internet censorship ideas ★1 9/12/2019
- [On tab it inserts 2 spaces, on one more tab this 2 spaces are added with 2 new and total 4 spaces are converted to a tab of the same length](https://gist.github.com/cc3874bf4675b79e16a98
I find the ability to get my android devices' battery info on my desktop computers via cli to be extremely convenient. I used to be able to this with KDE Connect easily, but things have just changed. Since I can't find any documentation on how to do this, and since I just stumbled on the answer myself, I though I might share what I know here. Please note that in the examples below, I will be using {device-id} as a placeholder for the string that KDE Connect uses to identify to my devices.
That said, I used to be able to get my various devices' battery status through gdbus through the following:
gdbus call --session --dest org.kde.kdeconnect --object-path /modules/kdeconnect/devices/{device-id} --method org.kde.kdeconnect.device.battery.charge
However on Arch, I now get the following error: Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownInterface: No such interface 'org.kde.kdeconnect.device.battery' at object path '/modules/kdeconnect/devices/b04294f19e8767f5'. I don't get this message on
| #!/usr/bin/env python3 | |
| import time | |
| import requests | |
| import sys | |
| from datetime import datetime, timezone | |
| from dateutil import parser | |
| import re | |
| def print_stderr(*args, **kwargs): |