vejvik

ESPhome MUST uart

Mar 30th, 2023 (edited)
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.20 KB | None | 0 0
  1. esphome:
  2. name: fve
  3. friendly_name: FVE
  4.  
  5. esp32:
  6. board: esp32dev
  7. framework:
  8. type: arduino
  9.  
  10.  
  11.  
  12. # Enable logging
  13. logger:
  14.  
  15.  
  16. # Enable Home Assistant API
  17. api:
  18. encryption:
  19. key: "BU0whyQh53j42Ve3q3iVoF0iKdaR8A0xFkg+6BUQSXk="
  20.  
  21. ota:
  22. password: "b94a5f5ca6b60706d3dfa93d65e1e2bc"
  23.  
  24. wifi:
  25. ssid: !secret wifi_ssid
  26. password: !secret wifi_password
  27.  
  28. # Enable fallback hotspot (captive portal) in case wifi connection fails
  29. ap:
  30. ssid: "Fve Fallback Hotspot"
  31. password: "ZdCryXqsJvGW"
  32.  
  33. uart:
  34. id: mod_bus
  35. tx_pin: GPIO19
  36. rx_pin: GPIO23
  37. baud_rate: 19200
  38. stop_bits: 1
  39. parity: NONE
  40. data_bits: 8
  41.  
  42. modbus:
  43. id: mod_bus_must
  44. send_wait_time: 1250ms
  45.  
  46. modbus_controller:
  47. - id: must
  48. address: 0x4
  49. modbus_id: mod_bus_must
  50. setup_priority: -10
  51. update_interval: 2s
  52.  
  53. switch:
  54. - platform: restart
  55. name: "ESPhome PV18 Restart"
  56.  
  57. sensor:
  58. - platform: uptime
  59. name: Uptime Sensor
  60. # charger sensors
  61. - platform: modbus_controller
  62. address: 15201
  63. name: "Charger workstate"
  64. register_type: holding
  65. - platform: modbus_controller
  66. address: 15202
  67. name: "MPPT state"
  68. register_type: holding
  69. - platform: modbus_controller
  70. address: 15203
  71. name: "Charging state"
  72. register_type: holding
  73. - platform: modbus_controller
  74. address: 15205
  75. name: "PV voltage"
  76. register_type: holding
  77. unit_of_measurement: "V"
  78. accuracy_decimals: 1
  79. icon: mdi:sine-wave
  80. filters:
  81. multiply: 0.1
  82. - platform: modbus_controller
  83. address: 15206
  84. name: "Battery voltage (charger side)"
  85. register_type: holding
  86. unit_of_measurement: "V"
  87. accuracy_decimals: 1
  88. icon: mdi:sine-wave
  89. filters:
  90. multiply: 0.1
  91. - platform: modbus_controller
  92. address: 15207
  93. name: "Charger Current"
  94. register_type: holding
  95. unit_of_measurement: "A"
  96. accuracy_decimals: 1
  97. icon: mdi:current-dc
  98. filters:
  99. multiply: 0.1
  100. - platform: modbus_controller
  101. address: 15208
  102. register_type: holding
  103. name: "Charger power"
  104. unit_of_measurement: "W"
  105. accuracy_decimals: 1
  106. icon: mdi:flash
  107. - platform: modbus_controller
  108. address: 15211
  109. register_type: holding
  110. name: "Battery Relay"
  111. - platform: modbus_controller
  112. address: 15212
  113. register_type: holding
  114. name: "PV Relay"
  115. icon: mdi:electric-switch
  116. - platform: modbus_controller
  117. address: 15218
  118. register_type: holding
  119. name: "Accumulated charger power"
  120. unit_of_measurement: "kWh"
  121. accuracy_decimals: 1
  122. icon: mdi:flash
  123. filters:
  124. multiply: 0.1
  125. # 15217 RO Accumulated power high 1000KWH
  126.  
  127. # inverter sensors
  128. - platform: modbus_controller
  129. address: 25201
  130. register_type: holding
  131. name: "Inverter Work state"
  132. - platform: modbus_controller
  133. address: 25205
  134. name: "Battery voltage"
  135. register_type: holding
  136. unit_of_measurement: "V"
  137. accuracy_decimals: 1
  138. icon: mdi:sine-wave
  139. filters:
  140. multiply: 0.1
  141. - platform: modbus_controller
  142. address: 25206
  143. name: "Inverter voltage"
  144. register_type: holding
  145. unit_of_measurement: "V"
  146. accuracy_decimals: 1
  147. icon: mdi:sine-wave
  148. filters:
  149. multiply: 0.1
  150. - platform: modbus_controller
  151. address: 25207
  152. name: "Grid voltage"
  153. register_type: holding
  154. unit_of_measurement: "V"
  155. accuracy_decimals: 1
  156. icon: mdi:sine-wave
  157. filters:
  158. multiply: 0.1
  159. - platform: modbus_controller
  160. address: 25208
  161. name: "Bus voltage"
  162. register_type: holding
  163. unit_of_measurement: "V"
  164. accuracy_decimals: 1
  165. icon: mdi:sine-wave
  166. filters:
  167. multiply: 0.1
  168. - platform: modbus_controller
  169. address: 25209
  170. name: "Control current"
  171. register_type: holding
  172. unit_of_measurement: "A"
  173. accuracy_decimals: 1
  174. icon: mdi:current-dc
  175. filters:
  176. multiply: 0.1
  177. - platform: modbus_controller
  178. address: 25210
  179. name: "Inverter current"
  180. register_type: holding
  181. unit_of_measurement: "A"
  182. accuracy_decimals: 1
  183. icon: mdi:current-dc
  184. filters:
  185. multiply: 0.1
  186. - platform: modbus_controller
  187. address: 25211
  188. name: "Grid current"
  189. register_type: holding
  190. unit_of_measurement: "A"
  191. accuracy_decimals: 1
  192. icon: mdi:current-dc
  193. filters:
  194. multiply: 0.1
  195. - platform: modbus_controller
  196. address: 25212
  197. name: "Load current"
  198. register_type: holding
  199. unit_of_measurement: "A"
  200. accuracy_decimals: 1
  201. icon: mdi:current-dc
  202. filters:
  203. multiply: 0.1
  204. - platform: modbus_controller
  205. address: 25213
  206. name: "Inverter power"
  207. register_type: holding
  208. unit_of_measurement: "W"
  209. accuracy_decimals: 1
  210. icon: mdi:flash
  211. - platform: modbus_controller
  212. address: 25214
  213. name: "Grid power"
  214. register_type: holding
  215. unit_of_measurement: "W"
  216. accuracy_decimals: 1
  217. value_type: S_WORD
  218. icon: mdi:flash
  219. - platform: modbus_controller
  220. address: 25215
  221. name: "Load power"
  222. register_type: holding
  223. unit_of_measurement: "W"
  224. accuracy_decimals: 1
  225. icon: mdi:flash
  226. - platform: modbus_controller
  227. address: 25216
  228. name: "System load"
  229. register_type: holding
  230. unit_of_measurement: "%"
  231. accuracy_decimals: 1
  232. icon: mdi:flash
  233.  
  234. # 25217 Inverter complex power(S) 1 VA
  235. # 25218 Grid complex power(S) 1 VA
  236. # 25219 Load complex power(S) 1 VA
  237. # 25221 Inverter reactive power(Q) 1 var
  238. # 25222 Grid reactive power(Q) 1 var
  239. # 25223 Load reactive power(Q) 1 var
  240. # 25225 Inverter frequency 0.01 Hz
  241. # 25226 Grid frequency 0.01 Hz
  242.  
  243. - platform: modbus_controller
  244. address: 25233
  245. register_type: holding
  246. name: "AC radiator temp"
  247. accuracy_decimals: 1
  248. unit_of_measurement: "°C"
  249. - platform: modbus_controller
  250. address: 25234
  251. register_type: holding
  252. name: "Transformer temp"
  253. unit_of_measurement: "°C"
  254. accuracy_decimals: 1
  255. - platform: modbus_controller
  256. address: 25235
  257. register_type: holding
  258. name: "DC Radiator temp"
  259. unit_of_measurement: "°C"
  260. accuracy_decimals: 1
  261. - platform: modbus_controller
  262. address: 25237
  263. register_type: holding
  264. name: "Inverter Relay"
  265. icon: mdi:electric-switch
  266. - platform: modbus_controller
  267. address: 25238
  268. register_type: holding
  269. name: "Grid Relay"
  270. icon: mdi:electric-switch
  271. - platform: modbus_controller
  272. address: 25239
  273. register_type: holding
  274. name: "Load Relay"
  275. icon: mdi:electric-switch
  276. - platform: modbus_controller
  277. address: 25240
  278. register_type: holding
  279. name: "N_Line Relay"
  280. icon: mdi:electric-switch
  281. - platform: modbus_controller
  282. address: 25241
  283. register_type: holding
  284. name: "DC Relay"
  285. icon: mdi:electric-switch
  286. - platform: modbus_controller
  287. address: 25242
  288. register_type: holding
  289. name: "Earth Relay"
  290. icon: mdi:electric-switch
  291.  
  292. # statistics sensors
  293. # - platform: modbus_controller
  294. # address: 25246
  295. # register_type: holding
  296. # name: "Accumulated charger power"
  297. # unit_of_measurement: "kW"
  298. # accuracy_decimals: 1
  299. # icon: mdi:flash
  300. # filters:
  301. # multiply: 0.1
  302. - platform: modbus_controller
  303. address: 25248
  304. register_type: holding
  305. name: "Accumulated discharger power"
  306. unit_of_measurement: "kWh"
  307. accuracy_decimals: 1
  308. icon: mdi:flash
  309. filters:
  310. multiply: 0.1
  311. - platform: modbus_controller
  312. address: 25250
  313. register_type: holding
  314. name: "Accumulated buy power"
  315. unit_of_measurement: "kWh"
  316. accuracy_decimals: 1
  317. icon: mdi:flash
  318. filters:
  319. multiply: 0.1
  320. - platform: modbus_controller
  321. address: 25252
  322. register_type: holding
  323. name: "Accumulated sell power"
  324. unit_of_measurement: "kWh"
  325. accuracy_decimals: 1
  326. icon: mdi:flash
  327. filters:
  328. multiply: 0.1
  329. - platform: modbus_controller
  330. address: 25254
  331. register_type: holding
  332. name: "Accumulated load power"
  333. unit_of_measurement: "kWh"
  334. accuracy_decimals: 1
  335. icon: mdi:flash
  336. filters:
  337. multiply: 0.1
  338. - platform: modbus_controller
  339. address: 25256
  340. register_type: holding
  341. name: "Accumulated self_use power"
  342. unit_of_measurement: "kWh"
  343. accuracy_decimals: 1
  344. icon: mdi:flash
  345. filters:
  346. multiply: 0.1
  347. - platform: modbus_controller
  348. address: 25258
  349. register_type: holding
  350. name: "Accumulated PV_sell power"
  351. unit_of_measurement: "kWh"
  352. accuracy_decimals: 1
  353. icon: mdi:flash
  354. filters:
  355. multiply: 0.1
  356. - platform: modbus_controller
  357. address: 25260
  358. register_type: holding
  359. name: "Accumulated grid_charger power"
  360. unit_of_measurement: "kWh"
  361. accuracy_decimals: 1
  362. icon: mdi:flash
  363. filters:
  364. multiply: 0.1
  365. - platform: modbus_controller
  366. address: 25273
  367. register_type: holding
  368. value_type: S_WORD
  369. name: "Battery power"
  370. unit_of_measurement: "W"
  371. accuracy_decimals: 1
  372. icon: mdi:flash
  373. - platform: modbus_controller
  374. address: 25274
  375. register_type: holding
  376. value_type: S_WORD
  377. name: "Battery current"
  378. unit_of_measurement: "A"
  379. accuracy_decimals: 1
  380. icon: mdi:current-dc
  381.  
  382.  
  383. captive_portal:
  384.  
Advertisement
Add Comment
Please, Sign In to add comment