December 2, 20223 yr What sunsynk invertor do you have? Card looks good Maybe it just applies to the deye 12kw, I tested all the ports just incase when I did the excercise, only BMS had Comms. Would be really nice to write now that Eskom se push has opened up API.
December 18, 20223 yr Can i suggest a "HALO" for the inverter image based on it's status from register 059 - Run State? 0x0000 - Standby - Blue 0x0001 - Self Test - Yellow 0x0002 - Normal - Green 0x0003 - Alarm - Orange 0x0004 - Fault - Red
December 18, 20223 yr How about a small dot that changes colour Edited December 19, 20223 yr by slipx
December 27, 20223 yr Hi slipx On the "DOT" to indicate the Inverter status - 👍 I have been struggling to get my values for "Essential" and "Non-Essential" to match what i know i am consuming. After looking at the real-time data in MQTT Explorer and looking at other registers, i think i might have found the solution. Essential Load = (175+167) - 166, I also saw that kellerza has this in his HA integration. Non-Essential = 172-167, BUT... i had to change "inverter_load_grid_167" to register 178 for my loads to work. So: Essential Load = (175+178) - 166 Non-Essential = 172-178 I tested this with switching my geyser on/off. I have two CBI Astute Smart Controllers connected to each of my geysers that is on the non-essential side. i might be a few watts off, but it seems to be working. Does this seem correct??? What i found is that during loadshedding, this does not work anymore... Register 178, is then the same value as 175 instead of going to zero. Edited December 27, 20223 yr by Zodiac69
December 27, 20223 yr 4 hours ago, Zodiac69 said: Hi slipx On the "DOT" to indicate the Inverter status - 👍 I have been struggling to get my values for "Essential" and "Non-Essential" to match what i know i am consuming. After looking at the real-time data in MQTT Explorer and looking at other registers, i think i might have found the solution. Essential Load = (175+167) - 166, I also saw that kellerza has this in his HA integration. Non-Essential = 172-167, BUT... i had to change "inverter_load_grid_167" to register 178 for my loads to work. So: Essential Load = (175+178) - 166 Non-Essential = 172-178 I tested this with switching my geyser on/off. I have two CBI Astute Smart Controllers connected to each of my geysers that is on the non-essential side. i might be a few watts off, but it seems to be working. Does this seem correct??? What i found is that during loadshedding, this does not work anymore... Register 178, is then the same value as 175 instead of going to zero. Perhaps start by checking Inverter output power (175) and Grid (172). I also assume you have nothing connected to AUX so 166 will always be 0. Then check 167. Based on those 3 you should be able to work our essential and non-essential. Here is an updated card that displays inverter status as a coloured dot. I've also added a red dot next to grid when load shedding is active custom-sunsynk-configuration.txt and for the full card custom-sunsynk-configuration -full.txt Edited December 27, 20223 yr by slipx
December 28, 20223 yr Hi slipx It seems that register 169 is working for my setup. So: Essential Load = (175+169) - 166 Non-Essential = 172-169
December 29, 20223 yr Interesting so 169 is 167+168. Glad you got it working 167 L1 Grid side L1 power R 1W int Signed int 168 L2 Grid side L2 power R 1W int Signed int 169 L1L2 Total power of grid side L1L2 R 1W int 00 Signed int > 0 BUY < 0 SELL
January 2, 20233 yr I have made some progress in writing settings values to the inverter. There are probably multiple ways to do this. For now, I've done this by creating an API service that can be called from Home Assistant. To start, the service gets defined in the esphome yaml. My example. api: services: - service: update_lowbatt variables: lowbatt_value: int then: - lambda: |- esphome::modbus_controller::ModbusController *controller = id(sunsynk); std::vector<uint16_t> lowbatt_data = {uint16_t((lowbatt_value))}; esphome::modbus_controller::ModbusCommandItem set_lowbatt_command = esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x00DB, 0x0001, lowbatt_data); controller->queue_command(set_lowbatt_command); This service updates the Low Battery % setting (register 219 or 0x00DB). The service is then called from home assistant. service: esphome.sunsynk_update_lowbatt data_template: lowbatt_value: "5" I use this setting to set the minimum SOC of the battery before it starts using grid power. Normally I keep this as something very low (e.g. 5%), unless I need to maintain a higher minimum battery level in anticipation of a loadshedding period. I'm going to write an automation that manages this Low Battery % setting based on load shedding status and upcoming low shedding periods. But that's a job for another day. I'm sure the code for this could be simplified by someone with more skill than me. Edited January 2, 20233 yr by BrettC
January 2, 20233 yr I've also found another approach that works. Instead of defining settings as "sensors", they can instead be defined as numbers (and probably also switches for binary sensors). Using the same code above, the setting's value updates when you change its value in home assistant. Here is the ESPHome yaml code for a number component. Once again I'm sure this can be neatened up. number: # 219 Setting Low Battery % - platform: modbus_controller modbus_controller_id: sunsynk name: "Low Batt Percent Setting" id: sunsynk_setting_low_batt register_type: holding address: 219 lambda: "return x * 1.0; " write_lambda: |- esphome::modbus_controller::ModbusController *controller = id(sunsynk); std::vector<uint16_t> lowbatt_data = {uint16_t((x))}; esphome::modbus_controller::ModbusCommandItem set_lowbatt_command = esphome::modbus_controller::ModbusCommandItem::create_write_multiple_command(controller, 0x00DB, 0x0001, lowbatt_data); controller->queue_command(set_lowbatt_command); return x;
January 6, 20233 yr BrettC you wizard!!!! Thank you for this. If it works as you say, this proves esphome can write back to the invertor, I need to try this! That mixed with the eskomsepush api into HA is a solution to automating this load shedding nonsense so we can avoid getting caught with our pants down if we haven't kept an eye on our batteries. Been manually changing it like a caveman up till now. Wish I could help with the code but not strong on Dev, your the first to get writes to an invertor with esphome that I have seen
January 8, 20233 yr I only made this user to share this 🤣 Thanks all for the inspiration. Exactly as BrettC suggest, I made this in the weekend for my deye I have shared it with some hundreds other danish deye owners and waiting for more feedback. The adresses i use is matching my 12kW 3 phase, low voltage hybrid deye inverter. I seems for me that the modbus adresses does not match your sunsync inverters(deye inverters). github.com/klatremis/esphome-for-deye Edited January 8, 20233 yr by Klatremis
January 8, 20233 yr 2 hours ago, Klatremis said: I only made this user to share this 🤣 Thanks all for the inspiration. Exactly as BrettC suggest, I made this in the weekend for my deye I have shared it with some hundreds other danish deye owners and waiting for more feedback. The adresses i use is matching my 12kW 3 phase, low voltage hybrid deye inverter. I seems for me that the modbus adresses does not match your sunsync inverters(deye inverters). github.com/klatremis/esphome-for-deye This is great. The registers on the 8KW Sunsynk are definitely different. I've managed to toggle system timer, and grid charge per timezone, as well as set the SOC using the config below. 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 # 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
January 9, 20233 yr Hi everyone Are the 12kW 3phase registers the same as the single phase inverters? I doubt it, the the modbus document shared for load power shows for L1 and L2 and total (L1 +L2) Help me if I am wrong or share with me possible registers for the 3 phase inverter please
January 9, 20233 yr 2 minutes ago, FrikkieD said: Hi everyone Are the 12kW 3phase registers the same as the single phase inverters? I doubt it, the the modbus document shared for load power shows for L1 and L2 and total (L1 +L2) Help me if I am wrong or share with me possible registers for the 3 phase inverter please Hi @FrikkieD - they are not the same. L1&L2 is not related to phases, but internal measurement points A good descriptions of registers and other discussions around this can be found here: Compatibility with Sunsynk 12kw 3-phase inverter? · Issue #63 · kellerza/sunsynk (github.com) My addon does not support the 12kW at the moment. Since it's not something I can easily test I'm a bit reluctant to do it.
January 9, 20233 yr 5 hours ago, kellerza said: Hi @FrikkieD - they are not the same. L1&L2 is not related to phases, but internal measurement points A good descriptions of registers and other discussions around this can be found here: Compatibility with Sunsynk 12kw 3-phase inverter? · Issue #63 · kellerza/sunsynk (github.com) My addon does not support the 12kW at the moment. Since it's not something I can easily test I'm a bit reluctant to do it. Thanks, this will help
January 14, 20233 yr @Zodiac69 trying to understand what is different with your setup, you mentioned this worked: Quote Essential Load = (175+169) - 166 Non-Essential = 172-169 while this did not Quote Essential Load = (175+167) - 166, I also saw that kellerza has this in his HA integration. Non-Essential = 172-167, BUT... i had to change "inverter_load_grid_167" Or more specifically, I'm missing where L2 is being measured! Sensor(169, "Grid power", WATT, -1), # L1(167) + L2(168) Sensor(167, "Grid LD power", WATT, -1), # L1 seems to be LD Sensor(168, "Grid L2 power", WATT, -1),
January 15, 20233 yr Hi kellerza Not sure why, but if i used the registers as shown here Sunsynk Mimic, my Non Essential was showing negative values, see message to slipx Wrong Values. I looked at all the inverter "Grid" registers in node red, gauge for each one, and looked at the value during "Normal" operation and Load shedding and register 167 was not matching my system during loadshedding. Using register 169 and now i am no longer getting negative values when the battery charge. Register 169 gave me values that were correct. Battery Charging: Battery Charged:
January 16, 20233 yr just a question regarding all of this. I have solar-assistant setup on a separate raspberry PI with the RS485 adapter. Solar-assistant then speak to HA via MQTT. Do i have to install another RS485 adapter and connect it directly to the RPI running HA? Is there no way to leverage off of the solar-assistant PI and get these dashboards setup?
January 16, 20233 yr Once you have the data in Home Assistant you can use it in any dashboard, it does not matter if it comes from Solar Assistant or any of the other options. In Home Assistant, go to Developer Tools -> States tab and then filter on the Attributes column for 'power' or 'energy' to see what sensors you have available.
January 20, 20233 yr Hi Guys, I have been trying for days now and I am simply not winning. I get this My Setup, Sunsynk 8.8kw. Raspi 4 running Home Assistant, Core, Supervisor. mosquito MQTT installed and running (for other devices as well) Running Sunsynk Inverter Add-on. First of I believe this is the setup I have I am unsure which Driver to use - I get this and if I use currently using this as - USB to RS485 Converter - Micro Robotics Currently My Rasp1 4 has everything on I have this connected to the USB of the Pi4 - USB to RS485 Converter - Micro Robotics And cat5e running from there to the RS485 port ont he invertor, Short patch cable. I have also tried another rs485 module I am lost. Any help would be great.
January 20, 20233 yr 2 minutes ago, Decsus said: Hi Guys, I have been trying for days now and I am simply not winning. I get this My Setup, Sunsynk 8.8kw. Raspi 4 running Home Assistant, Core, Supervisor. mosquito MQTT installed and running (for other devices as well) Running Sunsynk Inverter Add-on. First of I believe this is the setup I have I am unsure which Driver to use - I get this and if I use currently using this as - USB to RS485 Converter - Micro Robotics Currently My Rasp1 4 has everything on I have this connected to the USB of the Pi4 - USB to RS485 Converter - Micro Robotics And cat5e running from there to the RS485 port ont he invertor, Short patch cable. I have also tried another rs485 module I am lost. Any help would be great. If you have a directly connected interface, try having a *blank* PORT and selecting your DEVICE... Also try these kellerza/sunsynk: Sunsynk Inverter Python library and Home Assistant OS Addon (github.com) I find the umodbus driver more reliable. By far the most reliable is the umodbus driver connected to mbusd via TCP, which connects to the usb port
January 20, 20233 yr 7 minutes ago, Decsus said: Hi Guys, I have been trying for days now and I am simply not winning. I get this My Setup, Sunsynk 8.8kw. Raspi 4 running Home Assistant, Core, Supervisor. mosquito MQTT installed and running (for other devices as well) Running Sunsynk Inverter Add-on. First of I believe this is the setup I have I am unsure which Driver to use - I get this and if I use currently using this as - USB to RS485 Converter - Micro Robotics Currently My Rasp1 4 has everything on I have this connected to the USB of the Pi4 - USB to RS485 Converter - Micro Robotics And cat5e running from there to the RS485 port ont he invertor, Short patch cable. I have also tried another rs485 module I am lost. Any help would be great. check on inverter, advanced settings, if the inverter is set to "slave", if so, change to "master"
January 20, 20233 yr Awesome, I will stick to umodbus. My advanced settings are/were correct. Does a wrong serial number (not modbus SN) affect the connection at this stage, if so where do I get the correct one? I have tried all of these, thus also a second USB-rs485 module Can the mbusd also run on the same Raspi, or must i get a second device (pi or similar) to run that? Also what does this mean? 2023-01-20 12:55:37,640 ERROR Read Error: (1,16,2) CRC validation failed. Thanks guys Edited January 20, 20233 yr by Decsus
January 20, 20233 yr Seems this is if the A an B cables are the wrong way around. Due to trying everything 😕
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.