Waze travel time update


#121

Logger component, don’t have a link. Posting from phone


#122

Thanks. It is not a very long page [Logger]
but I obviously never read to the bottom - or more likely took it all in when I did read it.


#123

Ok It happened again. It happened at about 4:25pm CST yesterday (1/14). No serious warning, just all of a sudden the component stopped updating and an error in the log that it took longer than the scheduled update interval of 0:05:00. See the attached log. The log starts when I last restarted HA and the component stops updating at line 650. Before that point you’ll see the occasional Waze route calculator error, but the component would still update. About the only thing I can attribute this to is I had some internet connectivity issues last night. I don’t know what time they started, but it could have started as early as that time.

I had to change the extension from .log to .xml in order to upload it here, but it shouldn’t affect anything.

home-assistant.xml (86.9 KB)


#124

Happened again tonight. uptime of just over 3 days and the same error as before, just that the component took longer than the scheduled update time and the component stopped updating. this time I cannot pinpoint anything going on at that time so not sure what caused it to stop updating.


#125

Do you have internet connection at that point? Can you verify the waze api was up and running? It should recover with internet loss


#126

yes I had internet at the time it stopped the second time. According to https://status.waze.com/ they updated the maps about the same time I had issues. But they also updated them the 2-3 days prior and I didn’t have an issue then.


#127

I just noticed for the first time that my waze sensor is using km vs miles for distance. I guess I dont use this much, but… How do I get it to show miles, vs km


#128

you’d have to make a template sensor that converts km to miles. It’s funny, i’ve never checked what units the distance is in. But it comes from WazeRouteCalculator which is the api that the component uses. That API has no way to change from KM to miles. Anways, here’s a template that would work:

sensor:
  - platform: template
    sensors:
      route_in_miles:
        value_template: "{{ state_attr('domain.device','distance') * 0.621371 }}"
        unit_of_measurement: miles

#129

Ha, that’s funny. The reason I noticed was i was using the Waze lovelace card. First time I’ve noticed the distance listed. Template won’t solve that. :frowning:
Oh well for the moment I’ll just hide the distance.


#130

Yeah, sorry! sounds like a PR for the api we use.


#131

Had another hiccup last night. Previously the component had been working with an uptime of 15 days. Last night I had a planned internet outage of about 20 minutes. The component did not recover and the only warning message in the log was that it took longer than the expected update interval of “00:05:00”. It’s the same message I posted previously. I had to restart HA to get it to reconnect. So it would appear the component is not recovering after loosing connection.


#132

@petro Is there any way to delay Waze first run on HA startup?, I’m getting the errors below, and I believe it’s only because the entity doesn’t exist on startup.

2019-02-14 03:12:31 ERROR (Thread-17) [homeassistant.components.sensor.waze_travel_time] Unable to find entity device_tracker.2014_chevrolet_express_cargo_van
2019-02-14 03:12:31 ERROR (Thread-17) [homeassistant.components.sensor.waze_travel_time] Unable to find entity zone.home
2019-02-14 03:12:31 ERROR (Thread-20) [homeassistant.components.sensor.waze_travel_time] Unable to find entity zone.home
2019-02-14 03:12:31 ERROR (Thread-21) [homeassistant.components.sensor.waze_travel_time] Unable to find entity device_tracker.2018_gmc_yukon_xl
2019-02-14 03:12:31 ERROR (Thread-21) [homeassistant.components.sensor.waze_travel_time] Unable to find entity zone.home


#133

There isn’t a way without a PR. The whole component needs to be updated to the new model at some point too. You may be able to get rid of the errors if you place the sensor section at the end of your configuration.yaml, or at least after device_tracker section and the zone section.


#134

Okay

This mite be a little tough, since I’m using packages.

Looks like it’s creating errors for zone’s as well


#135

Actually, just looked at the git, looks like someone made a fix coming next version for this exact issue.

You can get the current copy from git and use it as a custom component until it’s released


#136

Awesome, Thanks.


#137

does the order in configuration.yaml set the order in which the components are loaded? I’ve always wondered about that and never gave this a thought…Would be too simple :wink: But really obvious too…


#138

I would assume so but I do not know for sure which is why I said “you may be able to get rid of the errors if”


#139

did a quick test, and can report the order in configuration.yaml has no consequence in my startup process…
Could have to do with my use of packages, but didnt notice any difference in startup order, or error messages by Hue, Waqi and Waze…


#140

packages would probably have an impact if they are split up. I would expect it to be an ordered dictionary but package may use a normal dictionary, where there is no order.