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.

My Sunsynk 8Kw & data collection setup

Featured Replies

11 minutes ago, Sc00bs said:

We just need to get all the inverter integration authors to standardise the naming of the entities, would make life so much easier.

It would make life easier!

One easy change I can think of would be to change _power_kwh, to _energy. I also made this mistake in one of the erlier editions of the addon and since updated & deprecated the old names

https://github.com/kellerza/sunsynk/blob/main/sunsynk/definitions.py#L318

It is a bit painful, since you lose your Energy stats 

  • Replies 657
  • Views 178k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • If you want to try this card in home assistant follow these steps. 1. Create a new directory under www/community/ and name it sunsynk-card. If you don't have HACS installed you can create directo

  • Hi all. Here is my version to get Sunsynk 8.8 Modbus metrics in Home Assistant: Required Hardware: ESP32 Development Board @R149.95 https://www.diyelectronics.co.za/store/espressif-iot/1495-

  • Thought I would also contribute with something small. Not as impressive as what some of the others here but a contribution nonetheless. The GUI for Sunsynk System Mode, or lack thereof, has reall

Posted Images

43 minutes ago, kellerza said:

It is a bit painful, since you lose your Energy stats 

Technically you could just rename those in the statistics table, it is still on my todo list

 

1 hour ago, kellerza said:

One easy change I can think of would be to change _power_kwh, to _energy

My 2c towards some standard names

 

It is well documented how to setup your entities here

https://developers.home-assistant.io/docs/core/entity/sensor/#properties

power = kW

energy = kWh  (rieman sum over the time period for the amount of power... a summary of the data)

since all energy is a calculation I tend to name them without energy as it is implied

Summary_Day_PV

Summary_Day_Load

Summary_Month_PV

Summary_Total_PV

But for power

PV1_Power

PV1_Voltage

PV2_Power

PV2_Current

PV_Power

Load_Power

Load_Frequency

 

16 hours ago, JDSym said:

I agree with you.

Something I also changed in my own integration was to change all measurements with a kWh unit to include the word "energy" instead of "power".

 

For example, instead of naming the entity "Day_GridSell_Power Wh" as in the official documents, or "grid_export_day" as in some integrations, I named it grid_energy_export_day which I think makes a lot more sense. 

 

 

agree, I'm using solar assistant and it's such a mission with all of the different entity names to setup cards and dashboards. 

On 2022/11/01 at 12:08 AM, slipx said:

Hey,
Would you mind sharing your card codes?

(I've added all the required HACS cards as per your Github).

Also, which sensors are you using for the battery config in the HA Energy Dashboard?

-Energy into battery

-Energy out battery

image.thumb.png.8ce353c31cf797075b2fb9c037a7ab0c.png

 

 

27 minutes ago, McAllstar said:

sorry any idea why I'm getting this? 

I can't figure out which sensor to use for the grid. 

image.thumb.png.ce919f2a64baa4c105888902ee514b30.png

Mine shows this when there's loadshedding... are you sure you're not being loadshed when it's that colour/icon?

50 minutes ago, Muttley said:

Mine shows this when there's loadshedding... are you sure you're not being loadshed when it's that colour/icon?

thanks for the reply. No definitely not being loadshed, you can see it was showing that i was consuming 22w from the grid. It stays like that all the time. 

1 hour ago, Muttley said:

Mine shows this when there's loadshedding... are you sure you're not being loadshed when it's that colour/icon?

never mind i see that i need to create the template sensors for grid_status_19 and inverter_status_59

where exactly do i put it though? I tried to put it in my configuration.yaml and or sensors.yaml file however I get errors when i check the config from developer tools. 

Edited by McAllstar

1 hour ago, McAllstar said:

never mind i see that i need to create the template sensors for grid_status_19 and inverter_status_59

where exactly do i put it though? I tried to put it in my configuration.yaml and or sensors.yaml file however I get errors when i check the config from developer tools. 

again figured it out, put it in the sensors.yaml file and had to fix the indentations

7 hours ago, McAllstar said:

sorry any idea why I'm getting this? 

image.thumb.png.ce919f2a64baa4c105888902ee514b30.pngI can't figure out which sensor to use for the grid. 

 

I like the colour scheme. 

You can clean up a lot of that card configuration as I've made most of the sensors optional specifically when not used e.g. you can delete all the pv3, pv4 sensors lines

3 hours ago, slipx said:

 

I like the colour scheme. 

You can clean up a lot of that card configuration as I've made most of the sensors optional specifically when not used e.g. you can delete all the pv3, pv4 sensors lines

excellent thanks for that, I didn't notice, until you mentioned it. I'll clean it up now that I got it working. appreciate the hard work and generosity. 

On 2023/03/03 at 2:16 PM, slipx said:

I was playing with some text sensors to get the timezone to display as 02:00 as opposed to 200 etc. You can try them if it helps

 

text_sensor:
  - platform: template
    name: "Program1_test"
    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: "Program2_test"
    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);

