SecKatie / ha-wyzeapi

Home Assistant Integration for Wyze devices.
733 stars 112 forks source link

Error during startup -- Unable to find device type field! #50

Closed svenugop closed 4 years ago

svenugop commented 4 years ago

Hi

Thank you for this HACS component. Finally found a way to control my Wyze bulbs using HA!

I am having an issue getting the component to work even after updating my configuration.yaml. When I check the logs, this is the error I see --> ' Unable to find the device type field!'

Pasting the relevant section of the log and the traceback over here.

Any suggestions as to what is happening?

2020-05-17 02:33:32 DEBUG (MainThread) [custom_components.wyzeapi] Creating new WyzeApi component
2020-05-17 02:33:32 ERROR (SyncWorker_0) [pyHS100.discover] Unable to find the device type field!
2020-05-17 02:33:37 ERROR (MainThread) [homeassistant.setup] Error during setup of component wyzeapi
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/config/custom_components/wyzeapi/__init__.py", line 39, in async_setup
    await wyzeapi_account.async_init()
  File "/config/custom_components/wyzeapi/wyzeapi/wyzeapi.py", line 23, in async_init
    self._access_token = await self.async_login(self._user_name, self._password, self._device_id)
  File "/config/custom_components/wyzeapi/wyzeapi/wyzeapi.py", line 47, in async_login
    data = await self.async_do_request(url, payload)
  File "/config/custom_components/wyzeapi/wyzeapi/wyzeapi.py", line 113, in async_do_request
    return await WyzeRequest(url, payload).async_get_response()
  File "/config/custom_components/wyzeapi/wyzeapi/wyze_request.py", line 45, in async_get_response
    raise WyzeApiError("Payload: " + str(self._payload) + "\nResponse Data: " + str(data))
svenugop commented 4 years ago

:This is what my configuration looks like:

wyzeapi:
  username: my_wyze_user_name
  password: my_wyze_password
svenugop commented 4 years ago

This was stupid on my end. There was an error in my user name. Works fine now!