Tried both, same issue.
Do you have http or https for OAuth Redirect URL?
Tried both, same issue.
Do you have http or https for OAuth Redirect URL?
I’d like some clarification on this as well. I just redid my HA install and didn’t plan to open it up to the internet until I find a solution that I like. So if my rpi is no available to the internet, my Automatic sensor may not work?
Hi guys,
Documentation is a bit backwards. Documentation mentions to edit URL https://redacted.duckdns.org/api/automatic/callback however this URL belongs to the URL field not the OAuth URL field. The OAuth URL field simply contains an example with http://localhost/redirect.
Simply put, their example URL belongs to the URL field but their instructions mention to edit the OAuth URL field.
In any case, this save issue for the OAuth URL field is preventing the configure action in HASS from completing the redirect piece of the authorization since it keeps pointing to http://localhost/redirect
I am on HASS.IO 0.52 btw.
At the risk of being redundant, but in an effort to be crystal clear, here’s the info I have entered at the developer site AND what is currently working for me:
URL:
https://redacted.duckdns.org
OAuth Redirect URL:
https://redacted.duckdns.org/api/automatic/callback
That was it, ty tggman. So the instructions need to be updated to the above and note that the reference URLs within the Automatic app settings on the Automatic side should be ignored.
Setting the URL was the part I was missing to save my callback url. It wouldn’t save unless the URL was set first. Also having the correct Redirect URL helped too thanks @tggman
Thanks @tggman for the clear explanation.
Is it the expected behavior for the component to ask for authorization after every home assistant restart? I get an Automatic Configurator card after every restart from which I have to re-authorize/re-link home assistant with Automatic.
I too am asked to reauthorize after every home assistant restart, and I read somewhere that this was expected.
Are you receiving any real-time stream of events?
From the Readme:
# Fetch a list of all trips in the last 10 days
min_end_time = datetime.utcnow() - timedelta(days=10)
trips = yield from session.get_trips(ended_at__gte=min_end_time, limit=10)
print(“TRIPS”)
print(trips)
print(trips[0].start_location.lat)
print(trips[0].start_location.lon)
print(trips[0].start_address.name)
print(trips[0].distance_m)
print(trips[0].duration_s)
No real time location at all
YES. I AM receiving real time LOCATION updates through the standard home-assistant device tracker component. Note that some “Scopes” (e.g. heartbeat = real-time location requests) are available upon request and require approval by Automatic Labs.
Here are my scopes lists…
Available Scopes
scope:public Access to public information about user.
scope:user:profile Access to user’s profile.
scope:location Access to historical location.
scope:current_location Access heartbeat location updates in realtime during a drive.
scope:vehicle:profile Access to vehicle information.
scope:vehicle:events Access to vehicle events details.
scope:trip Access to trips that are visible to a user.
scope:behavior Access to user’s driving behavior summary stats.
Unavailable Scopes
scope:vehicle:vin Access to VIN.
scope:adapter:basic Direct bluetooth access to all adapters on the user’s account.
With the exception of the following, what other attributes do you have in HA?
latitude: 40.90779
longitude: -73.841872
fuel_level: 50
Your list of attributes, for the most part, matches mine:
latitude: redacted
longitude: redacted
gps_accuracy: 5.2
fuel_level: 73
Do you have a list of the Real-Time Events?
I just added the “ignition:on” from the docs and it works, the only issue is, I’m not sure how to specify one particular vehicle.
I’m guessing it may be the following?
Apparently not. Could you PLEASE explain in detail how to “expose” those sensors in HASS? It would be very much appreciated.
They are not sensors per say, but real-time events that is updated in HA and can be used in automation’s.
I have tested the one from the docs and it works well, except that it fire’s for each vehicle and I’m not sure to to specify each device/car.
automation:
- trigger:
- platform: event
event_type: automatic_update
event_data:
type: "ignition:on"
action:
- service: tts.amazon_polly_say
data_template:
entity_id: media_player.living_room
message: Chevy, has started.
Ah yes. I remember this now. One of those things I meant to loop back one day and try. Thanks! As far as specifying the vehicle, its not clear to me either, but there’s an example in the Automatic Labs docs that may provide a clue:
},
"type": "ignition:on",
"created_at": 1383448450201,
"time_zone": "America/Los_Angeles",
"location": {
"lat": 37.757076,
"lon": -122.448120,
"accuracy_m": 10,
"ts": 1383448450201
},
"vehicle": {
"id": "C_8e7b567626c26695",
"year": "2001",
"make": "Acura",
"model": "MDX",
"color": "#d15fed",
"display_name": "My Speed Demon"
},
"device" : {
"id": "021ac91c826b12eca99e685c"
}
}
specifically the vehicle id which may? match the device_tracker id in HASS?
… funnier yet, it turns out I was already using it for an Input Select update:
- alias: "AutoPro Real-Time Event: ignition off"
hide_entity: true
trigger:
platform: event
event_type: automatic_update
event_data:
type: "ignition:off"
action:
# - service: script.turn_on
# entity_id: script.align_katy_autopro
- service: input_select.select_option
data_template:
entity_id: input_select.sonata09_status
option: "Parked"
- alias: "AutoPro Real-Time Event: ignition on"
hide_entity: true
trigger:
platform: event
event_type: automatic_update
event_data:
type: "ignition:on"
action:
# - service: script.turn_on
# entity_id: script.align_katy_autopro
- service: input_select.select_option
data_template:
entity_id: input_select.sonata09_status
option: "Driving"