dewet22 / givenergy-modbus

A python library to access GivEnergy inverters via Modbus TCP on a local network, with no dependency on the GivEnergy Cloud.
Other
19 stars 15 forks source link

CLI failing - latest version #17

Open springfall2008 opened 1 year ago

springfall2008 commented 1 year ago

Description

I'm trying to get the latest version to work, tried to CLI but it seems not to work with the API, see below.

What I Did

treforsouthwell@Trefors-MacBook-Pro-2 givenergy-modbus % python3 givenergy_modbus/cli.py -h 192.168.0.141 dump-registers Traceback (most recent call last): File "/Users/treforsouthwell/Library/CloudStorage/OneDrive-Personal/Code/givenergy/givenergy-modbus/givenergy_modbus/cli.py", line 184, in main(obj={}) # pragma: no cover File "/Users/treforsouthwell/homebrew/lib/python3.10/site-packages/click/core.py", line 1130, in call return self.main(args, kwargs) File "/Users/treforsouthwell/homebrew/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/Users/treforsouthwell/homebrew/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/treforsouthwell/homebrew/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/Users/treforsouthwell/homebrew/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(args, *kwargs) File "/Users/treforsouthwell/homebrew/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), args, **kwargs) File "/Users/treforsouthwell/Library/CloudStorage/OneDrive-Personal/Code/givenergy/givenergy-modbus/givenergy_modbus/cli.py", line 71, in dump_registers ctx.obj['CLIENT'].refresh_plant(plant=plant, full_refresh=True) AttributeError: 'Coordinator' object has no attribute 'refresh_plant'. Did you mean: 'refresh_count'?