Python Plugin: GoodWe solar inverter via SEMS API

Python and python framework

Moderator: leecollings

User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

RE: Python Plugin: GoodWe solar inverter via SEMS API

Post by waltervl »

Jeweettoch13 wrote: Tuesday 30 December 2025 10:36 Hello fellow members.

For some reason i got some errors today when requesting the data from the Goodwe SEMS plugin. Do you guys know what this means?
Update the plugin, see also https://github.com/JanJaapKo/domoticz-G ... /issues/30
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Jeweettoch13
Posts: 20
Joined: Saturday 23 July 2022 16:42
Target OS: Windows
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: RE: Python Plugin: GoodWe solar inverter via SEMS API

Post by Jeweettoch13 »

waltervl wrote: Tuesday 30 December 2025 10:56
Jeweettoch13 wrote: Tuesday 30 December 2025 10:36 Hello fellow members.

For some reason i got some errors today when requesting the data from the Goodwe SEMS plugin. Do you guys know what this means?
Update the plugin, see also https://github.com/JanJaapKo/domoticz-G ... /issues/30
Replaced the file in Domoticz plugins, but no luck:

2025-12-30 11:03:41.058 Error: (FindModule) Domoticz and DomoticzEx modules both found in interpreter, use one or the other.
2025-12-30 11:03:41.058 Error: Goodwe SEMS: Call to function 'onHeartbeat' failed, exception details:
2025-12-30 11:03:41.059 Error: Goodwe SEMS: Traceback (most recent call last):
2025-12-30 11:03:41.059 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 459, in onHeartbeat
2025-12-30 11:03:41.059 Error: Goodwe SEMS: _plugin.onHeartbeat()
2025-12-30 11:03:41.059 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 370, in onHeartbeat
2025-12-30 11:03:41.059 Error: Goodwe SEMS: elif len(Parameters["Mode1"]) == 0:
2025-12-30 11:03:41.059 Error: Goodwe SEMS: ^^^^^^^^^^
2025-12-30 11:03:41.059 Error: Goodwe SEMS: NameError: name 'Parameters' is not defined
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by waltervl »

Did you restart Domoticz?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Jeweettoch13
Posts: 20
Joined: Saturday 23 July 2022 16:42
Target OS: Windows
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Jeweettoch13 »

waltervl wrote: Tuesday 30 December 2025 11:11 Did you restart Domoticz?
Yes i did. Only copy paste the file. Don't know if that's sufficient.
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by waltervl »

What file? The plugin.py or the Goodwe.py or both?
In your case it looks like Domoticz is confused now about the plugin.py.
You are running Domoticz in Docker it looks like so not sure how to restart properly.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Jeweettoch13
Posts: 20
Joined: Saturday 23 July 2022 16:42
Target OS: Windows
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Jeweettoch13 »

waltervl wrote: Tuesday 30 December 2025 11:23 What file? The plugin.py or the Goodwe.py or both?
In your case it looks like Domoticz is confused now about the plugin.py.
You are running Domoticz in Docker it looks like so not sure how to restart properly.
I copied the one provided by jeannot171 (GoodWe.py)

also copied just the plugin file,It's working :).

I see on a sidenote that new sensors have been made, but need the old log on the new sensors. Is this achieved by restoring the backup data?
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by waltervl »

Jeweettoch13 wrote: Tuesday 30 December 2025 11:26
waltervl wrote: Tuesday 30 December 2025 11:23 What file? The plugin.py or the Goodwe.py or both?
In your case it looks like Domoticz is confused now about the plugin.py.
You are running Domoticz in Docker it looks like so not sure how to restart properly.
I copied the one provided by jeannot171 (GoodWe.py)

also copied just the plugin file,It's working :).

I see on a sidenote that new sensors have been made, but need the old log on the new sensors. Is this achieved by restoring the backup data?
You could use the device replace function to move the history in the new device: https://wiki.domoticz.com/Managing_Devi ... ace_device
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Jeweettoch13
Posts: 20
Joined: Saturday 23 July 2022 16:42
Target OS: Windows
Domoticz version: 2025.2
Location: Netherlands
Contact:

Re: Python Plugin: GoodWe solar inverter via SEMS API

Post by Jeweettoch13 »

waltervl wrote: Tuesday 30 December 2025 11:52
Jeweettoch13 wrote: Tuesday 30 December 2025 11:26
waltervl wrote: Tuesday 30 December 2025 11:23 What file? The plugin.py or the Goodwe.py or both?
In your case it looks like Domoticz is confused now about the plugin.py.
You are running Domoticz in Docker it looks like so not sure how to restart properly.
I copied the one provided by jeannot171 (GoodWe.py)

also copied just the plugin file,It's working :).

I see on a sidenote that new sensors have been made, but need the old log on the new sensors. Is this achieved by restoring the backup data?
You could use the device replace function to move the history in the new device: https://wiki.domoticz.com/Managing_Devi ... ace_device
That should work indeed, if not turning the complete system haywire:

2025-12-30 12:03:17.255 Error: Goodwe SEMS: ~~~~~~~~~~~~~~~~~~~~~^^^^^^
2025-12-30 12:03:17.255 Error: Goodwe SEMS: KeyError: 2
2025-12-30 12:03:27.742 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/2) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/4) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/5) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/6) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/14) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/7) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/8) already exists in Domoticz.
2025-12-30 12:03:27.743 Error: Goodwe SEMS: (Goodwe SEMS) Unit creation failed, Hardware/DeviceID/Unit combination (5/56000DTS205W0092/15) already exists in Domoticz.
2025-12-30 12:03:27.747 Error: Goodwe SEMS: Call to function 'onHeartbeat' failed, exception details:
2025-12-30 12:03:27.749 Error: Goodwe SEMS: Traceback (most recent call last):
2025-12-30 12:03:27.749 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 519, in onHeartbeat
2025-12-30 12:03:27.749 Error: Goodwe SEMS: _plugin.onHeartbeat()
2025-12-30 12:03:27.749 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 413, in onHeartbeat
2025-12-30 12:03:27.749 Error: Goodwe SEMS: self.startDeviceUpdateV2()
2025-12-30 12:03:27.754 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 175, in startDeviceUpdateV2
2025-12-30 12:03:27.754 Error: Goodwe SEMS: self.updateDevices(DeviceData)
2025-12-30 12:03:27.755 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 199, in updateDevices
2025-12-30 12:03:27.755 Error: Goodwe SEMS: UpdateDevice(inverter["sn"], theInverter.outputCurrentUnit, 0, str(inverter["output_current"]), AlwaysUpdate=True)
2025-12-30 12:03:27.755 Error: Goodwe SEMS: File "/opt/domoticz/userdata/plugins/domoticz-GoodWeSEMS/plugin.py", line 559, in UpdateDevice
2025-12-30 12:03:27.755 Error: Goodwe SEMS: logging.debug("Updating device '"+Devices[Device].Units[Unit].Name+ "' with current sValue '"+Devices[Device].Units[Unit].sValue+"' to '" +sValue+"'")

Luckily a backed up the database so can convert back easily.

Edit* Got it working. I restart the container per edit, and that works. Tnx for the help :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest