Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to lock or unlock vehicle #62

Closed
malaakso opened this issue Aug 31, 2021 · 5 comments
Closed

Unable to lock or unlock vehicle #62

malaakso opened this issue Aug 31, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@malaakso
Copy link

Describe the bug
Updated integration using HACS from 1.0.38 to 1.0.52. S-PIN was/is set in the configuration.yaml and is visible in the new configuration dialog. Locking or unlocking the vehicle fails and logs imply missing S-PIN.

Latest working release
1.0.38

Debug logs

2021-08-31 06:36:45 WARNING (MainThread) [skodaconnect.vehicle] Failed to unlock vehicle - SPIN is required
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/skodaconnect/dashboard.py", line 334, in unlock
    response = await self.vehicle.set_lock('unlock', self.spin)
  File "/usr/local/lib/python3.9/site-packages/skodaconnect/vehicle.py", line 951, in set_lock
    raise SkodaException('Lock action failed')
skodaconnect.exceptions.SkodaException: Lock action failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/logging/handlers.py", line 1431, in emit
    self.enqueue(self.prepare(record))
  File "/usr/local/lib/python3.9/logging/handlers.py", line 1414, in prepare
    msg = self.format(record)
  File "/usr/local/lib/python3.9/logging/__init__.py", line 927, in format
    return fmt.format(record)
  File "/usr/local/lib/python3.9/logging/__init__.py", line 663, in format
    record.message = record.getMessage()
  File "/usr/local/lib/python3.9/logging/__init__.py", line 367, in getMessage
    msg = msg % self.args
ValueError: incomplete format
Call stack:
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 322, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 314, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 108, in run
    return asyncio.run(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
    handle._run()
  File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/config/custom_components/skodaconnect/lock.py", line 57, in async_unlock
    await self.instrument.unlock()
  File "/usr/local/lib/python3.9/site-packages/skodaconnect/dashboard.py", line 340, in unlock
    _LOGGER.error("Unlock failed: %", e.args[0])
  File "/usr/local/lib/python3.9/logging/__init__.py", line 1475, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/local/lib/python3.9/logging/__init__.py", line 1589, in _log
    self.handle(record)
  File "/usr/local/lib/python3.9/logging/__init__.py", line 1599, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.9/logging/__init__.py", line 1661, in callHandlers
    hdlr.handle(record)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 51, in handle
    self.emit(record)
Message: 'Unlock failed: %'
Arguments: ('Lock action failed',)

Installation:

  • Home Assistant variant: Docker
  • Python version 3.9

Additional context
Add any other context about the problem here.

@malaakso malaakso added the bug Something isn't working label Aug 31, 2021
@Farfar
Copy link
Collaborator

Farfar commented Aug 31, 2021

Will verify. Could be that S-PIN is incorrectly stored in the config entry.

@Farfar
Copy link
Collaborator

Farfar commented Sep 5, 2021

This should be fixed in recent release 1.0.54.

@Farfar Farfar closed this as completed Sep 5, 2021
@dwapps
Copy link

dwapps commented Sep 6, 2021

I still seem to have a similar error in 1.0.5.4 (freshly reinstalled, SPIN is correct):

2021-09-06 21:17:58 WARNING (MainThread) [skodaconnect.vehicle] Failed to lock vehicle - SPIN is required
2021-09-06 21:17:58 ERROR (Thread-2) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/logging/handlers.py", line 1517, in _monitor
self.handle(record)
File "/usr/local/lib/python3.9/logging/handlers.py", line 1498, in handle
handler.handle(record)
File "/usr/local/lib/python3.9/logging/__init__.py", line 952, in handle
self.emit(record)
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 192, in emit
entry = LogEntry(record, stack, _figure_out_source(record, stack, self.hass))
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 99, in __init__
self.message = deque([record.getMessage()], maxlen=5)
File "/usr/local/lib/python3.9/logging/__init__.py", line 367, in getMessage
msg = msg % self.args
ValueError: incomplete format

@Farfar Farfar reopened this Sep 6, 2021
@Farfar
Copy link
Collaborator

Farfar commented Sep 7, 2021

I still seem to have a similar error in 1.0.5.4 (freshly reinstalled, SPIN is correct):

2021-09-06 21:17:58 WARNING (MainThread) [skodaconnect.vehicle] Failed to lock vehicle - SPIN is required
2021-09-06 21:17:58 ERROR (Thread-2) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/logging/handlers.py", line 1517, in _monitor
self.handle(record)
File "/usr/local/lib/python3.9/logging/handlers.py", line 1498, in handle
handler.handle(record)
File "/usr/local/lib/python3.9/logging/__init__.py", line 952, in handle
self.emit(record)
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 192, in emit
entry = LogEntry(record, stack, _figure_out_source(record, stack, self.hass))
File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 99, in __init__
self.message = deque([record.getMessage()], maxlen=5)
File "/usr/local/lib/python3.9/logging/__init__.py", line 367, in getMessage
msg = msg % self.args
ValueError: incomplete format

Found the problem. Fix scheduled for next release.

@Farfar
Copy link
Collaborator

Farfar commented Sep 8, 2021

Should be fixed in latest release, v1.0.55

@Farfar Farfar closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants