generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 15
/
modbus-dongle-pro-dds519mr.yaml
154 lines (138 loc) · 3.23 KB
/
modbus-dongle-pro-dds519mr.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
substitutions:
device_name: modbus-dongle-pro
device_description: "Modbus Dongle connecting RTU Modbus to your network"
friendly_name: Modbus Dongle Pro
prj_version: "v23.12.1"
esphome:
name: ${device_name}
comment: "${device_description}"
name_add_mac_suffix: false
project:
name: "smartstuff.modbus"
version: ${prj_version}
platformio_options:
upload_speed: 1500000
esp32:
board: esp32-c3-devkitm-1
status_led:
pin:
number: 7
inverted: true
api:
services:
- service: p1_dongle_reboot
then:
- button.press:
id: reboot
ota:
wifi:
power_save_mode: none
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${device_name}
ap_timeout: 15s
improv_serial:
next_url: http://{{ip_address}}
dashboard_import:
package_import_url: github://mhendriks/esphome-p1/modbus-dongle-pro-dds519mr.yaml@main
captive_portal:
web_server:
# Enable logging
logger:
level: Debug
button:
- platform: restart
name: "_Restart device"
id: reboot
- platform: factory_reset
name: "_Restart with Factory Default Settings"
uart:
id: mod_bus
tx_pin: 0
rx_pin: 10
baud_rate: 9600
parity: even
stop_bits: 1
modbus:
flow_control_pin: 1
id: modbus1
send_wait_time: 200ms
modbus_controller:
- id: modbus_c
## the Modbus device addr
address: 42
modbus_id: modbus1
setup_priority: -10
update_interval: 10s
command_throttle: 200ms
sensor:
- platform: uptime
name: "Uptime"
- platform: wifi_signal
name: "Wi-Fi Signal"
update_interval: 60s
- platform: modbus_controller
modbus_controller_id: modbus_c
id: array_rated_voltage
name: "array_rated_voltage"
address: 0x0000
unit_of_measurement: "V"
register_type: read
value_type: FP32
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: modbus_c
id: array_rated_current
name: "array_rated_current"
address: 0x0008
unit_of_measurement: "A"
register_type: read
value_type: FP32
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: modbus_c
id: array_freq
name: "array_freq"
address: 0x0036
unit_of_measurement: "Hz"
register_type: read
value_type: FP32
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: modbus_c
id: array_rated_pwr
name: "array_rated_pwr"
address: 0x0012
unit_of_measurement: "W"
register_type: read
value_type: FP32
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: modbus_c
id: array_pwr_fac
name: "array_pwr_fac"
address: 0x002A
unit_of_measurement: ""
register_type: read
value_type: FP32
accuracy_decimals: 1
- platform: modbus_controller
modbus_controller_id: modbus_c
id: array_tot_act_pwr
name: "array_tot_act_pwr"
address: 0x0100
unit_of_measurement: "kWh"
register_type: read
value_type: FP32
accuracy_decimals: 1
text_sensor:
- platform: wifi_info
ip_address:
name: "IP Address"
ssid:
name: "Wi-Fi SSID"
bssid:
name: "Wi-Fi BSSID"
- platform: version
name: "ESPHome Version"
hide_timestamp: true