-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Create time_travel component for google and waze #166
Comments
Does each platform always know the orig/destination lat/long ? We should make sure the platform standardizes the origin/destination config. So you either have |
What is measurement units? Also, for state, if we want this to be graphable, we should have the state be the number of minutes and a unit of measurement should be 'minutes'. How will this/can this work with Lyft/Uber or othe ride hailing services. If so, what would need to be added to support this? |
|
Doesn't look like the latest version of waze library needs it anymore. Now that I think about it we don't really need coordinates for time_travel attr.
I do want to have some way to get the name for the origin/destination so the lovelace card could be a table. then you can click on a row to open your gps app. this is how my waze card works
sorry i meant unit of measurement couldnt think of the word |
For some people using my waze card, they travel as part of their job so the regular 9-5 doesn't apply here. The google sensor is already rate limited to 5 min. i dont think the waze sensor needs to be but it uses an unofficial api ;/ |
The problem with a blanket 5 min |
looked into this |
The Waze API isn't reliable in my opinion. The main loop for getting information checks 3 servers which routinely reply with an "Internal Error" or No response. People have been complaining about this for a while now. I don't think a PR to the WazeRouteCalculator will fix the issues either because the Internal Errors are coming directly from Waze. I don't know if this is because this is an unofficial API or if the Waze servers are just that bad. |
Also as a side note. If this new travel time component is going to replace the existing one, we may want to investigate adding functionality to notify the user based on a time. Possibly an event of some sort. Something people always attempt to do is create a notification telling them when to leave based on a 'work arrival time' and the duration of the 'travel time'. Maybe change the sensor to a boolean (or add a new boolean sensor) with a 'arrival time', 'origin', 'destination', etc. |
there is no existing time_travel component. the |
We are saying the same thing. I was referring to this 'new' component this thread is referring to. When/if it gets implemented we should consider the following: Create a binary sensor that users can use to trigger automations based on an arrival time and the duration of travel. |
I think that can be handled through templating. You'll already have the duration in the state. My hope was to get this up as simple as possible so the lovelace card can be created. Most attributes for waze and google match up, I just want it formally standardized. |
Ah, you must not help people with templates much. Time and templating is a thing people do not understand. |
Yeah, I'll agree templating is a little advanced. As far as the basic TimeTravel component I was thinking this:
The waze/google platforms will inherit this and use update() and some kind of normalize method to adhere to attr structure
Then consts as well like SCAN_INTERVAL, UNITS, etc. Very basic stuff just to get this in. As far as binary sensors or anything else I think can be added in another PR. |
We'd need to add in distance. I've tried removing that in the past and people were not happy. At a minimum, we should keep what is currently in waze otherwise they will all complain. I'd argue the same for google's as well. It looks like google has a large set of attributes though. Also, are you okay with having origin and destination being lat, long when outside a zone, or without an address? |
ah yeah distance as well, thats what
I think address if given else lat,long string. |
We are just talking about base attributes right? Ones that will be common among both platforms? The google platform seems to do so much more. I'd hate to lose that functionality for the sake of 'making things common'. I also like @arsaboo's Idea of having defined times where polling rates are higher. Personally, after dealing with the poor waze API, I want to switch to google. |
Yes, I think this would only be common attributes. |
side note, |
One thing that would be absolutely fantastic is if this component could take multiple origins and destinations rather than a single one. For example my wife works at 10 different locations and I have a couple myself. Under the current architecture this requires 12 sensors. The current component is using the distance matrix and even says it supports multiple origins and destinations but it just discards them and takes the first one. This would allow a single call to google maps when possible and drastically reduce the amount of calls needed which is super important with the new quotas in place on the APIs. In an ideal world it would be a list with their own |
The waze api does not support multiple origins and destinations, it only support single origin and a single destination. The output can be multiple routes for the same origin and destination. |
This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions. For that reason, I'm going to close this issue. ../Frenck |
we currently have
google_travel_time
andwaze_travel_time
sensors. I was thinking to create atravel_time
component for these two platforms. Then we can create a travel time lovelace card.state: time to get there
attributes:
_get_location_from_entity
on TimeTravel component would get fromTRACKABLE_DOMAINS = ['device_tracker', 'sensor', 'zone', 'person']
The text was updated successfully, but these errors were encountered: