Skip to content

Remove Mazda integration #101849

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

Merged
merged 3 commits into from
Oct 12, 2023
Merged

Remove Mazda integration #101849

merged 3 commits into from
Oct 12, 2023

Conversation

bdr99
Copy link
Contributor

@bdr99 bdr99 commented Oct 11, 2023

Proposed change

I'm removing the Mazda integration due to a legal notice sent to me by Mazda.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@bdraco
Copy link
Member

bdraco commented Oct 12, 2023

Here is the DMCA notice: https://github.com/github/dmca/blob/master/2023/10/2023-10-10-mazda.md

I couldn't find any of the copyrighted code in the pypi package that they reference in the notice so I'm not sure which code they are referencing (unless they mean the API itself?). Maybe there was something in the GitHub repo, but that is no longer accessible. If there isn't, it seems like they might resorted to a DMCA notice to suppress information about their API.

This is a bit ironic considering that Tesla just published dev docs for their API at https://developer.tesla.com/docs/fleet-api a few hours ago.

This seems like quite a poor way to handle this from Mazda as you would think that they would want to encourage people to use their ecosystem and and cars like Tesla is doing. It would be a hard sell for me to consider a Mazda product in the future after seeing this.

bdraco
bdraco previously approved these changes Oct 12, 2023
@bdraco bdraco added this to the 2023.10.2 milestone Oct 12, 2023
@frenck frenck self-assigned this Oct 12, 2023
@frenck frenck marked this pull request as draft October 12, 2023 06:48
MartinHjelmare
MartinHjelmare previously approved these changes Oct 12, 2023
@frenck
Copy link
Member

frenck commented Oct 12, 2023

Drafted this PR. Will pick this up today, but considering a different handling.

@frenck
Copy link
Member

frenck commented Oct 12, 2023

As this will go out in a patch release, it might surprise users with a breaking change.

The integration is still removed, but added a stub that raises a repair issue for existing users (so they are informed and know what to do).

image

image

(Note: the Mazda logo in this screenshot will not be displayed once the brand assets have been removed).

"documentation": "https://www.home-assistant.io/integrations/mazda",
"integration_type": "system",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this is incorrect, but it prevents the integration from showing up in the "Add integration" dialog.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we set config_flow to False instead?

Copy link
Member

@frenck frenck Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is already the case. That would still make it appear (and send people to, the non-existing docs to add it as a YAML-based integration).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 forgot that we changed how that is handled.

@frenck frenck marked this pull request as ready for review October 12, 2023 10:18
@frenck frenck requested a review from MartinHjelmare October 12, 2023 10:18
@frenck frenck dismissed stale reviews from bdraco and MartinHjelmare October 12, 2023 10:18

Made changes that need review

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allright, ready to go.

@bdr99 thanks for all the great and hard work you have put into this ❤️

../Frenck

@frenck frenck merged commit 91cf719 into home-assistant:dev Oct 12, 2023
frenck added a commit that referenced this pull request Oct 12, 2023
Co-authored-by: Franck Nijhof <git@frenck.dev>
@frenck frenck mentioned this pull request Oct 12, 2023
@jphoke
Copy link

jphoke commented Oct 12, 2023

Whelp ... that made it easier to decide on my new car next month ... one less option to go with 🤬

@mr-ransel
Copy link

mr-ransel commented Oct 12, 2023

Not that I disagree with removing it to avoid a legal issue, but @bdr99 , if it's something you're interested in arguing, it's not necessarily a done deal. It's worth taking a look at the DMCA guidelines on fair use of reverse engineering for the purpose of "Interoperability". And github has a DMCA counter-notice procedure for this purpose.

Since neither of their cited apps are written in python or node, it seems like it would be particularly difficult for you to have taken their copyrighted code and re-used it directly, and were instead merely utilizing their API interface, which is at worst not protected by DMCA, at best is a heavily contested area, after the Oracle/Google lawsuit, which ruled in favor of code (and likely web) APIs being unprotected.

@Jasesun
Copy link

Jasesun commented Oct 12, 2023

Shame this has to be removed, was nice to see the information from the app displayed in one home assistant dashboard.

@capsel22
Copy link

oh gutted to hear about this. I've used this integration almost daily, had all sort of notifications configured too.
@bdr99 thanks for all your work on this integration I appreciate it.

@GSzabados
Copy link

GSzabados commented Oct 13, 2023

I am a Mazda owner, but not a current user of the integration, as I own an older model from 2017, which hasn't got any connected feature.

But, I just sent an email, marked as an official complaint, to Mazda Hungary, that it is scandalous that they forced the integration to be removed by a DMCA, and they are just loosing future clients this way.

I had plenty troubles in the past regarding their authorised service stations, this might be the last straw regarding choosing a Mazda in the future.

But to give a insight into Mazda's philosophy on selling a car:

Everything we do is intended to make our customers take pride
in every moment of their Mazda ownership.

https://www.mazda.com/en/innovation/design/

I encourage everybody to do the same, and send a complaint to your local Mazda office about this issue.

@GPDixon
Copy link

GPDixon commented Oct 13, 2023

New plug-in hybrid Mazda CX60 arrived 2 weeks ago. Had specifically checked I could integrate with HA beforehand. Had built automations to optimise the overnight charging based on the Octopus Agile tariff (changes every 30mins), controlling the Hypervolt charger and knowing how much electricity the car could take. All now in the bin as a result of this. What a dreadful way to behave in 2023! Really gutted.

@GSzabados
Copy link

@GPDixon, call your dealership and tell them that you are returning the car due to this sh!tshow that MNOA did with the integration, unless they sort it out as soon as possible with their headquarters. If they really see, that they will loose clients they might change their idea about it.

@zatricky
Copy link

@GSzabados while I agree in principal, it's not always so easy. @GPDixon please do seriously consider returning the car, assuming you are able.

@zatricky
Copy link

zatricky commented Oct 13, 2023

I couldn't find any of the copyrighted code in the pypi package that they reference in the notice so I'm not sure which code they are referencing (unless they mean the API itself?). Maybe there was something in the GitHub repo, but that is no longer accessible. If there isn't, it seems like they might resorted to a DMCA notice to suppress information about their API.

Not that I disagree with removing it to avoid a legal issue, but @bdr99 , if it's something you're interested in arguing, it's not necessarily a done deal. It's worth taking a look at the DMCA guidelines on fair use of reverse engineering for the purpose of "Interoperability". And github has a DMCA counter-notice procedure for this purpose.

@bdr99 This looks like Mazda are abusing DMCA processes. If you didn't steal their code, you can counter the DMCA at which point they have to prove that the code was stolen from them, which would be impossible.

@Jasesun
Copy link

Jasesun commented Oct 13, 2023

Thanks to everyone involved with making this work, shame it has to be removed.

I am in the UK and own a Mazda and as I said earlier its handy to have everything from the App in one place.
I upgraded to version 2023.10.2 and then rolled back to 2023.10.1 and it started working again.
I can't stop/start or lock/unlock doors but I still see the mileage/fuel level and the location of the car.

If I stay on this version will it eventually stop working?

@townsmcp
Copy link

@Jasesun i think it should work until Mazda change their API. I did notice this in the app yesterday though so I wonder if an API update is coming next month:
IMG_6796

I really do hope this can be sorted and DMCA revert what has been done. The work is simply amazing. I am UK based as well and I’m on Intelligent Octopus - I have automations (among many other car related automations for controlling preheat, location etc) setup so when the car is charging switch house electric to cheap mode in HA for energy recording - there are no Ohme API integrations to assist with this. The car is deeply integrated into my home and this is such a blow.

Ultimately, why are Mazda US dictating to the entire world that the code is a breach and must be taken down? Surely Mazda Corporation, in Japan, should have ultimate say - which they haven’t. Not some subsidiary of the brand

@Valdorama
Copy link

If the DMCA is not rescinded and the API continues to be available, is it possible to install this integration manually so you could still use it but also keep upgrading HA?

@mr-ransel
Copy link

mr-ransel commented Oct 13, 2023

If the DMCA is not rescinded and the API continues to be available, is it possible to install this integration manually so you could still use it but also keep upgrading HA?

You'd need to either run a fork of HA core, or create a custom component integration using the existing source code from HA, and a pre-DMCA copy of the library from before the library was taken down. If you were to do such a thing I'd advise you against open sourcing it, as it may or may not be a violation of HA, the original author, or Mazdas licenses, I'm familiar with none of them.

Even if you went to that effort, you'd be on the hook for maintaining it yourself and fixing any API changes from now on. The more legitimate path is to counter-notice the DMCA takedown as DMCA abuse as I don't believe any code was actually copied from Mazda.

@frenck
Copy link
Member

frenck commented Oct 13, 2023

Alright!

Home Assistant just published a blog about the removal of Mazda.

Thanks all for the discussion, but I will lock down this PR at this point. All perspectives have been shared and points have been made; also, the PR itself has been merged after all.

Please, feel welcome in our Community Forum or our Discord chat server to continue this conversation.

../Frenck

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.