|
22 | 22 | "battery_config_eps_buffer"
|
23 | 23 | ],
|
24 | 24 | "append": [1]
|
| 25 | + }, |
| 26 | + { |
| 27 | + "name": "eps_config", |
| 28 | + "start_register": "0x1029", |
| 29 | + "length": "2", |
| 30 | + "registers": [ |
| 31 | + "eps_control", |
| 32 | + "eps_wait_time" |
| 33 | + ] |
| 34 | + }, |
| 35 | + { |
| 36 | + "name": "rs485_config", |
| 37 | + "start_register": "0x100B", |
| 38 | + "length": "5", |
| 39 | + "registers": [ |
| 40 | + "rs485_config_address", |
| 41 | + "rs485_config_baud", |
| 42 | + "rs485_config_stop_bit", |
| 43 | + "rs485_config_parity_bit" |
| 44 | + ], |
| 45 | + "append": [1] |
25 | 46 | }
|
26 | 47 | ],
|
27 | 48 | "registers": [
|
|
77 | 98 | },
|
78 | 99 | "refresh": 86400
|
79 | 100 | },
|
| 101 | + { |
| 102 | + "name": "rs485_config_address", |
| 103 | + "register": "0x100B", |
| 104 | + "desc": "RS 485 configuration- communication address", |
| 105 | + "type": "U16", |
| 106 | + "min": 1, |
| 107 | + "max": 63, |
| 108 | + "ha": { |
| 109 | + "name": "RS485 Address", |
| 110 | + "icon": "mdi:identifier", |
| 111 | + "entity_category": "config", |
| 112 | + "min": 1, |
| 113 | + "max": 63, |
| 114 | + "initial": 0, |
| 115 | + "mode": "box", |
| 116 | + "command_topic": "sofar/rw/rs485_config/address", |
| 117 | + "control": "number", |
| 118 | + "value_template": "{{ value_json.rs485_config_address | int }}" |
| 119 | + }, |
| 120 | + "refresh": 1 |
| 121 | + }, |
| 122 | + { |
| 123 | + "name": "rs485_config_baud", |
| 124 | + "register": "0x100C", |
| 125 | + "desc": "RS485 Baud Rate Selection", |
| 126 | + "type": "U16", |
| 127 | + "function": "mode", |
| 128 | + "modes": { |
| 129 | + "0": "4800", |
| 130 | + "1": "9600", |
| 131 | + "2": "19200", |
| 132 | + "3": "38400", |
| 133 | + "4": "57600" |
| 134 | + }, |
| 135 | + "ha": { |
| 136 | + "name": "RS485 Baud", |
| 137 | + "icon": "mdi:identifier", |
| 138 | + "entity_category": "config", |
| 139 | + "min": 0, |
| 140 | + "max": 4, |
| 141 | + "initial": 0, |
| 142 | + "mode": "box", |
| 143 | + "unit_of_measurement": "bps", |
| 144 | + "value_template": "{{ value_json.rs485_config_baud }}", |
| 145 | + "command_topic": "sofar/rw/rs485_config/baud", |
| 146 | + "options": [ |
| 147 | + "4800", |
| 148 | + "9600", |
| 149 | + "19200", |
| 150 | + "38400", |
| 151 | + "57600" |
| 152 | + ], |
| 153 | + "control": "select" |
| 154 | + }, |
| 155 | + "refresh": 1 |
| 156 | + }, |
| 157 | + { |
| 158 | + "name": "rs485_config_stop_bit", |
| 159 | + "register": "0x100C", |
| 160 | + "desc": "RS485 Stop Bit Selection", |
| 161 | + "type": "U16", |
| 162 | + "function": "mode", |
| 163 | + "modes": { |
| 164 | + "0": "1", |
| 165 | + "1": "1.5", |
| 166 | + "2": "2" |
| 167 | + }, |
| 168 | + "ha": { |
| 169 | + "name": "RS485 Stop Bit", |
| 170 | + "icon": "mdi:identifier", |
| 171 | + "entity_category": "config", |
| 172 | + "min": 0, |
| 173 | + "max": 2, |
| 174 | + "initial": 0, |
| 175 | + "value_template": "{{ value_json.rs485_config_stop_bit }}", |
| 176 | + "command_topic": "sofar/rw/rs485_config/stop_bit", |
| 177 | + "options": [ |
| 178 | + "1", |
| 179 | + "1.5", |
| 180 | + "2" |
| 181 | + ], |
| 182 | + "control": "select" |
| 183 | + }, |
| 184 | + "refresh": 1 |
| 185 | + }, |
| 186 | + { |
| 187 | + "name": "rs485_config_parity_bit", |
| 188 | + "register": "0x100C", |
| 189 | + "desc": "RS485 Parity Bit Selection", |
| 190 | + "type": "U16", |
| 191 | + "function": "mode", |
| 192 | + "modes": { |
| 193 | + "0": "None", |
| 194 | + "1": "Even", |
| 195 | + "2": "Odd", |
| 196 | + "3": "High/Mark", |
| 197 | + "4": "Low/Space" |
| 198 | + }, |
| 199 | + "ha": { |
| 200 | + "name": "RS485 Parity Bit", |
| 201 | + "icon": "mdi:identifier", |
| 202 | + "entity_category": "config", |
| 203 | + "min": 0, |
| 204 | + "max": 4, |
| 205 | + "initial": 0, |
| 206 | + "value_template": "{{ value_json.rs485_config_parity_bit }}", |
| 207 | + "command_topic": "sofar/rw/rs485_config/parity_bit", |
| 208 | + "options": [ |
| 209 | + "None", |
| 210 | + "Even", |
| 211 | + "Odd", |
| 212 | + "High/Mark", |
| 213 | + "Low/Space" |
| 214 | + ], |
| 215 | + "control": "select" |
| 216 | + }, |
| 217 | + "refresh": 1 |
| 218 | + }, |
80 | 219 | {
|
81 | 220 | "name": "battery_config_id",
|
82 | 221 | "register": "0x1044",
|
|
1025 | 1164 | },
|
1026 | 1165 | "refresh": 60
|
1027 | 1166 | },
|
| 1167 | + { |
| 1168 | + "name": "total_generation", |
| 1169 | + "register": "0x0687", |
| 1170 | + "function": "divide", |
| 1171 | + "factor": 100, |
| 1172 | + "ha": { |
| 1173 | + "device_class": "energy", |
| 1174 | + "unit_of_measurement": "kWh", |
| 1175 | + "name": "Solar Generation Total", |
| 1176 | + "icon": "mdi:solar-power-variant", |
| 1177 | + "state_class": "total_increasing", |
| 1178 | + "entity_category": "diagnostic", |
| 1179 | + "value_template": "{{ value_json.total_generation }}" |
| 1180 | + }, |
| 1181 | + "refresh": 3600 |
| 1182 | + }, |
1028 | 1183 | {
|
1029 | 1184 | "name": "today_consumption",
|
1030 | 1185 | "register": "0x0689",
|
|
1041 | 1196 | },
|
1042 | 1197 | "refresh": 60
|
1043 | 1198 | },
|
| 1199 | + { |
| 1200 | + "name": "total_consumption", |
| 1201 | + "register": "0x068B", |
| 1202 | + "function": "divide", |
| 1203 | + "factor": 100, |
| 1204 | + "ha": { |
| 1205 | + "device_class": "energy", |
| 1206 | + "unit_of_measurement": "kWh", |
| 1207 | + "name": "Consumption Total", |
| 1208 | + "icon": "mdi:home-lightning-bolt-outline", |
| 1209 | + "state_class": "total_increasing", |
| 1210 | + "entity_category": "diagnostic", |
| 1211 | + "value_template": "{{ value_json.total_consumption }}" |
| 1212 | + }, |
| 1213 | + "refresh": 3600 |
| 1214 | + }, |
1044 | 1215 | {
|
1045 | 1216 | "name": "today_import",
|
1046 | 1217 | "register": "0x068D",
|
|
1057 | 1228 | },
|
1058 | 1229 | "refresh": 60
|
1059 | 1230 | },
|
| 1231 | + { |
| 1232 | + "name": "total_import", |
| 1233 | + "register": "0x068F", |
| 1234 | + "function": "divide", |
| 1235 | + "factor": 100, |
| 1236 | + "ha": { |
| 1237 | + "device_class": "energy", |
| 1238 | + "unit_of_measurement": "kWh", |
| 1239 | + "name": "Import Total", |
| 1240 | + "icon": "mdi:transmission-tower-import", |
| 1241 | + "state_class": "total_increasing", |
| 1242 | + "entity_category": "diagnostic", |
| 1243 | + "value_template": "{{ value_json.total_import }}" |
| 1244 | + }, |
| 1245 | + "refresh": 3600 |
| 1246 | + }, |
1060 | 1247 | {
|
1061 | 1248 | "name": "today_export",
|
1062 | 1249 | "register": "0x0691",
|
|
1074 | 1261 | "refresh": 60
|
1075 | 1262 | },
|
1076 | 1263 | {
|
1077 |
| - "name": "today_battery_discharge", |
1078 |
| - "register": "0x0699", |
| 1264 | + "name": "total_export", |
| 1265 | + "register": "0x0693", |
1079 | 1266 | "function": "divide",
|
1080 | 1267 | "factor": 100,
|
1081 | 1268 | "ha": {
|
1082 | 1269 | "device_class": "energy",
|
1083 | 1270 | "unit_of_measurement": "kWh",
|
1084 |
| - "name": "Battery Discharge Today", |
1085 |
| - "icon": "mdi:battery-minus-variant", |
| 1271 | + "name": "Export Total", |
| 1272 | + "icon": "mdi:transmission-tower-export", |
1086 | 1273 | "state_class": "total_increasing",
|
1087 | 1274 | "entity_category": "diagnostic",
|
1088 |
| - "value_template": "{{ value_json.today_battery_discharge }}" |
| 1275 | + "value_template": "{{ value_json.total_export }}" |
1089 | 1276 | },
|
1090 |
| - "refresh": 60 |
| 1277 | + "refresh": 3600 |
1091 | 1278 | },
|
1092 | 1279 | {
|
1093 | 1280 | "name": "today_battery_charge",
|
|
1105 | 1292 | },
|
1106 | 1293 | "refresh": 60
|
1107 | 1294 | },
|
| 1295 | + { |
| 1296 | + "name": "total_battery_charge", |
| 1297 | + "register": "0x0697", |
| 1298 | + "function": "divide", |
| 1299 | + "factor": 100, |
| 1300 | + "ha": { |
| 1301 | + "device_class": "energy", |
| 1302 | + "unit_of_measurement": "kWh", |
| 1303 | + "name": "Battery Charge Total", |
| 1304 | + "icon": "mdi:battery-plus-variant", |
| 1305 | + "state_class": "total_increasing", |
| 1306 | + "entity_category": "diagnostic", |
| 1307 | + "value_template": "{{ value_json.total_battery_charge }}" |
| 1308 | + }, |
| 1309 | + "refresh": 3600 |
| 1310 | + }, |
| 1311 | + { |
| 1312 | + "name": "today_battery_discharge", |
| 1313 | + "register": "0x0699", |
| 1314 | + "function": "divide", |
| 1315 | + "factor": 100, |
| 1316 | + "ha": { |
| 1317 | + "device_class": "energy", |
| 1318 | + "unit_of_measurement": "kWh", |
| 1319 | + "name": "Battery Discharge Today", |
| 1320 | + "icon": "mdi:battery-minus-variant", |
| 1321 | + "state_class": "total_increasing", |
| 1322 | + "entity_category": "diagnostic", |
| 1323 | + "value_template": "{{ value_json.today_battery_discharge }}" |
| 1324 | + }, |
| 1325 | + "refresh": 60 |
| 1326 | + }, |
| 1327 | + { |
| 1328 | + "name": "total_battery_discharge", |
| 1329 | + "register": "0x069B", |
| 1330 | + "function": "divide", |
| 1331 | + "factor": 100, |
| 1332 | + "ha": { |
| 1333 | + "device_class": "energy", |
| 1334 | + "unit_of_measurement": "kWh", |
| 1335 | + "name": "Battery Discharge Total", |
| 1336 | + "icon": "mdi:battery-minus-variant", |
| 1337 | + "state_class": "total_increasing", |
| 1338 | + "entity_category": "diagnostic", |
| 1339 | + "value_template": "{{ value_json.total_battery_discharge }}" |
| 1340 | + }, |
| 1341 | + "refresh": 3600 |
| 1342 | + }, |
1108 | 1343 | {
|
1109 | 1344 | "name": "battery_voltage",
|
1110 | 1345 | "register": "0x0604",
|
|
1187 | 1422 | "0": "Off",
|
1188 | 1423 | "1": "On"
|
1189 | 1424 | },
|
1190 |
| - "write": true, |
1191 |
| - "untested": true, |
1192 |
| - "refresh": 86400 |
| 1425 | + "ha": { |
| 1426 | + "name": "EPS Control", |
| 1427 | + "icon": "mdi:toggle-switch", |
| 1428 | + "entity_category": "config", |
| 1429 | + "command_topic": "sofar/rw/eps_config/eps_control", |
| 1430 | + "options": [ |
| 1431 | + "Off", |
| 1432 | + "On" |
| 1433 | + ], |
| 1434 | + "control": "select", |
| 1435 | + "value_template": "{{ value_json.eps_control }}" |
| 1436 | + }, |
| 1437 | + "refresh": 1 |
| 1438 | + }, |
| 1439 | + { |
| 1440 | + "name": "eps_wait_time", |
| 1441 | + "register": "0x102A", |
| 1442 | + "desc": "Waiting time for emergency power start", |
| 1443 | + "type": "U16", |
| 1444 | + "min": 0, |
| 1445 | + "max": 65535, |
| 1446 | + "ha": { |
| 1447 | + "name": "EPS Wait Time", |
| 1448 | + "icon": "mdi:alpha-s-box", |
| 1449 | + "entity_category": "config", |
| 1450 | + "min": 0, |
| 1451 | + "max": 65535, |
| 1452 | + "mode": "box", |
| 1453 | + "command_topic": "sofar/rw/eps_config/eps_wait_time", |
| 1454 | + "control": "number", |
| 1455 | + "device_class": "duration", |
| 1456 | + "unit_of_measurement": "s", |
| 1457 | + "value_template": "{{ value_json.eps_wait_time }}" |
| 1458 | + }, |
| 1459 | + "refresh": 1 |
1193 | 1460 | },
|
1194 | 1461 | {
|
1195 | 1462 | "name": "remote_on_off_control",
|
|
0 commit comments