diy solar

diy solar

Recent content by chromedshark

  1. chromedshark

    Bluetti AC300 Third-Party Software or Apps.

    @Topas0865 My background isn't really in electrical engineering, so I haven't done any research into that. Their Bluetooth (and WiFi) protocol is based around MODBUS, so it wouldn't surprise me if you discovered that the BMS also uses MODBUS.
  2. chromedshark

    Monitoring Bluetti Systems

    So it looks like there are two errors here: 1. The first error is that it cannot connect to an MQTT broker. You must install an MQTT broker like Mosquitto separately (or use the MQTT broker integration for Home Assistant if you want to go that route). By default they won't have a username or...
  3. chromedshark

    Monitoring Bluetti Systems

    Huh, looking at the Home Assistant add-on system, it probably wouldn't be that difficult to build a configurable add-on that runs bluetti-mqtt as a service, so you'd get logs, configurability, and automatic restarting. It's not anywhere close to what a native "integration" can provide, but...
  4. chromedshark

    Monitoring Bluetti Systems

    @Tinkerpete Short answer is that there is a way to fetch multiple values at once and I'm doing that in bluetti-mqtt. The longer answer is that can you use a query command (the 0x03 command) with a size greater than 1. The command 010300240001C401 will return a single field, the DC Input Power...
  5. chromedshark

    Monitoring Bluetti Systems

    @twister36 I only have a single AC300, but I suspect this is because one of the two places that value is stored should be ignored in this case. The question is which. If you use the bluetti-logger command to collect logs from both your devices (just run it for ~5 minutes against each device) and...
  6. chromedshark

    Monitoring Bluetti Systems

    @ApolloSK When you run bluetti-mqtt for the first time it "permanently" adds those homeassistant keys, so any time a client connects to the MQTT broker it'll receive that config data automatically. If you're not seeing anything other than those keys then the script is probably not running for...
  7. chromedshark

    Monitoring Bluetti Systems

    It's possible this is the same reason as this other report. When running services with systemd, logs are automatically sent to syslog, and should be readable by running journalctl -u name-of-the-service.target. You can use the -n 100 flag to specify the number of lines to print out, or the -f...
  8. chromedshark

    Monitoring Bluetti Systems

    It's not a UUID - it's just a string of raw bytes. Once you have the write characteristic (the BLERemoteCharacteristic*) you'll notice it has a writeValue method for either a string or raw uint8_t array. You'll just call it with any command string. The default for setting response to false here...
  9. chromedshark

    Monitoring Bluetti Systems

    @Tinkerpete Yeah, the string you need to send for the DC Input Power is "\x01\x03\x00\x24\x00\x01\xc4\x01". I did a detailed breakdown of how this is all built earlier in the thread so I'm not sure if you read that and there was something I said that was still unclear or you just missed that...
  10. chromedshark

    Monitoring Bluetti Systems

    @MrGPS Hmmmmmm. That warning that it's using Python 2.7 for pip seems like a problem. I went ahead and installed Python 3.7 just to test this and it works perfectly to install without any dependency issues. You might want to try python3 -m pip install bluetti_mqtt to force it to use Python 3.7...
  11. chromedshark

    Monitoring Bluetti Systems

    As far as I can tell only DC1 details are available over bluetooth. In theory there might be some way to switch it from reporting DC1 to DC2 to get both, but I haven't been able to figure out how to do that.
  12. chromedshark

    Monitoring Bluetti Systems

    I'm still a bit of a novice with Python, but I think if you run pip install 'bleak==0.14.3' it'll install a version of Bleak that is compatible with Python 3.7. Once that's done you should be able to run pip install bluetti_mqtt?
  13. chromedshark

    Monitoring Bluetti Systems

    @Tinkerpete Normally with a BLE device you can just read a specific characteristic to get the data you want, but the Bluetti is unfortunately more complicated than that. There are two characteristics I've been using to communicate with the device. Commands are written to the write...
  14. chromedshark

    Monitoring Bluetti Systems

    Linux instructions can be... complicated, but assuming that you're using a modern Raspberry Pi distro, you should be able to use systemd. You'll want to take the following and write it to a file called /etc/systemd/system/bluetti-mqtt.service, after first modifying the User=your_username_here...
  15. chromedshark

    Monitoring Bluetti Systems

    Yeah, I’ve noticed that the ”internal” values I’m pulling sometimes make absolutely no sense, but they’re not always bad or I wouldn’t be bothering. Feel free to ignore them. The battery voltages are always 0 because I haven’t yet written any code to page through each of the attached batteries...
Back
Top