Giter VIP home page Giter VIP logo

homeassistant-volkswagencarnet's People

Contributors

antoni-czaplicki avatar arthur1472 avatar chodorenko avatar dependabot[bot] avatar fredrik-oberg avatar ghveem avatar hwikene avatar isabellaalstrom avatar johnan avatar ktibow avatar leandroissa avatar leedsdba avatar madmic1314 avatar milkboy avatar ohaue avatar omaneso avatar opsiorobinostlund avatar robinostlund avatar senbei123 avatar sibyte avatar stickpin avatar tubalainen avatar wizzor avatar wrt54g avatar zzarne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-volkswagencarnet's Issues

Could not parse gps value

Hi,

I'm getting a lot of this errors in the log:

Could not parse gps value for golf: ('?', '?', None, None, None)

I guess you should look if the returned values are valid

Greets,
Sören

Udate state / Refresh button

it would be nice to add an update button, to fetch the current state of the car. Same like you can do on the android app.

Invalid config

Hi,

This is great! Cant wait to get this up and running!

This may be my own fault by wrong config, however I've checked and double checked, and cannot find the mistake. This is what's in the log:
2018-01-17 09:58:56 ERROR (MainThread) [homeassistant.setup] Error during setup of component volkswagen_carnet Traceback (most recent call last): File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 199, in _async_setup_component component.setup, hass, processed_config) File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup future.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/volkswagen_carnet.py", line 53, in setup hass.data[CARNET_DATA] = VWCarnet(hass, username, password) File "/home/homeassistant/.homeassistant/custom_components/volkswagen_carnet.py", line 100, in __init__ self._carnet_login() File "/home/homeassistant/.homeassistant/custom_components/volkswagen_carnet.py", line 184, in _carnet_login responseData = json.loads(r.content) File "/usr/lib/python3.5/json/__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes'
This is my config:

volkswagen_carnet:
username: [email protected]
password: Blxxxxxxx
update_interval: 1 # specify in minutes how often to fetch status data from carnet (optional, default 1 min)

(The indents are correct in my config but it does not show in the above example)

The files are in the correct folder by using Git clone..
It seems like a login issue?

My apologies if this is my own fault, I will then remove this post.

CR: Binary Sensor binary_sensor.vw_carid_door_locked

Hi

Maybe binary_sensor.vwcarid_door_locked should be of component type 'lock' instead of binary sensor? Then you align to Tesla and Volvo on Call component. Also Homebridge doesn't support binary sensor of class "Door" while lock is supported in Homekit.

Best regards
Peter

Installed latest update but no climate control?

Hello!
i just installed the latest commit (d421177) but i cant figure out how to control the climatization now, nothing has changed to the existing controls. Is there anything that i have to configure in addition to installing the update?

Invalid config message: The following components and platforms could not be set up: volkswagencarnet

Hi Robin!
Im running Home Assistant 0.87 on Hassio with Raspberry Pi B+ and would like to connect HA to my Car-Net account, but Im failing already at initial setup, and would really appreciate some help.

I followed your first steps in the readme, by downloading and copying all the necessary files into my "/config/custom_components/volkswagencarnet/." folder.
The files are:

switch.py
sensor.py
lock.py
device_tracker.py
binary_sensor.py
__ init __.py

Then I added the lines into my configuration.yaml:

volkswagencarnet:
  username: '[email protected]'
  password: my_password
  update_interval: 
    minutes: 60

First, I wanted to make sure the connection to Car-Net was fine before adding any yaml coding, so I restarted Hassio. After restart, the only thing I can see in Developer -> States is this notification:

persistent_notification.invalid_config

title: Invalid config
message: The following components and platforms could not be set up:

Please check your config.

Is there anything I have missed? Also, I dont see any volkswagencarnet.py file (which people are mentioning) in my custom_components folder, and I cant see it in your repository either.

Any idea whats wrong?
Thanks in advance and greetings from Stockholm, Sweden :)

/Martin

Locks

Is anyone able to lock/unlock locks in Ha 0.88.1?

I got everything working except for locks, gets NotImplementedError:

"Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/service.py", line 289, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/lock/init.py", line 124, in unlock
raise NotImplementedError()
NotImplementedError"

Can't install package in Home Assistant

Hi all,

I'm using a Raspberry Pi 2 with raspbian where I have installed Home Assistant.

I have installed this module in custom_components. I also configured the file 'configuration.yaml' with these values:

volkswagencarnet:
  username: [email protected]
  password: my_password
  scan_interval:
    minutes: 2
  name:
    wvw1234567812356: 'Whatever'

