-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
esp32-usb-meter-example-faker.yaml
32 lines (31 loc) · 1.54 KB
/
esp32-usb-meter-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
<<: !include esp32-usb-meter-example.yaml
interval:
- interval: 10s
then:
- lambda: |-
const uint8_t frame[36] = {
0xFF, 0x55, 0x01, 0x03, 0x00, 0x01, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x06, 0x38, 0x00, 0x00, 0x03, 0x11, 0x00,
0x07, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x12, 0x2E, 0x33, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E
};
id(atorch0).decode(frame, sizeof(frame));
- delay: 2s
- lambda: |-
const uint8_t frame[36] = {
0xFF, 0x55, 0x01, 0x03, 0x00, 0x01, 0xFB, 0x00, 0x00, 0x00, 0x00, 0x3C, 0xC7, 0x00, 0x00, 0x55, 0x4E, 0x00,
0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x47, 0x2F, 0x24, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE
};
id(atorch0).decode(frame, sizeof(frame));
- delay: 2s
- lambda: |-
const uint8_t frame[36] = {
0xFF, 0x55, 0x01, 0x03, 0x00, 0x01, 0xCD, 0x00, 0x00, 0x7F, 0x00, 0x3C, 0xC8, 0x00, 0x00, 0x55, 0x4E, 0x00,
0x09, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x47, 0x30, 0x0D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8F
};
id(atorch0).decode(frame, sizeof(frame));
- delay: 2s
- lambda: |-
const uint8_t frame[36] = {
0xFF, 0x55, 0x01, 0x03, 0x00, 0x01, 0xFB, 0x00, 0x00, 0x01, 0x00, 0x6C, 0x3F, 0x00, 0x00, 0x6C, 0x44, 0x00,
0x07, 0x00, 0x06, 0x00, 0x1A, 0x00, 0x47, 0x1C, 0x1A, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78
};
id(atorch0).decode(frame, sizeof(frame));