Open notterme opened 5 days ago
Ah, I think I forgot to install bluez.. It is running now. Sorry for the confusion.
Since I'm super-new at using mqtt from the commandline, how do I query the current state of the battery? I'm not using anything HA or node-red.
I've got the client connected to the broker:
(venv) [me@myhost bluetti]$ bluetti-mqtt --broker 127.0.0.1 F4:D9:19:48:1F:DE
2024-11-21 20:47:46 INFO Connecting to MQTT broker...
2024-11-21 20:47:46 INFO Starting to poll clients...
2024-11-21 20:47:46 INFO Connecting to clients: ['F4:D9:19:48:1F:DE']
2024-11-21 20:47:46 INFO Connected to MQTT broker
2024-11-21 20:47:51 INFO Connected to device: F4:D9:19:48:1F:DE
2024-11-21 20:47:51 INFO Device F4:D9:19:48:1F:DE has name: EB3A2314000970412
2024-11-21 20:47:52 INFO Sent discovery message of EB3A-2314000970412 to Home Assistant
and I've subscribed to the topic:
$ mosquitto_sub -h localhost -t "/bluetti/state/F4:D9:19:48:1F:DE/total_battery_percent"
But I'm completely stuck with getting it to trigger spitting out a percentage.
mosquitto_pub -h 127.0.0.1 -t "bluetti/command/F4:D9:19:48:1F:DE" -m "total_battery_voltage"
produces this on the bluetti-mqtt client console:
WARNING unknown command topic: bluetti/command/F4:D9:19:48:1F:DE
..and this on journalctl -u mosquitto -f
Nov 21 20:54:39 myhost mosquitto[812]: 1732182879: New connection from 127.0.0.1:40740 on port 1883.
Nov 21 20:54:39 myhost mosquitto[812]: 1732182879: New client connected from 127.0.0.1:40740 as auto-AA16A47A-4249-7D79-6263-D961832AE725 (p2, c1, k60).
Nov 21 20:54:39 myhost mosquitto[812]: 1732182879: Client auto-AA16A47A-4249-7D79-6263-D961832AE725 disconnected.
I checked the READMEs from warhammerkid and this one, but they don't provide any examples on how to interrogate the bluetti using mqtt.
Ran the install process as per the README:
But on executing 'bluetti-mqtt --scan' I'm greeted with the following error messages:
Did I miss installing some dependency?