-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathesp8266-test-protocols.yaml
137 lines (123 loc) · 4.3 KB
/
esp8266-test-protocols.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
substitutions:
name: pipsolar
tx_pin: GPIO4
rx_pin: GPIO5
esphome:
name: ${name}
min_version: 2024.6.0
esp8266:
board: d1_mini
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
logger:
level: DEBUG
api:
reboot_timeout: 0s
uart:
id: uart_0
baud_rate: 2400
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
dummy_receiver: true
after:
delimiter: "\r"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
interval:
- interval: 80s
then:
# PI30/PI30MAX/PI30REVO/PI41
- logger.log:
level: INFO
format: "Testing PI30/PI30MAX/PI30REVO/PI41 commands..."
- logger.log:
level: INFO
format: "This is the set of commands supported by the pipsolar component!"
- uart.write: [0x51, 0x50, 0x49, 0xBE, 0xAC, 0x0D] # QPI\xbe\xac\r
- delay: 1s
- uart.write: [0x51, 0x44, 0x49, 0x71, 0x1B, 0x0D] # QDIq\x1b\r
- delay: 1s
- uart.write: [0x51, 0x46, 0x4C, 0x41, 0x47, 0x98, 0x74, 0x0D] # QFLAG\x98t\r
- delay: 1s
- uart.write: [0x51, 0x4D, 0x4E, 0xBB, 0x64, 0x0D] # QMN\xbbd\r
- delay: 1s
- uart.write: [0x51, 0x4D, 0x4F, 0x44, 0x49, 0xC1, 0x0D] # QMODI\xc1\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x49, 0x47, 0x53, 0xB7, 0xA9, 0x0D] # QPIGS\xB7\xA9\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x49, 0x52, 0x49, 0xF8, 0x54, 0x0D] # QPIRI\xF8T\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x49, 0x57, 0x53, 0xB4, 0xDA, 0x0D] # QPIWS\xb4\xda\r
- delay: 1s
- uart.write: [0x51, 0x54, 0x27, 0xFF, 0x0D] # QT'\xff\r
- delay: 1s
# Test some PI30 commands from Phocos Any-Grid PSW-H inverters
- uart.write: [0x51, 0x50, 0x47, 0x53, 0x30, 0x3F, 0xDA, 0x0D] # QPGS0<CRC>\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x47, 0x53, 0x31, 0x2F, 0xFB, 0x0D] # QPGS1<CRC>\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x47, 0x53, 0x32, 0x1F, 0x98, 0x0D] # QPGS2<CRC>\r
- delay: 1s
# PI41 split phase
- logger.log:
level: INFO
format: "Testing PI41 split phase / multiple strings commands..."
- uart.write: [0x51, 0x50, 0x49, 0x47, 0x53, 0x32, 0x68, 0x2D, 0x0D] # QPIGS2h-\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x32, 0x47, 0x53, 0x30, 0x14, 0x05, 0x0D] # QP2GS0\x14\x05\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x32, 0x47, 0x53, 0x31, 0x04, 0x24, 0x0D] # QP2GS1\x04$\r
- delay: 1s
# PI18
- logger.log:
level: INFO
format: "Testing unsupported PI18 commands..."
- uart.write: [0x5E, 0x50, 0x30, 0x30, 0x35, 0x50, 0x49, 0x71, 0x8B, 0x0D] # ^P005PIq\x8b\r
- delay: 1s
- uart.write: [0x5E, 0x50, 0x30, 0x30, 0x35, 0x47, 0x53, 0x58, 0x14, 0x0D] # ^P005GSX\x14\r
- delay: 1s
- uart.write: [0x5E, 0x50, 0x30, 0x30, 0x36, 0x4D, 0x4F, 0x44, 0xDD, 0xBE, 0x0D] # ^P006MOD\xdd\xbe\r
- delay: 1s
# PI17
- logger.log:
level: INFO
format: "Testing unsupported PI17 commands..."
- uart.write: [0x5E, 0x50, 0x30, 0x30, 0x33, 0x50, 0x49, 0x0D] # ^P003PI\r
- delay: 1s
- uart.write: [0x5E, 0x50, 0x30, 0x30, 0x34, 0x4D, 0x4F, 0x44, 0x0D] # ^P004MOD\r
- delay: 1s
- uart.write: [0x5E, 0x50, 0x30, 0x30, 0x35, 0x46, 0x4C, 0x41, 0x47, 0x0D] # ^P005FLAG\r
- delay: 1s
# PI16
- logger.log:
level: INFO
format: "Testing unsupported PI16 commands..."
- uart.write: [0x51, 0x50, 0x49, 0x0D] # QPI\r
- delay: 1s
- uart.write: [0x51, 0x4D, 0x4F, 0x44, 0x0D] # QMOD\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x49, 0x47, 0x53, 0x0D] # QPIGS\r
- delay: 1s
- uart.write: [0x51, 0x50, 0x49, 0x52, 0x49, 0x0D] # QPIRI\r
- delay: 1s
- uart.write: [0x51, 0x4D, 0x4F, 0x44, 0x0D] # QMOD\r
# Qx
- logger.log:
level: INFO
format: "Testing unsupported Qx commands..."
- uart.write: [0x51, 0x31, 0x0D] # Q1\r
- delay: 1s
- uart.write: [0x51, 0x32, 0x0D] # Q2\r
- delay: 1s
- uart.write: [0x51, 0x34, 0x0D] # Q4\r
- delay: 1s
- uart.write: [0x51, 0x36, 0x0D] # Q6\r
- delay: 1s
- logger.log:
level: INFO
format: "Done. Repeating..."