ValueError: AES key must be either, 24, or 32 bytes lon 16g
See original GitHub issueEnvironment: Sungrow Inverter SG8K-D with Wifi Adaptor. Raspi8 with Python 3.8. Port 502 accessible by scanning. Error: ValueError: AES key must be either, 24, or 32 bytes lon 16g
I have attempted to re-install and update all dependencies with no errors.
./solariot.py Load config sungrow-sh5k Load SungrowModbusTcpClient Connect Traceback (most recent call last): File “./solariot.py”, line 77, in <module> client.connect() File “/solariot/SungrowModbusTcpClient.py”, line 32, in connect self._getkey() File “/solariot/SungrowModbusTcpClient.py”, line 22, in _getkey self._aes_ecb = AES.new(self._key, AES.MODE_ECB) File “/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py”, line 94, in new return AESCipher(key, *args, **kwargs) File “/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py”, line 59, in init blockalgo.BlockAlgo.init(self, _AES, key, *args, **kwargs) File “/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py”, line 141, in init self._cipher = factory.new(key, *args, **kwargs) ValueError: AES key must be either, 24, or 32 bytes lon 16g
`inverter_ip = “10.1.1.7” inverter_port = 502
Slave Defaults
Sungrow: 0x01
SMA: 3
slave = 0x01 model = “sungrow-sh5k” timeout = 3 scan_interval = 10
Optional:
dweepy_uuid = “random_solar_thing”
Optional:
influxdb_ip = “192.168.1.128” influxdb_port = 8086 influxdb_user = “user” influxdb_password = “password” influxdb_database = “inverter” influxdb_ssl = True influxdb_verify_ssl = False
Optional
mqtt_server = “192.168.1.128” mqtt_port = 1883 mqtt_topic = “inverter/stats” mqtt_username = “user” mqtt_password = “password” `
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top GitHub Comments
@meltaxa maybe we just close this off if @wombatvic isn’t responding?
Here it is. Sorry if the formatting didn’t work out properly