Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jacauc

Members
  • Joined

  • Last visited

Everything posted by jacauc

  1. @Sc00bs the pinout you show looks a bit different. Below is a pinout which more accurately reflects @Gooseza setup https://www.electronicshub.org/esp32-pinout/
  2. Thanks @Sc00bs. I've seen those before but unfortunately it's not very clear to decipher the data types and whether signed/unsigned.
  3. Does anyone have a list of all data types for all registers? The Sunsynk word document leaves a lot for the imagination
  4. If your inverter is far from the living area you could also consider using another esp32 board elsewhere in the house reading values from home assistant or mqtt and adjusting the display accordingly. I've played around with displays with built-in I2C modules and it's dead easy. Make sure you use I2C displays otherwise cabling is way more complex
  5. Not sure if related, but is your inverter set up for Modbus ID #1? Also have a good look at the cabling between the esp and the inverter
  6. No issues whatsoever. Running bleeding edge of HA and ESPHOME.
  7. Which is why I use Dupont connectors 😂
  8. Repo hasn't changed much because it didn't really need changes. All is well with that code. We're focusing right now on moving the functionality out of node red and raspberry Pi to be able to poll it with a much more lightweight ESP32 on the Esphome platform for situations where the HA instance is not close to the inverter
  9. Alternatively, install the HACS Addon by swartjean and it's all done for you
  10. found a better way to skip updates for settings instead of creating another modbus component. Updating github now and adding substitutions at the very top of the document
  11. I would imagine it's possible using the write_lambda function https://esphome.io/components/output/modbus_controller.html Worthwhile to look at the node red flows @Bloubul7made for writing values to see how he did it and adapt it to lambda format. Let me know if you figure something out with this, I'll try it sometime, but have a busy few weeks ahead
  12. I just tried this and seems to be easy enough. I uploaded the code to github
  13. Yeah thought about that too, but I don't really know how to query it less frequently with esphome. Also... Does it really matter? I suppose we can make another modbus sensor with a less frequent scan rate, no idea if that would work though. I commented out the PV values because I don't have PV. (which is also why I have not tried writing values) If you want to add any more values to query, please feel free to add them into the code on GitHub with a pull request. Maybe we can somehow have a variable that can be set in the top of the script so that the irrelevant values are automatically ignored?
  14. Instead of posting my esphome configs here, I'm uploading them to github (partly just for keeping for my own backup) Recently added all the setting values https://github.com/jacauc/SunsynkEsphome
  15. I doubt. If it worked before with Raspberry there's no reason it won't work with ESP. The modbus protocol is pretty simple,so can't see why it won't work that way. I would suggest trying not bridging the middle two pins on that modbus converter @sjlouw used and trying each of them independently. I actually used my raspberry pi rs485 HAT and wired it into the ESP32
  16. Oh forgot to mention - For those who did not know, ESP recently released a loadshedding API which can be used by personal users and integrated directly into HA. Just need to request an API key from them. Been using it for a week. Works very well
  17. Random question - Has anyone noticed that their inverter battery never charges to 100%. It seems like 99% is the highest it goes and I'm wondering if that is wasting power constantly trickling it to "try" and reach 100%. Is it possibly just a setting on the inverter that I can change to make it satisfied with the 99%?
  18. Not sure where to look. Is this it?
  19. @sjlouw Thank you for the esphome code! I have modified it somewhat and below is my current code if anyone is interested: esphome: name: "sunsynk" esp32: board: esp32dev framework: type: arduino #################################### STATIC SECTION #################################### wifi: ssid: !secret wifi_ssid password: !secret wifi_password fast_connect: true ap: ssid: '${device_name}' password: !secret fallback_password ota: safe_mode: true reboot_timeout: 10min num_attempts: 5 #web_server: # port: 80 # auth: # username: !secret esphome_web_username # password: !secret esphome_web_password #switch: # - platform: restart # name: "${device_name} Restart" captive_portal: esp32_ble_tracker: scan_parameters: active: true bluetooth_proxy: active: true # Enable logging logger: # Enable Home Assistant API api: password: !secret esphome_api_password # Enable time component to reset energy at midnight # 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: 5000ms sensor: - 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; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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: |- # x = x / 1; # float MAX_VALUE = 32767; # if (x > MAX_VALUE) return (0 - 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; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 65535) /1; else return (x) /1; # - platform: modbus_controller # 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 # 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: 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 65535) /1; else return (x) /1; - 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 65535) /10; else return (x) /10; - 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 accuracy_decimals: 0 - platform: modbus_controller # 059 Overall State modbus_controller_id: sunsynk_esphome name: "SS Overall State" id: sunsynk_esphome_overall_state register_type: holding address: 59 - 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 65535) /1; else return (x) /1; device_class: power state_class: measurement - 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return ((x - 65535)-1000) / 10; else return ((x)-1000) / 10; # - platform: modbus_controller # modbus_controller_id: sunsynk_esphome # name: "SS Environment Temp" # id: sunsynk_esphome_environment_temperature # register_type: holding # address: 095 # unit_of_measurement: "°C" # accuracy_decimals: 0 # device_class: temperature # state_class: measurement # filters: # - multiply: 0.1 - 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) 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: |- x = x / 1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - 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: |- x = x /1; float MAX_VALUE = 32767; if (x > MAX_VALUE) return (0 - x + 65535) /-1; else return (0 - x) /-1;
  20. I just check to see if grid frequency is < 48
  21. Could anyone running this RS485 hat on a PI zero send me the contents of your /boot/config.txt file please? I redid my setup and now cannot get it to work anymore
  22. Oh I understand. This is for installations where the RS485 USB is connected to the HA server as opposed to a separate raspberry sending the data to mqtt right?
  23. Wow cool! Anything I should undo or disable in HA before installing the addon? Of course we did everything manually up till now

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.