image.png.1510cd4cd9bed228a0fb2124ed0f379b.png

Hey,

Me again here to bug you - you're work is just too good not to copy 🤓

I'm struggling to replicate this card - I have the text sensors that you added above in my ESP32 code and I've tried the code below but the result is not anything like ^

type: markdown
content: "  ## System Timer Settings\n<table width=\"100%\"  border=0>\n  <tbody> \n  <tr>\n    <td align=\"left\">\n    <b>Time Slot</b>\n    </td>\n    <td align=\"left\">\n    <b>Battery SOC</b>\n    </td>\n    <td align=\"left\">\n\t<b>Grid</b>\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    01:00 - 05:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone1') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone1', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    05:00 - 09:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone2') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone2', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    09:00 - 17:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone3') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone3', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    17:00 - 20:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone4') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone4', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    20:00 - 22:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone5') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone5', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    22:00 - 01:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone6') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone6', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  </tbody>\n</table>"
view_layout:
  grid-area: weather

image.png.8595a6a53698ad7f98187e8ad73515d7.png

 

Also, you need to sign up for the buymeacoffeebeer thing!

Edited by Muttley

27 minutes ago, Muttley said:

Hey,

Me again here to bug you - you're work is just too good not to copy 🤓

I'm struggling to replicate this card - I have the text sensors that you added above in my ESP32 code and I've tried the code below but the result is not anything like ^

type: markdown
content: "  ## System Timer Settings\n<table width=\"100%\"  border=0>\n  <tbody> \n  <tr>\n    <td align=\"left\">\n    <b>Time Slot</b>\n    </td>\n    <td align=\"left\">\n    <b>Battery SOC</b>\n    </td>\n    <td align=\"left\">\n\t<b>Grid</b>\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    01:00 - 05:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone1') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone1', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    05:00 - 09:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone2') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone2', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    09:00 - 17:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone3') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone3', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    17:00 - 20:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone4') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone4', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    20:00 - 22:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone5') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone5', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    22:00 - 01:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone6') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone6', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  </tbody>\n</table>"
view_layout:
  grid-area: weather

image.png.8595a6a53698ad7f98187e8ad73515d7.png

 

Also, you need to sign up for the buymeacoffeebeer thing!

Just remember to update your sensors. You also need to install

https://github.com/benct/lovelace-multiple-entity-row

Now I'm gonna go do the coffee thing 😁

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: tile
        entity: switch.toggle_system_timer
        name: System Timer
        vertical: true
        icon: mdi:timer-cog-outline
      - type: tile
        entity: switch.toggle_priority_load
        name: Priority Load
        vertical: true
        icon: ''
  - type: entities
    entities:
      - entity: switch.toggle_grid_charge_timezone1
        type: custom:multiple-entity-row
        name: Timeslot 1
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone1
            name: From
          - entity: sensor.time_zone2
            name: To
          - entity: number.set_soc_timezone1
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone2
        type: custom:multiple-entity-row
        name: Timeslot 2
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone2
            name: From
          - entity: sensor.time_zone3
            name: To
          - entity: number.set_soc_timezone2
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone3
        type: custom:multiple-entity-row
        name: Timeslot 3
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone3
            name: From
          - entity: sensor.time_zone4
            name: To
          - entity: number.set_soc_timezone3
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone4
        type: custom:multiple-entity-row
        name: Timeslot 4
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone4
            name: From
          - entity: sensor.time_zone5
            name: To
          - entity: number.set_soc_timezone4
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone5
        type: custom:multiple-entity-row
        name: Timeslot 5
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone5
            name: From
          - entity: sensor.time_zone6
            name: To
          - entity: number.set_soc_timezone5
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone6
        type: custom:multiple-entity-row
        name: Timeslot 6
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone6
            name: From
          - entity: sensor.time_zone1
            name: To
          - entity: number.set_soc_timezone6
            name: SOC
            format: precision0
    state_color: true
view_layout:
  grid-area: a

 

Edited by slipx

  • Author
8 hours ago, Muttley said:

Hey,

Me again here to bug you - you're work is just too good not to copy 🤓

I'm struggling to replicate this card - I have the text sensors that you added above in my ESP32 code and I've tried the code below but the result is not anything like ^

type: markdown
content: "  ## System Timer Settings\n<table width=\"100%\"  border=0>\n  <tbody> \n  <tr>\n    <td align=\"left\">\n    <b>Time Slot</b>\n    </td>\n    <td align=\"left\">\n    <b>Battery SOC</b>\n    </td>\n    <td align=\"left\">\n\t<b>Grid</b>\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    01:00 - 05:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone1') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone1', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    05:00 - 09:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone2') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone2', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    09:00 - 17:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone3') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone3', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    17:00 - 20:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone4') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone4', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    20:00 - 22:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone5') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone5', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  <tr>\n    <td align=\"left\">\n    22:00 - 01:00\n    </td>\n    <td align=\"left\">\n    {{ states('sensor.sunsynk_setting_soc_timezone6') }} %\n    </td>\n    <td align=\"left\">\n\t{% if is_state('sensor.sunsynk_setting_grid_charge_timezone6', '1') %} <ha-icon icon=\"mdi:checkbox-marked-outline\"></ha-icon> {% else %} <ha-icon icon=\"mdi:checkbox-blank-outline\"></ha-icon> {% endif %}\n\t</td>\n  </tr>\n  </tbody>\n</table>"
view_layout:
  grid-area: weather

image.png.8595a6a53698ad7f98187e8ad73515d7.png

 

Also, you need to sign up for the buymeacoffeebeer thing!

Hey @Muttley

I am working on this video as we speak, have almost finished the ESP32 part of it and will then start working on the dashboard, hope to have the ESP32 part up today and the Dashboard part  by Monday. 🙂 

 

  • Author
8 hours ago, Muttley said:

Also, you need to sign up for the buymeacoffeebeer thing!

@slipx I agree with @Muttley , you need to set that up. 

People would like to be able to say thanks for all the work you have put in. 

Speaking of which I think it would be great to have a forum IRL get together, would be great to be able to put some faces to the forum handles 🙂.

Was thinking of maybe having a few drinks at the Baron Kyalami Corner next Friday 9th June after work if anyone else is keen? 

4 hours ago, Sc00bs said:

Speaking of which I think it would be great to have a forum IRL get together, would be great to be able to put some faces to the forum handles 🙂.

Was thinking of maybe having a few drinks at the Baron Kyalami Corner next Friday 9th June after work if anyone else is keen? 

Sounds like fun, but I'm travelling next week. Will try for the next one 😉

On 2023/06/02 at 12:08 AM, slipx said:

Just remember to update your sensors. You also need to install

https://github.com/benct/lovelace-multiple-entity-row

Now I'm gonna go do the coffee thing 😁

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: tile
        entity: switch.toggle_system_timer
        name: System Timer
        vertical: true
        icon: mdi:timer-cog-outline
      - type: tile
        entity: switch.toggle_priority_load
        name: Priority Load
        vertical: true
        icon: ''
  - type: entities
    entities:
      - entity: switch.toggle_grid_charge_timezone1
        type: custom:multiple-entity-row
        name: Timeslot 1
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone1
            name: From
          - entity: sensor.time_zone2
            name: To
          - entity: number.set_soc_timezone1
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone2
        type: custom:multiple-entity-row
        name: Timeslot 2
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone2
            name: From
          - entity: sensor.time_zone3
            name: To
          - entity: number.set_soc_timezone2
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone3
        type: custom:multiple-entity-row
        name: Timeslot 3
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone3
            name: From
          - entity: sensor.time_zone4
            name: To
          - entity: number.set_soc_timezone3
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone4
        type: custom:multiple-entity-row
        name: Timeslot 4
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone4
            name: From
          - entity: sensor.time_zone5
            name: To
          - entity: number.set_soc_timezone4
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone5
        type: custom:multiple-entity-row
        name: Timeslot 5
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone5
            name: From
          - entity: sensor.time_zone6
            name: To
          - entity: number.set_soc_timezone5
            name: SOC
            format: precision0
      - entity: switch.toggle_grid_charge_timezone6
        type: custom:multiple-entity-row
        name: Timeslot 6
        toggle: true
        state_header: Charge
        state_color: true
        entities:
          - entity: sensor.time_zone6
            name: From
          - entity: sensor.time_zone1
            name: To
          - entity: number.set_soc_timezone6
            name: SOC
            format: precision0
    state_color: true
view_layout:
  grid-area: a

 

Me again 🙈

I seem to be struggling with these sensors:

- entity: sensor.time_zone1

- entity: sensor.time_zone2

etc

Is this something that should get pulled from the inverter via the ESP32 or is it a manual addition to your configuration.yaml file?

Just send me an invoice and your banking details already 🤑

  • 2 weeks later...

Hi all. So I'm a bit late on the topic, and I have an issue with something, but figured I'll ask here rather than create a new thread.

I'm trying to get the ESP-32 (with ESPHome) way of monitoring.

My setup is as follows:
Deye 8Kw Inverter
RJ45 with 1+8(B) and 2+7(A) and 3+6(GND) (based on solar assistant docs) hooked up to RS485-TTL module and this again connected to ESP-32 pins 16(RX) + 17(TX) + 5(Flow Control)

Now ESPHome log is going crazy with "Modbus CRC Check" failures and "Got Modbus frame from unknown address"

So in Home Assistant the values are all random... It jumps between "Unavailable" to waay incorrect numbers to actual correct values

Based on the fact that I'm getting correct values some of the time tells me my addresses are correct (and using the values from the Deye modbus doc)

Crazy values
image.png.4fb6b55d2b9c94a6cf2755969d4e729b.png

Correct values
image.png.46511481406c784a4072ec41374475da.png

Here is my ESPHome config with just 3 sensors shown

substitutions:
  name: esp32-inverter-module
  modbus_controller_id: sg01lp1

esphome:
  name: $name

esp32:
  board: esp32dev
  framework:
    type: arduino

web_server:
  port: 80

logger:
api:
ota:
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: $name
    password: !secret wifi_failover
captive_portal:

uart:
  id: mod_bus
  tx_pin: 17
  rx_pin: 16
  baud_rate: 9600
  stop_bits: 1
  debug:
    direction: BOTH
    dummy_receiver: false
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

modbus:
  id: modbus1
  uart_id: mod_bus
  flow_control_pin: 5
  disable_crc: true

modbus_controller:
  - id: ${modbus_controller_id}
    modbus_id: modbus1
    address: 0x01
    setup_priority: -10
    update_interval: 3sec

sensor:
  - platform: modbus_controller
    modbus_controller_id: ${modbus_controller_id}
    name: sun8k Battery Voltage
    id: sun8k_battery_voltage
    register_type: holding
    address: 183
    unit_of_measurement: V
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
    value_type: U_WORD

  - platform: modbus_controller
    modbus_controller_id: ${modbus_controller_id}
    name: sun8k Battery SOC
    id: sun8k_battery_soc
    register_type: holding
    address: 184
    unit_of_measurement: "%"
    state_class: measurement
    accuracy_decimals: 0
    value_type: U_WORD

  - platform: modbus_controller
    modbus_controller_id: ${modbus_controller_id}
    name: sun8k Battery Current
    id: sun8k_battery_current
    register_type: holding
    address: 191
    unit_of_measurement: A
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
    value_type: S_WORD

Any help would be greatly appreciated

  • Author
46 minutes ago, fStof said:

Hi all. So I'm a bit late on the topic, and I have an issue with something, but figured I'll ask here rather than create a new thread.

I'm trying to get the ESP-32 (with ESPHome) way of monitoring.

My setup is as follows:
Deye 8Kw Inverter
RJ45 with 1+8(B) and 2+7(A) and 3+6(GND) (based on solar assistant docs) hooked up to RS485-TTL module and this again connected to ESP-32 pins 16(RX) + 17(TX) + 5(Flow Control)

Now ESPHome log is going crazy with "Modbus CRC Check" failures and "Got Modbus frame from unknown address"

So in Home Assistant the values are all random... It jumps between "Unavailable" to waay incorrect numbers to actual correct values

Based on the fact that I'm getting correct values some of the time tells me my addresses are correct (and using the values from the Deye modbus doc)

Crazy values
image.png.4fb6b55d2b9c94a6cf2755969d4e729b.png

Correct values
image.png.46511481406c784a4072ec41374475da.png

Here is my ESPHome config with just 3 sensors shown

substitutions:
  name: esp32-inverter-module
  modbus_controller_id: sg01lp1

esphome:
  name: $name

esp32:
  board: esp32dev
  framework:
    type: arduino

web_server:
  port: 80

logger:
api:
ota:
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: $name
    password: !secret wifi_failover
captive_portal:

uart:
  id: mod_bus
  tx_pin: 17
  rx_pin: 16
  baud_rate: 9600
  stop_bits: 1
  debug:
    direction: BOTH
    dummy_receiver: false
    after:
      delimiter: "\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

modbus:
  id: modbus1
  uart_id: mod_bus
  flow_control_pin: 5
  disable_crc: true

modbus_controller:
  - id: ${modbus_controller_id}
    modbus_id: modbus1
    address: 0x01
    setup_priority: -10
    update_interval: 3sec

sensor:
  - platform: modbus_controller
    modbus_controller_id: ${modbus_controller_id}
    name: sun8k Battery Voltage
    id: sun8k_battery_voltage
    register_type: holding
    address: 183
    unit_of_measurement: V
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
    value_type: U_WORD

  - platform: modbus_controller
    modbus_controller_id: ${modbus_controller_id}
    name: sun8k Battery SOC
    id: sun8k_battery_soc
    register_type: holding
    address: 184
    unit_of_measurement: "%"
    state_class: measurement
    accuracy_decimals: 0
    value_type: U_WORD

  - platform: modbus_controller
    modbus_controller_id: ${modbus_controller_id}
    name: sun8k Battery Current
    id: sun8k_battery_current
    register_type: holding
    address: 191
    unit_of_measurement: A
    state_class: measurement
    accuracy_decimals: 2
    filters:
      - multiply: 0.01
    value_type: S_WORD

Any help would be greatly appreciated

Where have you got the ESP32 & RS485 board located?

At one stage I located mine inside my Inverter and suffered from a lot of weird readings, once I moved it out of the enclosure was not an issue. 

 

16 minutes ago, Sc00bs said:

I made a video for you 🙂

Awe... Just for me? You shouldn't have 😁

So I don't have a heap of these 485 borads laying around... and don't want to just remove it without knowing if it is the actual issue...

Is there a way to check with a multimeter maybe if the inverter has the resistor already built in?

14 minutes ago, Sc00bs said:

Where have you got the ESP32 & RS485 board located?

At one stage I located mine inside my Inverter and suffered from a lot of weird readings, once I moved it out of the enclosure was not an issue. 

 

I haven't packaged anything yet... its still jumper wires hanging out the side

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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.