forked from syssi/esphome-jk-bms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
esp32-heltec-balancer-ble-example-faker.yaml
91 lines (85 loc) · 7.48 KB
/
esp32-heltec-balancer-ble-example-faker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<<: !include esp32-heltec-balancer-ble-example-debug.yaml
interval:
- interval: 20s
then:
- lambda: |-
const uint8_t device_info_frame[100] = {
0x55, 0xAA, 0x11, 0x01, 0x01, 0x00, 0x64, 0x00, 0x47, 0x57, 0x2D, 0x32, 0x34, 0x53, 0x34, 0x45, 0x42,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x57, 0x2D, 0x32, 0x2E, 0x38, 0x2E, 0x30, 0x5A, 0x48,
0x2D, 0x31, 0x2E, 0x32, 0x2E, 0x33, 0x56, 0x31, 0x2E, 0x30, 0x2E, 0x30, 0x00, 0x00, 0x32, 0x30, 0x32,
0x32, 0x30, 0x35, 0x33, 0x31, 0x05, 0x00, 0x00, 0x00, 0x01, 0x91, 0x0A, 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, 0x00, 0x00, 0xAB, 0xFF};
id(bms0).assemble(device_info_frame, sizeof(device_info_frame));
- delay: 2s
- lambda: |-
const uint8_t cell_info_frame[300] = {
0x55, 0xaa, 0x11, 0x01, 0x02, 0x00, 0x2c, 0x01, 0x38, 0xe7, 0xfa, 0x50, 0x40, 0xb6, 0x04, 0x51, 0x40, 0x85,
0x0e, 0x51, 0x40, 0xf0, 0x05, 0x51, 0x40, 0xb6, 0x04, 0x51, 0x40, 0x75, 0x1e, 0x51, 0x40, 0x7f, 0x4f, 0x51,
0x40, 0x43, 0x02, 0x51, 0x40, 0x1c, 0x3d, 0x51, 0x40, 0x78, 0x6a, 0x51, 0x40, 0xfe, 0x82, 0x51, 0x40, 0x16,
0x7e, 0x51, 0x40, 0xbc, 0x76, 0x51, 0x40, 0x16, 0x7e, 0x51, 0x40, 0x8b, 0x80, 0x51, 0x40, 0xca, 0x66, 0x51,
0x40, 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, 0x35, 0x93, 0x24,
0x3e, 0x68, 0x94, 0x26, 0x3e, 0x3d, 0x25, 0x1b, 0x3e, 0x90, 0x8e, 0x1b, 0x3e, 0xb3, 0xf3, 0x23, 0x3e, 0x2e,
0x91, 0x25, 0x3e, 0xc6, 0x1b, 0x1a, 0x3e, 0x4a, 0x7c, 0x1c, 0x3e, 0x6f, 0x1b, 0x1a, 0x3e, 0xc2, 0x43, 0x1b,
0x3e, 0x85, 0x1e, 0x18, 0x3e, 0x4b, 0x27, 0x19, 0x3e, 0x5e, 0xdf, 0x18, 0x3e, 0xd0, 0xeb, 0x1a, 0x3e, 0xe6,
0xd4, 0x18, 0x3e, 0x0c, 0xfe, 0x18, 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, 0xde, 0x40, 0x51, 0x42, 0xde, 0x40, 0x51, 0x40, 0x00, 0x17, 0x08, 0x3c, 0x0a, 0x00, 0x0f,
0x05, 0x19, 0xa1, 0x82, 0xc0, 0xc3, 0xf5, 0x48, 0x42, 0xc3, 0xf5, 0x48, 0x42, 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, 0x76, 0x2e, 0x09, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0xff};
id(bms0).assemble(cell_info_frame, sizeof(cell_info_frame));
- delay: 2s
- lambda: |-
const uint8_t cell_info_frame2[300] = {
0x55, 0xaa, 0x11, 0x01, 0x02, 0x00, 0x2c, 0x01, 0x39, 0xe7, 0xfa, 0x50, 0x40, 0xb6, 0x04, 0x51, 0x40, 0x85,
0x0e, 0x51, 0x40, 0xf0, 0x05, 0x51, 0x40, 0xb6, 0x04, 0x51, 0x40, 0x75, 0x1e, 0x51, 0x40, 0x7f, 0x4f, 0x51,
0x40, 0x43, 0x02, 0x51, 0x40, 0x1c, 0x3d, 0x51, 0x40, 0x78, 0x6a, 0x51, 0x40, 0xfe, 0x82, 0x51, 0x40, 0x16,
0x7e, 0x51, 0x40, 0xbc, 0x76, 0x51, 0x40, 0x16, 0x7e, 0x51, 0x40, 0x8b, 0x80, 0x51, 0x40, 0xca, 0x66, 0x51,
0x40, 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, 0x35, 0x93, 0x24,
0x3e, 0x68, 0x94, 0x26, 0x3e, 0x3d, 0x25, 0x1b, 0x3e, 0x90, 0x8e, 0x1b, 0x3e, 0xb3, 0xf3, 0x23, 0x3e, 0x2e,
0x91, 0x25, 0x3e, 0xc6, 0x1b, 0x1a, 0x3e, 0x4a, 0x7c, 0x1c, 0x3e, 0x6f, 0x1b, 0x1a, 0x3e, 0xc2, 0x43, 0x1b,
0x3e, 0x85, 0x1e, 0x18, 0x3e, 0x4b, 0x27, 0x19, 0x3e, 0x5e, 0xdf, 0x18, 0x3e, 0xd0, 0xeb, 0x1a, 0x3e, 0xe6,
0xd4, 0x18, 0x3e, 0x0c, 0xfe, 0x18, 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, 0xde, 0x40, 0x51, 0x42, 0xde, 0x40, 0x51, 0x40, 0x00, 0x17, 0x08, 0x3c, 0x0a, 0x00, 0x0f,
0x05, 0x19, 0xa1, 0x82, 0xc0, 0xc3, 0xf5, 0x48, 0x42, 0xc3, 0xf5, 0x48, 0x42, 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, 0x77, 0x2e, 0x09, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xff};
id(bms0).assemble(cell_info_frame2, sizeof(cell_info_frame2));
- delay: 2s
- lambda: |-
const uint8_t factory_defaults_frame[100] = {
0x55, 0xAA, 0x11, 0x01, 0x03, 0x00, 0x64, 0x00, 0x7B, 0xD2, 0xBF, 0x3F, 0x35, 0xCC, 0xBF, 0x3F, 0x51,
0x82, 0x54, 0x40, 0x33, 0x33, 0x73, 0x40, 0xAA, 0xC0, 0xDB, 0x3F, 0x7B, 0xE1, 0xDB, 0x3F, 0x61, 0xD6,
0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x33, 0x33, 0xD3, 0x3F, 0x5C, 0x8F, 0xD2,
0x3F, 0x48, 0xE1, 0xBA, 0x3F, 0x00, 0x00, 0xAA, 0x42, 0x00, 0x00, 0x82, 0x42, 0x08, 0x00, 0x00, 0x00,
0xF6, 0xE1, 0x0B, 0x00, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35, 0x33, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF};
id(bms0).assemble(factory_defaults_frame, sizeof(factory_defaults_frame));
- delay: 2s
- lambda: |-
const uint8_t factory_defaults_frame2[100] = {
0x55, 0xAA, 0x11, 0x01, 0x03, 0x00, 0x64, 0x00, 0x75, 0xD5, 0xBF, 0x3F, 0x35, 0xCC, 0xBF, 0x3F, 0x17,
0x81, 0x54, 0x40, 0x33, 0x33, 0x73, 0x40, 0x74, 0xB6, 0xDB, 0x3F, 0x7B, 0xE1, 0xDB, 0x3F, 0x62, 0xD0,
0xF0, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, 0x33, 0x33, 0xD3, 0x3F, 0x5C, 0x8F, 0xD2,
0x3F, 0x48, 0xE1, 0xBA, 0x3F, 0x00, 0x00, 0xAA, 0x42, 0x00, 0x00, 0x82, 0x42, 0x08, 0x00, 0x00, 0x00,
0xF6, 0xE1, 0x0B, 0x00, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35, 0x33, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0xFF};
id(bms0).assemble(factory_defaults_frame2, sizeof(factory_defaults_frame2));
- delay: 2s
- lambda: |-
const uint8_t settings_frame[100] = {
0x55, 0xaa, 0x11, 0x01, 0x04, 0x00, 0x64, 0x00, 0x10, 0x0a, 0xd7, 0xa3, 0x3b, 0x00, 0x00, 0x80, 0x40,
0x00, 0x00, 0x20, 0x40, 0x01, 0x01, 0x02, 0x18, 0x01, 0x00, 0x00, 0x66, 0x66, 0x26, 0x40, 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, 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, 0xb7, 0xff};
id(bms0).assemble(settings_frame, sizeof(settings_frame));