Then, I see logs and this is what I see:

2019-09-07 20:36:44 INFO (SyncWorker_12) [homeassistant.util.package] Attempting install of volkswagencarnet==4.0.23

Nothing else about volkswagencarnet module. And also, home assistant doesn't start. It freezes when says "Querying device status".

If I delete parameters VWcarnet parameters from configuration.yaml, everything works fine.

Ideas?

Thanks in advance.

ValueError: invalid literal for int() with base 10: '2,750'

I'm seeing a lot of these from the HA log. Seems to be working OK still not sure what they mean if anything

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 215, in async_update_ha_state
state = self.state
File "/config/custom_components/sensor/volkswagen_carnet.py", line 25, in state
val = getattr(self.vehicle, self._attribute)
File "/config/deps/lib/python3.6/site-packages/volkswagencarnet.py", line 453, in distance
return int(self.data.get('vehicle-details',{}).get('distanceCovered').replace('.', ''))
ValueError: invalid literal for int() with base 10: '2,750'

Error first boot

I got this error, anyone a idea?

2018-04-05 08:42:56 ERROR (MainThread) [homeassistant.setup] Error during setup of component volkswagen_carnet
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/setup.py”, line 145, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/volkswagen_carnet.py”, line 125, in setup
return update(utcnow())
File “/config/custom_components/volkswagen_carnet.py”, line 110, in update
if not connection.update():
File “/config/deps/lib/python3.6/site-packages/volkswagencarnet.py”, line 231, in update
loaded_cars = self.get(’-/mainnavigation/get-fully-loaded-cars’)
File “/config/deps/lib/python3.6/site-packages/volkswagencarnet.py”, line 211, in get
return self._request(self._session.get, ref, rel)
File “/config/deps/lib/python3.6/site-packages/volkswagencarnet.py”, line 199, in _request
res = res.json(object_hook=_obj_parser)
File “/usr/lib/python3.6/site-packages/requests/models.py”, line 892, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.6/site-packages/simplejson/init.py”, line 535, in loads
return cls(encoding=encoding, **kw).decode(s)
File “/usr/lib/python3.6/site-packages/simplejson/decoder.py”, line 370, in decode
obj, end = self.raw_decode(s)
File “/usr/lib/python3.6/site-packages/simplejson/decoder.py”, line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 57 column 3 (char 58)

Plugin (partially) not working with non-electric engine VW cars

After fiddling around with the code for this plugin the last days, Im starting to realize it was made for mainly electric engine VW cars. There are several things that makes me believe this. And I think Robin (the developer of this plugin) needs to have a look at how the VW Car-Net EManager Dashboard looks like for non-electric VW cars that have Diesel/Petrol engines only, as the URLs are apparently not the correct. Either VW has changed something on their website with latest updates, or maybe non-electric and electric cars have different dashboards.

Let me take it from start.

I have a non-electric VW Arteon, including climatisation working with Car-Net.
I made many attempts the last days to get this plugin working on my Hassio (both version 87.1 and latest 89.1) and had a problem to even get the addon or component to connect to Car-Net, with a Error 400.

As @rickardhho , @Artionet and several others has mentioned, the Error 400 is caused by this URL being incorrect to retrieve emanager information:
https://www.volkswagen-car-net.com/portal/user/xxxxxx/yyyyyyyyyyyyyyyyyy/-/emanager/get-emanager
Some people suggested to change the last part "get-emanager" to "getemanager".
This is made by editing line 255 in the file volkswagercarnet.py which you can find in folder /config/deps/lib/python3.7/site-packages/

The line looks like this:

vehicle_emanager = self.get('-/emanager/get-emanager', rel)

But as far as I can see, changing the url to '-/emanager/getemanager' is not a solution. This URL is incorrect (at least for non-electric VW cars) as it only brings you to the main dashboard again.

