Skip to content

mtec_util can't connect, because of unexpected parameter #7

@dani-bell

Description

@dani-bell

When Server is running and mtec_util tries to connect unexpected parameter failure it thrown.

in mtec_util.py Line 133 the parameters (ip, port, slave) are passed in connect() function.
But the MTECmodbusAPI.connect() does not expect any parameters. (See MTECmodbusAPI.py Line 27)

The infos(IP, PORT, Slave) are used in self._connect but not in connect.

So in my point of view it is needed to change mtec_util.py Line 133
from
api.connect( ip_addr=cfg['MODBUS_IP'], port=cfg['MODBUS_PORT'], slave=cfg['MODBUS_SLAVE'] )
to
api.connect()

at least this worked for me.

If you like I can create a PR.

BR Daniel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions