Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entity not available: sensor.sg_battery_charge_nom and sg_battery_level_nom #88

Closed
dl1ekm opened this issue Apr 1, 2023 · 22 comments
Closed

Comments

@dl1ekm
Copy link

dl1ekm commented Apr 1, 2023

In the new "default" dashboard these fields are shown as errors in the first page.

From my view the problem is that these are relicts from earlier versions. The correct entity (sensor.battery_charge_nominal) are already in the dashboard.

@mkaiser
Copy link
Owner

mkaiser commented Apr 12, 2023

sorry, I missed this issue. Will take care of it, soon! :)

Thank you for reporting!

@mkaiser mkaiser closed this as completed in c46fade Jul 7, 2023
@mkaiser
Copy link
Owner

mkaiser commented Jul 7, 2023

Finally i had the time to fix this:

I suppose many users (since end of march) have this issue now. :/

Folloe EXATLY these steps to fix this (takes < 5min)

  1. Update to current versions (modbus_sungrow.yaml) and dashboard(s) from the git

  2. modbus_sungrow.yaml:
    Comment the two sensors "Battery level (nominal)" and "Battery charge (nominal)"

  3. check config & restart HA

  4. GoTo "Developers --> States" and type "nominal" into the field "entity filters" (screenshot)
    image

  5. In my case, I had 4 entities matching "nominal". We want to (termporarily delete all of them to add them again with the correct unique_id. Repeat for each one (Screenshot):
    -- (1) Click on the information logo
    -- (2) Click on the gears (not shown)
    -- (3) Delete and confirm
    image

Now all sensor history connecting unique_id and sensor name are gone

  1. Revert commenting the two sensors in yaml

  2. check config & restart HA

@mkaiser
Copy link
Owner

mkaiser commented Jul 7, 2023

@ALL:

Can you give me some feedback, if this fix is working and if the instructions are "human understandable"? ;)

@mkaiser mkaiser reopened this Jul 7, 2023
@mastameista
Copy link
Contributor

@mkaiser - thx a lot for this fix but also for this really great integration. I am a proud owner of a solar plant since one week. :)

Feedback

Instructions: yes, they are easily understandable

Results in my case

Besides some Powerwalker sensors containing "nominal" in their name I only had two of your sensors listed in DevTools:

image

I deleted those and after restarting HA, "Battery charge (nominal)" is "unavailable"
image

I've checked in
/config/.storage/core.entity_registry

before and after the update -> no change

  {
    "aliases": [],
    "area_id": null,
    "capabilities": {
      "state_class": "measurement"
    },
    "config_entry_id": null,
    "device_class": null,
    "device_id": null,
    "disabled_by": null,
    "entity_category": null,
    "entity_id": "sensor.battery_level_nominal",
    "hidden_by": null,
    "icon": null,
    "id": "14ded1e923e219d3b814699e87b1e596",
    "has_entity_name": false,
    "name": null,
    "options": {
      "conversation": {
        "should_expose": false
      }
    },
    "original_device_class": "battery",
    "original_icon": null,
    "original_name": "Battery level (nominal)",
    "platform": "template",
    "supported_features": 0,
    "translation_key": null,
    "unique_id": "sg_battery_level_nom",
    "unit_of_measurement": "%"
  },
  {
    "aliases": [],
    "area_id": null,
    "capabilities": null,
    "config_entry_id": null,
    "device_class": null,
    "device_id": null,
    "disabled_by": null,
    "entity_category": null,
    "entity_id": "sensor.battery_charge_nominal",
    "hidden_by": null,
    "icon": null,
    "id": "3e5f3410186001d4f3cbdbf402b939d7",
    "has_entity_name": false,
    "name": null,
    "options": {
      "conversation": {
        "should_expose": false
      }
    },
    "original_device_class": "energy",
    "original_icon": null,
    "original_name": "Battery charge (nominal)",
    "platform": "template",
    "supported_features": 0,
    "translation_key": null,
    "unique_id": "sg_battery_charge_nom",
    "unit_of_measurement": "kWh"
  }