Therefore, when I changed that line, I got many errors (see here: #26 (comment))

BUT eventually, thanks to @cyberjunky in the thread here I got the plugin to work with my non-electric Arteon, by completely removing the fetch of all e-manager information, editing the lines 254 to 263 in volkswagencarnet.py:

        #fetch vehicle emanage data
        #REMOVED vehicle_emanager = self.get('-/emanager/getemanager', rel)
        # fetch vehicle location data
        vehicle_location = self.get('-/cf/get-location', rel)
        # fetch vehicle details data
        vehicle_details = self.get('-/vehicle-info/get-vehicle-details', rel)
        #REMOVED if vehicle_emanager.get('errorCode', {}) == '0':
        #REMOVED    if vehicle_emanager.get('EManager', {}):
        #REMOVED        self._state[vin]['emanager'] = vehicle_emanager.get('EManager', {})

This way, the plugin and component was successfully installed upon boot of Hassio and HomeAssistant, no more errors and I was able to get a lot of information from my car with fuel, car info, doors locked or unlocked etc etc... and I can now also unlock and lock the car with switches.

Some of the values are fetched from this page, as far as I can tell:
https://www.volkswagen-car-net.com/portal/user/xxxxxx/yyyyyyyyyyyyyyyyyy/-/vehicle-info/get-vehicle-details

The problem though, is that my climatization or window heater features are not accessible or even detected this way in Home Assistant. My Arteon is not electric engine car, but the climatization and window heater features are included, and as far as I can see, all these values are located under E-Manager (/emanager/get-emanager), which I obviously removed from loading, to get the plugin to even work with my car.

So...

if you have a non-electric engine VW car and just want to get some car details and ability to lock/unlock your car, then just remove the emanager lines as stated above.

But my personal main reason even using this plugin, is to be able to remotely start the climatization within Home Assistant, instead of the Car-Net smartphone app.

So, now I would like to ask Robin @robinostlund , could you please have a look on how this plugin could be re-made and working with non-electric VW cars including climatization and window heaters as well? Im sure many of us would really appreciate it!

Thank you in advance

combustion_engine_heating missing

Hi,

I have a brand new Passat GTE, for which I can turn on the combustion_engine_heating through VW's own web portal. The custom component works in all other respects, but the new combustion_engine_heating entity is missing for me.

Any ideas as to why?

Odometer reading is not updated

Unfortunately, the odometer reading is not updated. Only after an HA reboot, the value was updated.

Update 20:20: It seems that it takes a long time for the value to be updated. Now, after 11 hours, odometer reading has been updated.

The only errors I see in the logs are the following:
2019-05-15 11:15:33 WARNING (SyncWorker_13) [volkswagencarnet] Failure when communcating with the server: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/xxx/xxxxx/-/emanager/get-emanager, url: https://www.volkswagen-car-net.com/portal/user/xxx/xxxxx/-/emanager/get-emanager

2019-05-15 11:20:34 WARNING (SyncWorker_35) [volkswagencarnet] Failure when communcating with the server: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/xxx/xxxxx/-/emanager/get-emanager, url: https://www.volkswagen-car-net.com/portal/user/xxx/xxxxx/-/emanager/get-emanager

Unable to start carnet - no real values in dashboard

When Home Assistant is starting I get this error:

2019-10-01 16:16:49 DEBUG (SyncWorker_8) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-01 16:16:49 INFO (SyncWorker_8) [custom_components.volkswagencarnet] Adding data for VIN: xxxxxxxxxxxxxxxx from carnet
2019-10-01 16:16:49 ERROR (MainThread) [homeassistant.setup] Error during setup of component volkswagencarnet
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 172, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/volkswagencarnet/__init__.py", line 149, in setup
    return update(utcnow())
  File "/config/custom_components/volkswagencarnet/__init__.py", line 137, in update
    discover_vehicle(vehicle)
  File "/config/custom_components/volkswagencarnet/__init__.py", line 107, in discover_vehicle
    dashboard = vehicle.dashboard(mutable = config[DOMAIN][CONF_MUTABLE])
  File "/usr/local/lib/python3.7/site-packages/volkswagencarnet.py", line 392, in dashboard
    return Dashboard(self, **config)
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 469, in __init__
    for instrument in create_instruments()
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 470, in <listcomp>
    if instrument.setup(vehicle, **config)
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 29, in setup
    if not self.is_supported:
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 69, in is_supported
    if hasattr(self.vehicle, self.attr):
  File "/usr/local/lib/python3.7/site-packages/volkswagencarnet.py", line 512, in distance
    return int(value)
ValueError: invalid literal for int() with base 10: '--'

The plugin authenticates just fint, and keeps updating from carnet according to the log:

2019-10-01 16:21:50 DEBUG (SyncWorker_13) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-01 16:26:51 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet] Updating data from volkswagen carnet

I suspect it is because the values in the dashboard is not updated and actually contains the values --.

Screen-Shot-2019-10-01-16-21-08 62

Component becomes unresponsive - requires restart of HASS

Hello!

Because of the We Connect "reasons" it seems like long downtime at the VW server ends causes the component not to reconnect once the centralized We Connect servers has undergone yet another "Maintenance to server - we are making things better" episode and are back online.

Can the code be optimized in any way so that we do not have to restart hass so often to gain back communication with our cars?

