audiconnect / audi_connect_ha

Adds an audi connect integration to home assistant
MIT License
226 stars 98 forks source link

Dev Approach #232

Closed cdnninja closed 6 months ago

cdnninja commented 6 months ago

Hi All,

Wanted to started a thread talking about the future of this integration. I have merge access to this repo but not full admin.

I am hoping to coordinate our efforts as lots of good work is going into this. Wanting to hear thoughts on if others working agree or would like to fork into new repos. Here is my hope:

  1. Convert this repo to a org repo. So audi_connect_ha/audi_connect_ha. If converted it auto redirects hacs. @arjenvrh would need to give admin or do this for us. I would propose a few of us get owner admin to the new org.
  2. Use PRs to work together to improve this and resolve the issues.
  3. Include release version control much like what I have done in kia_uvo repo that I am moving on from.

If the preference is to fork and move on from here please let me know since I do understand.

Lets keep this issue focused around dev approach and contributions and not issues.

@t0bias-r @gac3k @DivingUp

t0bias-r commented 6 months ago

What is the goal? To be as fast as possible or to have longterm support with stable code?

There was a web API change. I would say that it's ok when it may take a few days until everything works again. And e.g. an AdBlue sensor value is not that super urgent in my opinion. I would place more value on good and stable solutions, PRs that are really discussed, code that is reviewed and approved instead of clicking on the merge button as quick as possible.

DivingUp commented 6 months ago

the AdBlue patch had to be merged, because without this patch the application did not work for all vehicles without AdBlue... you just have to follow the comments... but it also seems to be a bit of mimimi here...

Kolbi commented 6 months ago

I like more the approach from @cyr-ius : https://github.com/cyr-ius/hass-audiconnect // https://github.com/cyr-ius/audiconnectpy as it splits HASS & audiconnectpy functionalities - which seems to be coming standard in HASSIO development. Sadly he seems sometimes not to be very active. :) He also integrated different API levels for the different vehicles & functionalities. But this topic may be otudated with the new APIs.

cdnninja commented 6 months ago

What is the goal?

To be as fast as possible or to have longterm support with stable code?

There was a web API change. I would say that it's ok when it may take a few days until everything works again. And e.g. an AdBlue sensor value is not that super urgent in my opinion.

I would place more value on good and stable solutions, PRs that are really discussed, code that is reviewed and approved instead of clicking on the merge button as quick as possible.

Thank you for the reply. I'm open to that and agree. Purely merged to get things working.

My impression code in general could use cleanup. I'll slow merging and I request both of you provide reviews to PRs.

I only have merge access. Not admin unfortunately.

cdnninja commented 6 months ago

I like more the approach from @cyr-ius : cyr-ius/hass-audiconnect // cyr-ius/audiconnectpy as it splits HASS & audiconnectpy functionalities - which seems to be coming standard in HASSIO development. Sadly he seems sometimes not to be very active. :) He also integrated different API levels for the different vehicles & functionalities. But this topic may be otudated with the new APIs.

This is how we built out version 2 of the kia integration in my past life. It supported others in automation as well because of that.

cdnninja commented 6 months ago

@arjenvrh wanted to ping you again to see if we could get admin to convert this to a shared repo. With your permission and support. This repo is starting to take life so hoping to keep that going.

arjenvrh commented 6 months ago

@cdnninja I would be more than happy to convert this repo to make collaboration/maintaining easier. I'm not sure how to give you admin access to this repo. Or do you mean that I create an organization, shift this repo to this organization and add you to the organisation?

t0bias-r commented 6 months ago

@cdnninja @DivingUp @arjenvrh When the repo is moved to an organization, the URL will change. And when it is ok for us and the endusers, that the URL changes, then you @cdnninja could make a new fork within your account and we maintain that fork together. Then @arjenvrh does not have to give admin rights.

arjenvrh commented 6 months ago

Just let me know what you all prefer. I can add collaborators to this repo, create an org, or do nothing and we all move to a fork/different URL. When changing the URL would be ok, the org-way would perhaps have the advantage that when the new maintainer later doesn't have the time anymore to maintain the project, others could take over without changing the url again.

cdnninja commented 6 months ago

@cdnninja @DivingUp @arjenvrh

When the repo is moved to an organization, the URL will change.

And when it is ok for us and the endusers, that the URL changes, then you @cdnninja could make a new fork within your account and we maintain that fork together. Then @arjenvrh does not have to give admin rights.

GitHub does built in redirects if we use this one and convert to org. So HACS will move users over. We did this for Kia_uvo and worked great.

cdnninja commented 6 months ago

Just let me know what you all prefer. I can add collaborators to this repo, create an org, or do nothing and we all move to a fork/different URL. When changing the URL would be ok, the org-way would perhaps have the advantage that when the new maintainer later doesn't have the time anymore to maintain the project, others could take over without changing the url again.

Just checked. I think where you set me as a collaborator just change that to "owner" and it will allow me to make the changes. Thank you for all your work on this project you paved the way. @arjenvrh

Kolbi commented 6 months ago

Bespite that discussion do we have a full list of actual API calls from the app?

And maybe even with sample data?

t0bias-r commented 6 months ago

Bespite that discussion do we have a full list of actual API calls from the app?

And maybe even with sample data?

I can capture the network traffic of the Android myAudi app and store the decrypted traffic in a HAR file. This would be for a Q8 e-tron. Because I don't have much time, I can't code it myself. But I could provide such HAR files privately. I doubt there is a public specification.

TheDelta commented 6 months ago

Hi, been following this repo for a while and got active because of the new API changes. I forked https://github.com/cyr-ius/audiconnectpy (https://github.com/TheDelta/audiconnectpy) and fixed current API issues to get at least vehicle information back.

Would love to contribute as well and get a fully working home assistant integration back for a broader set of Audi vehicles (I could contribute data from an Audi RS3 2023 / MIB3 platform)

My initial question would be just what starting base should be used? This repo or the ones of @cyr-ius ?

Ingrimmsch93 commented 6 months ago

So as i understand this repo will probably be moved to an organisation, so it is easier to maintain. With @cyr-ius permission, we could include his work to combine both and start with arjenvrh version. For me it looks like a good start for a "new" audi integration. I am pretty new, but very interested to learn and contribute. Time is also a topic for me. Currently i can spend some time.

I can contribute data from an Audi A3 2023 TFSIe. @t0bias-r could you send me an HAR file from you or from my account? I think this would help me/us a lot to see whats actually available. I also would check, if i can anonymize the HAR file and share it here in any way.

arjenvrh commented 6 months ago

@cdnninja I cannot find an option to make you owner. I created an organization audiconnect for you and invited you as an owner. Then I will move the repo to this organization. Is that ok?

Kolbi commented 6 months ago

Hi, been following this repo for a while and got active because of the new API changes. I forked https://github.com/cyr-ius/audiconnectpy (https://github.com/TheDelta/audiconnectpy) and fixed current API issues to get at least vehicle information back.

Would love to contribute as well and get a fully working home assistant integration back for a broader set of Audi vehicles (I could contribute data from an Audi RS3 2023 / MIB3 platform)

My initial question would be just what starting base should be used? This repo or the ones of @cyr-ius ?

The architecure from @cyr-ius looks better for me splitting hassio frontend and api backend. But he seems not to be very active and here we have some active people already :) You are not living so far away from me.

tieskuh commented 6 months ago

Hi, been following this repo for a while and got active because of the new API changes. I forked https://github.com/cyr-ius/audiconnectpy (https://github.com/TheDelta/audiconnectpy) and fixed current API issues to get at least vehicle information back.

Would love to contribute as well and get a fully working home assistant integration back for a broader set of Audi vehicles (I could contribute data from an Audi RS3 2023 / MIB3 platform)

My initial question would be just what starting base should be used? This repo or the ones of @cyr-ius ?

I noticed you didn't create a pull request in cyr-ius' repo with your fixes. Maybe you could do that to prevent him from doing the same changes over.

tieskuh commented 6 months ago

Hi, been following this repo for a while and got active because of the new API changes. I forked https://github.com/cyr-ius/audiconnectpy (https://github.com/TheDelta/audiconnectpy) and fixed current API issues to get at least vehicle information back. Would love to contribute as well and get a fully working home assistant integration back for a broader set of Audi vehicles (I could contribute data from an Audi RS3 2023 / MIB3 platform) My initial question would be just what starting base should be used? This repo or the ones of @cyr-ius ?

The architecure from @cyr-ius looks better for me splitting hassio frontend and api backend. But he seems not to be very active and here we have some active people already :) You are not living so far away from me.

I have been using cyr-ius' repo for quite some time now. It has been very stable until now. The last few weeks he has not been very active indeed but before he responded very fast. Maybe he is busy at work or on holiday. I think it could be a good idea to reach out to him to discuss. He refactored the entire code. In arjenvrh's repo there are more active contributers, but maybe cyr-ius is open to collaboration as well.

cdnninja commented 6 months ago

@cdnninja I cannot find an option to make you owner. I created an organization audiconnect for you and invited you as an owner. Then I will move the repo to this organization. Is that ok?

Yes that works. Ready to go when you are!

@tieskuh @cyr-ius yes I personally hope to be able to bring many together on this. This repo seems to have the most users so thinking it should live on but could be refactored as wel.

Stats from home assistant show

"audiconnect": { "total": 605, "versions": { "2021.1.1": 582, "1.5.1": 15, "2023.12.3": 8

2021.1.1 being this repo. 1.5.1 being cyr-ius I believe.

arjenvrh commented 6 months ago

I transferred the repo to the audiconnect organization. Redirect seems to be working. Thanks to all contributors for keeping the Audi integration alive!

TheDelta commented 6 months ago

Hi, been following this repo for a while and got active because of the new API changes. I forked https://github.com/cyr-ius/audiconnectpy (https://github.com/TheDelta/audiconnectpy) and fixed current API issues to get at least vehicle information back. Would love to contribute as well and get a fully working home assistant integration back for a broader set of Audi vehicles (I could contribute data from an Audi RS3 2023 / MIB3 platform) My initial question would be just what starting base should be used? This repo or the ones of @cyr-ius ?

I noticed you didn't create a pull request in cyr-ius' repo with your fixes. Maybe you could do that to prevent him from doing the same changes over.

Key issue is that I don't want to "waste" too much time on something which might be not the development direction and also it's not fully working with legacy yet. Could need some more love and more brain power. But I look into it how to continue. Top priority should be to get most if not all entities back asap now.

cdnninja commented 6 months ago

It is a very good point. I don't know the best code base to start with. This repo being tied to users HACS allows easy upgrades. It can be switched to any code easily with permission of course.

I don't know enough on each repo to comment on the better code base though. Nor am I a professional dev. Just a hobby.

Another option is patch this up a bit to keep it working. Then work on v2 as a branch here. Once ready merge to master. Can use the best approach from multiple sources. However that isn't a small task.

I do like splitting out a separate python library for the api vs HA. That is what I used in the paste project and it helped solve many issues.