-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Wyze Lock appears as Unavailable in Home Assistant #577
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Is this project abandoned? |
It’s not. The logs you provided have no reference to the lock, and without having one myself it’s pretty hard to troubleshoot. |
Apologies. I have been trying this morning to get a lock that does contain relevant info, and I'm not sure how to do that... I tried just now by enabling debug logging, reloading the integration and then disabling debug logging again. The log I got just now from that has a single mention of a lock, and it doesn't appear to be an error:
The log does contain some errors from wyzeapy that may be related though:
The device appears but with a status of "Unavailable" and actions are disabled. Is there anything else that I can do help provide more useful information here? |
Thanks for the logs. Unfortunately those don’t provide any real mention of an issue either. Was this working for you previously and stopped or is this a new setup? I really have no idea how the lock works, although it does look like it was/is still supported through this setup. Also assuming it still works for you in the app. Maybe somebody else can chime in with some help. |
Thanks @brg468 ! The lock has never worked through the HA integration. It does report the battery status, but it doesn't appear to know the state of the lock (It shows it as locked regardless of the actual state) and it doesn't allow changing the state. The If anyone has suggestions for what I can do to obtain more relevant logs, I'd love to hear it. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Describe the bug
Wyze Lock appears as
Unavailable
in Home AssistantTo Reproduce
Steps to reproduce the behavior:
Follow the instructions in
README.md
to configure ha-wyzeapi through HACS in Home Assistant.Expected behavior
The entities for the lock should report the locked state, and should respond to requests to lock or unlock.
System configuration
System: HAOS running in a VM with libvirt/qemu
HA Version: 2024.4.4
WyzeApi Version: 0.1.24
home-assistant.log
2024-04-30 13:11:40.701 ERROR (MainThread) [wyzeapy.services.update_manager] Unknown error happened during updating device info
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/update_manager.py", line 44, in update
self.device.callback_function(self.device)
File "/config/custom_components/wyzeapi/climate.py", line 316, in async_update_callback
self.async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1233, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 328, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 464, in state
return HVACMode(hvac_mode).value # type: ignore[unreachable]
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: <HVACMode.AUTO: 'auto'> is not a valid HVACMode
2024-04-30 13:11:58.226 DEBUG (MainThread) [custom_components.wyzeapi.light] Creating new WyzeApi light component
2024-04-30 13:11:58.239 DEBUG (MainThread) [custom_components.wyzeapi.switch] Creating new WyzeApi light component
2024-04-30 13:11:58.274 DEBUG (MainThread) [custom_components.wyzeapi.lock] Creating new WyzeApi lock component
2024-04-30 13:11:58.276 DEBUG (MainThread) [custom_components.wyzeapi.climate] Creating new WyzeApi thermostat component
2024-04-30 13:11:58.280 DEBUG (MainThread) [custom_components.wyzeapi.alarm_control_panel] Creating new WyzeApi Home Monitoring System component
2024-04-30 13:11:58.281 DEBUG (MainThread) [custom_components.wyzeapi.sensor] Creating new WyzeApi sensor component
2024-04-30 13:11:58.289 DEBUG (MainThread) [custom_components.wyzeapi.siren] Creating new WyzeApi siren component
2024-04-30 13:11:58.580 ERROR (MainThread) [homeassistant.components.climate] Error adding entity climate.thermostat for domain climate with platform wyzeapi
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 890, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1334, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 328, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 464, in state
return HVACMode(hvac_mode).value # type: ignore[unreachable]
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: <HVACMode.AUTO: 'auto'> is not a valid HVACMode
2024-04-30 13:12:16.375 ERROR (MainThread) [wyzeapy.services.update_manager] Unknown error happened during updating device info
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/update_manager.py", line 44, in update
self.device.callback_function(self.device)
File "/config/custom_components/wyzeapi/climate.py", line 316, in async_update_callback
self.async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1233, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 328, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 464, in state
return HVACMode(hvac_mode).value # type: ignore[unreachable]
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: <HVACMode.AUTO: 'auto'> is not a valid HVACMode
2024-04-30 13:12:26.581 DEBUG (MainThread) [custom_components.wyzeapi.switch] Camera: Living Room Cam has a new event
2024-04-30 13:13:27.019 ERROR (MainThread) [wyzeapy.services.update_manager] Unknown error happened during updating device info
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/update_manager.py", line 44, in update
self.device.callback_function(self.device)
File "/config/custom_components/wyzeapi/climate.py", line 316, in async_update_callback
self.async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1233, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 328, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 464, in state
return HVACMode(hvac_mode).value # type: ignore[unreachable]
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: <HVACMode.AUTO: 'auto'> is not a valid HVACMode
2024-04-30 13:13:27.519 DEBUG (MainThread) [custom_components.wyzeapi.light] Creating new WyzeApi light component
2024-04-30 13:13:27.532 DEBUG (MainThread) [custom_components.wyzeapi.switch] Creating new WyzeApi light component
2024-04-30 13:13:27.556 DEBUG (MainThread) [custom_components.wyzeapi.lock] Creating new WyzeApi lock component
2024-04-30 13:13:27.561 DEBUG (MainThread) [custom_components.wyzeapi.climate] Creating new WyzeApi thermostat component
2024-04-30 13:13:27.564 DEBUG (MainThread) [custom_components.wyzeapi.alarm_control_panel] Creating new WyzeApi Home Monitoring System component
2024-04-30 13:13:27.570 DEBUG (MainThread) [custom_components.wyzeapi.sensor] Creating new WyzeApi sensor component
2024-04-30 13:13:27.579 DEBUG (MainThread) [custom_components.wyzeapi.siren] Creating new WyzeApi siren component
2024-04-30 13:13:27.857 ERROR (MainThread) [homeassistant.components.climate] Error adding entity climate.thermostat for domain climate with platform wyzeapi
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 890, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1334, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 328, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 464, in state
return HVACMode(hvac_mode).value # type: ignore[unreachable]
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: <HVACMode.AUTO: 'auto'> is not a valid HVACMode
2024-04-30 13:13:29.511 ERROR (MainThread) [wyzeapy.services.update_manager] Unknown error happened during updating device info
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/update_manager.py", line 44, in update
self.device.callback_function(self.device)
File "/config/custom_components/wyzeapi/climate.py", line 316, in async_update_callback
self.async_schedule_update_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1233, in async_schedule_update_ha_state
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 328, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 464, in state
return HVACMode(hvac_mode).value # type: ignore[unreachable]
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 744, in call
return cls.new(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/enum.py", line 1158, in new
raise ve_exc
ValueError: <HVACMode.AUTO: 'auto'> is not a valid HVACMode
2024-04-30 13:13:57.649 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140316852639552] {'code': '3005', 'ts': 1714504437623, 'msg': 'unauthorized operation', 'data': {}, 'traceId': '89e1759027a59193eeeca07fc8e2b6b5'}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/wyzeapi/token_manager.py", line 45, in inner_function
await func(*args, **kwargs)
File "/config/custom_components/wyzeapi/switch.py", line 202, in async_turn_off
await self._service.turn_off(self._device)
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/camera_service.py", line 108, in turn_off
await self._run_action(camera, "power_off")
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/base_service.py", line 328, in _run_action
check_for_errors_standard(response_json)
File "/usr/local/lib/python3.12/site-packages/wyzeapy/utils.py", line 84, in check_for_errors_standard
raise UnknownApiError(response_json)
wyzeapy.exceptions.UnknownApiError: {'code': '3005', 'ts': 1714504437623, 'msg': 'unauthorized operation', 'data': {}, 'traceId': '89e1759027a59193eeeca07fc8e2b6b5'}
2024-04-30 13:14:00.959 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140316852639552] {'code': '3005', 'ts': 1714504440932, 'msg': 'unauthorized operation', 'data': {}, 'traceId': 'c157e7faa52881fc687d016cce5a7fdf'}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/wyzeapi/token_manager.py", line 45, in inner_function
await func(*args, **kwargs)
File "/config/custom_components/wyzeapi/switch.py", line 194, in async_turn_on
await self._service.turn_on(self._device)
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/camera_service.py", line 105, in turn_on
await self._run_action(camera, "power_on")
File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/base_service.py", line 328, in _run_action
check_for_errors_standard(response_json)
File "/usr/local/lib/python3.12/site-packages/wyzeapy/utils.py", line 84, in check_for_errors_standard
raise UnknownApiError(response_json)
wyzeapy.exceptions.UnknownApiError: {'code': '3005', 'ts': 1714504440932, 'msg': 'unauthorized operation', 'data': {}, 'traceId': 'c157e7faa52881fc687d016cce5a7fdf'}
The text was updated successfully, but these errors were encountered: