Skip to content
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

CarPlay implementation #2320

Merged
merged 42 commits into from Jan 8, 2024
Merged

Conversation

LuisFALopes
Copy link
Contributor

Summary

CarPlay implementation that allows you to interact with various entities safely while driving your vehicle.

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#923

Any other notes

@home-assistant
Copy link

home-assistant bot commented Mar 9, 2023

Hi @LuisFALopes

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@LuisFALopes LuisFALopes marked this pull request as ready for review March 9, 2023 18:18
@codecov
Copy link

codecov bot commented Mar 12, 2023

Codecov Report

Attention: 730 lines in your changes are missing coverage. Please review.

Comparison is base (f04c5f4) 28.70% compared to head (e6dc060) 28.02%.

Files Patch % Lines
...es/Shared/Common/Extensions/HAEntity+CarPlay.swift 0.00% 188 Missing ⚠️
Sources/App/Scenes/CarPlaySceneDelegate.swift 0.00% 162 Missing ⚠️
...urces/Vehicle/Templates/EntitiesListTemplate.swift 0.00% 151 Missing ⚠️
...ources/Vehicle/Templates/DomainsListTemplate.swift 0.00% 82 Missing ⚠️
...ources/Shared/CarPlay/HATypedRequest+CarPlay.swift 0.00% 69 Missing ⚠️
Sources/Shared/Domain/Domain.swift 0.00% 69 Missing ⚠️
Sources/Shared/Environment/LocalizedManager.swift 0.00% 7 Missing ⚠️
Sources/App/AppDelegate.swift 87.50% 1 Missing ⚠️
Sources/App/Scenes/SceneActivity.swift 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2320      +/-   ##
==========================================
- Coverage   28.70%   28.02%   -0.69%     
==========================================
  Files         285      291       +6     
  Lines       30189    30926     +737     
==========================================
+ Hits         8667     8668       +1     
- Misses      21522    22258     +736     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robbiet480
Copy link
Member

Can you provide some screenshots or even better a video of this code working in the CarPlay simulator?

@LuisFALopes
Copy link
Contributor Author

LuisFALopes commented Jun 29, 2023

Can you provide some screenshots or even better a video of this code working in the CarPlay simulator?

Hello, here is a short video showing controlling entities and changing servers:

Link

Configuration/Entitlements/App-ios.entitlements Outdated Show resolved Hide resolved
Sources/App/AppDelegate.swift Outdated Show resolved Hide resolved
Sources/App/Resources/en.lproj/Localizable.strings Outdated Show resolved Hide resolved
Sources/App/Scenes/CarPlaySceneDelegate.swift Outdated Show resolved Hide resolved
Sources/App/Scenes/CarPlaySceneDelegate.swift Outdated Show resolved Hide resolved
Sources/Vehicle/Extensions/ServerManagerExtension.swift Outdated Show resolved Hide resolved
Sources/App/Scenes/CarPlaySceneDelegate.swift Outdated Show resolved Hide resolved
Sources/App/Scenes/CarPlaySceneDelegate.swift Outdated Show resolved Hide resolved
Sources/Vehicle/Extensions/HAEntityExtension.swift Outdated Show resolved Hide resolved
Sources/Vehicle/Extensions/HAEntityExtension.swift Outdated Show resolved Hide resolved
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft June 30, 2023 23:47
@bramkragten
Copy link
Member

Can we give the icon an color when the entity is in an active state? The state is often not visible when the name of the entity is long, and it gives an easier overview of the state.

image

@bgoncal
Copy link
Member

bgoncal commented Aug 17, 2023

Very nice PR, Im just wondering if Apple would approve an App like this, I rarely see Apps for CarPlay which similar behaviours, usually they have to adhere to a category like.. media/maps/voice interaction

@kasparasl
Copy link

Is there any way this will be implemented one day? I see there are some issues to be fixed buy It looks abandoned :/

@bgoncal
Copy link
Member

bgoncal commented Nov 2, 2023

@LuisFALopes the community is very much looking forward to this feature, I have some points I want to discuss with you if you still feel like releasing, can you DM me on discord? (I'm @bgoncal2 there)

@LuisFALopes
Copy link
Contributor Author

Is there any way this will be implemented one day? I see there are some issues to be fixed buy It looks abandoned :/

Hello. Sorry to only respond now. Yes, I will continue this development.

@LuisFALopes
Copy link
Contributor Author

@LuisFALopes the community is very much looking forward to this feature, I have some points I want to discuss with you if you still feel like releasing, can you DM me on discord? (I'm @bgoncal2 there)

Hello. Sorry to only respond now. Yes. I will check all the comments and continue this development.

@ItzSwirlz
Copy link
Contributor

ItzSwirlz commented Nov 7, 2023

@LuisFALopes the community is very much looking forward to this feature, I have some points I want to discuss with you if you still feel like releasing, can you DM me on discord? (I'm @bgoncal2 there)

Hello. Sorry to only respond now. Yes. I will check all the comments and continue this development.

Just so happens I was thinking about more integrations, and I saw this PR today. I'm willing to help you! Lets do this

@bgoncal
Copy link
Member

bgoncal commented Nov 7, 2023

@LuisFALopes the community is very much looking forward to this feature, I have some points I want to discuss with you if you still feel like releasing, can you DM me on discord? (I'm @bgoncal2 there)

Hello. Sorry to only respond now. Yes. I will check all the comments and continue this development.

Just so happens I was thinking about more integrations, and I saw this PR today. I'm willing to help you! Lets do this

Great to see this collaboration! Looking forward for the result.
One suggestion: instead of showing all devices/entities in CarPlay, you could do an approach like what we have for Apple Watch, in the iOS app you choose what do you want to display in CarPlay

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @ItzSwirlz

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@bgoncal bgoncal marked this pull request as ready for review January 4, 2024 23:48
@home-assistant home-assistant bot requested a review from zacwest January 4, 2024 23:48
@bgoncal
Copy link
Member

bgoncal commented Jan 4, 2024

Screenshot 2024-01-05 at 00 49 43

Copy link
Member

@bgoncal bgoncal left a comment

Choose a reason for hiding this comment

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

LGTM!

@codyc1515
Copy link

Is there a way to test this (short of pulling out Xcode)?

@bgoncal
Copy link
Member

bgoncal commented Jan 6, 2024

Is there a way to test this (short of pulling out Xcode)?

Currently there is not, you have to compile the App in Xcode.
But we are putting some effort to have this merged this month and luckily available on January release. Can't promise though

@bgoncal bgoncal merged commit 14081d7 into home-assistant:master Jan 8, 2024
6 of 7 checks passed
@oNaiPs
Copy link

oNaiPs commented Jan 9, 2024

Thank you for landing this 🙏🎉

@helmerzNL
Copy link

Thanks for this first iteration!

@nayzm
Copy link

nayzm commented Jan 9, 2024

Looking forward to this, thank you! 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet