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

KeyError "Status" #96

Open
infoedkok opened this issue Feb 19, 2024 · 1 comment
Open

KeyError "Status" #96

infoedkok opened this issue Feb 19, 2024 · 1 comment

Comments

@infoedkok
Copy link

Hi, After upgrading Domoticz to 2024-1 (docker container) and installing the plugin from version 1.1.1 and solaredge_modbus-0.8.0 I have these errors:
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: Call to function 'onHeartbeat' failed, exception details:
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: Traceback (most recent call last):
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: File "/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 544, in onHeartbeat
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: _plugin.onHeartbeat()
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: File "/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 352, in onHeartbeat
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: to_lookup = int(inverter_values[unit[Column.MODBUSNAME]])
2024-02-13 15:27:22.544 Error: SolarEdgeMODBUS: KeyError: 'status'

'Status' looks like one of the 22 items that are passed.
This status reports on what the inverter is doing.

"KeyError" message is generated by in ---init---.py"!

Here in ---init---.py there's a list of keys for Status which refers to INVERTER_STATUS_MAP, line 110:
INVERTER_STATUS_MAP = [
"Undefined",
"Off",
"Sleeping",
"Grid Monitoring",
"Producing",
"Producing (Throttled)",
"Shutting Down",
"Fault",
"Standby"
]

I think that this list is missing some status and that causes this message?

The errors appear randomly :-(

Versions after pip3 install -r requirements.txt :
Requirement already satisfied: solaredge_modbus==0.7.0 in /usr/local/lib/python3.9/dist-packages (from -r requirements.txt (line 1)) (0.7.0)
Requirement already satisfied: pymodbus>=2.4.0 in /usr/local/lib/python3.9/dist-packages (from solaredge_modbus==0.7.0->-r requirements.txt (line 1)) (3.6.4)

Any idea what status of the inverter could cause this?

Regards, Ed

@OlmZone
Copy link

OlmZone commented May 31, 2024

Hi,
I experience the same errors, that keep on going at random intervals:
2024-05-31 09:36:06.614 Error: SolarEdge: Call to function 'onHeartbeat' failed, exception details:
2024-05-31 09:36:06.616 Error: SolarEdge: Traceback (most recent call last):
2024-05-31 09:36:06.616 Error: SolarEdge: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 544, in onHeartbeat
2024-05-31 09:36:06.616 Error: SolarEdge: _plugin.onHeartbeat()
2024-05-31 09:36:06.616 Error: SolarEdge: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 352, in onHeartbeat
2024-05-31 09:36:06.616 Error: SolarEdge: to_lookup = int(inverter_values[unit[Column.MODBUSNAME]])
2024-05-31 09:36:06.616 Error: SolarEdge: KeyError: 'status'

(plugin version 1.1.1 and solaredge_modbus-0.7.0, not in docker-container.)
Although it seems to work pretty well, it looks ugly in my error log.
If I can help by providing more info or maybe testing, let me know.

Regards,
Jos

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

2 participants