Jump to content

georgelza

Members
  • Posts

    473
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by georgelza

  1. sweet, thanks, i removed it from my card definition, which then had the internal logic kick in. G
  2. to which entity/sensor does that <0w> below the PV array map, G
  3. hi Keller. problem was the entity names, my names seem to have a 2nd sunsynk_ at the beginning. G
  4. so answering some of my own questions. for some reason my sensors are sunsynk_synsynk_* where the original is sunsynk_* G
  5. hmmm, looking at slipx06 repo and his custom: Sunsynk-Power-Flow-Card thinking it's probably suppose to go with a very specific yaml file setup deployed onto the esp32. what I got deployed atm... attached... can't recall who's this is... guessing there is a pre defined visualization/dashboard available for this... at the moment I got a very dead screen, no values on dashboard/flow card, so guessing a total disconnect between the sensor names it wants and what the esp32 is bringing in. looking at my notes, this is suppose to be slips Sunsynk 8000 yaml code for esp32 deployment. if I go into Developer Tools and filter on Sunsynk I do see some sensors that is updating as per whats on the inverter control panel. esphome: name: "sunsynk" friendly_name: Sunsynk substitutions: settings_skipped_updates: "30" devicename: sunsynk device_description: "Sunsynk RS485 Logger" friendly_name: "SunSynk" esp32: board: esp32dev framework: type: arduino # Enable logging logger: # Enable Home Assistant API api: encryption: key: "uSF7p2o9ek------zOUUGTecm70=" ota: password: "5b3d7a336------df" wifi: ssid: "muller" password: "08-----798" manual_ip: static_ip: 192.168.0.180 gateway: 192.168.0.1 subnet: 255.255.255.0 # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Esphome-Web-415E4C" password: "Pd-----Z5" captive_portal: # Enable time component to reset energy at midnight # https://esphome.io/components/time.html#home-assistant-time-source time: - platform: homeassistant id: homeassistant_time 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 address: 0x01 modbus_id: sunsynk_modbus setup_priority: -10 update_interval: "15s" command_throttle: "50ms" ############################################### BINARY SENSORS ######################################## binary_sensor: - platform: modbus_controller # 194 Grid Connected Status modbus_controller_id: sunsynk name: "${friendly_name} Grid Connected Status" id: sunsynk_esphome_grid_connected_status register_type: holding address: 194 - platform: modbus_controller # 280 Gen Peak Shaving Status modbus_controller_id: sunsynk name: "${friendly_name} Gen Peak Shaving Status" id: sunsynk_esphome_gen_peak_shaving_status register_type: holding address: 280 bitmask: 0x10 - platform: modbus_controller # 280 Grid Peak Shaving Status modbus_controller_id: sunsynk name: "${friendly_name} Grid Peak Shaving Status" id: sunsynk_esphome_grid_peak_shaving_status register_type: holding address: 280 bitmask: 0x100 # SENSORS # ####################################################################################################### ############################################### BATTERY ############################################### sensor: - platform: modbus_controller # 182 Battery Temperature modbus_controller_id: sunsynk name: "${friendly_name} 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 value_type: U_WORD filters: - offset: -1000 - multiply: 0.1 - platform: modbus_controller # 183 Battery Voltage modbus_controller_id: sunsynk name: "${friendly_name} Battery Voltage" id: sunsynk_esphome_battery_voltage register_type: holding address: 183 unit_of_measurement: "V" accuracy_decimals: 1 device_class: voltage state_class: measurement filters: - multiply: 0.01 value_type: U_WORD - platform: modbus_controller # 184 Battery SOC modbus_controller_id: sunsynk name: "${friendly_name} Battery SOC" id: sunsynk_esphome_battery_soc register_type: holding address: 184 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery value_type: U_WORD - platform: modbus_controller # 190 Battery Power modbus_controller_id: sunsynk name: "${friendly_name} Battery Power" id: sunsynk_esphome_battery_power register_type: holding address: 190 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power value_type: S_WORD - platform: modbus_controller # 191 Battery Current modbus_controller_id: sunsynk name: "${friendly_name} Battery Current" id: sunsynk_esphome_battery_current register_type: holding address: 191 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement value_type: S_WORD filters: - multiply: 0.01 - platform: modbus_controller # 217 Battery Capacity Shutdown modbus_controller_id: sunsynk name: "${friendly_name} Battery Capacity Shutdown" id: sunsynk_esphome_battery_capacity_shutdown register_type: holding address: 217 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery ############################################### INVERTER ############################################## - platform: modbus_controller # 175 Inverter Power modbus_controller_id: sunsynk name: "${friendly_name} Inverter Power" id: sunsynk_esphome_inverter_power register_type: holding address: 175 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power value_type: S_WORD - platform: modbus_controller # 154 Inverter Voltage modbus_controller_id: sunsynk name: "${friendly_name} Inverter Voltage" id: sunsynk_esphome_inverter_voltage register_type: holding address: 154 unit_of_measurement: "V" accuracy_decimals: 1 device_class: voltage state_class: measurement filters: - multiply: 0.1 value_type: U_WORD - platform: modbus_controller # 164 Inverter Current modbus_controller_id: sunsynk name: "${friendly_name} Inverter Current" id: sunsynk_esphome_inverter_current register_type: holding address: 164 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement value_type: S_WORD filters: - multiply: 0.01 - platform: modbus_controller # 193 Inverter Frequency modbus_controller_id: sunsynk name: "${friendly_name} Inverter Frequency" id: sunsynk_esphome_inverter_frequency register_type: holding address: 193 unit_of_measurement: "Hz" accuracy_decimals: 2 filters: - multiply: 0.01 value_type: U_WORD state_class: measurement ############################################### GRID ################################################## - platform: modbus_controller # 079 Grid Frequency modbus_controller_id: sunsynk name: "${friendly_name} Grid Frequency" id: sunsynk_esphome_grid_frequency register_type: holding address: 79 unit_of_measurement: "Hz" accuracy_decimals: 2 filters: - multiply: 0.01 value_type: U_WORD state_class: measurement - platform: modbus_controller # 169 Grid Power modbus_controller_id: sunsynk name: "${friendly_name} Grid Power" id: sunsynk_esphome_grid_power_169 register_type: holding address: 169 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD - platform: modbus_controller # 167 Grid LD Power modbus_controller_id: sunsynk name: "${friendly_name} Grid LD Power 167" id: sunsynk_esphome_grid_power_167 register_type: holding address: 167 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD - platform: modbus_controller # 168 Grid L2 Power modbus_controller_id: sunsynk name: "${friendly_name} Grid L2 Power 168" id: sunsynk_esphome_grid_power_168 register_type: holding address: 168 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD - platform: modbus_controller # 150 Grid Voltage modbus_controller_id: sunsynk name: "${friendly_name} Grid Voltage" id: sunsynk_esphome_grid_voltage register_type: holding address: 150 unit_of_measurement: "V" accuracy_decimals: 1 device_class: voltage state_class: measurement filters: - multiply: 0.1 value_type: U_WORD - platform: modbus_controller # 160 Grid Current modbus_controller_id: sunsynk name: "${friendly_name} Grid Current" id: sunsynk_esphome_grid_current register_type: holding address: 160 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement value_type: S_WORD filters: - multiply: 0.01 - platform: modbus_controller # 172 Grid CT Power modbus_controller_id: sunsynk name: "${friendly_name} Grid CT Power" id: sunsynk_esphome_grid_ct_power register_type: holding address: 172 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD ############################################### LOAD ################################################ - platform: modbus_controller # 178 Load Power modbus_controller_id: sunsynk name: "${friendly_name} 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 value_type: S_WORD - platform: modbus_controller # 176 Load L1 Power modbus_controller_id: sunsynk name: "${friendly_name} Load L1 Power" id: sunsynk_esphome_load_l1_power register_type: holding address: 176 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD - platform: modbus_controller # 177 Load L2 Power modbus_controller_id: sunsynk name: "${friendly_name} Load L2 Power" id: sunsynk_esphome_load_l2_power register_type: holding address: 177 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD - platform: modbus_controller # 192 Load Frequency modbus_controller_id: sunsynk name: "${friendly_name} Load Frequency" id: sunsynk_esphome_load_frequency register_type: holding address: 192 unit_of_measurement: "Hz" accuracy_decimals: 2 filters: - multiply: 0.01 value_type: U_WORD state_class: measurement ############################################### SOLAR PV1 ############################################# - platform: modbus_controller # 186 PV1 Power modbus_controller_id: sunsynk name: "${friendly_name} PV1 Power" id: sunsynk_esphome_pv1_power register_type: holding address: 186 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: U_WORD - platform: modbus_controller # 109 PV1 Voltage modbus_controller_id: sunsynk name: "${friendly_name} PV1 Voltage" id: sunsynk_esphome_pv1_voltage register_type: holding address: 109 unit_of_measurement: "V" device_class: voltage state_class: measurement filters: - multiply: 0.1 value_type: U_WORD - platform: modbus_controller # 110 PV1 Current modbus_controller_id: sunsynk name: "${friendly_name} PV1 Current" id: sunsynk_esphome_pv1_current register_type: holding address: 110 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement filters: - multiply: 0.1 value_type: U_WORD ############################################### SOLAR PV2 ############################################# - platform: modbus_controller # 187 PV2 Power modbus_controller_id: sunsynk name: "${friendly_name} PV2 Power" id: sunsynk_esphome_pv2_power register_type: holding address: 187 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: U_WORD - platform: modbus_controller # 111 PV2 Voltage modbus_controller_id: sunsynk name: "${friendly_name} PV2 Voltage" id: sunsynk_esphome_pv2_voltage register_type: holding address: 111 unit_of_measurement: "V" filters: - multiply: 0.1 device_class: voltage state_class: measurement value_type: U_WORD - platform: modbus_controller # 112 PV2 Current modbus_controller_id: sunsynk name: "${friendly_name} PV2 Current" id: sunsynk_esphome_pv2_current register_type: holding address: 112 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement filters: - multiply: 0.1 value_type: U_WORD ############################################### SOLAR TOTAL ########################################### - platform: template # Sum of PV1 and PV2 to get total PV Power name: "${friendly_name} Solar Power" unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement lambda: |- return (id(sunsynk_esphome_pv1_power).state + id(sunsynk_esphome_pv2_power).state); update_interval: 5s ############################################### OUTPUTS ############################################### - platform: modbus_controller # 166 Aux Power modbus_controller_id: sunsynk name: "${friendly_name} AUX Power" id: sunsynk_esphome_aux_power register_type: holding address: 166 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD - platform: template # Essential Power based on register 175 + 167 - 166 name: "${friendly_name} Essential Power" unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement lambda: |- return (id(sunsynk_esphome_inverter_power).state + id(sunsynk_esphome_grid_power_167).state - id(sunsynk_esphome_aux_power).state); update_interval: 5s - platform: template # Essential Power1 based on register 175 + 169 - 166 name: "${friendly_name} Essential Power 1" unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement lambda: |- return (id(sunsynk_esphome_inverter_power).state + id(sunsynk_esphome_grid_power_169).state - id(sunsynk_esphome_aux_power).state); update_interval: 5s - platform: template # Nonessential Power 172 - 167 name: "${friendly_name} Nonessential Power" unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement lambda: |- return (id(sunsynk_esphome_grid_ct_power).state - id(sunsynk_esphome_grid_power_167).state); update_interval: 5s - platform: template # Nonessential Power1 172 - 169 name: "${friendly_name} Nonessential Power 1" unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement lambda: |- return (id(sunsynk_esphome_grid_ct_power).state - id(sunsynk_esphome_grid_power_169).state); update_interval: 5s ############################################### ENERGY ################################################ - platform: modbus_controller # 070 Day Battery Charge modbus_controller_id: sunsynk name: "${friendly_name} Day Battery Charge" id: sunsynk_esphome_day_battery_charge register_type: holding address: 70 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing value_type: U_WORD filters: - multiply: 0.1 - platform: modbus_controller # 071 Day Battery Discharge modbus_controller_id: sunsynk name: "${friendly_name} Day Battery Discharge" id: sunsynk_esphome_day_battery_discharge register_type: holding address: 71 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing value_type: U_WORD filters: - multiply: 0.1 - platform: modbus_controller # 072 Total Battery Charge modbus_controller_id: sunsynk name: "${friendly_name} Total Battery Charge" id: sunsynk_esphome_total_battery_charge register_type: holding address: 72 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters: - multiply: 0.1 - platform: modbus_controller # 074 Total Battery Discharge modbus_controller_id: sunsynk name: "${friendly_name} Total Battery Discharge" id: sunsynk_esphome_total_battery_discharge register_type: holding address: 74 unit_of_measurement: "kWh" accuracy_decimals: 0 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters: - multiply: 0.1 - platform: modbus_controller # 076 Day Grid Import modbus_controller_id: sunsynk name: "${friendly_name} Day Grid Import" id: sunsynk_esphome_day_grid_import register_type: holding address: 76 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing value_type: U_WORD filters: - multiply: 0.1 - platform: modbus_controller # 077 Day Grid Export modbus_controller_id: sunsynk name: "${friendly_name} Day Grid Export" id: sunsynk_esphome_day_grid_export register_type: holding address: 77 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing value_type: U_WORD filters: - multiply: 0.1 - platform: modbus_controller # 078 Total Grid Import modbus_controller_id: sunsynk name: "${friendly_name} Total Grid Import" id: sunsynk_esphome_total_grid_import register_type: holding address: 78 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_WORD filters: - multiply: 0.1 - platform: modbus_controller # 081 Total Grid Export modbus_controller_id: sunsynk name: "${friendly_name} Total Grid Export" id: sunsynk_esphome_total_grid_export register_type: holding address: 81 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_WORD filters: - multiply: 0.1 - platform: modbus_controller # 084 Day Load Energy modbus_controller_id: sunsynk name: "${friendly_name} Day Load Energy" id: sunsynk_esphome_day_load_energy register_type: holding address: 84 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 value_type: U_WORD - platform: modbus_controller # 085 Total Load Energy modbus_controller_id: sunsynk name: "${friendly_name} Total Load Energy" id: sunsynk_esphome_total_load_energy register_type: holding address: 85 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing value_type: U_DWORD_R filters: - multiply: 0.1 - platform: modbus_controller # 096 Total PV Energy modbus_controller_id: sunsynk name: "${friendly_name} Total PV Energy" id: sunsynk_esphome_total_pv_energy register_type: holding address: 96 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 value_type: U_DWORD_R - platform: modbus_controller # 108 Day PV Energy modbus_controller_id: sunsynk name: "${friendly_name} Day PV Energy" id: sunsynk_esphome_day_pv_energy register_type: holding address: 108 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters: - multiply: 0.1 value_type: U_WORD ############################################### TEMPERATURE ################################################ - platform: modbus_controller # 090 DC Transformer Temperature modbus_controller_id: sunsynk name: "${friendly_name} DC Transformer Temperature" id: sunsynk_esphome_dc_transformer_temperature register_type: holding address: 090 unit_of_measurement: "°C" accuracy_decimals: 1 device_class: temperature state_class: measurement value_type: S_WORD filters: - offset: -1000 - multiply: 0.1 - platform: modbus_controller # 091 Radiator Temperature modbus_controller_id: sunsynk name: "${friendly_name} 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 value_type: S_WORD filters: - offset: -1000 - multiply: 0.1 ################################################ READ SETTINGS ############################################# - platform: modbus_controller # 250 System Mode Time 1 modbus_controller_id: sunsynk name: "${friendly_name} System Mode Time1" id: sunsynk_esphome_system_mode_time1 register_type: holding skip_updates: ${settings_skipped_updates} address: 250 icon: "mdi:clock" - platform: modbus_controller # 251 System Mode Time 2 modbus_controller_id: sunsynk name: "${friendly_name} System Mode Time2" id: sunsynk_esphome_system_mode_time2 register_type: holding skip_updates: ${settings_skipped_updates} address: 251 icon: "mdi:clock" - platform: modbus_controller # 252 System Mode Time 3 modbus_controller_id: sunsynk name: "${friendly_name} System Mode Time3" id: sunsynk_esphome_system_mode_time3 register_type: holding skip_updates: ${settings_skipped_updates} address: 252 icon: "mdi:clock" - platform: modbus_controller # 253 System Mode Time 4 modbus_controller_id: sunsynk name: "${friendly_name} System Mode Time4" id: sunsynk_esphome_system_mode_time4 register_type: holding skip_updates: ${settings_skipped_updates} address: 253 icon: "mdi:clock" - platform: modbus_controller # 254 System Mode Time 5 modbus_controller_id: sunsynk name: "${friendly_name} System Mode Time5" id: sunsynk_esphome_system_mode_time5 register_type: holding skip_updates: ${settings_skipped_updates} address: 254 icon: "mdi:clock" - platform: modbus_controller # 255 System Mode Time 6 modbus_controller_id: sunsynk name: "${friendly_name} System Mode Time6" id: sunsynk_esphome_system_mode_time6 register_type: holding skip_updates: ${settings_skipped_updates} address: 255 icon: "mdi:clock" - platform: modbus_controller # 255 Grid Peak Shaving raw register value modbus_controller_id: sunsynk id: grid_peak_shaving_raw register_type: holding address: 280 value_type: U_WORD ################################################ WRITE SETTINGS ############################################ switch: - platform: modbus_controller # 247 Toggle Solar Sell use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} Toggle Solar sell" id: sunsynk_esphome_toggle_solar_sell register_type: holding address: 247 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 248 Toggle System Timer use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} Toggle System Timer" id: sunsynk_esphome_toggle_Time_of_Use register_type: holding address: 248 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 243 Priority Load use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} Toggle Priority Load" id: sunsynk_esphome_toggle_priority_load register_type: holding address: 243 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 274 System Mode Grid Charge Time 1 use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} System Mode Grid Charge Time1" id: sunsynk_esphome_toggle_grid_charge_time1 register_type: holding address: 274 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 275 System Mode Grid Charge Time 2 modbus_controller_id: sunsynk use_write_multiple: true name: "${friendly_name} System Mode Grid Charge Time2" id: sunsynk_esphome_toggle_grid_charge_time2 register_type: holding address: 275 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 276 System Mode Grid Charge Time 3 modbus_controller_id: sunsynk use_write_multiple: true name: "${friendly_name} System Mode Grid Charge Time3" id: sunsynk_esphome_toggle_grid_charge_time3 register_type: holding address: 276 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 277 System Mode Grid Charge Time 4 modbus_controller_id: sunsynk use_write_multiple: true name: "${friendly_name} System Mode Grid Charge Time4" id: sunsynk_esphome_toggle_grid_charge_time4 register_type: holding address: 277 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 278 System Mode Grid Charge Time 5 modbus_controller_id: sunsynk use_write_multiple: true name: "${friendly_name} System Mode Grid Charge Time5" id: sunsynk_esphome_toggle_grid_charge_time5 register_type: holding address: 278 bitmask: 1 icon: "mdi:toggle-switch" - platform: modbus_controller # 279 System Mode Grid Charge Time 6 modbus_controller_id: sunsynk use_write_multiple: true name: "${friendly_name} System Mode Grid Charge Time6" id: sunsynk_esphome_toggle_grid_charge_time6 register_type: holding address: 279 bitmask: 1 icon: "mdi:toggle-switch" number: - platform: modbus_controller # 268 System Mode SoC Time 1 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_soc_time1 name: "${friendly_name} System Mode SoC Time1" unit_of_measurement: "%" address: 268 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 269 System Mode SoC Time 2 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_soc_time2 name: "${friendly_name} System Mode SoC Time2" unit_of_measurement: "%" address: 269 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 270 System Mode SoC Time 3 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_soc_time3 name: "${friendly_name} System Mode SoC Time3" unit_of_measurement: "%" address: 270 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 271 System Mode SoC Time 4 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_soc_time4 name: "${friendly_name} System Mode SoC Time4" unit_of_measurement: "%" address: 271 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 272 System Mode SoC Time 5 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_soc_time5 name: "${friendly_name} System Mode SoC Time5" unit_of_measurement: "%" address: 272 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 273 System Mode SoC Time 6 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_soc_time6 name: "${friendly_name} System Mode SoC Time6" unit_of_measurement: "%" address: 273 min_value: 0 max_value: 100 step: 5 value_type: U_WORD - platform: modbus_controller # 256 System Mode Power Time 1 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_power_time1 name: "${friendly_name} System Mode Power Time1" unit_of_measurement: "W" address: 256 min_value: 0 max_value: 8000 step: 100 value_type: U_WORD - platform: modbus_controller # 257 System Mode Power Time 2 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_power_time2 name: "${friendly_name} System Mode Power Time2" unit_of_measurement: "W" address: 257 min_value: 0 max_value: 8000 step: 100 value_type: U_WORD - platform: modbus_controller # 258 System Mode Power Time 3 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_power_time3 name: "${friendly_name} System Mode Power Time3" unit_of_measurement: "W" address: 258 min_value: 0 max_value: 8000 step: 100 value_type: U_WORD - platform: modbus_controller # 259 System Mode Power Time 4 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_power_time4 name: "${friendly_name} System Mode Power Time4" unit_of_measurement: "W" address: 259 min_value: 0 max_value: 8000 step: 100 value_type: U_WORD - platform: modbus_controller # 260 System Mode Power Time 5 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_power_time5 name: "${friendly_name} System Mode Power Time5" unit_of_measurement: "W" address: 260 min_value: 0 max_value: 8000 step: 100 value_type: U_WORD - platform: modbus_controller # 261 System Mode Power Time 6 use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_set_power_time6 name: "${friendly_name} System Mode Power Time6" unit_of_measurement: "W" address: 261 min_value: 0 max_value: 8000 step: 100 value_type: U_WORD - platform: modbus_controller # 230 Grid Charge Battery current use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_grid_charge_bat_current name: "${friendly_name} Grid Charge Battery current" unit_of_measurement: "A" address: 230 min_value: 0 max_value: 185 step: 5 value_type: U_WORD - platform: modbus_controller # 210 Battery Max Charge current use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_bat_max_charge_current name: "${friendly_name} Battery Max Charge current" unit_of_measurement: "A" address: 210 min_value: 0 max_value: 185 step: 5 value_type: U_WORD - platform: modbus_controller # 211 Battery Max Discharge current use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_bat_max_discharge_current name: "${friendly_name} Battery Max Discharge current" unit_of_measurement: "A" address: 211 min_value: 0 max_value: 185 step: 5 value_type: U_WORD - platform: modbus_controller # 293 Grid Peak Shaving Power use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} Grid Peak shaving power" id: sunsynk_grid_peak_shaving_power address: 293 unit_of_measurement: "W" min_value: 0 max_value: 8000 step: 500 value_type: U_WORD - platform: modbus_controller # 245 Max Sell Power use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} Max Sell power" id: sunsynk_max_sell_power address: 245 unit_of_measurement: "W" min_value: 0 max_value: 8000 step: 500 value_type: U_WORD ################################################ TEXT SENSORS ################################################## text_sensor: - platform: modbus_controller # 059 Overall State modbus_controller_id: sunsynk name: "${friendly_name} Overall State" id: sunsynk_esphome_overall_state register_type: holding skip_updates: ${settings_skipped_updates} raw_encode: HEXBYTES address: 59 lambda: |- uint16_t value = modbus_controller::word_from_hex_str(x, 0); switch (value) { case 0: return std::string("standby"); case 1: return std::string("selftest"); case 2: return std::string("normal"); case 3: return std::string("alarm"); case 4: return std::string("fault"); default: return std::string("unknown"); } - platform: template name: "${friendly_name} Time Slot 1" id: sunsynk_esphome_time_slot_1 icon: "mdi:clock" lambda: |- int minutes, hours; if (id(sunsynk_esphome_system_mode_time1).state) { minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time1).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_system_mode_time1).state) / 100; } else { minutes = 0; hours = 0; } char formatted_time[6]; snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes); return esphome::optional<std::string>(formatted_time); - platform: template name: "${friendly_name} Time Slot 2" id: sunsynk_esphome_time_slot_2 icon: "mdi:clock" lambda: |- int minutes, hours; if (id(sunsynk_esphome_system_mode_time2).state) { minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time2).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_system_mode_time2).state) / 100; } else { minutes = 0; hours = 0; } char formatted_time[6]; snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes); return esphome::optional<std::string>(formatted_time); - platform: template name: "${friendly_name} Time Slot 3" id: sunsynk_esphome_time_slot_3 icon: "mdi:clock" lambda: |- int minutes, hours; if (id(sunsynk_esphome_system_mode_time3).state) { minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time3).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_system_mode_time3).state) / 100; } else { minutes = 0; hours = 0; } char formatted_time[6]; snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes); return esphome::optional<std::string>(formatted_time); - platform: template name: "${friendly_name} Time Slot 4" id: sunsynk_esphome_time_slot_4 icon: "mdi:clock" lambda: |- int minutes, hours; if (id(sunsynk_esphome_system_mode_time4).state) { minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time4).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_system_mode_time4).state) / 100; } else { minutes = 0; hours = 0; } char formatted_time[6]; snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes); return esphome::optional<std::string>(formatted_time); - platform: template name: "${friendly_name} Time Slot 5" id: sunsynk_esphome_time_slot_5 icon: "mdi:clock" lambda: |- int minutes, hours; if (id(sunsynk_esphome_system_mode_time5).state) { minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time5).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_system_mode_time5).state) / 100; } else { minutes = 0; hours = 0; } char formatted_time[6]; snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes); return esphome::optional<std::string>(formatted_time); - platform: template name: "${friendly_name} Time Slot 6" id: sunsynk_esphome_time_slot_6 icon: "mdi:clock" lambda: |- int minutes, hours; if (id(sunsynk_esphome_system_mode_time6).state) { minutes = static_cast<int>(id(sunsynk_esphome_system_mode_time6).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_system_mode_time6).state) / 100; } else { minutes = 0; hours = 0; } char formatted_time[6]; snprintf(formatted_time, sizeof(formatted_time), "%02d:%02d", hours, minutes); return esphome::optional<std::string>(formatted_time); ################################################ SELECT SENSORS ################################################ select: - platform: modbus_controller #243 Select Energy Patern use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_select_energy_pattern name: "${friendly_name} Energy Pattern" address: 243 value_type: U_WORD optionsmap: "Battery first": 0 "Load first": 1 - platform: modbus_controller #244 Select Work Mode use_write_multiple: true modbus_controller_id: sunsynk id: sunsynk_esphome_select_work_mode name: "${friendly_name} Work Mode" address: 244 value_type: U_WORD optionsmap: "Selling First": 0 "Zero Export + Limit to Load Only": 1 "Limited to Home": 2 - platform: modbus_controller #280 Select Grid Peak Shaving use_write_multiple: true modbus_controller_id: sunsynk name: "${friendly_name} Grid Peak Shaving" id: sunsynk_esphome_select_grid_peak_shaving address: 280 value_type: U_WORD optionsmap: "Disabled": 0 "Enabled": 256 lambda: |- // we are only interested in the 8th bit binary 0001 0000 0000 need to map the options 0, 256 in select //ESP_LOGE("main","Modbus Number incoming value = %d",x); //ESP_LOGE("main","Modbus eval value = %d",(x & 0x0100)); if ((x & 0x0100) == 0) return std::string("Disabled"); if ((x & 0x0100) == 256) return std::string("Enabled"); return {}; write_lambda: |- //ESP_LOGE("main","Modbus write gets = %d",value); uint16_t unmodified = id(grid_peak_shaving_raw).state; //ESP_LOGE("main","Modbus write unmodified = %d", unmodified); // optionsmap should only return 2 values... 0 , 256 so bitmask with complement 0x0100 to ensure we keep the original values in register. then appply or with the value that was chosen uint16_t modified = ((unmodified & ~0x0100) | value); //ESP_LOGE("main","Modbus write to write = %d", modified); return modified;
  6. now next... what to deploy onto HA to visualise all of this ? G
  7. splitter has been installed... i can see data on the esp32 logs. the li-bat screen, well it was like this, allot of zero's to start with. and stays like that, with the yellow cable directly into the BMS port of into the splitter. all the other screens where there is battery information mentioned is dynamically updating... G
  8. thanks. you will see above the splitter i made. think i've gotten it correct. will go try later. G
  9. once i have my splitter plugged in, how can i make sure the BMS side, monitoring of the battery is still working ? G
  10. anyone else confirm/validate thinking. 1 RG45 B cabling Male on left side, connecting to 2 female blocks on the right. (dev board and BMS) Block 1 (BMS) will get the blue cables as per RG45B wiring, ping 4 and 5. and the 2nd block will get the 2 Orange cables as per RG45B, dev board onto pin 1 and 2. Can't see how/why to connect the green to the dev block as it's not connect on the dev board side anyhow. ?
  11. ye, will have a look, just curious how/why they show pin 3 used for gnd as it's not cabled to the dev board. thinking about making a splitter... RG45 B wired one side going to two received blocks both also B wired. Was just trying to take that wiring diagram of theirs and over laying it on what we have and does not add up. I'm assuming the BMS is using pins 4 and 5, aka the Blue and Blue/White cables. I like to confirm/understand what Im about to do before doing it... not going to be fun doing it wrong and blowing anything on a friends brand new Sunsynk inverter. G
  12. ok, so O/W goes to dev board: port B and O to port A. and other side of cable is RG45 B crimped. thats 2 cables going into the RG45 block. but when i then look at a splitter setup they ref 3 cables (points 1,2 and 3)... the 3rd (G/W) being the gnd which we have not connected to anything. EDIT, removed brown& Brown/White usage. G
  13. please explain, my RG45 is B.. so which of the 2 Oracle cables goes onto A and B on the dev board. think this was my root cause. As I got it wired as per: attached G
  14. ... looking at the splitter... and the 3 cables... and the presence of the Gnd.. and colours and looking at my connections... Attached is how i got it wired. onto a RG45 B plug. no where do I get to the 3rd pin for ground as per splitter requirement. G
  15. while making splitter... I assume the cable coming from the battery follows RG45 B standard also. So that I can make the RG45 going into the BMS port B based connecting to 2 blocks that B based ? G
  16. ... understand why I'm not getting data atm, as I've removed the esp32 to permanently soldier cables into place and resolve the splitter requirement... but why would all these values be unavailable? (surely they should have populated when it was connected)
  17. know pishop well... making one quickly mean time, have all the required bits. G
  18. ok... with me going into the BMS port now.. and working it at least implies my crimping and wiring is correct... only thing is the battery i had to unplug. would really prefer not to use BMS port... but rather to use the RS485 port.... if I recall I followed the B wiring... if I get my friend to get a splitter cable... will I still be able to use the B cable ? G
  19. See attached... looks like i got data flowing... ok, so now what do I do with the yellow cable that was in the middle port ? G logs_sunsynk_logs.txt
  20. fyi, checking the connections. so long, B wiring i believe. @XianZA my middle port reads BMS485/Can, and is currently used by I'm guessing the battery. If I can temporarily use it to check cabling then sure, but I don't want to change/move anything the installer did. As I read it the left port reads RS485 Meter ?? G
  21. so i remember having a cable with a A plug, and deciding I rather wanted B so I crimped as per B, then I show a how where I connect the doubled up cables onto the dev board. I have a factory made A cable... so might try that, (might be my crimping thats bad). G Attached is where I patched into.top left open RS485 port
  22. ... so eventually got the esp32 at my friends house flashed and on the network, and inside HA... but not getting data... attached is the log and also the yaml file used to esphome flash the esp32. need help. G sunsynk.yaml logs_esphome-web-1d1b00_logs.txt
  23. not from me, will be lots of docs and youtube videos waiting for me to go over also. G
×
×
  • Create New...