Waze travel time update

@petro I am using the code you posted, I am not getting startup errors either, but am still getting

2019-03-10 11:36:06 WARNING (SyncWorker_11) [custom_components.waze_travel_time.sensor] Error on retrieving data: empty response
2019-03-10 11:36:06 WARNING (SyncWorker_18) [custom_components.waze_travel_time.sensor] Error on retrieving data: empty response
2019-03-10 11:36:06 WARNING (SyncWorker_16) [custom_components.waze_travel_time.sensor] Error on retrieving data: empty response
2019-03-10 11:36:06 WARNING (SyncWorker_10) [custom_components.waze_travel_time.sensor] Error on retrieving data: empty response
2019-03-10 11:36:06 WARNING (SyncWorker_15) [custom_components.waze_travel_time.sensor] Error on retrieving data: empty response

about every 10 minutes so far. I have 5 sensors all of which use a device tracker for at either origin or destination

Edit: I will say that is did fix another error that has been bugging me for months. Iā€™ve had issues where waze calculates my distance in KM even though Iā€™m in US, selected US, and have imperial units set in HA.

strangest thing: Iā€™ve put back the CC in service again, because I liked the idea of less startup errors, and happen to click the dev-info. What do you know:

this is most remarkable because:
1- this want there before
2- this appears after using the CC which is supposed explicitly to get rid of these errorsā€¦

somehow the dev-info log shows other logs than the hone-assistant.logā€¦

@Mariusthvdb @ptdalen
Iā€™m not sure that itā€™s actually using the PR for the WazeRouteCalculator. That is essential for removing the errors. Iā€™m running it in my dev version and I have almost no empty response errors in 3 hours with 11 waze sensors. Iā€™m thinking that itā€™s not using the PR.

EDIT: Iā€™m going to leave this running for a few hours. If you guys would like, PM me your typical lat/long directions and I can add them to my dev tests to verify they work without exceptions.

Right now Iā€™m testing 3 sensors inside each region without any Response errors.

Hi, after 0.89, or around that time, my waze route calculation goes banana: my sensor (route from home to work) should be 15 minutes (as in in Waze website) but the sensor in HASS shows 302 minutes.

Any clue?

  - platform: waze_travel_time
    origin: via d____________, Italy
    destination: via __________Italy
    name: da Scuola a Casa
    icon: mdi:home-account
    region: 'EU'

After a few hours I started seeing this in my logs, not sure if itā€™s related or not, but I dont remember seeing this before.

Iā€™m going to take out the custom componet, and try again and see how it goes

2019-03-10 15:16:40 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139908564868288] Client exceeded max pending messages [2]: 512
2019-03-10 15:16:40 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139908564868288] Client exceeded max pending messages [2]: 512
2019-03-10 15:16:41 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139908645467024] Client exceeded max pending messages [2]: 512
2019-03-10 15:29:16 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139907867121592] Client exceeded max pending messages [2]: 512
2019-03-10 15:29:16 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139908566233384] Client exceeded max pending messages [2]: 512
2019-03-10 15:29:16 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139907867121592] Client exceeded max pending messages [2]: 512
2019-03-10 15:29:16 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.139908566233384] Client exceeded max pending messages [2]: 512

Wonā€™t be able to help without seeing the full addresses, sorry. Some things were changed in WazeRouteCalculator.py. You can raise an issue with the functionality.

I copy/pasted exactly how is in the Waze app (after Waze it adjusted slightly the address with its database)

This API has nothing to do with the waze app. They use different apiā€™s.

And as I said, I canā€™t do anything without the addresses. Saying ā€œThis doesnā€™t work, fix itā€ without giving information doesnā€™t help.

But was working until few days ago

Hey

I also have the same problem. The travel times went mental lately. A drive that normally takes 7-8 mins is now 35mins, and a drive thatā€™s about 2 hours now takes 18mins.

As mentioned above by petro, itā€™s not the HA components fault.

I tested the WazeRouteCalculator and confirmed the times are way out.
It could be an inaccurate address causing your issue so include the address (and country name) that appears as a suggestion if you use the Waze app (though in my testing I canā€™t make it match the app times and in some cases, I canā€™t even get close).

