- id: car_track
alias: Tracker Car
trigger:
- entity_id: sensor.e208_mapdata
platform: state
- event: start
platform: homeassistant
action:
- data:
dev_id: car
battery: '{{states.sensor.e208_battery_level.state}}'
gps_accuracy: '15'
gps:
- '{{ (states.sensor.peugeot_e208.attributes["last_position"]["geometry"]["coordinates"][1]) }}'
- '{{ (states.sensor.peugeot_e208.attributes["last_position"]["geometry"]["coordinates"][0]) }}'
service: device_tracker.see
mode: single
P.S. It seems like I have to use [“energy”][1] as my car is on identity crisis and thinks it’s a hybrid car and [“energy”][0] is the nulled fuel information in my case. Use what works for you
The last position is not empty for me. I own an open Corsa. The coordinates are in home assistant, but I don’t have any experiences showing coordinates nor tracks in the card?
Can you give me a hint?
Did you add the automation I posted above? This one will fill the self made device tracker. Then it should have the coordinates and you can add it in a map lovelace tile. Worked nicely until my car went to coordinates = null mode… Solution not found yet, but likely it happened due to registering to a Telemaintenance service inside the app. If you can register such service, too… DONT (yet) ^^
And there were coorinates in the sensor.car_corsa_charge_mapdata, but i don’t have any device tracker that i can visualize in any map.
Can you help me out?
Strange… Maybe becuase of that:
Once device_tracker is enabled, a file will be created in your configuration dir named known_devices.yaml . Edit this file to adjust which devices to be tracked.
Has anyone managed to get the flobz app_decoder working for a Vauxhall Corsa-e in the UK at all? I’m struggling - I’ve tried a few different versions of the APK (from 1.27.0 up to 1.29.2) and I just get kicked out after entering GB as the country code:
What is your country code ? (ex: FR, GB, DE, ES...)
GB
Traceback (most recent call last):
File "/psa_car_controller/psa_car_controller/app_decoder.py", line 112, in <module>
token = res.json()["accessToken"]
KeyError: 'accessToken'
HOST_BRANDID : https://id-dcr.vauxhall.co.uk/mobile-services sitecode: 0V_GB_ESP
{"returnCode":"NEED_ACTIVATION"}
There’s a small amount of hassle for the first-run SMS/PIN routine, but it’s all documented in the readme.
(updated because my container code has been merged with the main psa_car_controller repo, and a new Docker Image repo set up to reflect that).
Build a template that reades the type attribute in the JSON and use that in the template for the Electric or Fuel depending on the value in object 0 and 1.
I use a sensor to pick the correct energy object in the list and use it in the rest of my templates
After upgrading (FLOBZ server and HA) or maybe reconfiguring my HA config i have a problem with the device tracker, maybe @Daniel_Reimer you can help me?
The problem is the device tracker seems to not receive the coordinates.
I see the coordinates in the attributes of the car.
And also the automation is running with:
2021-06-30 11:43:26 ERROR (MainThread) [homeassistant.components.automation.garage_corsa_position] Garage Corsa Position: Error executing script. Invalid data for call_service at pos 1: expected int for dictionary value @ data['battery']
2021-06-30 11:43:26 ERROR (MainThread) [homeassistant.components.automation.garage_corsa_position_2] Garage Corsa Position #2: Error executing script. Invalid data for call_service at pos 1: expected int for dictionary value @ data['battery']
2021-06-30 11:43:26 ERROR (MainThread) [homeassistant.components.automation.garage_corsa_position] Error while executing automation automation.garage_corsa_position: expected int for dictionary value @ data['battery']
2021-06-30 11:43:26 ERROR (MainThread) [homeassistant.components.automation.garage_corsa_position_2] Error while executing automation automation.garage_corsa_position_2: expected int for dictionary value @ data['battery']
When I start the HA module I have this error in the log :
Containerised psa_car_controller loading...
Traceback (most recent call last):
File "/psa_car_controller/server.py", line 8, in <module>
import web.app
File "/psa_car_controller/web/app.py", line 3, in <module>
import dash_bootstrap_components as dbc
ModuleNotFoundError: No module named 'dash_bootstrap_components'