-
Notifications
You must be signed in to change notification settings - Fork 14
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
ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data #242
Comments
same with me - looks like Porsche made a big change on their APIs that needs to be reflected |
What HA versions are you on? |
Latest one
De: Fredrik Ljunggren ***@***.***>
Enviado el: miércoles, 12 de junio de 2024 15:30
Para: CJNE/ha-porscheconnect ***@***.***>
CC: barto64 ***@***.***>; Author ***@***.***>
Asunto: Re: [CJNE/ha-porscheconnect] ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data (Issue #242)
What HA versions are you on?
—
Reply to this email directly, view it on GitHub <#242 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ALG263MZTYL5NZKLK6ZQ32LZHBEPHAVCNFSM6AAAAABJGCRIQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGAYTMNJZHE> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ALG263I6OAHFG57NT5JRNLDZHBEPHA5CNFSM6AAAAABJGCRIQKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUA5UBZO.gif> Message ID: ***@***.*** ***@***.***> >
|
i am using your latest python lib directly. I only stopped by here to see if others are seeing it. I will set up HA later to test as I use it also but just not with this integration. . The normal python lib stopped working Sunday morning early for me EST so I stopped my automatic (hourly) ping. I just realized it actually worked yesterday about 3:40pm EST (I was doing a test), but this morning it had the same error as above. On Sunday I was getting a valid response but effectively empty JSON values. When I log into the Connect web site I get an alert about changes coming (i.e. it looks like they will remove web access and work only via the mobile apps) |
I just noticed they have scrapped all remote services from the web access, possibly they have retired all those APIs. In which case we might have some trouble. |
that's what I was afraid of. I suppose someone would need to work from the Android app side to see if the mobile APIs can be used. I won't be able to do this, but I would be willing to pay a bounty to someone |
This is going to take a while. |
I've had a first stab at the new APIs in this branch: https://github.com/CJNE/pyporscheconnectapi/tree/new_api It currently only supports authentication and retrieving capabilities and status. And will require significant changes of the HA integration as well. |
I can confirm it works thanks so much I will send you an email. Note the JSON is changed quite a bit. I found ChatGPT4o quite useful to rewriting my code and the key functionality is working like before. I still need to do tire pressure and lights control but that is not as key. Really appreciate your efforts on this! |
For anyone whose life depend on a (somewhat) functional ha integration, and is prepared to file a pull request to fix any discovered issues, there is work in progress in the new_api branch. |
@fredriklj is there something we can help with to get it up an running again? |
I'd appreciate any help I can get, I have quite limited time to spend on this. I've started to clean up the integration to align it with best current (hass) practices, but could certainly use some help on that. Also, pyporscheconnectapi need an overhaul. So please feel free to dive in! |
FWIW, I have pushed some changes to the new_api branch which seem to work somewhat reliably, and give you a few more entities in hass. Please note that you will have to manually make sure to install the development version of pyporscheconnectapi (from new_api branch) into your hass environment before you start hass. Hass will not pull this version of the library automatically. |
I do not update the version numbers as i commit to the development branch, you have to manually wiggle the latestc oode into your hass environment every time you update the component. Its a pain, I know. But this is WIP. |
Noted and understood, that make sense. I will google how it can be done. Honestly, no idea how to do it. Maybe I can cheat HA by swapping the branch and force it to make updates on the api version. Pretty conscious it is WIP and trying to help. Great thanks for your efforts. |
@barto64 Or just use pip to install directly from the directory where you have cloned the git repo.
|
Would pip uninstall first help to get rid of the old version? |
Hi @fredriklj and thanks again for your support. Will try to explain to the best of my knowledge given that my skills are not so wide as yours by any means in spite of being a tech person sadly much more involve in management at this stage of my career than in tech stuff which is what i would really like. The point is that my install as the vast mayority of HA users is "Operating system" as opposed to "Container, Core or Supervised". It makes life super much easier but gives you far less degree of control on what you can do or not. So honestly, i have no idea on how i can manipulate internally the code and libraries of HA. I vaguely recall in the past i was able to do it as there are some tools that you can use for that (although they work only up to the time you reboot again the system). I need to refresh those skills to be able to install and unsintall libraries on my HA DEV instance. I have pasted the below links to illustrate my comment: |
@barto64 What you need to do, regardless of type of installation, is to manually install the pyporscheconnect package into the hass environment. You would typically do that by "entering" your environment, meaning launching a shell inside your OS, container or venv, clone or update the repo and then install it using pip. This will overwrite the files of the old version of the package and clean what needs to be cleaned. Then you need to restart your hass (restarting, not rebooting if you are in a container or similar). |
I have gone into my env using Termius terminal, but any command I try says always command not found. Maybe I must do something else before I do not know. |
@barto64 |
@royalidea , lesson learnt, thanks a lot, each day brings something new :) I made the above, integration works fine now, i can see a few sensors being delivered. Besides, in DEBUG I can see also far more info about my char which are not yet delivered by the integration. WIP ;) |
Put your desires on the wish list :-) |
@barto64 or others, is the data being updated for you? For me it seems to only update when i manually reload the integration. |
I notice the same behaviour |
@Jimnaldo , @royalidea I have been running the component on my DEV instance in DEBUG and i could see every 32 min and update being executed. @fredriklj not sure what is he whish list you refer to. I like very much the sensors and switches the old component provided before Porsche made the changes. So, anything similiar to that would be great. For me personally it was great the ability to execute the Direct Charge as I used to combine different parameters from my solar pannels and home power consumption to force the car charge. |
@barto64 but are the values also updated in the json you see in the logs? Because for me it's always the same until i reload the integration. |
@royalidea , honestly i am not able to say whether they are updated, i am not using the car so mileage or battery level which would be the easier one to change in my case will not do it. Enable the DEBUG and you will see the payload the integration receives from the Porsche Servers. If you see the value changing in the payload and not in the integration it would be for our friend @fredriklj to fix, but that would be really weird. You can also validate Payload values, integration values and mobile app value to identify potential differences. I see many times my App not updating the info either. |
I see it too. Will have a look at it. |
Switches for climatisation and direct charge, as well a control of the lock is on my to-do list. Maybe also honk & flash. I am happy to receive feature requests for any other sensors or services. |
@royalidea Obviously I had a brain fart. Please update and install pyporscheconnect again, updates should work now. |
@fredriklj now i get this error, please advise?: Log details (ERROR) Unexpected error fetching porscheconnect data |
Yep, I have the same error, there seem to be a mistmatch in between the API and the component. |
Mine is Hybrid and cannot provide a fresh data object as my integration is now broken. I guess you mean the JSON Porsche server return with all data for the car. This is the latest i have |
Ok, got it! Fixed in last commit of pyporscheconnectapi. Please try and see if it resolves it. |
It went back to live. I uninstall the API and installed it again, deleted the pycache dir, reboot the HA and it worked. FYI, I am about to leave mid day tomorrow for a couple of week and will not be able to assist during that time. |
Folks, we are about to make a new release of the ha component any day now. But we need testers with different types of cars and also I know some of you have more than one, which would be of great value to know how/if that works. So if you can, please check out the new_api branch and make sure to have the same branch of the pyporcheconnectapi installed and updated to the last commit. Bugs can be reported as new issues, not to clutter this thread even more. Thanks! |
I have latest (Build Date 07/2024) Cayenne hybrid. Will it help ? |
@jfrigger All testing would help, absolutely! Any types of nits and grits that can be spotted. Bugs of course, but also unavailable sensors, missing information, awkward translations, etc. |
I have a 2023 Taycan Turbo that I could test with Sent from my iPhoneOn 24 Nov 2024, at 10:16, Fredrik Ljunggren ***@***.***> wrote:
@jfrigger All testing would help, absolutely! Any types of nits and grits that can be spotted. Bugs of course, but also unavailable sensors, missing information, awkward translations, etc.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
User is not granted access to vehicle VIN xxx, reason |
Version of the custom_component
0.0.18
Configuration
The text was updated successfully, but these errors were encountered: