Open shurubura opened 1 month ago
It depends on your goal. This tool runs almost perfectly with Home Assistant via MQTT integration. You need MQTT broker, but after setup all data gets reported there on regular interval. You can listen MQTT broker also for your other needs using any MQTT client.
If you really want to do it with code, take a look at logger_cli code, it does almost what you want, but writes output to file. https://github.com/warhammerkid/bluetti_mqtt/blob/main/bluetti_mqtt/logger_cli.py#L54
Here's an example of what you get in Home Assistant after setting it up:
Plus ability to control your bluetti from dashboard (enable/disable AC and DC outputs), and create automations based on data from device.
I'm not a pro, so creating the code with chatGPT
I have this code:
And this is the output:
What should I do to get output power information every second?