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.

Muttley

Members
  • Joined

  • Last visited

Everything posted by Muttley

  1. I'm sure @Sc00bs will come visit if you offer him enough beers 🤪
  2. All from this Forum, running in Home Assistant - see here and vids from @Sc00bs and then:
  3. Thanks @Sc00bs There's no leaks... certain members bath in the evening, every evening... It's a real battle I tell you 🤣
  4. Basically the whole house (minus the oven, electric stove and outside fridges (soon to be added to non essential side) are on the inverter - really have to be careful when the inverter goes into islanding mode during load shedding as I've overloaded it a few times. I've spent a bit of well spent $$ of Tuya smart plugs to get insight into what devices are drawing and made an effort to turn these off during the evenings (Jojo tank pump etc). Also realised that the outside fridges mentioned above are using 3kWh per day with a smart plus educating the fam about turning lights off... it's a challenge but I'm enjoying it!
  5. Thanks for the message and question. Certain family members insist of having a hot shower at 06:00 so the 1 geyser which a 4Kw element switches on from 04:00 - 06:00... Regarding the shading - there's none, though our poor palm tree had a proper haircut when the initial 10 panels went up but it's growing back quite quickly - will need to trim it again for winter.
  6. Just an update on our production: System commissioned on 04/10/23 - the few bad days of weather in Gauteng were brutal and messed my graphs 🫠 (Past 31 days) Monthly production: All geysers have also been moved onto essential side Found that our outdoor fridge and freezers (on another phase) are making Eskom $$ so these are also going to be moved onto the non essential side - should save an additional 3kWh per day. Still super super chuffed with how things are working!
  7. Thanks - found that setting panel_mode to false and setting card_height: 480px makes them all line up nicely. Once again, I really appreciate your work on this and willingness to help out with my ridiculous requests
  8. Thanks so much - it looks awesome Is there any way that I can get all the cards to be similarly sized (all are currently set to default size)
  9. Hey, Thanks - I've removed the card height adjustment and left it as is (default). What I have found is that depending on the screen used, the vertical scaling seems to be changing inconsistently: 15" laptop below: I can send you screen grabs of this from a 24" & 27" monitor later if that helps.....
  10. Thanks so much for this! Just struggling with the size of the icons on the far right: (seems like the scaling is off/layout setting is wrong or I'm doing something wrong) Card_height set to 480 to match your other horseshoe cards Autoscale is set to false Here's what my whole screen on PC looks like: View type: Horizontal (layout card) Also, what does the green circle under the inverter represent? Thanks once again!
  11. Thanks so much... would be awesome!
  12. Hi @slipx Would it be possible to add more than 2 essential loads? Currently on the essential side we have 4 big loads which I'd love to visualise: Pool pump Main Geyser Second Geyser Kitchen Geyser I'd really like to add this to flow card and I've tried changing the additional loads to 4 and adding in the required names, icons, entities (essential load 1, 2 etc) but no luck.
  13. Unfortunately, we're big consumers... 4 Adults, 1 baby, 3 geysers, dishwasher, Jojo pump, pool pump, too much networking equipment plus lots of cups of coffee during the day Trying to reduce evening load - worked out last night that I'm going to bypass the Jojo pump from 18:00 - 08:00 which should help.
  14. Thanks so much... super super chuffed with the performance!
  15. Did 42.5kWh today - forecast was 47.7 - I think that if our load was higher today, we would've hit 47....
  16. Here's my Solcast forecast for the next few days: From the legend @slipx
  17. The past few days have been all over the place.. Typical day: Using up all the electricity day: Today: At least there was some sunshine today to charge up batteries and take the load of some of the geysers. Tomorrow and Wednesday are looking great!
  18. So far they've been flawless.... have 2 more of these units in my wishlist
  19. Didn't think to look in the owners manual. Here's the details if anyone else needs them:
  20. Hi guys, Does anyone have any info regarding the status LED's on the Greenrich WM5000? I.E: What is the SOC when LED's are blue/yellow/green etc I've left a message with Elleyhill Power to try find out and can't find anything on the internet... Many thanks
  21. Thanks for reminding me, Mike Cronje of The Cottage Project designed, fabricated and installed the structure. His details are: +27 61 002 7678 / [email protected]
  22. Hi guys, After initially sourcing our own components and getting a "sparky" who claimed to have many years of experience and certifications ("PV4 AREP") in solar, we started down this rabbit hole with: 1 x 8kW Sunsynk Inverter 10 x 460W JA Mono Solar Panels (installed onto our north facing tiled roof) 2 x WM5000 (4.95kWh; 1.5C) Greenrich batteries All worked ok but soon we realised that we needed more PV and more batteries and after doing research about our existing install, I started to question the initial installer about his work. Some issues that I picked up were: According to him, you can put AC and DC cables in the same trunking, as long as the AC cable is surfix, it's shielded so it's ok 🤔 No indicator lights in the AC combiner box needed as there are indicator lights on the inverter At this point we'd already had a north facing galvanised frame designed & installed next to our existing array and purchased an additional 10 x 460W JA Mono Solar Panels and 1 x additional Greenrich WM5000. We did a self install of the panels which was fun (despite the Mrs complaining about all the time on the roof) and mounted the battery. Once the panels were installed, I decided that it was time get hold of the legendary @Steve87 who not only gave me guidance in terms of my self install (earthing, frame spacing etc) but also came past to inspect and quote to fix the existing install & commission the new bits of kit. Amongst some of the issues he found were: The items listed above 6mm wire used instead of 10 on the AC side (DB to inverter) Different battery cable lengths and super dodgy cable used Max charge rate of batteries set to 40A Steve feel free to add more issues found here 🤣: ______________________________________ ______________________________________ The system looks like this at the moment: 1 x 8kW Sunsynk Inverter 20 x 460W JA Mono Solar Panels (5s2p Mppt 1 and 5s2p Mppt 2 total 9200 watts 21.84A/Mppt) with 30A fuses 3 x WM5000 (4.95kWh; 1.5C) Greenrich batteries After a perfect day in JHB, it's evident that we have gone overboard on the PV, so wondering if I should start solar pooling with my neighbours or installing more geysers 😝 Next (and hopefully the last) phase is more battery storage... convincing the Mrs could take some time but I'm onto it! Safety of the whole system has always been my most important requirement and knowing that Steve has fixed, commissioned and optimised the system has put my mind at ease - I cannot thank you enough! And finally time for some pics:
  23. May be a silly suggestion but I recall when I tried to get this to work, I mixed up the pairs on the ethernet cable (Type B Config) going to the RS485 to TTL converter - switched these over and the same modbus error disappeared and it started working. I removed the R7 resistor and doubled up the ethernet pairs as seen below. Here's a pic of a ESP32 Dev board that I made for a colleague - powered using a cellphone charger into the micro USB port If I recall correctly, the brown jumper is power 5V from the ESP32 and the white jumper is ground (ran out of red and black jumpers). Used a wago type connector to bridge the DE & RE pins on the RS485 converter. And here's my code courtesy of @slipx esphome: name: sunsynk substitutions: settings_skipped_updates: "30" esp32: board: esp32dev framework: type: arduino # Enable logging logger: baud_rate: 0 # Enable Home Assistant API api: encryption: key: ota: password: wifi: ssid: !secret wifi_ssid password: !secret wifi_password power_save_mode: none fast_connect: true manual_ip: static_ip: 192.168.0.135 gateway: 192.168.1.1 subnet: 255.255.255.0 # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Sunsynk Fallback Hotspot" password: "W88biQV6RGjF" 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: "Grid Connected Status" id: grid_connected_status register_type: holding address: 194 ############################################### SENSORS ############################################### sensor: - platform: modbus_controller # 013 Firmware Control Board modbus_controller_id: sunsynk name: "Firmware Control Board" id: sunsynk_esphome_firmware_control_board register_type: holding skip_updates: ${settings_skipped_updates} address: 13 - platform: modbus_controller # 014 Firmware Comms Board modbus_controller_id: sunsynk name: "Firmware Comms Board" id: sunsynk_esphome_firmware_comms_board register_type: holding skip_updates: ${settings_skipped_updates} address: 14 - platform: modbus_controller # 070 Battery Charge Day modbus_controller_id: sunsynk name: "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 name: "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 # 072 Battery Charge Energy Total modbus_controller_id: sunsynk name: "Total Battery Charge (kWh)" id: total_battery_charge_kwh 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 Battery Discharge Energy Total modbus_controller_id: sunsynk name: "Total Battery Discharge (kWh)" id: total_battery_discharge_kwh 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 Grid Import Day (Buy) modbus_controller_id: sunsynk name: "Grid Import Day (Buy)" id: sunsynk_esphome_grid_import_day register_type: holding address: 76 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters: # GOOD - lambda: |- if (x > 32767) return (x - 65535) / 10; else return x /10; - platform: modbus_controller # 078 Grid Import Energy Total (Buy) modbus_controller_id: sunsynk name: "Total Grid Import (kWh)" id: total_grid_import_kwh register_type: holding address: 78 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller # 079 Grid Frequency modbus_controller_id: sunsynk name: "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 # 081 Grid Export Energy Total (Sell) modbus_controller_id: sunsynk name: "Total Grid Export (kWh)" id: total_grid_export_kwh 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 # 084 Daily Load modbus_controller_id: sunsynk name: "Daily Load Power (kWh)" id: daily_load_power_kwh register_type: holding address: 84 unit_of_measurement: "kWh" accuracy_decimals: 2 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller # 085 Total Load modbus_controller_id: sunsynk name: "Total Load Power (kWh)" id: total_load_power_kwh 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 # 090 DC Transformer Temperature modbus_controller_id: sunsynk 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 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 # 096 PV Energy Total modbus_controller_id: sunsynk name: "Total PV Power (kWh)" id: 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 # 108 Day PV Power modbus_controller_id: sunsynk name: "Daily PV Power (kWh)" id: daily_pv_power_kwh register_type: holding address: 108 unit_of_measurement: "kWh" accuracy_decimals: 1 device_class: energy state_class: total_increasing filters: - multiply: 0.1 - platform: modbus_controller # 109 DC1 Voltage modbus_controller_id: sunsynk name: "DC1 Voltage" id: sunsynk_esphome_dc1_voltage register_type: holding address: 109 unit_of_measurement: "V" device_class: voltage state_class: measurement filters: - multiply: 0.1 - platform: modbus_controller # 111 DC2 Voltage modbus_controller_id: sunsynk name: "DC2 Voltage" id: sunsynk_esphome_dc2_voltage register_type: holding address: 111 unit_of_measurement: "V" filters: - multiply: 0.1 device_class: voltage state_class: measurement - platform: modbus_controller # 110 DC1 Output Current modbus_controller_id: sunsynk name: "DC1 Current" id: sunsynk_esphome_dc1_current register_type: holding address: 110 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement filters: - multiply: 0.1 - platform: modbus_controller # 112 DC2 Output Current modbus_controller_id: sunsynk name: "DC2 Current" id: sunsynk_esphome_dc2_current register_type: holding address: 112 unit_of_measurement: "A" accuracy_decimals: 1 device_class: current state_class: measurement filters: - multiply: 0.1 - platform: modbus_controller # 154 Grid Inverter Voltage modbus_controller_id: sunsynk name: "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 # 164 Inverter Output Current modbus_controller_id: sunsynk name: "Inverter Output Current" id: sunsynk_esphome_inverter_output_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 # 166 Aux Output Power modbus_controller_id: sunsynk name: "Aux Output Power" id: sunsynk_esphome_aux_output_power register_type: holding address: 166 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 # 169 (167+168) Grid Power modbus_controller_id: sunsynk name: "Grid Power" id: grid_power register_type: holding address: 169 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement #value_type: S_WORD filters: #GOOD - lambda: |- float MIN_VALUE = -10000.0; float MAX_VALUE = 10000.0; if (MIN_VALUE <= x && x <= MAX_VALUE) return x; else return {}; - platform: modbus_controller # 172 Grid External Power modbus_controller_id: sunsynk name: "Grid External Power" id: grid_external_power register_type: holding address: 172 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement #value_type: S_WORD filters: #GOOD - lambda: |- float MIN_VALUE = -10000.0; float MAX_VALUE = 10000.0; if (MIN_VALUE <= x && x <= MAX_VALUE) return x; else return {}; - platform: modbus_controller # 175 Inverter Output Power modbus_controller_id: sunsynk name: "Inverter Output Power" id: sunsynk_esphome_inverter_output_power register_type: holding address: 175 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power value_type: S_WORD filters: #GOOD - lambda: |- if (x > 32767) return (0 - x + 65535) /-1; else return (0 - x) /-1; - platform: modbus_controller # 176 Load Power modbus_controller_id: sunsynk name: "Load Power 176" id: ss_load_power_176 register_type: holding address: 176 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD filters: #GOOD - lambda: |- if (x > 32767) return (x - 65536) /1; else return (x) /1; - platform: modbus_controller # 177 Load Power modbus_controller_id: sunsynk name: "Load Power 177" id: ss_load_power_177 register_type: holding address: 177 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD filters: #GOOD - lambda: |- if (x > 32767) return (x - 65536) /1; else return (x) /1; - platform: modbus_controller # 178 Load Power modbus_controller_id: sunsynk name: "Load Power" id: load_power register_type: holding address: 178 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement value_type: S_WORD filters: #GOOD - lambda: |- if (x > 32767) return (x - 65536) /1; else return (x) /1; - platform: modbus_controller # 182 Battery Temperature modbus_controller_id: sunsynk 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 # 183 Battery Voltage modbus_controller_id: sunsynk name: "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 # 184 Battery SOC modbus_controller_id: sunsynk name: "Battery SOC" id: battery_soc register_type: holding address: 184 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /1; else return (x) /1; - platform: modbus_controller # 186 PV1 Power modbus_controller_id: sunsynk name: "PV1 Power" id: pv1_power register_type: holding address: 186 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement - platform: modbus_controller # 187 PV2 Power modbus_controller_id: sunsynk name: "PV2 Power" id: pv2_power register_type: holding address: 187 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement - platform: template # Sum of PV1 and PV2 to get total PV Power name: "SS Total Solar" unit_of_measurement: "W" accuracy_decimals: 0 device_class: power state_class: measurement lambda: |- return (id(pv1_power).state + id(pv2_power).state); update_interval: 5s - platform: modbus_controller # 190 Battery Output Power modbus_controller_id: sunsynk name: "Battery Output Power" id: sunsynk_esphome_battery_output_power register_type: holding address: 190 unit_of_measurement: "W" accuracy_decimals: 0 device_class: power value_type: S_WORD filters: #GOOD - lambda: |- if (x > 32767) return (x - 65536) /1; else return (x) /1; - platform: modbus_controller # 191 Battery Output Current modbus_controller_id: sunsynk name: "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 value_type: S_WORD filters: #GOOD - lambda: |- if (x > 32767) return (x - 65536) / 100; else return x / 100; - platform: modbus_controller # 192 Load Frequency modbus_controller_id: sunsynk name: "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 # 216 Battery Charging Efficiency modbus_controller_id: sunsynk name: "Battery Charging Efficiency" id: battery_charging_efficiency register_type: holding address: 216 unit_of_measurement: "%" accuracy_decimals: 1 device_class: battery filters: #GOOD - lambda: |- if (x > 32767) return (x - 65535) /10; else return (x) /10; - platform: modbus_controller # 217 Battery Capacity Shutdown modbus_controller_id: sunsynk name: "Battery Capacity Shutdown" id: sunsynk_battery_capacity_shutdown register_type: holding address: 217 unit_of_measurement: "%" accuracy_decimals: 0 device_class: battery ################################################ READ SETTINGS ################################################ - platform: modbus_controller # 250 Settings Timezone1 modbus_controller_id: sunsynk name: "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; icon: "mdi:clock" - platform: modbus_controller # 251 Settings Timezone2 modbus_controller_id: sunsynk name: "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; icon: "mdi:clock" - platform: modbus_controller # 252 Settings Timezone3 modbus_controller_id: sunsynk name: "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; icon: "mdi:clock" - platform: modbus_controller # 253 Settings Timezone4 modbus_controller_id: sunsynk name: "Setting Timezone4" id: sunsynk_esphome_setting_timezone4 register_type: holding skip_updates: ${settings_skipped_updates} address: 253 icon: "mdi:clock" - platform: modbus_controller # 254 Settings Timezone5 modbus_controller_id: sunsynk name: "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; icon: "mdi:clock" - platform: modbus_controller # 255 Settings Timezone6 modbus_controller_id: sunsynk name: "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; icon: "mdi:clock" - platform: modbus_controller # 268 Settings SoC Timezone1 modbus_controller_id: sunsynk name: "Setting SoC Timezone1" id: sunsynk_esphome_setting_soc_timezone1 register_type: holding skip_updates: ${settings_skipped_updates} address: 268 value_type: U_WORD - platform: modbus_controller # 269 Settings SoC Timezone2 modbus_controller_id: sunsynk name: "Setting SoC Timezone2" id: sunsynk_esphome_setting_soc_timezone2 register_type: holding skip_updates: ${settings_skipped_updates} address: 269 value_type: U_WORD - platform: modbus_controller # 270 Settings SoC Timezone3 modbus_controller_id: sunsynk name: "Setting SoC Timezone3" id: sunsynk_esphome_setting_soc_timezone3 register_type: holding skip_updates: ${settings_skipped_updates} address: 270 value_type: U_WORD - platform: modbus_controller # 271 Settings SoC Timezone4 modbus_controller_id: sunsynk name: "Setting SoC Timezone4" id: sunsynk_esphome_setting_soc_timezone4 register_type: holding skip_updates: ${settings_skipped_updates} address: 271 value_type: U_WORD - platform: modbus_controller # 272 Settings SoC Timezone5 modbus_controller_id: sunsynk name: "Setting SoC Timezone5" id: sunsynk_esphome_setting_soc_timezone5 register_type: holding skip_updates: ${settings_skipped_updates} address: 272 value_type: U_WORD - platform: modbus_controller # 273 Settings SoC Timezone6 modbus_controller_id: sunsynk name: "Setting SoC Timezone6" id: sunsynk_esphome_setting_soc_timezone6 register_type: holding skip_updates: ${settings_skipped_updates} address: 273 value_type: U_WORD - platform: modbus_controller # 274 Settings Grid Charge Timezone1 modbus_controller_id: sunsynk name: "Setting Grid Charge Timezone1" id: sunsynk_esphome_setting_grid_charge_timezone1 register_type: holding skip_updates: ${settings_skipped_updates} address: 274 - platform: modbus_controller # 275 Settings Grid Charge Timezone2 modbus_controller_id: sunsynk name: "Setting Grid Charge Timezone2" id: sunsynk_esphome_setting_grid_charge_timezone2 register_type: holding skip_updates: ${settings_skipped_updates} address: 275 - platform: modbus_controller # 276 Settings Grid Charge Timezone3 modbus_controller_id: sunsynk name: "Setting Grid Charge Timezone3" id: sunsynk_esphome_setting_grid_charge_timezone3 register_type: holding skip_updates: ${settings_skipped_updates} address: 276 - platform: modbus_controller # 277 Settings Grid Charge Timezone4 modbus_controller_id: sunsynk name: "Setting Grid Charge Timezone4" id: sunsynk_esphome_setting_grid_charge_timezone4 register_type: holding skip_updates: ${settings_skipped_updates} address: 277 - platform: modbus_controller # 278 Settings Grid Charge Timezone5 modbus_controller_id: sunsynk name: "Setting Grid Charge Timezone5" id: sunsynk_esphome_setting_grid_charge_timezone5 register_type: holding skip_updates: ${settings_skipped_updates} address: 278 - platform: modbus_controller # 279 Settings Grid Charge Timezone6 modbus_controller_id: sunsynk name: "Setting Grid Charge Timezone6" id: sunsynk_esphome_setting_grid_charge_timezone6 register_type: holding skip_updates: ${settings_skipped_updates} address: 279 ################################################ WRITE SETTINGS ################################################ switch: - platform: modbus_controller # 248 Toggle System Timer use_write_multiple: true modbus_controller_id: sunsynk 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 # 243 Priority Load use_write_multiple: true modbus_controller_id: sunsynk name: "Toggle Priority Load" id: sunsynk_esphome_toggle_priority_load register_type: holding address: 243 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 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 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 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 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 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 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 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 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 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 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 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 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 ################################################ TEMPLATE SENSORS ################################################ text_sensor: - platform: modbus_controller # 059 Overall State modbus_controller_id: sunsynk name: "Overall State" id: sunsynk_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: "Sunsynk Time Slot 1" id: sunsynk_time_slot_1 lambda: |- int minutes, hours; if (id(sunsynk_esphome_setting_timezone1).state) { minutes = static_cast<int>(id(sunsynk_esphome_setting_timezone1).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_setting_timezone1).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: "Sunsynk Time Slot 2" id: sunsynk_time_slot_2 lambda: |- int minutes, hours; if (id(sunsynk_esphome_setting_timezone2).state) { minutes = static_cast<int>(id(sunsynk_esphome_setting_timezone2).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_setting_timezone2).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: "Sunsynk Time Slot 3" id: sunsynk_time_slot_3 lambda: |- int minutes, hours; if (id(sunsynk_esphome_setting_timezone3).state) { minutes = static_cast<int>(id(sunsynk_esphome_setting_timezone3).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_setting_timezone3).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: "Sunsynk Time Slot 4" id: sunsynk_time_slot_4 lambda: |- int minutes, hours; if (id(sunsynk_esphome_setting_timezone4).state) { minutes = static_cast<int>(id(sunsynk_esphome_setting_timezone4).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_setting_timezone4).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: "Sunsynk Time Slot 5" id: sunsynk_time_slot_5 lambda: |- int minutes, hours; if (id(sunsynk_esphome_setting_timezone5).state) { minutes = static_cast<int>(id(sunsynk_esphome_setting_timezone5).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_setting_timezone5).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: "Sunsynk Time Slot 6" id: sunsynk_time_slot_6 lambda: |- int minutes, hours; if (id(sunsynk_esphome_setting_timezone6).state) { minutes = static_cast<int>(id(sunsynk_esphome_setting_timezone6).state) % 100; hours = static_cast<int>(id(sunsynk_esphome_setting_timezone6).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: "Sunsynk Battery Capacity" lambda: |- if (!id(grid_connected_status).state) { float value = id(sunsynk_battery_capacity_shutdown).state; char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else { // Get the current date and time time_t now = id(homeassistant_time).now().timestamp; tm* currentTime = localtime(&now); std::string timeSlot1 = id(sunsynk_time_slot_1).state; std::string timeSlot2 = id(sunsynk_time_slot_2).state; std::string timeSlot3 = id(sunsynk_time_slot_3).state; std::string timeSlot4 = id(sunsynk_time_slot_4).state; std::string timeSlot5 = id(sunsynk_time_slot_5).state; std::string timeSlot6 = id(sunsynk_time_slot_6).state; int hour, minute; // Convert timeSlot1 to sellTime1Epoch sscanf(timeSlot1.c_str(), "%d:%d", &hour, &minute); currentTime->tm_hour = hour; currentTime->tm_min = minute; currentTime->tm_sec = 0; time_t sellTime1Epoch = mktime(currentTime); // ESP_LOGD("DEBUG", "sellTime1Epoch: %ld, now: %ld", sellTime1Epoch, now); // Convert timeSlot2 to sellTime2Epoch sscanf(timeSlot2.c_str(), "%d:%d", &hour, &minute); currentTime->tm_hour = hour; currentTime->tm_min = minute; currentTime->tm_sec = 0; time_t sellTime2Epoch = mktime(currentTime); // ESP_LOGD("DEBUG", "sellTime2Epoch: %ld, now: %ld", sellTime2Epoch, now); // Convert timeSlot3 to sellTime3Epoch sscanf(timeSlot3.c_str(), "%d:%d", &hour, &minute); currentTime->tm_hour = hour; currentTime->tm_min = minute; currentTime->tm_sec = 0; time_t sellTime3Epoch = mktime(currentTime); // Convert timeSlot4 to sellTime4Epoch sscanf(timeSlot4.c_str(), "%d:%d", &hour, &minute); currentTime->tm_hour = hour; currentTime->tm_min = minute; currentTime->tm_sec = 0; time_t sellTime4Epoch = mktime(currentTime); // Convert timeSlot5 to sellTime5Epoch sscanf(timeSlot5.c_str(), "%d:%d", &hour, &minute); currentTime->tm_hour = hour; currentTime->tm_min = minute; currentTime->tm_sec = 0; time_t sellTime5Epoch = mktime(currentTime); // Convert timeSlot6 to sellTime6Epoch sscanf(timeSlot6.c_str(), "%d:%d", &hour, &minute); currentTime->tm_hour = hour; currentTime->tm_min = minute; currentTime->tm_sec = 0; time_t sellTime6Epoch = mktime(currentTime); if (now >= sellTime1Epoch && now < sellTime2Epoch) { float value = static_cast<float>(id(sunsynk_esphome_set_soc_timezone1).state); char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else if (now >= sellTime2Epoch && now < sellTime3Epoch) { float value = static_cast<float>(id(sunsynk_esphome_set_soc_timezone2).state); char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else if (now >= sellTime3Epoch && now < sellTime4Epoch) { float value = static_cast<float>(id(sunsynk_esphome_set_soc_timezone3).state); char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else if (now >= sellTime4Epoch && now < sellTime5Epoch) { float value = static_cast<float>(id(sunsynk_esphome_set_soc_timezone4).state); char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else if (now >= sellTime5Epoch && now < sellTime6Epoch) { float value = static_cast<float>(id(sunsynk_esphome_set_soc_timezone5).state); char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else if (now >= sellTime6Epoch && now < sellTime1Epoch) { float value = static_cast<float>(id(sunsynk_esphome_set_soc_timezone6).state); char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } else { float value = id(sunsynk_battery_capacity_shutdown).state; char buffer[10]; dtostrf(value, 6, 0, buffer); return std::string(buffer); } }
  24. I have thoroughly enjoyed reading this thread! What an installation @Steve87 - super impressed!

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.