Cannot connect - address unknow?
leomayer opened this issue · 2 comments
Running on OpenSuse Tumbleweed
I have connected to the WalkingPad. I run status
, start
which is followed by a beep. When I type speed 30
nothing happens - as well with speed 15
. status
returns
WalkingPadCurStatus(dist=0.0, time=0, steps=0, speed=0.0, state=0, mode=1, app_speed=3.0, button=1, rest=0000)
I press CTRL-Z ==>
$> ^[[A^[[A^CTraceback (most recent call last):
File "/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 639, in <module>
main()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 632, in main
loop.run_until_complete(br.main())
File "/usr/lib64/python3.8/asyncio/base_events.py", line 603, in run_until_complete
self.run_forever()
File "/usr/lib64/python3.8/asyncio/base_events.py", line 570, in run_forever
self._run_once()
File "/usr/lib64/python3.8/asyncio/base_events.py", line 1823, in _run_once
event_list = self._selector.select(timeout)
File "/usr/lib64/python3.8/selectors.py", line 468, in select
fd_event_list = self._selector.poll(timeout, max_ev)
File "/home/lw/.local/lib/python3.8/site-packages/cmd2/cmd2.py", line 2004, in sigint_handler
raise KeyboardInterrupt("Got a keyboard interrupt")
KeyboardInterrupt: Got a keyboard interrupt
which is no problem. But when I try to restart I fail:
❯ python3.8 -m ph4_walkingpad.main ─╯
2022-02-03 19:48:51 ws3 __main__[7565] ERROR Exception in the main entry point: No address given to connect to
Traceback (most recent call last):
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 374, in main
await self.work()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 94, in work
await self.connect(address)
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 74, in connect
await self.ctler.run()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/pad.py", line 357, in run
await self.connect(address)
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/pad.py", line 272, in connect
raise ValueError('No address given to connect to')
ValueError: No address given to connect to
Traceback (most recent call last):
File "/usr/lib64/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib64/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 639, in <module>
main()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 632, in main
loop.run_until_complete(br.main())
File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 378, in main
await self.disconnect()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/main.py", line 63, in disconnect
await self.ctler.disconnect()
File "/home/lw/.local/lib/python3.8/site-packages/ph4_walkingpad/pad.py", line 267, in disconnect
await self.client.disconnect()
AttributeError: 'NoneType' object has no attribute 'disconnect'
==> Any idea what to check or what to do?
@leomayer pls try updating the repository. The error
AttributeError: 'NoneType' object has no attribute 'disconnect'
is resolved in the most recent version.
It basically means that scanning did not result with finding any usable WalkingPad.
In order to resolve this, pls specify how do you start walking pad controller (cli args). Also maybe use --debug
cli switch and paste the logs here so we can investigate the problem.
Pls note that WalkingPad Bluetooth LE stack allows only for one connected device at a time. So if a mobile application is connected to the WalkingPad, no other client can connect.
Closing for inactivity, pls reopen when the problem persists.