jnxxx / homeassistant-connectedcars_io Goto Github PK
View Code? Open in Web Editor NEWHome Assistant integration for connectedcars.io (Min Volkswagen)
Home Assistant integration for connectedcars.io (Min Volkswagen)
After getting the integration added as a custom HACS repo, it worked to install, both in hacs and then under integrations after a restart.
But then after adding my credentials, it says it works, but no car device shows up, and the log says:
2021-11-27 11:08:26 INFO (MainThread) [homeassistant.setup] Setting up connectedcars_io
2021-11-27 11:08:26 INFO (MainThread) [homeassistant.setup] Setup of domain connectedcars_io took 0.0 seconds
2021-11-27 11:08:26 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.connectedcars_io
2021-11-27 11:08:26 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.connectedcars_io
2021-11-27 11:08:26 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.connectedcars_io
2021-11-27 11:08:27 WARNING (MainThread) [custom_components.connectedcars_io.sensor] Failed to add sensors: argument of type 'NoneType' is not iterable
2021-11-27 11:08:27 WARNING (MainThread) [homeassistant.components.sensor] Platform connectedcars_io not ready yet: None; Retrying in background in 30 seconds
2021-11-27 11:08:27 WARNING (MainThread) [homeassistant.components.binary_sensor] Platform connectedcars_io not ready yet: None; Retrying in background in 30 seconds
2021-11-27 11:08:27 WARNING (MainThread) [homeassistant.components.device_tracker] Platform connectedcars_io not ready yet: None; Retrying in background in 30 seconds
Enabling debug i can see that it correctly talks to the connectedcars.io, gets a token and gets a reponse JSON back with my cars data inside, but no car is added.
Hello,
I have installed manually and via hacs as described in the readme.
Unfortunately, the integration does not appear under "settings, device & services, integrations". I suppose it is under there that the password and email must be entered.
Can anyone help with what I'm doing wrong?
Best regards,
Hi
I'm using the integration for my Skoda Octavia. A couple of weeks ago, the "Health" entitlement started to report "problem". I got no warning lights or issues reported by the car or the "MinSkoda" app.
I have enabled debug logging for this and can see this in the "Got vehicle data" call:
"health": {"ok": false, "recommendation": null}
After update to v.1.0.1, location is not updated after short trips (0-5 minutes). I suspect it is because Ignition is never true. It always takes several minutes until Ignition is true after I turn on my car.
Hi,
I'm using the latest pre-release v1.1.0
, which contains additional sensors. I've refulled my car and audi_a5_mileage_since_refuel
is now unavailable
(was okay before refuel). audi_a5_fuel_economy
isn't updating either (after refuel - might be because of missing data). I have my own calculations/sensors based on refueling. Currently traveled 6km
with the usage of 0L
fuel. Is this a bug or something expected? There are no errors in the HA logs when this happens.
Last refill was 12 hours ago with the milage of 32296.0 Km. Fuel Price was 13.69 DKK.
- Traveled 6.0 Km (0L) since last refuel.
- Cost of 0.0 DKK
- Average consumption 0.0 Km/L.
Last drive was 11 hours ago ...
Mere et request om du måske kunne lave så man kan få data fra sidste køretur omkring ens sving, opbremsninger, accelerationer og RPM. altså alle ens hændelser
Hi,
I've been using v1.1.0
for a couple of weeks now and something is "wrong" with the economy calculations (I think). If you look at the screenshot below. My car has a tank size of 54L
. Which would mean, that the total range traveled since last refuel is 595,1 km
with the usage of 40L
fuel. Economy
would be 14,88 km/l
(595,1 / 40) ? Are these values calculated in the code or are these existing data from connectedcars?
Any chance of getting a namespace for Cupra Leon. Should be a Seat Leon, but with different url
reg Anders
Hi,
It looks like there still are some kind of bug(s) with the refueling event from ConnectedCars. Strangely it worked last time I refueled with the same version of the integration (v1.1.1).
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:696
First occurred: 10:31:13 (5 occurrences)
Last logged: 10:35:13
Update for sensor.audi_a5_mileage_since_refuel fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 696, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 957, in async_device_update
await self.async_update()
File "/config/custom_components/connectedcars_io/sensor.py", line 385, in async_update
distance_since_refuel = odometer_current - self._dict["Odometer"]
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
homeassistant-connectedcars_io/custom_components/connectedcars_io/sensor.py
Lines 381 to 387 in 3f4f010
This error originated from a custom integration.
Logger: custom_components.connectedcars_io.device_tracker
Source: custom_components/connectedcars_io/device_tracker.py:171
Integration: Connectedcars.io (Min Volkswagen) (documentation, issues)
First occurred: 10:31:13 (5 occurrences)
Last logged: 10:35:13
Unable to parse ignition timestamp. Err: Invalid isoformat string: 'None'
audi_a5_fuel_economy
is disabled as suggested in #15.Hi,
Am I the only one having 203 occurrences of this error today, because fuel_economy
can't be found? 😅 Integration is working - I just have a bunch of these logged.
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:732
First occurred: 12:08:26 (207 occurrences)
Last logged: 15:34:27
Update for sensor.audi_a5_fuel_economy fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 732, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 991, in async_device_update
await self.async_update()
File "/config/custom_components/connectedcars_io/sensor.py", line 428, in async_update
self._state = round(
^^^^^^
TypeError: type NoneType doesn't define __round__ method
homeassistant-connectedcars_io/custom_components/connectedcars_io/sensor.py
Lines 427 to 433 in 3f4f010
Hi,
I'm using the latest prerelease v1.1.0
. Every time I refuel my car, I get an error on sensor.audi_a5_mileage_latest_month
. It almost looks like it can't read the value after the first few miles. It will start working the next day (sometimes) or if i travel like +50 miles. Currently traveled 24km
since refuel.
At the same time sensor.audi_a5_mileage_since_refuel
has become unavailable
.
(Note: The strange thing is, that the Economy
sensor is read/loading correctly)
This error originated from a custom integration.
Logger: homeassistant.helpers.entity
Source: custom_components/connectedcars_io/minvw/minvw.py:65
Integration: Connectedcars.io (Min Volkswagen) (documentation, issues)
First occurred: 10:01:31 (1 occurrences)
Last logged: 10:01:31
Update for sensor.audi_a5_mileage_latest_month fails
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1152, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 874, in _resolve_host
addrs = await self._resolver.resolve(host, port, family=self._family)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/resolver.py", line 33, in resolve
infos = await self._loop.getaddrinfo(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 867, in getaddrinfo
return await self.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Try again
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
await self.async_update()
File "/config/custom_components/connectedcars_io/sensor.py", line 333, in async_update
) = await self._connectedcarsclient.get_latest_years_mileage(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/connectedcars_io/minvw/minvw.py", line 96, in get_latest_years_mileage
vehicle_data = await self.api_request(req_param)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/connectedcars_io/minvw/minvw.py", line 65, in api_request
async with session.post(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1166, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.connectedcars.io:443 ssl:default [Try again]
Jeg har et par gange, i løbet af et par måneder, været ude for at dataene fra connectedcars.io har været forældede - i ét tilfælde flere dage, hvor VW bekræftede at der var knas i teknikken.
Ville det give mening at integrere et heartbeat timestamp, for hvornår der sidst er modtaget ændringer fra bilen?
Indtil jeg fandt din integration, brugte jeg Node-RED, til at kalde connectedcars.io, og give mig de ønskede data. Her hentede jeg bl.a. timestamp for følgende:
chargePercentage {
pct
time
}
rangeTotalKm {
km
time
}
ignition {
time
on
}
position {
latitude
longitude
direction
time
}
Deraf kunne jeg vælge det nyeste timestamp, og dermed vide hvornår bilen sidst var "set".
Hey, skide fed integration!
Men kan se at fuelpercentage er en drillepind ved flere, men er der en måde jeg kan fixe det på? Den står altid på 100%, uanset liter.
Halløj, jeg bruger med stor glæde integrationen.. er der nogen måde at skrue op på opdateringshastigheden på geolocation? Fx bare ned til 30 sek I stedet for 1 min?
Jeg bruger den til at tænde for et par forskellige lys og formodentlig også en port i fremtiden inden bilen rammer matriklen, men enkelte gange skal jeg lige vente på den registrerer mig indenfor en zone.. jeg kunne self bare øge zonen, men hvis der nu var en oplagt ændring i denne integration ville jeg gerne skrue på den her:-)
Mvh
I have installed the latest HAOS v11.2. When trying to add this repository, it fails with the error message:
2023-12-07 13:16:22.338 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /store/repositories - https://github.com/jnxxx/homeassistant-connectedcars_io is not a valid add-on repository
What am I doing wrong, or do I have to revert to manual installation?
Hej. Får desværre ingen af mine biler ind i HA efter installation af denne enhed
I can't find this integration in HACS right now.
when adding the integration I type my credentials as described.
but nothing happen no car show up also tried restart.
`Denne fejl stammer fra en brugerdefineret integration.
Logger: custom_components.connectedcars_io.sensor
Source: custom_components/connectedcars_io/sensor.py:67
Integration: Connectedcars.io (Min Volkswagen) (documentation, issues)
First occurred: 06.20.13 (5 occurrences)
Last logged: 06.24.56
Failed to add sensors: 'data'`
`Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:269
Integration: Sensor (documentation, issues)
First occurred: 06.20.13 (1 occurrences)
Last logged: 06.20.13
Platform connectedcars_io not ready yet: None; Retrying in background in 30 seconds`
Hej @Kjagd
Jeg har et par andre spørgsmål, som ikke relaterer sig til leads. Håber det er ok.
Super hvis du kan svare, men naturligvis ikke noget du skal bruge lang tid på.
Brug af logo
Tror du nogen hos Connected Cars vil have noget imod jeg uploader jeres logo til Home Assistant Brands repo?
Man skal ved et pull request angive at man har rettigheder til at bruge logoet, hvilket jeg selvsagt ikke har.
Jeg tror at andre rask væk uploader logoer de ikke har rettigheder til, men det gør jeg altså ikke.
Det bevirker to ting:
Fuel issues
Ved du om der er sket ændringer på fuelPercentage
og refuelEvents
?
På min egen bil oplever jeg at fuelPercentage
siden februar har sagt 50% konstant. fuelLevel
virker stadig fint.
Og i løbet af juni er den stoppet med at registrere refuelEvents
.
Begge dele har fungeret tidligere. Og det lyder til på andre, at det stadig gør for dem. Men har ingen ide om omfang.
{
"data": {
"vehicle": {
"id": "79334",
"refuelEvents": [
{
"litersAfter": 42,
"litersBefore": 9,
"time": "2023-06-05T16:42:02.000Z"
},
{
"litersAfter": 42,
"litersBefore": 14,
"time": "2023-04-05T19:23:58.000Z"
}
],
"fuelLevel": {
"time": "2023-09-11T17:33:42.000Z",
"liter": 34
},
"fuelPercentage": {
"time": "2023-02-02T08:06:35.000Z",
"percent": 50
}
}
}
}
Der er tanket to gange siden.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.