-
Notifications
You must be signed in to change notification settings - Fork 0
/
modbus.yaml
186 lines (144 loc) · 3.74 KB
/
modbus.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
captive_portal:
uart:
- id: mod_bus
tx_pin: GPIO16
rx_pin: GPIO17
baud_rate: 9600
stop_bits: 1
modbus:
#flow_control_pin: 23
uart_id: mod_bus
id: mod_bus_mppt
modbus_controller:
- id: mppt
## the Modbus device addr
address: 0x1
modbus_id: mod_bus_mppt
command_throttle: 200ms
setup_priority: -10
update_interval: 5s
sensor:
# - platform: modbus_controller
# modbus_controller_id: mppt
# name: Rated Current
# address: 10009
# register_type: holding
# value_type: U_WORD
# register_count: 1
# filters:
# - multiply: 0.1
- platform: modbus_controller
modbus_controller_id: mppt
name: Charger Workstate
address: 15201
register_type: holding
value_type: U_WORD
register_count: 1
# - platform: modbus_controller
# modbus_controller_id: mppt
# name: MPPT state
# address: 15202
# register_type: holding
# value_type: U_WORD
# register_count: 1
# - platform: modbus_controller
# modbus_controller_id: mppt
# name: Charging state
# address: 15203
# register_type: holding
# value_type: U_WORD
# register_count: 1
- platform: modbus_controller
modbus_controller_id: mppt
id: pv_input_voltage
name: pv_input_voltage
address: 15205
unit_of_measurement: "V" ## for any other unit the value is returned in minutes
register_type: holding
value_type: U_WORD
register_count: 1
accuracy_decimals: 1
icon: mdi:sine-wave
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: mppt
id: batt_input_voltage
name: batt_input_voltage
address: 15206
unit_of_measurement: "V" ## for any other unit the value is returned in minutes
register_type: holding
value_type: U_WORD
register_count: 1
accuracy_decimals: 1
icon: mdi:sine-wave
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: mppt
id: batt_input_current
name: batt_input_current
address: 15207
unit_of_measurement: "A"
register_type: holding
value_type: U_WORD
register_count: 1
filters:
- multiply: 0.1
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: mppt
id: pv_input_power
name: pv_input_power
address: 15208
unit_of_measurement: "W" ## for any other unit the value is returned in minutes
register_type: holding
value_type: U_WORD
register_count: 1
accuracy_decimals: 1
icon: mdi:sine-wave
- platform: modbus_controller
modbus_controller_id: mppt
name: MPPT temperature
address: 15209
unit_of_measurement: "°C" ## for any other unit the value is returned in minutes
register_type: holding
value_type: U_WORD
register_count: 1
- platform: modbus_controller
modbus_controller_id: mppt
name: MPPT energy
address: 15217
unit_of_measurement: "kWh"
register_type: holding
value_type: U_WORD
register_count: 1
number:
- platform: modbus_controller
name: MPPT Float Volatge
address: 10104
value_type: U_WORD
register_type: holding
unit_of_measurement: "V"
icon: mdi:timer-sand
min_value: 24
max_value: 32
step: 1
lambda: "return x * 0.1; "
- platform: modbus_controller
id: mppt_max_current
name: MPPT Corrente Max
address: 10108
value_type: U_WORD
register_type: holding
unit_of_measurement: "A"
icon: mdi:timer-sand
min_value: 1
max_value: 80
step: 1
lambda: "return x * 0.1; "
write_lambda: |-
ESP_LOGD("main","Modbus Number incoming value = %f",x);
uint16_t b_capacity = x*10 ;
payload.push_back(b_capacity);
return x ;