August lock in 0.64 - first gen?

Does the new august integration in 0.64 work for the first generation of August locks, or just the new ones with zwave? I’m getting errors trying to implement it with my 1st gen locks, regardless of if I use email or phone login types.

2018-02-26 22:04:55 ERROR (MainThread) [homeassistant.setup] Error during setup of component august
  File "/usr/src/app/homeassistant/components/august.py", line 137, in setup
    from august.api import Api
  File "/config/august.py", line 22, in <module>

I think there is more to that error in your log? It doesn’t look like the error has anything to do with what version of the lock you have, it isn’t getting that far. Can you see if there is more detail for the error?

2018-02-26 22:04:55 ERROR (MainThread) [homeassistant.setup] Error during setup of component august
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/august.py", line 137, in setup
    from august.api import Api
  File "/config/august.py", line 22, in <module>
    "User-Agent": USER_AGENT,
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1280, in _send_request
    self.putheader(hdr, value)
  File "/usr/local/lib/python3.6/http/client.py", line 1212, in putheader
    values[i] = one_value.encode('latin-1')

I still don’t think that is the entire message the final line should indicate what the exception was.

UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u2013’ in position 13: ordinal not in range(256)

I used the config format like on the main august page -

august:
login_method: phone
username: “+16041234567”
password: secret

Maybe the password needs to be in quotes if it has certain characters in it?

Edit: Same error even if password has “” around it.

Do you have and - in your password? If so try to re-type it out in the file and don’t copy and paste it. I think the /u2013 is a dash but there is something special about it.

No dash in my password. there is a leading plus + in the phone number as per the example…

Is this working for other people?

It’s working for me at least. Can you try entering bogus username and password and see what happens?

I get the exact same error even with a bogus username and password. Here is my configuration.yaml entry:

august:
  login_method: phone
  username: "+14145551212"
  password: bogus1

This looks suspicious, it looks like it’s loading august.api from somewhere else:

  File "/usr/src/app/homeassistant/components/august.py", line 137, in setup
    from august.api import Api
  File "/config/august.py", line 22, in <module>
    "User-Agent": USER_AGENT,
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get

What’s your environment like? docker, pi or hass.io?

Can you try renaming “/config/august.py” to something else and see?

It’s docker, so I’m not sure how the august.py could possibly be the wrong one, since it’s all bundled together in the docker image.

Ya nvm, I got it confused with something else so that’s not related at all.

Is there any other error log related to August? Id suggest try enable debug log and see what was actually sent and received from August api

With debug on:

2018-03-19 19:53:31 ERROR (MainThread) [homeassistant.setup] Error during setup of component august
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/august.py", line 137, in setup
    from august.api import Api
  File "/config/august.py", line 22, in <module>
    "User-Agent": USER_AGENT,
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 357, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1280, in _send_request
    self.putheader(hdr, value)
  File "/usr/local/lib/python3.6/http/client.py", line 1212, in putheader
    values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2013' in position 13: ordinal not in range(256)

2018-03-20 21:41:52 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components and platforms could not be set up:

 - [august](https://home-assistant.io/components/august/)

Please check your config., notification_id=invalid_config, service_call_id=140005444619792-4>