G-Two / homeassistant-subaru

Subaru STARLINK custom component for Home Assistant.
Apache License 2.0
54 stars 6 forks source link

Unable to Connect using Home Assistant #105

Closed Luidog closed 6 months ago

Luidog commented 6 months ago

Hello,

I recently lost access to MySubaru via Home assistant. When attempting to reconfigure the integration, I get a UI dialog that says "Cannot connect". The Home assistant logs record the following:

This error originated from a custom integration.

Logger: custom_components.subaru.config_flow Source: custom_components/subaru/config_flow.py:63 Integration: Subaru (HACS) (documentation, issues) First occurred: December 13, 2023 at 7:39:04 PM (3 occurrences) Last logged: 4:08:43 PM

Unable to communicate with Subaru API: HTTP 404: <!doctype html>HTTP Status 404 – Not Found

HTTP Status 404 – Not Found


Type Status Report

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


Apache Tomcat/9.0.76

RequestInfo(url=URL('https://mobileapi.prod.subarucs.com/g2v27/login.json'), method='POST', headers=<CIMultiDictProxy('Host': 'mobileapi.prod.subarucs.com', 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Android SDK built for x86 Build/QSR1.191030.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36', 'Origin': 'file://', 'X-Requested-With': 'com.subaru.telematics.app.remote', 'Accept-Language': 'en-US,en;q=0.9', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'Content-Length': '162', 'Content-Type': 'application/x-www-form-urlencoded')>, real_url=URL('https://mobileapi.prod.subarucs.com/g2v27/login.json'))

Luidog commented 6 months ago

Based on this issue: https://github.com/home-assistant/core/issues/83187#top

I believe we may need to update to the latest version. When I try https://mobileapi.prod.subarucs.com/g2v28/login.json I do not get a 404, but invalid account.

G-Two commented 6 months ago

Are you using the latest release? It should be using the g2v28 API.

https://github.com/G-Two/subarulink/blame/fc1a6c2c151cf62be3b0be8a11a5d5429771b5ad/subarulink/_subaru_api/const.py#L8

Luidog commented 6 months ago

Thanks @G-Two . Indeed, I was not using the latest. I check the code and saw that the latest uses 28. I updated and was able to connect. However, now I do not see remote start as an option. Is there something I need to do to reconfigure this?

I see the lock and binary_sensors, but no remote start

Luidog commented 6 months ago

I specifically don't see:

Button (Remote Start/Stop, Lights/Horn, Locate, Refresh) Select (Climate Control Preset)

as mentioned in the documentation. I had access to these sensors / buttons previous and still have the ability to send start commands and climate selections via the mysubaru web page and mobile app.

Is there anything I am missing?

Luidog commented 6 months ago

@G-Two , I am closing this issue as It looks like the remote and select features populated after some time.

Please accept my thanks for the support and an excellent integration.