romedtino / simple-wyze-vac

Home Assistant Custom Component for Wyze Vacuum
48 stars 8 forks source link

Base32 Key? #39

Closed pjuhl2313 closed 1 year ago

pjuhl2313 commented 2 years ago

So the newest instance of HA caused my Simple Wyze Vac to become disabled. I have uninstalled and reinstalled. It's asking for a Base32 key? Any idea what this is?

pjuhl2313 commented 2 years ago

Here are my logs when I try to install:

Logger: homeassistant.config_entries Source: components/system_log/init.py:96 First occurred: 10:35:57 AM (1 occurrences) Last logged: 10:35:57 AM

Error setting up entry Simple Wyze Vac for simple_wyze_vac
Traceback (most recent call last):
  File "/config/custom_components/simple_wyze_vac/__init__.py", line 70, in async_setup_entry
    if vac_info.current_map.rooms is not None:
  File "/usr/local/lib/python3.10/site-packages/wyze_sdk/models/devices/vacuums.py", line 380, in rooms
    return [VacuumMapRoom(**room) for room in map_data['12']]
  File "/usr/local/lib/python3.10/site-packages/wyze_sdk/models/devices/vacuums.py", line 380, in <listcomp>
    return [VacuumMapRoom(**room) for room in map_data['12']]
TypeError: wyze_sdk.models.devices.vacuums.VacuumMapRoom() argument after ** must be a mapping, not str

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/simple_wyze_vac/__init__.py", line 75, in async_setup_entry
    _LOGGER.warn("Failed to query vacuum rooms. If your firmware is higher than 1.6.113, rooms is currently not supported. Exception: ", err)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1494, in warn
    self.warning(msg, *args, **kwargs)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1489, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1624, in _log
    self.handle(record)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1634, in handle
    self.callHandlers(record)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 1696, in callHandlers
    hdlr.handle(record)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 968, in handle
    self.emit(record)
  File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 179, in emit
    entry = LogEntry(
  File "/usr/src/homeassistant/homeassistant/components/system_log/__init__.py", line 96, in __init__
    self.message = deque([record.getMessage()], maxlen=5)
  File "/usr/local/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
romedtino commented 2 years ago

The Base32 key is optional for those who want to use 2FA (through TOTP) on their account. See here for more information - https://github.com/romedtino/simple-wyze-vac#totp

As for your error, it looks like you're vacuuming is on a completely new firmware version. Looks similar to what this person was seeing - https://github.com/romedtino/simple-wyze-vac/issues/31

hopkinsag1 commented 2 years ago

I get the same error. Firmware has been the same for months. Only thing that has changed was a Home Assistant update.

hopkinsag1 commented 1 year ago

This is now fixed for me after the latest update! Thank you!

romedtino commented 1 year ago

Workaround fixes issue