Jump to content

CorneSchutte

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by CorneSchutte

  1. Re PowerOptimal: I was in a discussion today re the Elon 100 and possible successor. It does look like a good option now to take instead of evacuated tubes. I understand it also connects to wifi and that you can monitor with an app on your phone. But I cannot find the app? Draigman - did you find a way to use the excess power to route to an inverter? Any experience from anybody to integrate it in Home Assistant?
  2. Martinisonline - the ESPHome code (as originally written by sjlouw and refined by jacauc, with the update mod by slipx), only has the following for Grid Import Total (Buy) and it works fine for me: - platform: modbus_controller # 78 Grid Import Total (Buy) modbus_controller_id: sunsynk_esphome name: "SS Grid Import Total (Buy)" id: sunsynk_esphome_grid_import_total_buy register_type: holding address: 78 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing filters: #GOOD - lambda: |- x = x / -1; if (x > 32767) return (0 - x + 65535) /1; else return (0 - x) /1; Thus this ESPHome implementation therefore does not use the 80 register as far as I can tell? See if it works for you? For me, the code I inherited from jacauc etc worked immediately - the challenge was to identify the correct 2 wires in the Ethernet cable to connect to the TTL-RS485, but once I had done that, it simply just worked. I had recently tidied it up and put the ESP32 and TTL-RS485 in a nice case with some ventilation slots and have had no issues.
  3. "My" ESPHome code, which is a combination of others work before me. But I believe the Deye registers are completely different? esphome: name: "sunsynk" preferences: flash_write_interval: 5min esp32: board: esp32dev framework: type: arduino #################################### GLOBALS #################################### substitutions: modbus_update_interval: "3s" settings_skipped_updates: "10" query_throttle: "50ms" device_name: sunsynk friendly_name: SunSynk Link #################################### STATIC SECTION #################################### wifi: ssid: XXXX password: XXX fast_connect: true ota: safe_mode: true reboot_timeout: 10min num_attempts: 5 web_server: port: 80 #captive_portal: # Enable logging #logger: # baud_rate: 0 # Enable Home Assistant API api: # https://esphome.io/components/time.html#home-assistant-time-source time: - platform: homeassistant id: homeassistant_time #################################### STATIC SECTION #################################### uart: id: mod_bus tx_pin: 17 rx_pin: 16 baud_rate: 9600 stop_bits: 1 modbus: id: sunsynk_modbus flow_control_pin: 4 modbus_controller: - id: sunsynk_esphome address: 0x01 modbus_id: sunsynk_modbus setup_priority: -10 update_interval: ${modbus_update_interval} command_throttle: ${query_throttle} switch: - platform: restart name: "${friendly_name} Restart" - platform: modbus_controller # 248 Toggle System Timer use_write_multiple: true modbus_controller_id: sunsynk_esphome name: "Toggle System Timer" id: sunsynk_esphome_toggle_Time_of_Use register_type: holding address: 248 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" - platform: modbus_controller # 274 Toggle Grid Charge Timezone1 use_write_multiple: true modbus_controller_id: sunsynk_esphome name: "Toggle Grid Charge Timezone1" id: sunsynk_esphome_toggle_grid_charge_timezone1 register_type: holding address: 274 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" - platform: modbus_controller # 275 Toggle Grid Charge Timezone2 modbus_controller_id: sunsynk_esphome use_write_multiple: true name: "Toggle Grid Charge Timezone2" id: sunsynk_esphome_toggle_grid_charge_timezone2 register_type: holding address: 275 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" - platform: modbus_controller # 276 Toggle Grid Charge Timezone3 modbus_controller_id: sunsynk_esphome use_write_multiple: true name: "Toggle Grid Charge Timezone3" id: sunsynk_esphome_toggle_grid_charge_timezone3 register_type: holding address: 276 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" - platform: modbus_controller # 277 Toggle Grid Charge Timezone4 modbus_controller_id: sunsynk_esphome use_write_multiple: true name: "Toggle Grid Charge Timezone4" id: sunsynk_esphome_toggle_grid_charge_timezone4 register_type: holding address: 277 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" - platform: modbus_controller # 278 Toggle Grid Charge Timezone5 modbus_controller_id: sunsynk_esphome use_write_multiple: true name: "Toggle Grid Charge Timezone5" id: sunsynk_esphome_toggle_grid_charge_timezone5 register_type: holding address: 278 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" - platform: modbus_controller # 279 Toggle Grid Charge Timezone6 modbus_controller_id: sunsynk_esphome use_write_multiple: true name: "Toggle Grid Charge Timezone6" id: sunsynk_esphome_toggle_grid_charge_timezone6 register_type: holding address: 279 bitmask: 1 entity_category: config icon: "mdi:toggle-switch" number: - platform: modbus_controller # 268 Settings SoC Timezone1 use_write_multiple: true modbus_controller_id: sunsynk_esphome id: sunsynk_esphome_set_soc_timezone1 name: "Set SoC Timezone1" unit_of_measurement: "%" address: 268 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 269 Settings SoC Timezone2 use_write_multiple: true modbus_controller_id: sunsynk_esphome id: sunsynk_esphome_set_soc_timezone2 name: "Set SoC Timezone2" unit_of_measurement: "%" address: 269 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 270 Settings SoC Timezone3 use_write_multiple: true modbus_controller_id: sunsynk_esphome id: sunsynk_esphome_set_soc_timezone3 name: "Set SoC Timezone3" unit_of_measurement: "%" address: 270 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 271 Settings SoC Timezone4 use_write_multiple: true modbus_controller_id: sunsynk_esphome id: sunsynk_esphome_set_soc_timezone4 name: "Set SoC Timezone4" unit_of_measurement: "%" address: 271 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 272 Settings SoC Timezone5 use_write_multiple: true modbus_controller_id: sunsynk_esphome id: sunsynk_esphome_set_soc_timezone5 name: "Set SoC Timezone5" unit_of_measurement: "%" address: 272 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 273 Settings SoC Timezone6 use_write_multiple: true modbus_controller_id: sunsynk_esphome id: sunsynk_esphome_set_soc_timezone6 name: "Set SoC Timezone6" unit_of_measurement: "%" address: 273 min_value: 0 max_value: 100 step: 5 value_type: U_WORD sensor: - platform: wifi_signal name: WiFi signal ${device_name} id: wifi_s internal: true update_interval: 60s - platform: template name: Wifi ${device_name} unit_of_measurement: '%' accuracy_decimals: 0 icon: "mdi:wifi" lambda: |- if (id(wifi_s).state < -92.0) return 1.0; if (id(wifi_s).state > -21.0) return 100.0; else return round(( -0.0154 * id(wifi_s).state * id(wifi_s).state ) - ( 0.3794 * id(wifi_s).state ) + 98.182 ); update_interval: 60s - platform: uptime filters: - lambda: return x / 3600; unit_of_measurement: hours name: ${device_name} Uptime - platform: modbus_controller #72 Battery Charge Total modbus_controller_id: sunsynk_esphome name: "SS Battery Charge Total" id: sunsynk_esphome_battery_charge_total register_type: holding address: 72 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters: - lambda: |- x = x / -1; if (x > 32767) return (0 - x + 65535) /10; else return (0 - x) /10; - platform: modbus_controller #74 Battery Discharge Total modbus_controller_id: sunsynk_esphome name: "SS Battery Discharge Total" id: sunsynk_esphome_battery_discharge_total register_type: holding address: 74 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing filters: - lambda: |- if (x > 32767) return (x - 65535) /10; else return (x) /10; - platform: modbus_controller # 81 Grid Export Total (Sell) modbus_controller_id: sunsynk_esphome name: "SS Grid Export Total (Sell)" id: sunsynk_esphome_grid_export_total_sell register_type: holding address: 81 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - lambda: |- if (x > 32767) return (x - 65535) / 10; else return x /10; - platform: modbus_controller # 78 Grid Import Total (Buy) modbus_controller_id: sunsynk_esphome name: "SS Grid Import Total (Buy)" id: sunsynk_esphome_grid_import_total_buy register_type: holding address: 78 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing filters: #GOOD - lambda: |- x = x / -1; if (x > 32767) return (0 - x + 65535) /1; else return (0 - x) /1; - platform: modbus_controller # 85 Load Power Total modbus_controller_id: sunsynk_esphome name: "SS Load Power Total" id: sunsynk_esphome_load_power_total register_type: holding address: 85 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing filters: #GOOD - lambda: |- if (x > 32767) return (0 - x + 65535) /1; else return (0 - x) /1; - platform: modbus_controller modbus_controller_id: sunsynk_esphome name: "SS Total PV Power (kWh)" id: sunsynk_esphome_total_pv_power_kwh register_type: holding address: 96 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller # 169 Grid Power modbus_controller_id: sunsynk_esphome name: "SS Grid Power" id: sunsynk_esphome_grid_power register_type: holding address: 169 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 178 Load Power modbus_controller_id: sunsynk_esphome name: "SS Load Power" id: sunsynk_esphome_load_power register_type: holding address: 178 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 186 PV1 Power modbus_controller_id: sunsynk_esphome name: "SS PV1 Power" id: sunsynk_esphome_pv1_power register_type: holding address: 186 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement - platform: modbus_controller # 187 PV2 Power modbus_controller_id: sunsynk_esphome name: "SS PV2 Power" id: sunsynk_esphome_pv2_power register_type: holding address: 187 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement - platform: template # PV Total Power name: "SS PV Power" id: sunsynk_esphome_pv_power unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement update_interval: 15s lambda: |- return (id(sunsynk_esphome_pv1_power).state + id(sunsynk_esphome_pv2_power).state); - platform: total_daily_energy # PV Daily Energy name: 'SS PV Daily Energy' id: sunsynk_esphome_pv_daily_energy power_id: sunsynk_esphome_pv_power unit_of_measurement: 'kWh' icon: mdi:circle-slice-3 state_class: total_increasing device_class: energy accuracy_decimals: 2 restore: true filters: # Multiplication factor from W to kW is 0.001 - multiply: 0.001 - platform: modbus_controller # 190 Battery Output modbus_controller_id: sunsynk_esphome name: "SS Battery Output Power" id: sunsynk_esphome_battery_output_power register_type: holding address: 190 unit_of_measurement: "W" accuracy_decimals: 2 device_class: power state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 184 Battery SOC modbus_controller_id: sunsynk_esphome name: "SS Battery SOC" id: sunsynk_esphome_battery_soc register_type: holding address: 184 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 184 Battery Usable SOC modbus_controller_id: sunsynk_esphome name: "SS Battery Usable SOC" id: sunsynk_esphome_battery_usable_soc register_type: holding address: 184 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery state_class: measurement filters: #GOOD # battery normally charges to 99%, shutdown level is 20%, so subtract 19 from value and calculate as percentage divided by 80 - lambda: |- if (x > 32767) { int y = ((((x - 65535) -19) /80) *100) /1; if (y > 100) return 100; return y; } else { int y = (((x -19) /80) *100) /1; if (y > 100) return 100; return y; } - platform: modbus_controller # 216 Battery Charging Efficiency modbus_controller_id: sunsynk_esphome name: "SS Battery Charging Efficiency" id: sunsynk_esphome_battery_charging_efficiency register_type: holding address: 216 unit_of_measurement: "%" accuracy_decimals: 1 device_class: battery state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /10; else return (x) /10; # - platform: modbus_controller # 013 Firmware Control Board # modbus_controller_id: sunsynk_esphome # name: "SS Firmware Control Board" # id: sunsynk_esphome_firmware_control_board # register_type: holding # address: 13 # - platform: modbus_controller # 013 Firmware Comms Board # modbus_controller_id: sunsynk_esphome # name: "SS Firmware Comms Board" # id: sunsynk_esphome_firmware_comms_board # register_type: holding # address: 14 - platform: modbus_controller # 079 Grid Frequency modbus_controller_id: sunsynk_esphome name: "SS Grid Frequency" id: sunsynk_esphome_grid_frequency register_type: holding address: 79 unit_of_measurement: "hz" accuracy_decimals: 2 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /100; else return (x) /100; #device_class: none state_class: measurement - platform: modbus_controller # 192 Load Frequency modbus_controller_id: sunsynk_esphome name: "SS Load Frequency" id: sunsynk_esphome_load_frequency register_type: holding address: 192 unit_of_measurement: "hz" accuracy_decimals: 2 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /100; else return (x) /100; #device_class: none state_class: measurement - platform: modbus_controller # 154 Grid Inverter Voltage modbus_controller_id: sunsynk_esphome name: "SS Grid Inverter Voltage" id: sunsynk_esphome_grid_inverter_voltage register_type: holding address: 154 unit_of_measurement: "V" accuracy_decimals: 1 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /10; else return (x) /10; device_class: voltage state_class: measurement - platform: modbus_controller # 150 Grid Voltage modbus_controller_id: sunsynk_esphome name: "SS Grid Voltage" id: sunsynk_esphome_grid_voltage register_type: holding address: 150 unit_of_measurement: "V" accuracy_decimals: 1 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /10; else return (x) /10; device_class: voltage state_class: measurement - platform: modbus_controller # 154 Grid Inverter Voltage modbus_controller_id: sunsynk_esphome name: "SS Grid Voltage" id: sunsynk_inverter_grid_voltage register_type: holding address: 154 unit_of_measurement: "V" accuracy_decimals: 1 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /10; else return (x) /10; device_class: voltage state_class: measurement - platform: modbus_controller # 183 Battery Voltage modbus_controller_id: sunsynk_esphome name: "SS Battery Voltage" id: sunsynk_esphome_battery_voltage register_type: holding address: 183 unit_of_measurement: "V" accuracy_decimals: 1 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) / 100; else return x / 100; device_class: voltage state_class: measurement - platform: modbus_controller # 312 Battery Charge Voltage modbus_controller_id: sunsynk_esphome name: "SS Battery Charge Voltage" id: sunsynk_esphome_battery_charge_voltage register_type: holding address: 312 unit_of_measurement: "V" accuracy_decimals: 1 filters: #GOOD - lambda: |- x = x / -1; if (x > 32767) return (0 - x + 65535) /100; else return (0 - x) /100; device_class: voltage state_class: measurement - platform: modbus_controller # 167 Grid Inverter Load modbus_controller_id: sunsynk_esphome name: "SS Grid Inverter Load" id: sunsynk_esphome_grid_inverter_load register_type: holding address: 167 unit_of_measurement: "W" accuracy_decimals: 0 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; device_class: power state_class: measurement - platform: modbus_controller # 172 Grid External Power modbus_controller_id: sunsynk_esphome name: "SS Grid External Power" id: sunsynk_esphome_grid_external_power register_type: holding address: 172 unit_of_measurement: "W" accuracy_decimals: 0 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; device_class: power state_class: measurement - platform: total_daily_energy # Grid External Daily Energy name: 'SS Grid External Daily Energy' id: sunsynk_esphome_grid_external_daily_energy power_id: sunsynk_esphome_grid_external_power unit_of_measurement: 'kWh' icon: mdi:circle-slice-3 state_class: total_increasing device_class: energy accuracy_decimals: 2 restore: true filters: # Multiplication factor from W to kW is 0.001 - multiply: 0.001 - platform: modbus_controller # 166 Aux Output Power modbus_controller_id: sunsynk_esphome name: "SS Aux Output Power" id: sunsynk_esphome_aux_output_power register_type: holding address: 166 unit_of_measurement: "W" accuracy_decimals: 0 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; device_class: power state_class: measurement - platform: modbus_controller # 164 Inverter Output Current modbus_controller_id: sunsynk_esphome name: "SS Inverter Output Current" id: sunsynk_esphome_inverter_output_current register_type: holding address: 191 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (0 - x + 65535) /100; else return (0 - x) /100; - platform: modbus_controller # 191 Battery Output Current modbus_controller_id: sunsynk_esphome name: "SS Battery Output Current" id: sunsynk_esphome_battery_output_current register_type: holding address: 191 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (0 - x + 65535) /100; else return (0 - x) /100; - platform: modbus_controller # 182 Battery Temperature modbus_controller_id: sunsynk_esphome name: "SS Battery Temperature" id: sunsynk_esphome_battery_temperature register_type: holding address: 182 unit_of_measurement: "°C" accuracy_decimals: 1 device_class: temperature state_class: measurement filters: # GOOD - lambda: |- if (x > 32767) return ((x - 65535)-1000) / 10; else return ((x)-1000) / 10; - platform: modbus_controller # 090 DC Transformer Temperature modbus_controller_id: sunsynk_esphome name: "SS DC Transformer Temperature" id: sunsynk_esphome_dctransformer_temperature register_type: holding address: 090 unit_of_measurement: "°C" accuracy_decimals: 1 device_class: temperature state_class: measurement filters: # GOOD - lambda: |- if (x > 32767) return ((x - 65535)-1000) / 10; else return ((x)-1000) / 10; - platform: modbus_controller # 091 Radiator Temperature modbus_controller_id: sunsynk_esphome name: "SS DC Radiator Temperature" id: sunsynk_esphome_radiator_temperature register_type: holding address: 091 unit_of_measurement: "°C" accuracy_decimals: 1 device_class: temperature state_class: measurement filters: # GOOD - lambda: |- if (x > 32767) return ((x - 65535)-1000) / 10; else return ((x)-1000) / 10; - platform: modbus_controller #076 Grid Import Day (Buy) modbus_controller_id: sunsynk_esphome name: "SS Grid Import Day (Buy)" id: sunsynk_esphome_grid_import_day register_type: holding address: 76 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing filters: # GOOD - lambda: |- if (x > 32767) return (x - 65535) / 10; else return x /10; - platform: modbus_controller # 070 Battery Charge Day modbus_controller_id: sunsynk_esphome name: "SS Battery Charge Day" id: sunsynk_esphome_battery_charge_day register_type: holding address: 70 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters: #GOOD - lambda: |- x = x / 10; if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 071 Battery Discharge Day modbus_controller_id: sunsynk_esphome name: "SS Battery Discharge Day" id: sunsynk_esphome_battery_discharge_day register_type: holding address: 71 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters: #GOOD - lambda: |- x = x / 10; if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 175 Inverter Output Power modbus_controller_id: sunsynk_esphome name: "SS Inverter Output Power" id: sunsynk_esphome_inverter_output_power register_type: holding address: 175 unit_of_measurement: "W" accuracy_decimals: 1 device_class: power filters: #GOOD - lambda: |- if (x > 32767) return (0 - x + 65535) /-1; else return (0 - x) /-1; ################################################ READ SETTINGS ################################################ - platform: modbus_controller # 250 Settings Timezone1 modbus_controller_id: sunsynk_esphome name: "SSS Setting Timezone1" id: sunsynk_esphome_setting_timezone1 register_type: holding skip_updates: ${settings_skipped_updates} address: 250 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 251 Settings Timezone2 modbus_controller_id: sunsynk_esphome name: "SSS Setting Timezone2" id: sunsynk_esphome_setting_timezone2 register_type: holding skip_updates: ${settings_skipped_updates} address: 251 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 252 Settings Timezone3 modbus_controller_id: sunsynk_esphome name: "SSS Setting Timezone3" id: sunsynk_esphome_setting_timezone3 register_type: holding skip_updates: ${settings_skipped_updates} address: 252 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 253 Settings Timezone4 modbus_controller_id: sunsynk_esphome name: "SSS Setting Timezone4" id: sunsynk_esphome_setting_timezone4 register_type: holding skip_updates: ${settings_skipped_updates} address: 253 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 254 Settings Timezone5 modbus_controller_id: sunsynk_esphome name: "SSS Setting Timezone5" id: sunsynk_esphome_setting_timezone5 register_type: holding skip_updates: ${settings_skipped_updates} address: 254 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 255 Settings Timezone6 modbus_controller_id: sunsynk_esphome name: "SSS Setting Timezone6" id: sunsynk_esphome_setting_timezone6 register_type: holding skip_updates: ${settings_skipped_updates} address: 255 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 256 Settings Sell Mode Timezone1 modbus_controller_id: sunsynk_esphome name: "SSS Setting Sell Mode Timezone1" id: sunsynk_esphome_setting_sellmode_timezone1 register_type: holding skip_updates: ${settings_skipped_updates} address: 256 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 257 Settings Sell Mode Timezone2 modbus_controller_id: sunsynk_esphome name: "SSS Setting Sell Mode Timezone2" id: sunsynk_esphome_setting_sellmode_timezone2 register_type: holding skip_updates: ${settings_skipped_updates} address: 257 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 258 Settings Sell Mode Timezone3 modbus_controller_id: sunsynk_esphome name: "SSS Setting Sell Mode Timezone3" id: sunsynk_esphome_setting_sellmode_timezone3 register_type: holding skip_updates: ${settings_skipped_updates} address: 258 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 259 Settings Sell Mode Timezone4 modbus_controller_id: sunsynk_esphome name: "SSS Setting Sell Mode Timezone4" id: sunsynk_esphome_setting_sellmode_timezone4 register_type: holding skip_updates: ${settings_skipped_updates} address: 259 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 260 Settings Sell Mode Timezone5 modbus_controller_id: sunsynk_esphome name: "SSS Setting Sell Mode Timezone5" id: sunsynk_esphome_setting_sellmode_timezone5 register_type: holding skip_updates: ${settings_skipped_updates} address: 260 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 261 Settings Sell Mode Timezone6 modbus_controller_id: sunsynk_esphome name: "SSS Setting Sell Mode Timezone6" id: sunsynk_esphome_setting_sellmode_timezone6 register_type: holding skip_updates: ${settings_skipped_updates} address: 261 filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 245 Settings Export Limit modbus_controller_id: sunsynk_esphome name: "SSS Setting Export Limit" id: sunsynk_esphome_setting_export_limit register_type: holding skip_updates: ${settings_skipped_updates} address: 245 unit_of_measurement: "W" device_class: power state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 217 Settings Battery Shutdown modbus_controller_id: sunsynk_esphome name: "SSS Setting Battery Shutdown" id: sunsynk_esphome_setting_battery_shutdown register_type: holding skip_updates: ${settings_skipped_updates} address: 217 unit_of_measurement: "%" device_class: battery state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 219 Settings Battery Low modbus_controller_id: sunsynk_esphome name: "SSS Setting Battery Low" id: sunsynk_esphome_setting_battery_low register_type: holding skip_updates: ${settings_skipped_updates} address: 219 unit_of_measurement: "%" device_class: battery state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 218 Settings Battery Restart modbus_controller_id: sunsynk_esphome name: "SSS Setting Battery Restart" id: sunsynk_esphome_setting_battery_restart register_type: holding skip_updates: ${settings_skipped_updates} address: 218 unit_of_measurement: "%" device_class: battery state_class: measurement filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 210 Settings Battery Max Charge Current modbus_controller_id: sunsynk_esphome name: "SSS Setting Battery Max Charge Current" id: sunsynk_esphome_setting_battery_max_charge_current register_type: holding skip_updates: ${settings_skipped_updates} address: 210 device_class: current state_class: measurement unit_of_measurement: "A" filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 211 Settings Battery Max Discharge Current modbus_controller_id: sunsynk_esphome name: "SSS Setting Max Discharge Current" id: sunsynk_esphome_setting_battery_max_discharge_current register_type: holding skip_updates: ${settings_skipped_updates} address: 211 device_class: current state_class: measurement unit_of_measurement: "A" filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 230 Settings Grid Charge Current modbus_controller_id: sunsynk_esphome name: "SSS Setting Grid Charge Current" id: sunsynk_esphome_setting_grid_charge_current register_type: holding skip_updates: ${settings_skipped_updates} address: 230 device_class: current state_class: measurement unit_of_measurement: "A" filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: total_daily_energy name: 'SS Inverter Daily Energy' id: sunsynk_esphome_inverter_daily_energy power_id: sunsynk_esphome_inverter_output_power unit_of_measurement: 'kWh' icon: mdi:circle-slice-3 state_class: total_increasing device_class: energy accuracy_decimals: 2 restore: true filters: # Multiplication factor from W to kW is 0.001 - multiply: 0.001 ############################################### BINARY SENSORS ############################################### binary_sensor: - platform: status name: Status ${device_name} - platform: modbus_controller # 194 Grid Connected Status modbus_controller_id: sunsynk_esphome name: "SS Grid Connected Status" id: sunsynk_esphome_grid_connected_status register_type: holding address: 194 ############################################### BINARY SENSORS SETTINGS ############################################### - platform: modbus_controller # 244 Settings Load Limit Enabled modbus_controller_id: sunsynk_esphome name: "SSS Setting Load Limit Enabled" id: sunsynk_esphome_setting_load_limit2 register_type: holding skip_updates: ${settings_skipped_updates} address: 244 - platform: modbus_controller # 247 Settings Solar Export Enabled modbus_controller_id: sunsynk_esphome name: "SSS Setting Solar Export Enabled" id: sunsynk_esphome_setting_solar_export_enabled register_type: holding skip_updates: ${settings_skipped_updates} address: 247 - platform: modbus_controller # 232 Settings Battery Grid Charge Enabled modbus_controller_id: sunsynk_esphome name: "SSS Setting Battery Grid Charge Enabled" id: sunsynk_esphome_setting_battery_grid_charge_enabled register_type: holding skip_updates: ${settings_skipped_updates} address: 232 ############################################### TEXT SENSORS SETTINGS ############################################### text_sensor: - platform: wifi_info ssid: name: SSID ${device_name} bssid: name: BSSID ${device_name} id: bssid_id - platform: modbus_controller # 243 Settings Energy Management Model (PL) modbus_controller_id: sunsynk_esphome name: "SSS Setting Energy Management Model" id: sunsynk_esphome_setting_energy_management_model register_type: holding skip_updates: ${settings_skipped_updates} raw_encode: HEXBYTES address: 243 lambda: |- uint16_t value = modbus_controller::word_from_hex_str(x, 0); switch (value) { case 0: return std::string("Battery Priority Mode"); case 1: return std::string("Load First Mode"); default: return std::string("Unknown"); } - platform: modbus_controller # 059 Overall State modbus_controller_id: sunsynk_esphome name: "SS Overall State" id: sunsynk_esphome_overall_state register_type: holding skip_updates: ${settings_skipped_updates} raw_encode: HEXBYTES address: 59 lambda: |- # It is not clear what each of these states mean. TODO Fill in the string values once known uint16_t value = modbus_controller::word_from_hex_str(x, 0); switch (value) { case 0: return std::string("0"); case 1: return std::string("1"); case 2: return std::string("2"); case 3: return std::string("3"); case 4: return std::string("4"); case 5: return std::string("5"); default: return std::string("Unknown"); } I hope it helps!
  4. Martinisonline, I have been using use the ESPHome solution with the SunSynk 8.8kW inverter since about 10 Feb (just after my Inverter was installed), and updates are pretty immediate. Life graphs such as Inverter Power update every 2-3 s here - so I guess it is a function of when the inverter sends an update on the bus? Other data such as Battery SOC updates much slower, so I think it only sends it when the value changes? In terms of setting write updates, it is normally also instantaneous here, but I sometimes observe a slight lag (0,5s?), when I for example toggle the grid option for a time period, but it is not something one does so interactively that it bothers one. I am surprised by the ESPHome device's performance (ESP32) - I have 81! entities defined on it, with absolutely no issue so far - it is running 24/7 unless I reboot/recompile to refine the ESPHome code. I had just done last night the very nice power flow that emulates the SunSynk screen -see attached screen, and had to add a few missing sensors that was not defined in the ESPHome setup.
×
×
  • Create New...