WazeRouteCalculator changed the ā€˜address converterā€™ method between version 0.6 and 0.9. I can look into the issues. So can the developer of the WazeRouteCalculator. BUT WE NEED THE ADDRESS. @Klagio Iā€™ve said it 3 times. Not sure how else I can get the point across.

2 Likes

the below were working the other day, are not now. Basically none is working now

via del cenacolo 53, Rome, Italy
Via di Grottarossa, 1035, 00189 Roma RM, Italia
Via dei Monti Tiburtini, 385/389, 00157 Roma RM
Piazzale della Stazione Tiburtina, 00162 Roma RM, Italia
Roma Termini, 00185 Roma RM
Aeroporto di Fiumicino T1/T2/T3, Via dellā€™ Aeroporto di Fiumicino, Fiumicino, Metropolitan City of Rome
Aeroporto ā€œG.B. Pastineā€ di Roma Ciampino, Via Appia Nuova, Rome, Metropolitan City of Rome

Probably be best to PM me and delete this post if you want privacy.

they are all public places

1 Like

@Klagio, @xt16johnny

Iā€™ve spent some time looking into the address issue and Iā€™ve found the culprit. But the news is not good.
So what happens is we send the address to waze. They then send a list of GPS locations with a few attributes back. Waze has 3 servers, United States/North America, Isreal, and Rest of World. So when everyone sets their region as US, NA, IL, EU, or AU, it corresponds to these servers. There are 2 types of servers for each region, one that translates addresses into gps locations, and one that gets a route between gps locations. So on to the problem. The server for the EU is not returning the correct gps location for some parts of the EU. If you were to switch to the US region, it would work for translating the address to GPS. But itā€™s not that easy. If you do that, the calculations between routes will return the wonderful ā€˜empty responseā€™ bug. Itā€™s a catch-22.

Just see for yourself:

Address: via del cenacolo rome italy

EU server responses (4th choice is close, but not correct location)
https://www.waze.com/row-SearchServer/mozi?q=via+del+cenacolo+rome+italy&lang=eng&origin=livemap&lat=47.498&lon=19.04

4th choice

{  
   "bounds":null,
   "businessName":null,
   "city":"Roma",
   "location":{  
      "lat":42.000160217285156,
      "lon":12.385350227355957
   },
   "name":"Via del Cenacolo, Roma, Lazio",
   "number":null,
   "provider":"waze",
   "segmentId":-1,
   "state":"Lazio",
   "street":"Via del Cenacolo",
   "streetId":0
}

US server responses (first choice is correct location)
https://www.waze.com/SearchServer/mozi?q=via+del+cenacolo+rome+italy&lang=eng&origin=livemap&lat=47.498&lon=19.04

1st and correct choice

{  
   "bounds":{  
      "bottom":42.0027630302915,
      "left":12.3821763,
      "right":12.3855891,
      "top":42.0000650697085
   },
   "businessName":null,
   "city":"Roma",
   "location":{  
      "lat":42.001529693603516,
      "lon":12.384178161621094
   },
   "name":"Via del Cenacolo, 00123 Roma RM",
   "number":null,
   "provider":"waze",
   "segmentId":-1,
   "state":"Lazio",
   "street":"Via del Cenacolo",
   "streetId":0
}

IL server responses (no response)
https://www.waze.com/il-SearchServer/mozi?q=via+del+cenacolo+rome+italy&lang=eng&origin=livemap&lat=47.498&lon=19.04

2 Likes

Thanks for your time in resolving this issue.

What about inserting the GPS coordinates instead of the address, would that work (I can try later today) ?

In my case is a one time operation, no big deal.

EDIT, YES, it works, just go to maps.google.com enter the address you need, point it on the map, copy/paste the GPS coordinates in your waze_travel_time in origin/destination, and voilaā€™ ā€¦ problem solved

Replacing all with GPS coords worked for me too, thanks for the find

In UK, using Region EU

Is slow to populate all my sensors though (about 10mins)

I also left region, although probably we could take it out, since GPS coordinates are unique.

Also for me it takes 10 minutes after reboot to populate sensors, but was like that before too

Soon that will change :stuck_out_tongue:

2 Likes

I donā€™t use any addresses ever, Iā€™m only using zones and device_trackers which I would have thought reduced to latitude and longitudes, but I still have hundreds of these errors.