snicker / juicepassproxy

Proxy UDP requests to/from Juicebox EV chargers to MQTT discoverable by Home Assistant
25 stars 8 forks source link

Change udpc_timeout to telnet_timeout and add to readme #59

Closed Snuffy2 closed 2 months ago

Snuffy2 commented 2 months ago

After further review and testing of #53, I believe it makes more sense to call this telnet_timeout and not udpc_timeout.

Additionally

Snuffy2 commented 2 months ago

@j358 & @snicker please let me know your thoughts on the revision.

j358 commented 2 months ago

This commit doesn't run for me. juicepassproxy | Traceback (most recent call last): juicepassproxy | File "/juicepassproxy/juicepassproxy.py", line 743, in <module> juicepassproxy | main() juicepassproxy | File "/juicepassproxy/juicepassproxy.py", line 726, in main juicepassproxy | udpc_updater = JuiceboxUDPCUpdater( juicepassproxy | ^^^^^^^^^^^^^^^^^^^^ juicepassproxy | TypeError: JuiceboxUDPCUpdater.__init__() got multiple values for argument 'juicebox_host'

Somehow all of the arguments have been shifted along one when calling JuiceboxUDPCUpdater. Simple fix would be remove named arguments: udpc_updater = JuiceboxUDPCUpdater( args.juicebox_host, jpp_host, address[1], telnet_timeout=telnet_timeout, )

j358 commented 2 months ago

Or name all arguments: Line 726 udpc_updater = JuiceboxUDPCUpdater( juicebox_host=args.juicebox_host, udpc_host=jpp_host, udpc_port=address[1], telnet_timeout=telnet_timeout, )

Snuffy2 commented 2 months ago

Thanks @j358, it looks like I forgot to push my last local commit up. Sorry about that.

j358 commented 2 months ago

Yep looks good to me