Waze travel time update

That is possible

Yes, Either way, I think I can add a catch in there to suppress the error. Maybe shoot a warning or something.

So I’ve been trying to locate the API that this resource file uses and I cannot find anything. I’m starting to think this method was depreciated by waze and they may have shut off the service…

All the developer api’s for waze are completey different. The closest being waze deep links.

OK then if this change is permanent, we will think of directly using the Waze Deep Links into the HA component.

I don’t think the deep links way will give us what we need. It’s like a connection for a browser that opens a map. It doesn’t appear to return json information. I’m still looking for the original API documentation that the component uses. Any help would be appreciated.

1 Like

there is a fix that was out 15 hours ago, you cat upgrade by: (if you have hassbian ) or some linux
sudo systemctl stop [email protected]
sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install --upgrade WazeRouteCalculator
exit
sudo systemctl start [email protected]

2 Likes

any fixes possible if I run hassio?

Hi,

Version number of ressource library needs to be updated to “0.6” in the requirements of HA component.
If you can’t wait for the next version of HA, you can copy paste the source code and use the component as a custom_component.

There is a soulution, i managed to fix it (tested on virtual env).
basically Waze ha changed there api.
you need to update the WazeRouteCalculator from PIP:


and then in the component itself change the version in the Requirement to 0.6.
restart home assistant and have fun.

Update WazeRoutCalculator to version 0.6:


and than in Home Assistant Waze Component update the required version to 0.6.
restart Home Assistant and have fun

Thank you so much ! I’ ve almost gone crazy trying to fix this :slight_smile:
Your solution works perfectly.

Good to hear (:slight_smile:

I’m a little confused (yeah, it doesn’t take much).
Has this all been merged into the official component?

1 Like

Yes, no need to do anything in this thread anymore.

1 Like

Recently with the change with the google travel time sensor, I moved over to waze. It works well.

I started noticing a few errors in my log around the same time, but did not assiocate them with waze.

Today I changed back to google for a few of my sensors for an unrelated reason, and noticed the errors in my log went down. Then I realized I had the following errors the same number of times as waze sensors I had running.

2018-08-16 07:45:49 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 325, in wrapper
    result = method(*args, **kwargs)
TypeError: update() takes 1 positional argument but 2 were given

The sensors did work, but I see a few errors from time to time in the log about not being able to update, on top of these. Is this just noise I can ignore, or a valid issue?

Not sure. Those exceptions are coming from update func, it’s entirely possible the code in the waze app isn’t optimal. But what doesn’t make sense is that it’s complaining about 2 positional arguments but the update function in ways only has 1:

    def update(self):

Here is my sensor

  # My commute to home
  - platform: waze_travel_time
    name: My Time to Home
    origin: device_tracker.my_iphone
    destination: zone.home
    region: 'US'

My zones are gps cordinates, vs addresses. The cordinates are in secrets.yaml. Not sure if that helps or not

This works better with zones to be honest. But that does give me a place to start.

1 Like

I’ve been getting exactly the same 4 errors with 4 sensors. I’m not able to do so now but will post my config later if it helps.

EDIT: An example of one of mine. I’m using ‘zone to zone’ on two

  - platform: waze_travel_time
    name: 'Home to xxxx'
    origin: zone.home
    destination: zone.xxxx
    region: 'EU'

and ’device_tracker to zone’ on two

  - platform: waze_travel_time
    name: xxxx To Home Waze
    origin: device_tracker.xxxx_phone
    destination: zone.home
    region: 'EU'

Similar issue for me - 5 errors on startup, exactly same as already posted, all in the same second, one per waze sensor.

Component works thereafter.

I use device tracker and zone like previous posted example

- platform: waze_travel_time
  name: Me To Home
  api_key: xxxxxxxxxxxxxxxx
  origin: device_tracker.xxxxxxxxxxx
  destination: zone.home
  scan_interval: 300
  region: EU

but did just notice I left the scan_interval and api_key in from my conversion of google travel time sensor…