My possible suggestions to a solution would be:

  • Update the code so that it retires to reconnect in eternity, with a reasonable interval
  • Make a service that we can call via an automation to "restart" the component

Tack Robin! <3

"Last connected" not updated

"Last Connected" shows yesterday 16:01. But value for Electric range left & charging time left was updated just a little while ago.

screenshot 2019-01-16 10 36 47
screenshot 2019-01-16 10 37 08

I tried a restart of HA to see if it changed anything, it didn't (at 10:05).

I just found this in the log:

2019-01-16 10:31:01 ERROR (SyncWorker_13) [volkswagencarnet] Failed to request vehicle update

Running the little test script gives this output:

$ ./test.py
Vehicle VIN: X
This vehicle supports:
 Position: True
 Climatisation: True
 Service Inspection: True
 Battery Level: True
 Parking Light: True
 Distance: True
 Model: True
 Model Year: True
 Model Image: None
 Charging: True
 External Power: True
 Window Heater: True
 Charging time left: True
 Door Locked: True
 Electric Range: True
Vehicle information:
 Distance: 65258
 Last Connected: 2019-01-16 10:21:00
 Next Service: 50 Dag(ar) / 11.300 km
 Charging Time Left: 10
 Electric Range: 46
Vehicle States:
 Is Doors Locked: False
 Is Climatisation On: False
 Is Parking Lights On: True
 Is Window Heater On: False
 Is Charging On: True
 Is Request in progress: True

Change sensor to binary_sensor

Hello!

Please change "on/off" sensors to binary_sensor instead of sensor.

Reason is Grafana and the possibility to integrate this into my graphs :)

Multiple cars in car-net leads to 400 Client error

I got the following error messages after installation:

2019-03-17 20:02:18 WARNING (MainThread) [homeassistant.setup] Setup of volkswagencarnet is taking over 10 seconds. 2019-03-17 20:02:19 WARNING (SyncWorker_14) [volkswagencarnet] Failure when communcating with the server: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/******/*****/-/vsr/get-vsr, url: https://www.volkswagen-car-net.com/portal/user/******/*****/-/vsr/get-vsr 2019-03-17 20:02:19 WARNING (SyncWorker_14) [volkswagencarnet] Could not update information from carnet: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/******/*****/-/vsr/get-vsr 2019-03-17 20:02:19 WARNING (SyncWorker_14) [custom_components.volkswagencarnet] Could not query carnet 2019-03-17 20:02:19 ERROR (MainThread) [homeassistant.setup] Setup failed for volkswagencarnet: Component failed to initialize

After looking at a couple of the other issues giving 400 client errors with hybrid cars I tried to remove my hybrid car from car-net, keeping only my full electric car. A restart later and everything worked fine. So it seems like there is trouble with the queries when there's more than one car registered in car-net.

Currently I don't have the remote subscription active on my hybrid car so I will not miss it in car-net. But ideally I would like subscription on both cars and being able to query both of them from home assistant.

Cannot start climatisation

Does this feature work for others? When I toggle the climatisation switch, it "rolls back" after a few seconds. I don't get anything in my regular log. This is also true for window heating.

If it works for others, I will add debug.

Home Assistant 0.83.1.

S-PIN?

I love the work for this, but for me i can not either lock/unlock car or start/stop heater. I have a none electric car. I guess it is probably because S-PIN, would it be possible to add?

API request limit?

Hi,

do you know if there is somekind of request limit with the carnet API in Europe?

After using this plugin some time it seems like all requests are blocked. Even the App on my phone is refused new data from Carnet.

Any way to circumvent this?

Error with HA 0.69

I upgraded from 0.65 to 0.69 today and receive an error now:

Error during setup of component volkswagen_carnet Traceback (most recent call last): File "/srv/ha/lib/python3.5/site-packages/homeassistant/setup.py", line 145, in _async_setup_component component.setup, hass, processed_config) File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup future.result() File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result raise self._exception File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/etc/ha/custom_components/volkswagen_carnet.py", line 125, in setup return update(utcnow()) File "/etc/ha/custom_components/volkswagen_carnet.py", line 117, in update update_vehicle(vehicle) File "/etc/ha/custom_components/volkswagen_carnet.py", line 98, in update_vehicle entity.schedule_update_ha_state() File "/srv/ha/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 294, in schedule_update_ha_state self.hass.add_job(self.async_update_ha_state(force_refresh)) AttributeError: 'NoneType' object has no attribute 'add_job'

Values not updated OK

HA says my car is home, but it left home an hour ago. Also other values like battery is incorrect. It doesn't update OK.

