Right now the BLE container just fails if the Bluetooth Device isn't responding, moved from HCI0 to HCI2 or whatever.
It doesn't provide any feedback to TSC itself and as a result TSC can't control charging power and doesn't stop the charging process and empties the HomeBattery.
A Fail-Safe for this would be appreciated.
Today I had the following:
[07-Jul-2024 13:18:07.212 VRB TeslaSolarCharger.BleApi.Services.CommandLineExecutionService] Stderr Result: Error: failed to find a BLE device: can't init hci: no devices available: (hci0: can't down device: no such device)(hci1: can't up device: connection timed out)
The BLE Adapter switched again from HCI0 to HCI1 (I don't know why, sometimes just happens) and in that case it errors out.
Output of hciconfig --all:
In order to get it to work again I followed these steps:
https://unix.stackexchange.com/a/602739
I think they require sudo access, but the container has been started with privileged: true anyways. I'd suggest doing this in case the BLE container had 3 failed attempts with such errors.
If that again doesn't help and the CLI for BLE fails again I'd suggest that TSC is stopping the charge through a Fleet-API command just to prevent that the HomeBattery is getting drained.
Right now the BLE container just fails if the Bluetooth Device isn't responding, moved from HCI0 to HCI2 or whatever. It doesn't provide any feedback to TSC itself and as a result TSC can't control charging power and doesn't stop the charging process and empties the HomeBattery.
A Fail-Safe for this would be appreciated.
Today I had the following:
The BLE Adapter switched again from HCI0 to HCI1 (I don't know why, sometimes just happens) and in that case it errors out. Output of
hciconfig --all
:In order to get it to work again I followed these steps: https://unix.stackexchange.com/a/602739 I think they require sudo access, but the container has been started with privileged: true anyways. I'd suggest doing this in case the BLE container had 3 failed attempts with such errors.
If that again doesn't help and the CLI for BLE fails again I'd suggest that TSC is stopping the charge through a Fleet-API command just to prevent that the HomeBattery is getting drained.