pmcgn / dbus-modbus-client-kostal-smartmeter

14 stars 3 forks source link

Missing info on "ModbusTcpClient" package #8

Closed cRaErBs closed 11 months ago

cRaErBs commented 11 months ago

Hi Phil,

I am trying to run the helper script from you on my Windows PC, in order to identify the KSEM DeviceID, but cannot find the needed ModbusTcpClient package to get it work.

PC: Windows 11 Python: 3.12.1

I installed the pyModbusTCP package: pip3 install pyModbusTCP Requirement already satisfied: pyModbusTCP in c:\program files (x86)\python36-32\lib\site-packages (0.2.1)

and tried several other options: pip3 install pyModbusTCPclient ERROR: Could not find a version that satisfies the requirement pyModbusTCPclient (from versions: none) ERROR: No matching distribution found for pyModbusTCPclient

I also executed Wolfe´s suggestion in the forum: python -m pip install pymodbus

The error message is: _python .\read_modbus_tcp_register.py Traceback (most recent call last): File ".\read_modbus_tcpregister.py", line 1, in from pymodbus.client.tcp import odbusTcpClient as ModbusClient ModuleNotFoundError: No module named 'pymodbus.client.tcp'

So I guess that I still didn´t install the correct needed package (, or I installed it wrong? pip vs. pip3)

Many thanks and best regards

GitSoDE commented 11 months ago

Try as an alternative Node-RED:

2023-12-27 10 04 2792 2023-12-27 10 04 2793

I get 18530

cRaErBs commented 11 months ago

Thanks for the alternate way.

grafik

My result would be 18514

in Kostal_SmartEnergyMeter.py is already written: _models = { 18498: { 'model': 'KOSTAL_KSEM', 'handler': Kostal_SmartEnergyMeter, }, 18514: { 'model': 'KOSTAL_KSEM', 'handler': Kostal_SmartEnergyMeter, }, 18530: { 'model': 'KOSTAL_KSEM', Kostal_SmartEnergyMeter.py 'handler': KostalSmartEnergyMeter, },

(I found 18530 in the blog already and justr tried it as well.)

Modbus read: grafik

buffer parser: grafik

Debug: grafik

cRaErBs commented 11 months ago

Thanks again, the Modbus TCP connections works and Device ID is clear. I need to search the failure somewhere else.