Goodwe rest sensor for multiple json elements

I’ve updated the sems2mqtt component again.
I’ve optimized the code a bit: the config and 1st data topics are now sent at the same time.
Also, using the scan_interval parameter (max 300 secs) is now working correctly.
See https://github.com/bouwew/sems2mqtt

Hi bouwew,

This month production is always showing in a 15 decimal formation. Example: 53.800000000000004 kWh. Something you could fix? :blush:

BTW, I had the frozen sensors as well a couple of times. Now testing the integrations with a visitor account configured.

I had noticed that too, and fixed it. Please redownload the __init__.py file from the github.

@CervDotBe, can you please re-download the __init__.py file once more, and test?
I found an interesting way to send the MQTT-messages (publish.single).This way the connection can never be lost and the sensor values will never freeze, if I’m correct. Because there is no connection to keep-alive, just single connections that are disconnected directly after the data is sent. This should be more robust, I think.

Will do. Integration was stable while using a visitors account btw.

Please do. Also, on my side, no problems since switching to the visitor-account.

By the way, my sensor is available via HACS: Custom Component: HACS
Name: GoodWe SEMS MQTT-componenent for Home Assistant

Is there another way to config the sensors? I don’t want to use the discover option…

When you don’t want to use the discover option, you can use the GoodWe component by TimmyBankers.
Look in the posts above, or find it in HACS.

As of some days my GoodWe SemsPortal is not working anymore. It is showing in the error log “Index out of range”. Any one else experiencing this issue?

Yes, I get the same error. I think it is after updating to 101.3, but nut sure.

no not after the update as i was running 0.100.1 till this morning. Yesterday it wasnt working either, so guess something with the API?

Which of the options to collect SEMS-data provided in this thread are you using?
The one I’m providing (and am using) runs fine here.

I’m using Tim Soethout’s solution:

The fix is in the repo. You can download the updated code from here: https://raw.githubusercontent.com/TimSoethout/goodwe-sems-home-assistant/414ae4ab94881df506964c7f60955fb184e9c27e/custom_components/sems/sensor.py
Please test this updated code.

That gives me at leat another message about a “required key not provided” does it need to have a new config entry for the platform?

– EDIT –
just noticed the Issue on the github that ID indeed is required and can be found in the URL when browsing to the semsportal.com page, logging in and selecting your unit.

I was having the same problem but this fix solved the problem. Thx !

@TimmyBankers, please update your repo with the provided pull-request.

Updated! (Was on holiday.)
Thanks for @vPotusFlotus (on GitHub) for providing the fix and updating the code to use the GoodWe API!

Instructions are also updated in the readme.

Would it be possible to get SOC and SOH from a battery system connected to the Goodwe? The status shows in the SEMS app so I guess it may be available on the API?

That is an interesting idea. Since I do not own a battery I can’t easily try this out.
You can start using the web portal and use the web inspector to see which API requests are being done. The hass component should be able to mimic this.