pmcgn / dbus-modbus-client-kostal-smartmeter

14 stars 3 forks source link

No connection to KSEM #6

Closed pforrmi closed 10 months ago

pforrmi commented 11 months ago

Hi,

with newest Venus OS Version and also KSEM I don't get a connection. Gerätetyp: hw0100 Software-Version: 2.3.0

I've checked the logfile and see this:

@40000000657164ee07401e04 CCGX booted (0) @40000000657164ef027134bc starting dbus-modbus-client @40000000657164f7157172d4 INFO Waiting for localsettings @40000000657164f71ded859c INFO registered ourselves on D-Bus as com.victronenergy.modbusclient.tcp @40000000657164f71e07fb0c INFO Starting background scan @40000000657164f7243ae124 INFO Scanning 10.0.10.222/24 @400000006571650229d29c94 INFO Found KOSTAL_KSEM at tcp:10.0.10.133:502:1 @40000000657165022bad638c INFO Error initialising tcp:10.0.10.133:502:1, skipping @40000000657165022c737a7c Traceback (most recent call last): @40000000657165022c7b17b4 File "/opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py", line 98, in scan_update @40000000657165022c7b330c self.init_device(d, False) @40000000657165022c7c7f14 File "/opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py", line 296, in init_device @40000000657165022c7c9684 super().init_device(dev, args) @40000000657165022c7ca23c File "/opt/victronenergy/dbus-modbus-client/dbus-modbus-client.py", line 121, in init_device @40000000657165022c7cb5c4 dev.init(self.dbusconn, enable) @40000000657165022c7d7cfc File "/opt/victronenergy/dbus-modbus-client/device.py", line 278, in init @40000000657165022c7d9084 self.device_init() @40000000657165022c7d9854 File "/opt/victronenergy/dbus-modbus-client/Kostal_SmartEnergyMeter.py", line 59, in device_init @40000000657165022c7dabdc Reg_u64b(0x0200, '/Ac/Energy/Forward', 10000, '%.1f kWh'), @40000000657165022c7e5f8c File "/opt/victronenergy/dbus-modbus-client/Kostal_SmartEnergyMeter.py", line 26, in init @40000000657165022c7e76fc super(Reg_u64b, self).init(base, 4, args, kwargs) @40000000657165022c7f327c File "/opt/victronenergy/dbus-modbus-client/register.py", line 59, in init @40000000657165022c7f4604 super().init(base, self.count, name, text, write, kwargs) @40000000657165022c816114 AttributeError: 'Reg_u64b' object has no attribute 'count' @400000006571650d18c4e77c INFO Scan completed in 21 seconds

Seems that there is something wrong with the Kostal_SmartEnergyMeter.py ?!

Hope someone could help me.

Regards

pforrmi commented 11 months ago

As in the manual:

rm /opt/victronenergy/dbus-modbus-client/pycache/dbus-modbus-client.cpython-38.pyc

will reponse with:

root@raspberrypi2:~# rm /opt/victronenergy/dbus-modbus-client/pycache/dbus-modbus-client.cpython-38.pyc rm: can't remove '/opt/victronenergy/dbus-modbus-client/pycache/dbus-modbus-client.cpython-38.pyc': No such file or directory


Update: Could be a victron dedicated problem. At Version 3.01 I don't have any problems and KSEM will be found automatically. Strange...

GitSoDE commented 11 months ago

In my system the path .../pycache/ has underscore >__< in front of pycache and after The file dbus-modbus-client.cpyhton-38.pyc isnt existing !

pmcgn commented 10 months ago

Seems to be fixed withVersion 3.01. Based on the logs, it's hard to say, what exactly went wrong.

The path to pycache is contains the double underscores within the installation steps. I never changed it.

Please open another ticket, if the issue is still present.