grep:ing for carnet in my home-assistant.log shows this:

2019-06-07 01:44:40 WARNING (SyncWorker_11) [volkswagencarnet] Failure when communcating with the server: ('Connection aborted.', BadStatusLine('<!DOCTYPE html>\n',)), url: https://www.volkswagen-car-net.com/portal/user/*****/**********/-/emanager/get-emanager 2019-06-07 02:07:39 WARNING (SyncWorker_14) [volkswagencarnet] Failure when communcating with the server: HTTPSConnectionPool(host='www.volkswagen-car-net.com', port=443): Max retries exceeded with url: /portal/user/*****/**********/-/msgc/get-new-messages (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1d04569c88>: Failed to establish a new connection: [Errno -2] Name or service not known',)), url: https://www.volkswagen-car-net.com/portal/user/*****/**********/-/msgc/get-new-messages 2019-06-07 02:07:39 WARNING (SyncWorker_14) [volkswagencarnet] Could not validate login: HTTPSConnectionPool(host='www.volkswagen-car-net.com', port=443): Max retries exceeded with url: /portal/user/*****/**********/-/msgc/get-new-messages (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1d04569c88>: Failed to establish a new connection: [Errno -2] Name or service not known',)) 2019-06-07 02:07:39 WARNING (SyncWorker_14) [volkswagencarnet] Session expired, creating new login session to carnet. 2019-06-07 02:07:39 WARNING (SyncWorker_14) [volkswagencarnet] Failure when communcating with the server: HTTPSConnectionPool(host='www.volkswagen-car-net.com', port=443): Max retries exceeded with url: /portal/user/*****/**********/-/vsr/get-vsr (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1d043908d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)), url: https://www.volkswagen-car-net.com/portal/user/*****/**********/-/vsr/get-vsr 2019-06-07 02:07:39 WARNING (SyncWorker_14) [volkswagencarnet] Could not update information from carnet: HTTPSConnectionPool(host='www.volkswagen-car-net.com', port=443): Max retries exceeded with url: /portal/user/*****/**********/-/vsr/get-vsr (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f1d043908d0>: Failed to establish a new connection: [Errno -2] Name or service not known',)) 2019-06-07 02:07:39 WARNING (SyncWorker_14) [custom_components.volkswagencarnet] Could not query update from volkswagen carnet 2019-06-07 11:09:20 WARNING (SyncWorker_19) [volkswagencarnet] Session expired, creating new login session to carnet.

My configuration.yaml has scan_interval set to "minutes: 1".

Fresh install on docker-homeassistant fails

Hi,

Just got a new Passat GTE MY20 and thought I should try to add this awesome plugin. But I cannot get it to work.

I was first running on HA version 99.1. I tried creating a fresh install of 99.1 but with no success. Tried downgrading to 95.0. But still no luck.

My config is like this:

default_config:

volkswagencarnet:
  username: !secret vw_user
  password: !secret vw_pass
  scan_interval:
    minutes: 2
  name:
    <My VIN in lowerCase>: 'Passat GTE'

logger:
  default: info
  logs:
    custom_components.volkswagencarnet: debug
    custom_components.volkswagencarnet.climate: debug
    custom_components.volkswagencarnet.lock: debug
    custom_components.volkswagencarnet.device_tracker: debug
    custom_components.volkswagencarnet.switch: debug
    custom_components.volkswagencarnet.binary_sensor: debug
    custom_components.volkswagencarnet.sensor: debug


# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
~

This is the logs:

2019-10-20 19:45:43 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for volkswagencarnet which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-10-20 19:45:43 INFO (MainThread) [homeassistant.setup] Setting up volkswagencarnet
2019-10-20 19:45:44 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet] Creating connection to volkswagen carnet
2019-10-20 19:45:44 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet] Logging in to volkswagen carnet
2019-10-20 19:45:48 INFO (SyncWorker_3) [custom_components.volkswagencarnet] Starting volkswagencarnet component
2019-10-20 19:45:50 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-20 19:45:50 INFO (MainThread) [homeassistant.setup] Setup of domain volkswagencarnet took 6.9 seconds.
2019-10-20 19:47:53 DEBUG (SyncWorker_2) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-20 19:49:56 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-20 19:51:58 DEBUG (SyncWorker_2) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-20 19:54:00 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet] Updating data from volkswagen carnet

Docker-compose config:

  homeassistant:
    image: homeassistant/home-assistant:0.95.0
    container_name: homeassistant
    ports:
      - "8123:8123"
      - "3218:3218"
    volumes:
      - /home/nicklas/docker/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /home/nicklas/docker/homeassistant/.ssh:/root/.ssh
    devices:
      - /dev/ttyACM0:/dev/ttyACM0
    restart: always
    network_mode: host

But nothing shows up in HA.

Still functioning?

Just want to verify if this should still work? i know on my app and the website it now asks for a pin, not sure if this plugin is needing that. because i keep getting the message "Could not login to carnet"

[Feature Request] Add Option for Manual Update

The background for this request is, that CarNet shuts the script out after 15(or25) requests to the server. After that you have to start the car physically before the component is able to get responses to its requests again. During the night for example I am not interested in Updates of the component. I'd write an automation in which i can manually trigger an update of the component.

This would be a nice Feature.

Something like:
update_interval: manual

BTW: I am using the last Version of your custom_component on hass 0.86.4 with my VW e-GOLF in Austria

Charging time sensor not working

Hi Robin

Fantastic work you are doing with your VW Carnet component. I have followed your branch and have deployed the latest master branch. I have noticed an error in the charging time sensor, not a problem right now but I just want to notify you about it, if you want you can discard it if you don't want to support public yet:

This code snippet creates the problem in custom_components/volkswagen_carnet.py:

set charging time left sensor

    try:
        charging_time_left = int(data_emanager['EManager']['rbc']['status']['chargingRemaningHour']) * 60 * 60
        charging_time_left += int(data_emanager['EManager']['rbc']['status']['chargingRemaningMinute']) * 60
        self.vehicles[vehicle]['sensor_charging_time_left'] = charging_time_left
    except:
        _LOGGER.error("Failed to set charging time sensor for vehicle %s" % (self.vehicles[vehicle].get('vin')))

If I just for now comment it out and create a 'Unknown' string it doesn't create and exception every minute.

set charging time left sensor

    try:
        #charging_time_left = int(data_emanager['EManager']['rbc']['status']['chargingRemaningHour']) * 60 * 60
        #charging_time_left += int(data_emanager['EManager']['rbc']['status']['chargingRemaningMinute']) * 60
        self.vehicles[vehicle]['sensor_charging_time_left'] = 'Unknown'
    except:
        _LOGGER.error("Failed to set charging time sensor for vehicle %s" % (self.vehicles[vehicle].get('vin')))

return icon_for_battery_level

2018-10-02 18:58:12 ERROR (Thread-18) [volkswagencarnet] Failed to request vehicle update 2018-10-02 18:58:14 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 255, in async_update_ha_state icon = self.icon File "/home/homeassistant/.homeassistant/custom_components/sensor/volkswagen_carnet.py", line 43, in icon return icon_for_battery_level(battery_level = int(val), charging = self.vehicle.is_charging_on) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

HA 0.78.3 Ubuntu e-Golf Python 3.5.3

component broken since latest update (Volkswagen We Connect)

Since the latest Car-Net Update which rebranded the service in "Volkswagen We Connect" the component is broken and won't start.
Error message is Could not login to volkswagen carnet, please check your credentials and at the start i get the notification:
image

Remove "device tracker"

Is it possible to delete "device tracker" somewhere so that it does not show up in Home Assistant as an entity at all?

Error 400

Getting the following error during startup

WARNING (SyncWorker_2) [volkswagencarnet] Failure when communcating with the server: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/aaaaaay/bbbbbbb_/-/emanager/get-emanager, url: https://www.volkswagen-car-net.com/portal/user/aaaaaay/bbbbbbb_/-/emanager/get-emanager

The /-/emanager/get-emanager seems to been removed from the VW page.

I am using the following version:
Name: volkswagencarnet
Version: 2.0.22

And my location is Sweden.

New VW Connect version coming 2020-01-13

Hello

This is not the right place for this information but I could not find any kind of chat/forum to more generally discuss a Github Project?

But, this is a heads up that things might break 2020-01-13 when VW is launching a new(?) We Connect version. I think they are replacing many things server-side and the firmware in the car.. but my guess is the portal and app will look the same. I've read that it will be much faster after this big update. Which has been scheduled for a long time..I first read about this update September 2019.

Info below in Swedish which VW has been sending out for a while:

Hej Thomas,

Tack för att du använder Volkswagens digitala tjänster.

Vi beklagar besväret med dina We Connect tjänster.

Angående bekymret som du upplever med dina digitala tjänster, vill vi informera dig att den 13/1/2020 kommer det en ny uppdatering för kontrollenheten av dina digitala tjänster. Denna uppdatering kommer att lösa besväret permanent.

Som tillfällig lösning tills uppdateringen kommer upp, kan du boka en tid hos din önskade Volkswagen verkstad eller återförsäljare och be de att utföra en återställning av kontrollenheten för digitala tjänster.

Du är varmt välkommen att höra av dig igen om du har andra frågor. Du kan även kontakta oss på tfn. 0200-88 34 24 (mån-sön kl.08,00-20,00), ha då gärna ditt ärendenummer till hands.

Vi tackar för förtroendet och önskar dig en fin fortsättning på dagen.

Kör försiktigt och njut av din Passat

Med vänlig hälsning
Volkswagen

Error at first startup on new instance (0.89.1)

First start up: This error message

2019-03-11 11:22:04 ERROR (MainThread) [homeassistant.setup] Error during setup of component volkswagencarnet
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 154, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/volkswagencarnet/__init__.py", line 67, in setup
    from volkswagencarnet import Connection
ModuleNotFoundError: No module named 'volkswagencarnet'

Second start up (restart of Home Assistant): No issues

I am using docker under Debian (not HASS.IO)

Error doing job: Task exception was never retrieved

I get this repeatedly on my new VW GTE. Component is fully updated. It seems to work after I restart Home Assistant for a while.

HA 0.103.5.

I have logged in through portal and have no questions there.

2020-01-02 10:42:37 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/homeassistant/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
    self._async_write_ha_state()
  File "/home/homeassistant/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/home/homeassistant/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/__init__.py", line 200, in state_attributes
    self.target_temperature,
  File "/home/homeassistant/.homeassistant/custom_components/volkswagencarnet/climate.py", line 54, in target_temperature
    return float(self.instrument.target_temperature)
TypeError: float() argument must be a string or a number, not 'NoneType'

VW CarNet login fails, URL unrachable

Hi.

So I have used this plugin for a little over three monts now, and out of the blue it suddently started throwing errors. All of the errors are about login failed, and that the URL is unreachable.

Here's an example:
Failed to login to carnet, HTTPSConnectionPool(host='www.portal.volkswagen-we.com', port=443): Max retries exceeded with url: //portal/en_GB/web/guest/home (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f99aeb89910>, 'Connection to www.portal.volkswagen-we.com timed out. (connect timeout=60)'))

The URL in question is actually unreachable in my web browser as well, so I'm guessing it's just a matter of volkswagen messing with their domain names.

component need adaption to support entity and device registry of current HA versions

The current version of HA doesn't use the known_devices anymore, instead it uses the entity and device registry. This component has to be adapted to support HA correctly, now all component sensors are not found in the entity registry, and the device still uses the known_devices file which is deprecated.

Is this redesign planned in near future? Would be great :)

Broken from HASS 0.88

Apparently the new file structure is not implemented on this component, so the implementation is broken. got error after upgrading to 0.88. See release notes for Home Assistant 0.88 regarding custom components.

error on new install on Homeassistant 0.100.2

On a fresh installed homeassistant 0.100.2 on raspberrypi3 I face a problem setting up carnet.

I followed the instructions wich has been working earlier, but now I cat getit to work. What am I missing?

The log tells me that it loads the component, and login to carnet goes OK. But it fails...

2019-10-18 16:31:09 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for volkswagencarnet which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-10-18 16:31:12 INFO (MainThread) [homeassistant.setup] Setting up volkswagencarnet
2019-10-18 16:31:14 DEBUG (SyncWorker_0) [custom_components.volkswagencarnet] Creating connection to volkswagen carnet
2019-10-18 16:31:14 DEBUG (SyncWorker_0) [custom_components.volkswagencarnet] Logging in to volkswagen carnet
2019-10-18 16:31:22 INFO (SyncWorker_0) [custom_components.volkswagencarnet] Starting volkswagencarnet component
2019-10-18 16:31:22 WARNING (MainThread) [homeassistant.setup] Setup of volkswagencarnet is taking over 10 seconds.
2019-10-18 16:31:26 DEBUG (SyncWorker_0) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-18 16:31:26 INFO (SyncWorker_0) [custom_components.volkswagencarnet] Adding data for VIN: wvwzzzaazed902044 from carnet
2019-10-18 16:31:26 ERROR (MainThread) [homeassistant.setup] Error during setup of component volkswagencarnet
  File "/config/custom_components/volkswagencarnet/__init__.py", line 149, in setup
  File "/config/custom_components/volkswagencarnet/__init__.py", line 137, in update
  File "/config/custom_components/volkswagencarnet/__init__.py", line 107, in discover_vehicle
  File "/usr/local/lib/python3.7/site-packages/volkswagencarnet.py", line 401, in dashboard
  File "/usr/local/lib/python3.7/site-packages/volkswagencarnet.py", line 704, in charging_time_left
2019-10-18 16:33:29 DEBUG (SyncWorker_16) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-18 16:35:31 DEBUG (SyncWorker_19) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-18 16:37:33 DEBUG (SyncWorker_12) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-18 16:39:35 DEBUG (SyncWorker_4) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2019-10-18 16:41:37 DEBUG (SyncWorker_10) [custom_components.volkswagencarnet] Updating data from volkswagen carnet

´´´

strange is that there isnt anything in the /config/deps folder. 

Anyone have a hint what is wrong or what I am dooing wrong ? 

Location when car is moving

It looks like homeassistant is throwing errors if the car is moving (which I understand due to you can't track the car in movement) but it might not need to throw an error. Maybe location could be NaN or something so we can use a value_template to show in progress or similar on location

Error message:
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/volkswagen_carnet.py", line 102, in update
if not connection.update():
File "/srv/homeassistant/lib/python3.6/site-packages/volkswagencarnet.py", line 258, in update
self._state[vin]['position'] = vehicle_location['position']
KeyError: 'position'

Error during setup of component volkswagencarnet

Hi!

I am having a hard time getting the carnet integration to work consistently. Recently I am seeing this in my logs. Are you still "supporting" this @robinostlund ?

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
    component.setup, hass, processed_config  # type: ignore
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/volkswagencarnet/__init__.py", line 149, in setup
    return update(utcnow())
  File "/config/custom_components/volkswagencarnet/__init__.py", line 137, in update
    discover_vehicle(vehicle)
  File "/config/custom_components/volkswagencarnet/__init__.py", line 107, in discover_vehicle
    dashboard = vehicle.dashboard(mutable = config[DOMAIN][CONF_MUTABLE])
  File "/usr/local/lib/python3.7/site-packages/volkswagencarnet.py", line 401, in dashboard
    return Dashboard(self, **config)
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 429, in __init__
    for instrument in create_instruments()
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 430, in <listcomp>
    if instrument.setup(vehicle, **config)
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 29, in setup
    if not self.is_supported:
  File "/usr/local/lib/python3.7/site-packages/dashboard.py", line 69, in is_supported
    if hasattr(self.vehicle, self.attr):
  File "/usr/local/lib/python3.7/site-packages/volkswagencarnet.py", line 704, in charging_time_left
    return (int(hours) * 60) + int(minutes)
ValueError: invalid literal for int() with base 10: '--'

This is what the config looks like:

username: !secret gte_username
password: !secret gte_password
scan_interval: 
    minutes: 2
name:
    wvwzzz3czle033777: 'Passat GTE'

Switch icons "Ugly flashes"...?

Tack Robin!

The switches turned into ugly "flashing bolts" after the update. Did you change anything in the code related to the "look"?

Feature Request - Add to HACS

Hi,

Any possibility of adding this great component to HACS for easier updating?

And thank you for all your hard work on this component!

Doors and trunk not lockable from Home Assistant

Hi
On my e-Golf doors and trunk cannot be locked from the car-net app or Home Assistant and is only shown for status indication. Is it possible to change these two so they show up as sensors instead in Home Assistant?

Failure when communcating with the server: 400 Client Error: Bad Request for url

I am getting error:

2018-10-12 20:54:56 WARNING (SyncWorker_9) [volkswagencarnet] Failure when communcating with the server: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/la0o6kq/v_8pkhxo4dzjavyce3itpd-mtcbqfbuco_/-/vsr/get-vsr, url: https://www.volkswagen-car-net.com/portal/user/la0o6kq/v_8pkhxo4dzjavyce3itpd-mtcbqfbuco_/-/vsr/get-vsr
2018-10-12 20:54:56 WARNING (SyncWorker_9) [volkswagencarnet] Could not update information from carnet: 400 Client Error: Bad Request for url: https://www.volkswagen-car-net.com/portal/user/la0o6kq/v_8pkhxo4dzjavyce3itpd-mtcbqfbuco_/-/vsr/get-vsr
2018-10-12 20:54:56 WARNING (SyncWorker_9) [custom_components.volkswagen_carnet] Could not query carnet

Any way to make this work in the US

Hi,

I am trying to pull information about my VW car into Home Assistant.
I tried setting this up as described in the instructions, but I get an error saying that the compoinenet could not login to carnet.

I believe this might be the case due to the fact that the URL for CarNet in the US is different (carnet.vw.com) and also requires a PIN to complete the login process

Any pointers on how I could go about modifying this for use in the US ?

Thanks in advance !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.