robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
339 stars 61 forks source link

Update interval #58

Closed oneteam2win closed 4 years ago

oneteam2win commented 4 years ago

The problem

I recently installed this component and was able to read out all sensors that are available. As it looks like the values are only read from carnet after a restart of HA. At least for me there is no regular update of the sensors. Did I miss something?

Environment

Problem-relevant configuration.yaml

volkswagencarnet:
    username: "xxxxx@xxxxx"
    password: "xxxxx"
    spin: "xxxx"
    scan_interval: 
        minutes: 5
    name:
        wvw1234567812356: "xxxxxx"
oneteam2win commented 4 years ago

Is it necessary to specifically mark this case or notify someone to have the developer work on it?

Konstigt commented 4 years ago

Check your log to see if you can find out what's going on. There is also debug available.

tubalainen commented 4 years ago

It all boils down to the way carnet (We Connect) is designed. Especially for the old gen (OG) cars where the control units communicate via oldskoolz GSM, sms if I am not completely mistaken.

There are limits to how often the car can be polled and how often the information can be updated.

The component is not perfect in any shape or form, our fearless coder @robinostlund has literally reversed-engineered the communication and made this system that we have today.

@oneteam2win , Feel free to contribute if you can to the active development of this component. I know that Robins time is sparse due to work and family. I am doing what I can to support, but I am a copy/paste/change programmer :/ ..

oneteam2win commented 4 years ago

@Konstigt, I will try. @tubalainen, I'm aware that there is no real time display possible here but a reasonable interval should be possible even if the option is offered. And no, unfortunately I can't contribute to the programming because I am a user and not a programmer.

tubalainen commented 4 years ago

I am not 100% initiated into how the polling works and how the update_interval updates the data FROM THE CAR... Its session based and the number of polls per session is limited by VW.

oneteam2win commented 4 years ago

I have now activated the debug option. After a HA restart the status of the vehicle is queried correctly. Although according to the log file the query is performed every 5 minutes as set, a status change is not performed. Here is an example of the door lock parameter: I performed a HA restart at 22:41.

2020-02-18 22:41:41 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.
2020-02-18 22:41:45 DEBUG (SyncWorker_7) [custom_components.volkswagencarnet] Creating connection to volkswagen carnet
2020-02-18 22:41:45 DEBUG (SyncWorker_7) [custom_components.volkswagencarnet] Logging in to volkswagen carnet
2020-02-18 22:41:50 INFO (SyncWorker_7) [custom_components.volkswagencarnet] Starting volkswagencarnet component
2020-02-18 22:41:53 DEBUG (SyncWorker_7) [custom_components.volkswagencarnet] Updating data from volkswagen carnet
2020-02-18 22:41:53 INFO (SyncWorker_7) [custom_components.volkswagencarnet] Adding data for VIN: xxxxxxxxxxxxxxxxxxxxx from carnet
2020-02-18 22:41:53 DEBUG (MainThread) [custom_components.volkswagencarnet.lock] Getting state of door_locked

Afterwards, according to the log file, a query was performed every 5 minutes as set.

2020-02-18 22:46:54 DEBUG (MainThread) [custom_components.volkswagencarnet.lock] Getting state of door_locked
2020-02-18 22:51:55 DEBUG (MainThread) [custom_components.volkswagencarnet.lock] Getting state of door_locked

I opened the car at 22:55. Afterwards the query was continued according to the log file.

2020-02-18 22:56:56 DEBUG (MainThread) [custom_components.volkswagencarnet.lock] Getting state of door_locked
2020-02-18 23:01:57 DEBUG (MainThread) [custom_components.volkswagencarnet.lock] Getting state of door_locked

There is no error message in the log but also no update of the status. The Status is still "locked"

oneteam2win commented 4 years ago

Something else I noticed in the log file. In the device tracker query of the vehicle the VIN number is given.

2020-02-18 22:46:54 DEBUG (SyncWorker_2) [custom_components.volkswagencarnet.device_tracker] Updating location of xxxxxxxxxx
2020-02-18 22:51:55 DEBUG (SyncWorker_3) [custom_components.volkswagencarnet.device_tracker] Updating location of xxxxxxxxxx

This parameter is the only one that is updated by the program. Maybe the other parameters are missing this VIN number?

oneteam2win commented 4 years ago

As mentioned I am not a programmer so I can only help with observations. I have now tried to track changes to the car via the WeConnect homepage. The homepage is not automatically updated. To update the homepage you have to do a broswer refresh. So I thought if this plugin only checks the status of an existing internet connection at the set interval, the status will not change without a refresh request.

So I disconnected my router from the internet to see if the plugin would do a "new dial-in" to CarNet but that doesn't seem to be the case. As mentioned before, the only thing that is updated is the location of the car.

oneteam2win commented 4 years ago

It is really a pity that the developer of this plugin has no interest in its development anymore. It would at least be polite to tell this to all the people who are testing the plugin. This way we can save ourselves the time to report things we notice in connection with this plugin.

robinostlund commented 4 years ago

Interest exist but time does not. Feel free to make a pr and help out with this project.

oneteam2win commented 4 years ago

What ever it means "make a pr". As mentioned I can't contribute to the programming because I am a user and not a programmer. But at least now I know that it makes no sense to continue to provide possible clues to the cause. Thanks for the feedback.

stianheid commented 4 years ago

Not sure that's how free open source stuff on GitHub works @oneteam2win .... I'm just happy @robinostlund have made something I can use for free and I sure don't get mad at him for not serving me as if I had purchased this. I think demanding a 10 day fix based on your input is asking too much. be glad you have something. Without him you would have nothing. Thank you @robinostlund for what you have made so far!

oneteam2win commented 4 years ago

I think @robinostlund can speak for himself and needs no one to defend him. Besides, you got my message all wrong. On the one hand I am very aware of the fact that people here provide their knowledge completely free of charge and I appreciate that very much.

But what I found regrettable is the fact that there was no reaction. I also did not have, as you wrongly formulated, the expectation to get a correction in 10 days. The last feedback from @robinostlund to his project was months ago. So I think it is legitimate to ask him if there is still interest in his project. And no I have nothing from a project which does not work. If it fits for you it is fine.