addiejanssen / domoticz-solaredge-modbustcp-plugin

A Domoticz plugin to collect data from SolarEdge power inverters over ModbusTCP.
MIT License
18 stars 6 forks source link

Error in looking something up in the lookup table #2

Closed addiejanssen closed 4 years ago

addiejanssen commented 4 years ago

User reported the following:

2020-10-03 11:58:54.790 Error: (SolarEdge) 'onHeartbeat' failed 'KeyError'. 2020-10-03 11:58:54.790 Error: (SolarEdge) ----> Line 522 in '/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py', function onHeartbeat 2020-10-03 11:58:54.790 Error: (SolarEdge) ----> Line 335 in '/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py', function onHeartbeat

Looks like the inverter reports a status that is not supported by the solaredge_modbus library.

Let's see if we can catch this error and provide something in the Domoticz log that shows the unknown status value.

addiejanssen commented 4 years ago

Fixed in Version 1.0.2.

The plugin will first check if the key is in the lookup table. If not, it will create a string value showing the unknown key. This allows for further investigation.