-> I've still an entity called "sensor.battery_charge_nominal" in the registry. In your .yaml file such an entity doesn't exist anymore.

Any idea how to fix this?

FYI: I prepared this integration in May and updated it last week on Monday (copy/paste modbus_sungrow.yaml and dashboard.yaml).

@mkaiser
Copy link
Owner

mkaiser commented Jul 10, 2023

hi, thanks for the feedback! :)

FYI: I prepared this integration in May and updated it last week on Monday (copy/paste modbus_sungrow.yaml and dashboard.yaml)

last Friday I made the fixes, so after you upgraded: Can you upgrade to the newest git-revisions?

I've still an entity called "sensor.battery_charge_nominal" in the registry. In your .yaml file such an entity doesn't exist anymore.

This seems to be correct:
https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant/blob/c163aa638d2c65565d4a199ce19ba563139377be/modbus_sungrow.yaml#L2188C1-L2188C1

  - name: "Battery charge (nominal)"
    unique_id: sg_battery_charge_nom

HA will use "battery_charge_nominal" as internal name

@mastameista
Copy link
Contributor

last Friday I made the fixes, so after you upgraded: Can you upgrade to the newest git-revisions?

Sry, of course I did upgrade before implementing the change :)

I've just repeated all steps again and now both sensors are working.

image

image

Don't know why exactly but I assume the first copy/paste from github to my modbus_sungrow.yaml failed somehow. I found some differences in modbus_sungrow.yaml before trying a second time.

So sorry for the inconvenience! -> I now can confirm that your fix works like a charm!

PS: I have a Sungrow SBR128 battery and sensor.battery_capacity always shows 0. But this is another topic and I don't want to hijack this thread ;)

@mkaiser
Copy link
Owner

mkaiser commented Jul 10, 2023

PS: I have a Sungrow SBR128 battery and sensor.battery_capacity always shows 0. But this is another topic and I don't want to hijack this thread ;)

I am allowed to hijack ;)
Your installation is quiet new, so I assume that these values have not been set, yet. Try setting the battery capacity via isolarcloud (maybe app). AFAIK the is no "Auto negotiation" between battery and inverter regarding the capacity

@mastameista
Copy link
Contributor

Great :)

As my Solarteur is new in Sungrow business, I've setup the cloud initially. Under "Plant Configuration > Plan" the battery capacity is automatically read.

image

Clicking on "Settings", no changes are possible:
image

But in "Advanced Settings - Hybrid Inverter - Advanced Settings - Battery Parameters" the Parameter "Battery Capacity(kWh) is 0.

image

Due to my little knowhow I didn't change this parameter yet. Maybe it would fix this issue.
And because I will be away from home for the next 2 months.

@Boklov
Copy link

Boklov commented Jul 17, 2023

Hello Very good stuff. I am using this a lot. But i wounder if it is also possible to add the Feed-in limatiation trough modbus and Homeassistant

In solarcloud you can do it lie this
Advansed Otions => Powercontrol =>12 Feed in limitation (Enable/closed)
=> if enabled
12.1 Feed-in limation value in kw (0.0 - to max)
12.2 Feed-in limitation ratio (0-100%)

This can bee usefull when prises fore the exported energy are below 0 and you dont what to export anything.

@mkaiser
Copy link
Owner

mkaiser commented Jul 18, 2023

already threre :)

see "export power limit"

image

@Boklov
Copy link

Boklov commented Jul 19, 2023 via email

@mkaiser mkaiser closed this as completed Jul 19, 2023
@btota
Copy link

btota commented Jul 22, 2023

@mkaiser input_select.set_sg_start_stop_mode in modbus_sungrow.yaml doesn´t exist anymore right?

@btota
Copy link

btota commented Jul 22, 2023

Great :)

As my Solarteur is new in Sungrow business, I've setup the cloud initially. Under "Plant Configuration > Plan" the battery capacity is automatically read.

image

Clicking on "Settings", no changes are possible: image

But in "Advanced Settings - Hybrid Inverter - Advanced Settings - Battery Parameters" the Parameter "Battery Capacity(kWh) is 0.

image

Due to my little knowhow I didn't change this parameter yet. Maybe it would fix this issue. And because I will be away from home for the next 2 months.

@mastameista I can affirm your suggestion. It works fine now, battery capacity is shown up the right way - important: you need to login in as fitter in isolarcloud.eu to get to advanced settings as @mastameista showed in his thread.

@mkaiser
Copy link
Owner

mkaiser commented Jul 22, 2023

@mkaiser input_select.set_sg_start_stop_mode in modbus_sungrow.yaml doesn´t exist anymore right?

renamed for more clarity to:

input_select:
set_sg_inverter_run_mode:
name: Inverter mode
options:
- "Enabled"
- "Shutdown"

@btota
Copy link

btota commented Jul 22, 2023

then you need to update your dashboard.yaml I think :).

mkaiser added a commit that referenced this issue Jul 22, 2023
set_sg_start_stop_mode --> set_sg_inverter_run_mode


thanks @bota  #88 (comment)
@mkaiser
Copy link
Owner

mkaiser commented Jul 22, 2023

ooops, forgot to change that - thank you :)

@mheloy
Copy link

mheloy commented Jul 27, 2023

Great :)

As my Solarteur is new in Sungrow business, I've setup the cloud initially. Under "Plant Configuration > Plan" the battery capacity is automatically read.

image

Clicking on "Settings", no changes are possible: image

But in "Advanced Settings - Hybrid Inverter - Advanced Settings - Battery Parameters" the Parameter "Battery Capacity(kWh) is 0.

image

Due to my little knowhow I didn't change this parameter yet. Maybe it would fix this issue. And because I will be away from home for the next 2 months.

How did you get this Battery Parameters from ISolar Cloud.. I don't have this option in mine but I have battery SBR096

@btota
Copy link

btota commented Jul 27, 2023

As I said: "important: you need to login in as fitter in isolarcloud.eu to get to advanced settings"

from germany? then use this guidethread, howto describes how to get an fitteraccount (in case you do not have one) -->
https://www.photovoltaikforum.com/thread/158136-sungrow-sammelthread-produktmanagement/?postID=2495656#post2495656

@dvogt23
Copy link

dvogt23 commented Aug 22, 2023

works great, thanks for update 💯 @mkaiser

@mastameista
Copy link
Contributor

Great :)
As my Solarteur is new in Sungrow business, I've setup the cloud initially. Under "Plant Configuration > Plan" the battery capacity is automatically read.
image
Clicking on "Settings", no changes are possible: image
But in "Advanced Settings - Hybrid Inverter - Advanced Settings - Battery Parameters" the Parameter "Battery Capacity(kWh) is 0.
image
Due to my little knowhow I didn't change this parameter yet. Maybe it would fix this issue. And because I will be away from home for the next 2 months.

@mastameista I can affirm your suggestion. It works fine now, battery capacity is shown up the right way - important: you need to login in as fitter in isolarcloud.eu to get to advanced settings as @mastameista showed in his thread.

@btota thanks for your verification. Will also add this parameter :)

@leo4417
Copy link

leo4417 commented Sep 25, 2023

Unfortunately, nothing changes for me even with the current yaml and multiple procedures as in the instructions - still "unavailable". What else can I do?

@mkaiser
Copy link
Owner

mkaiser commented Sep 27, 2023

Unfortunately, nothing changes for me even with the current yaml and multiple procedures as in the instructions - still "unavailable". What else can I do?

Please open a new issue (this is already closed) and show us, what entities are shown in your installation, when you go to "Developer Tools" and filter entities for "battery_charge"

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants