Running an Eco-Worthy KP1100 inverter with a BW02 adapter for BT access.
I can talk to the device with a BLE Client in ESPHome and decode the byes with the below sensor and of course the appropriate ble_client code. I found the proper uuid information via nRF Connect and this looks to be the data. However, this device flops the FFF1 uuid data in between two byte arrays. One starting with xA1, and the other with xA2. Using the code below in ESPHome will get and read the byte set, BUT it changes every time the BW02 re-notifies. I’ve tried to filter out the byte array by checking for the xA1 byte and processing the sensor, but the sensor bounces between unknown or unavailable to the actual value as each notification arrives.
Is there a better way to process the Lambda to filter out one or the other notifier byte arrays?
Once I can get actual data working, I can work on figuring out the actual byte array data.
The byte array data as seen scanning and in ESPHome;
Data Array A1:
A100 0000 6500 0000 0FF0 and so forth
Data Array A2:
A200 0000 6500 0000 0AE0 and so forth
- platform: ble_client
name: "Inverter Test"
id: inverter_Test
type: characteristic
ble_client_id: inverter
service_uuid: 'fff0'
characteristic_uuid: 'fff1'
notify: True
update_interval: 5s
lambda: |-
if (x[0] == 161)
{
uint16_t inverter_test = x[55];
if (x[54] & 1)
{
inverter_test += (x[55] << 8);
return (float)inverter_test;
}
else
{
}
}