-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code not working #6
Comments
Yes, the example code has unfortunately not been worked on for a while. I am working on a project in parallel to migrate all code into a more generalized "VW-Group Connect" library that might be used for all VAG brands since most seems to be using the same API (at least VW, Skoda and Seat this far). |
No problem - may be you can just explain how I can grep the data in a simple way. I would like to use the library to send all data to a MQTT broker. |
See the example/examply.py in latest commit. There you should be able to figure out what you can use and how. If you have the Vehicle class object then you can access the data directly from the object properties, vehicle.charging_cable_connected for instance will then return True/False. You should implement a update method that periodically calls the Connection update() method to fetch newest data from servers. If not done periodically, or too long between updates, then the tokens might expire and might be non-refreshable. Then a new login is required which will re-init everything. |
Great - thanks a lot! |
Sorry, have to reopen this again... When trying the new example code I got an error regarding missing cryptography module (RSAalgorith is missing). So I used pip to install cryptography (seems that this must be added to requirements.txt). I installed cryptography-3.4.4 via pip. Now I get the following error:
Some discussions on the web shows, that this error seems to be related to pyJWT module, but I have installed latest version via pip:
Maybe this one? https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst#dropped-deprecated-verify-param-in-jwtdecode Sorry for all that trouble.... :-) |
Just checked with an older version from the debian repo: python3-jwt (1.7.0-2). This version gave the same error. |
No worries. |
Can you try install older version via pip instead? And verify which one in use with pip show. |
Great - works with 1.7.1 from pip! Thanks! I am looking forward if the new lib for all other VW brands is available. I will now include at first the skoda lib in my project. https://github.com/mschlenstedt/LoxBerry-Plugin-SkodaConnect This is still based on https://github.com/DBa2016/sc2mqtt, but functionality is quite limited... |
Played a little bit with the example today. It greps the data for the first time very well, but then if it tries to update the data after 20 sec I got the following error:
|
Check the latest commit. And you don't need to update the data like in the example, it's only there to show you different ways to do it. |
@mschlenstedt did you resolve this? |
Yes, sorry. Works like a charme now :-) |
Hey!
You made a pull request to my repo some time ago, but I still stuck with my own implementation. Since your implementation seems to be much more detailed, I would like to use your library for my project. Unfortunately, the example code does not work (and I also could not find any other documentation:
Could you please help?
The text was updated successfully, but these errors were encountered: