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

Automatic date format not matching #7307

Closed
kgwhitmer opened this issue Apr 26, 2017 · 7 comments · Fixed by #7329
Closed

Automatic date format not matching #7307

kgwhitmer opened this issue Apr 26, 2017 · 7 comments · Fixed by #7329

Comments

@kgwhitmer
Copy link

kgwhitmer commented Apr 26, 2017

Home Assistant release (hass --version):
0.43.1

Python release (python3 --version):
3.4.2

Component/platform:
Presence Detection/Automatic RPi3/latest Raspbian

Description of problem:
Problem parsing date data from Automatic after upgrading to 0.43.1

Expected:
Date parsed without error.

Problem-relevant configuration.yaml entries and steps to reproduce:

device_tracker:
  platform: automatic
  client_id: !secret automatic_client_id
  secret: !secret automatic_secret
  username: !secret automatic_user
  password: !secret automatic_pass
  track_new_devices: True
  1. Add automatic to config yaml
  2. Start HA
  3. Check log

Traceback (if applicable):

17-04-25 19:47:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 235, in _step
    result = coro.send(value)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/device_tracker/automatic.py", line 116, in update_vehicle
    vehicle=vehicle.id, limit=1)
  File "/home/homeassistant/.homeassistant/deps/aioautomatic/session.py", line 94, in get_trips
    return base.ResultList(self, resp, data.Trip)
  File "/home/homeassistant/.homeassistant/deps/aioautomatic/base.py", line 119, in __init__
    list.__init__(self, (item_class(item) for item in resp['results']))
  File "/home/homeassistant/.homeassistant/deps/aioautomatic/base.py", line 119, in <genexpr>
    list.__init__(self, (item_class(item) for item in resp['results']))
  File "/home/homeassistant/.homeassistant/deps/aioautomatic/data.py", line 34, in __init__
    super().__init__(data)
  File "/home/homeassistant/.homeassistant/deps/aioautomatic/base.py", line 93, in __init__
    self._data = self.validator(data)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 192, in __call__
    return self._compiled([], data)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 486, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/voluptuous/schema_builder.py", line 324, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: Value 2017-04-25T19:49:45Z+0000 does not match expected format %Y-%m-%dT%H:%M:%S.%fZ%z for dictionary value @ data['ended_at']

Additional info:

@tchellomello
Copy link
Contributor

I hit this problem with my old account too. I'm currently troubleshooting this as well.

Thanks for reporting it.

@rpitera
Copy link

rpitera commented Apr 26, 2017

Also having the same issue - I thought it was a db problem and the automatic issue was separate but now I see they are related.

Does rolling back to 0.43.0 help?

@tchellomello
Copy link
Contributor

@rpitera I think the problem is with the library.

Check if you can reproduce the but executing the README tests at https://github.com/armills/aioautomatic.

The issue happened to me too. Marking @armills so then he can be aware too.

@emlove
Copy link
Contributor

emlove commented Apr 27, 2017

Thanks for the ping. This is actually fixed on aioautomatic master, but it hasn't been released yet. I'll push out a fix.

@rpitera
Copy link

rpitera commented Apr 27, 2017

Thanks @armills! Quick question; does the updated lib now support Automatic Pro? One or two users in the forums were reporting that they had issues with the Automatic component with Pro devices.

@emlove
Copy link
Contributor

emlove commented Apr 27, 2017

I'm using it with an Automatic Pro, and haven't had any issues. I assume you're talking about this thread? https://community.home-assistant.io/t/automatic-odb-ii-issue/3813

We're accessing the cloud API, so in theory it shouldn't make a difference, and possibly the extra input sanitizing will help iron out some issues, (even though it creates some extra headaches like this issue). If you can trace a problem back to the library, feel free to open an issue at https://github.com/armills/aioautomatic

The biggest benefit of the new library will be the upcoming websocket support for live updates. Stay tuned!

@rpitera
Copy link

rpitera commented Apr 27, 2017

Thanks for such a quick response! Yes, that was the thread. I'm not having an issue but I will pass this info on to that thread.

Live updates will be awesome! Thanks for your hard work.

@home-assistant home-assistant locked and limited conversation to collaborators Aug 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants