Skip to content

Commit

Permalink
Add test traffic of a v14 device (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored Jul 7, 2024
1 parent 9044e93 commit d4a295d
Show file tree
Hide file tree
Showing 4 changed files with 442 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ jobs:
esphome -s external_components_source components config esp32-ble-v11-example.yaml
esphome -s external_components_source components config esp32-ble-v11-example-debug.yaml
esphome -s external_components_source components config esp32-ble-v11-example-faker.yaml
esphome -s external_components_source components config esp32-ble-v14-example.yaml
esphome -s external_components_source components config esp32-ble-v14-example-debug.yaml
esphome -s external_components_source components config esp32-ble-v14-example-faker.yaml
- name: Compile esp32 (modbus) example configurations
run: |
esphome config esp32-jk-pb-modbus-example.yaml
Expand Down Expand Up @@ -288,7 +291,6 @@ jobs:
run: |
esphome -s external_components_source components compile esp32-ble-example-faker.yaml
esphome -s external_components_source components compile esp32-ble-v11-example-faker.yaml
esphome -s external_components_source components compile esp32-ble-v11-example.yaml
- name: Compile esp32 (modbus) example configurations
run: |
esphome compile esp32-jk-pb-modbus-example.yaml
17 changes: 17 additions & 0 deletions esp32-ble-v14-example-debug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<<: !include esp32-ble-v14-example.yaml

logger:
level: VERY_VERBOSE
logs:
esp32_ble_tracker: VERY_VERBOSE
jk_bms_ble: VERY_VERBOSE
scheduler: DEBUG
component: DEBUG
sensor: DEBUG
mqtt: INFO
mqtt.idf: INFO
mqtt.component: INFO
mqtt.sensor: INFO
mqtt.switch: INFO
api.service: INFO
api: INFO
96 changes: 96 additions & 0 deletions esp32-ble-v14-example-faker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<<: !include esp32-ble-v14-example-debug.yaml

interval:
- interval: 1s
then:
- lambda: |-
const uint8_t cell_info_frame[300] = {
0x55, 0xAA, 0xEB, 0x90, 0x02, 0x2B, 0xC8, 0x0C, 0xCA, 0x0C, 0xCD, 0x0C, 0xCD, 0x0C, 0xCF, 0x0C, 0xD0, 0x0C,
0xD0, 0x0C, 0xCC, 0x0C, 0xC7, 0x0C, 0xCB, 0x0C, 0xCB, 0x0C, 0xCC, 0x0C, 0xCD, 0x0C, 0xD1, 0x0C, 0xD1, 0x0C,
0xCF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0x00, 0x00, 0xCD, 0x0C, 0x0A, 0x00, 0x0E, 0x0C, 0x5B, 0x00, 0x3C, 0x00, 0x3E, 0x00, 0x3B, 0x00, 0x3F, 0x00,
0x3C, 0x00, 0x3F, 0x00, 0x3C, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3E, 0x00,
0x40, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xCC, 0x00, 0x00, 0x38, 0xDF, 0x35, 0x00, 0x2C, 0xF3, 0xFE, 0xFF,
0x71, 0x00, 0x68, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x51, 0xA4, 0x75, 0x07, 0x00, 0xC0, 0x27,
0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x37, 0x6E, 0x17, 0x00, 0x64, 0x00, 0x00, 0x00, 0x7C, 0x0E, 0x08, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
0x01, 0x00, 0x00, 0x00, 0x9D, 0x03, 0x00, 0x00, 0xBA, 0x00, 0x8E, 0x8A, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
0x7A, 0x14, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x06, 0x00, 0x00, 0x62, 0x88, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7C, 0x00, 0x71, 0x00, 0x74, 0x00, 0xA1, 0x03, 0x77, 0xD0, 0x9C, 0x07, 0x3D, 0x00, 0x00, 0x00,
0x80, 0x51, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE,
0xFF, 0x7F, 0xDD, 0x2F, 0x01, 0x01, 0xB0, 0x07, 0x00, 0x00, 0x00, 0x59
};
id(bms0).assemble(cell_info_frame, sizeof(cell_info_frame));
- delay: 2s
- lambda: |-
const uint8_t cell_info_frame[300] = {
0x55, 0xAA, 0xEB, 0x90, 0x02, 0x37, 0xC8, 0x0C, 0xCA, 0x0C, 0xCD, 0x0C, 0xCD, 0x0C, 0xCF, 0x0C, 0xD1, 0x0C,
0xD0, 0x0C, 0xCC, 0x0C, 0xC7, 0x0C, 0xCB, 0x0C, 0xCB, 0x0C, 0xCC, 0x0C, 0xC6, 0x0C, 0xCF, 0x0C, 0xD1, 0x0C,
0xCF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0x00, 0x00, 0xCD, 0x0C, 0x0B, 0x00, 0x0E, 0x0C, 0x5B, 0x00, 0x3C, 0x00, 0x3E, 0x00, 0x3B, 0x00, 0x3F, 0x00,
0x3C, 0x00, 0x3F, 0x00, 0x3C, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3E, 0x00,
0x40, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCF, 0xCC, 0x00, 0x00, 0x17, 0x94, 0x35, 0x00, 0xF4, 0xF8, 0xFE, 0xFF,
0x71, 0x00, 0x68, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x51, 0x2A, 0x75, 0x07, 0x00, 0xC0, 0x27,
0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0xB1, 0x6E, 0x17, 0x00, 0x64, 0x00, 0x00, 0x00, 0x82, 0x0E, 0x08, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
0x01, 0x00, 0x00, 0x00, 0x9D, 0x03, 0x00, 0x00, 0xB6, 0x00, 0x8E, 0x8A, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
0x7B, 0x14, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x06, 0x00, 0x00, 0xA4, 0x88, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7C, 0x00, 0x71, 0x00, 0x74, 0x00, 0xA1, 0x03, 0x7D, 0xD0, 0x9C, 0x07, 0x3D, 0x00, 0x00, 0x00,
0x80, 0x51, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE,
0xFF, 0x7F, 0xDD, 0x2F, 0x01, 0x01, 0xB0, 0x07, 0x00, 0x00, 0x00, 0x0C
};
id(bms0).assemble(cell_info_frame, sizeof(cell_info_frame));
- delay: 2s
- lambda: |-
const uint8_t cell_info_frame[300] = {
0x55, 0xAA, 0xEB, 0x90, 0x02, 0x45, 0xCB, 0x0C, 0xCA, 0x0C, 0xCC, 0x0C, 0xC8, 0x0C, 0xC8, 0x0C, 0xCD, 0x0C,
0xCF, 0x0C, 0xCC, 0x0C, 0xC6, 0x0C, 0xCB, 0x0C, 0xCC, 0x0C, 0xCF, 0x0C, 0xCD, 0x0C, 0xD0, 0x0C, 0xD0, 0x0C,
0xCB, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0x00, 0x00, 0xCB, 0x0C, 0x0A, 0x00, 0x0D, 0x08, 0x5B, 0x00, 0x3C, 0x00, 0x3E, 0x00, 0x3B, 0x00, 0x3F, 0x00,
0x3C, 0x00, 0x3F, 0x00, 0x3C, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3E, 0x00,
0x40, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7D, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB5, 0xCC, 0x00, 0x00, 0x8A, 0x70, 0x36, 0x00, 0x10, 0xF6, 0xFE, 0xFF,
0x71, 0x00, 0x68, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x51, 0x2E, 0x60, 0x07, 0x00, 0xC0, 0x27,
0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0xAE, 0x83, 0x17, 0x00, 0x64, 0x00, 0x00, 0x00, 0xA1, 0x0F, 0x08, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
0x01, 0x00, 0x00, 0x00, 0x9D, 0x03, 0x00, 0x00, 0xB8, 0x00, 0x8E, 0x8A, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
0x78, 0x14, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x06, 0x00, 0x00, 0xD7, 0x93, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7D, 0x00, 0x72, 0x00, 0x74, 0x00, 0xA1, 0x03, 0x9C, 0xD1, 0x9C, 0x07, 0x3D, 0x00, 0x00, 0x00,
0x80, 0x51, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE,
0xFF, 0x7F, 0xDD, 0x2F, 0x01, 0x01, 0xB0, 0x07, 0x00, 0x00, 0x00, 0xDA
};
id(bms0).assemble(cell_info_frame, sizeof(cell_info_frame));
- delay: 2s
- lambda: |-
const uint8_t cell_info_frame[300] = {
0x55, 0xAA, 0xEB, 0x90, 0x02, 0x5B, 0xCA, 0x0C, 0xCA, 0x0C, 0xCB, 0x0C, 0xCA, 0x0C, 0xCA, 0x0C, 0xCF, 0x0C,
0xD0, 0x0C, 0xCD, 0x0C, 0xCC, 0x0C, 0xCD, 0x0C, 0xCC, 0x0C, 0xCB, 0x0C, 0xC6, 0x0C, 0xCC, 0x0C, 0xD0, 0x0C,
0xCC, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0x00, 0x00, 0xCB, 0x0C, 0x0B, 0x00, 0x0E, 0x08, 0x5B, 0x00, 0x3C, 0x00, 0x3E, 0x00, 0x3B, 0x00, 0x3F, 0x00,
0x3C, 0x00, 0x3F, 0x00, 0x3C, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3D, 0x00, 0x40, 0x00, 0x3E, 0x00,
0x40, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB5, 0xCC, 0x00, 0x00, 0x8A, 0x70, 0x36, 0x00, 0x10, 0xF6, 0xFE, 0xFF,
0x71, 0x00, 0x68, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x51, 0x4C, 0x5F, 0x07, 0x00, 0xC0, 0x27,
0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8F, 0x84, 0x17, 0x00, 0x64, 0x00, 0x00, 0x00, 0xAD, 0x0F, 0x08, 0x00,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
0x01, 0x00, 0x00, 0x00, 0x9D, 0x03, 0x00, 0x00, 0xB8, 0x00, 0x8E, 0x8A, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00,
0x78, 0x14, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x06, 0x00, 0x00, 0x4F, 0x94, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7E, 0x00, 0x72, 0x00, 0x74, 0x00, 0xA1, 0x03, 0xA8, 0xD1, 0x9C, 0x07, 0x3D, 0x00, 0x00, 0x00,
0x80, 0x51, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE,
0xFF, 0x7F, 0xDD, 0x2F, 0x01, 0x01, 0xB0, 0x07, 0x00, 0x00, 0x00, 0x84
};
id(bms0).assemble(cell_info_frame, sizeof(cell_info_frame));
Loading

0 comments on commit d4a295d

Please sign in to comment.