-
Notifications
You must be signed in to change notification settings - Fork 42
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
Comments
Hi, (plugin version 1.1.1 and solaredge_modbus-0.7.0, not in docker-container.) Regards, |
Averter mentioned in this link saidlm/Domoticz-Solax-plugin#3 a possible cause and solution: In this case, in init.py of the solaredge module, it is in uppercase. Pymodbus installed inside my domoticz is 3.6.4. EDIT: tested it anyway (replaced 5 BIG>big and 1 LITTLE>little in ___ init ___.py). |
Did some more debugging and I have an idea. It seems to me some sort of timing issue. In the domoticz.log I can see regular OnHeartBeat loops where in milliseconds after the call "OnHeartBeat" the inverter values are ALL retrieved. The errors occures when the retrieving of the invertervalues happenes seconds after the OnHeartBeat call. Example: Notice that the list of the values is very short. In a regular loop, this list a much longer. And because the "status" value is not in the shortened list, it can not be matched within the defined tablestructure in the plugin (e.g line 201 for the THREE_PHASE_INVERTER . As you can see, the "status" is the first record in this table structure. So the question is: why is the plugin sometimes waiting after the OnHeartBeat call? |
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
The text was updated successfully, but these errors were encountered: