-
Notifications
You must be signed in to change notification settings - Fork 9
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
Websocket error every few minutes #122
Comments
I'm in Canada using Metric system, and a quick glance at the code seems to point at a bug specific to this case... |
Sure, here you go! subaru-7d740fd5e86943646274952f43ba30ee-JF2SKEPC4PH408272-0d0e149903e481014081797ee22cc0f6.json Funny timing I was literally just looking at the issue because I finally have spare time to look at the source to see if I can debug further myself. Please let me know if there's anything I can do to help debug. Thanks! |
I think I found the bug: It looks like the Subaru API doesn't include a recommended tire pressure in your vehicle features. There's a check to see if the dict is populated with the data (should be length of 2, if the data is provided):
But there's a subsequent else block that tries to get the value for a non-existent key and passes it along for conversion:
|
Ah! I was just digging into the pressure unit conversion code, thinking it was something to do with that logic specifically. Happy to test out any code changes if you think there's an easy fix. |
I published a prerelease version https://github.com/G-Two/homeassistant-subaru/releases/tag/v0.7.15dev0 |
Awesome thanks, the error seems to be gone! I am however seeing all 4 tires with pressure displayed as It seems that the values for tire pressure are missing as well as the recommended tire pressure. I guess that just isn't supported by subaru in Canada... |
Looking at your diagnostics output, it looks like there is no reported tire pressure right now. If you drive around for a few minutes and then turn off the vehicle, it should start reporting tire pressure. Unfortunately, it looks like I may have broke other things with this prerelease, so I'll have to keep working on it later. Feel free to keep using this one, I'll make sure to keep the bug fix for your case in any subsequent release. |
Interesting, no tire data in history so far, but maybe it'll start showing up with this fix. I'll check after I use the car tomorrow morning. Thanks again, and sorry to hear that the fix has caused other issues. |
Apparently "dev" version numbers break things, so I switched to "rc": https://github.com/G-Two/homeassistant-subaru/releases/tag/v0.7.15rc0 This should fix the issue without breaking everything else. |
I used the car this morning, but all tire pressures are still being reported as 0. |
Are you using 0.7.15rc0? |
To test the fix I just copied over the new I've done a proper update to rc0 now, and here's the latest diagnostics output: subaru-7d740fd5e86943646274952f43ba30ee-JF2SKEPC4PH408272-0d0e149903e481014081797ee22cc0f6 (2).json |
I got an email notification that someone mentioned me and asked if the tire pressure was showing up in the MySubaru app. The answer to that question is no, I wasn't able to see the tire pressure displayed anywhere in the MySubaru app. Maybe it shows up for people in the US but not Canada? I also wonder if there's some TPMS feature that my Forester is missing. Do people who have tire pressure displaying in the app have anything related to that in the |
Do you have the ability to view your individual tire pressures inside your vehicle? If so, it's strange that they wouldn't send that information through. There is a "vehicle_features": [
"ABS_MIL",
"AHBL_MIL",
"ATF_MIL",
"AWD_MIL",
"BSD",
"BSDRCT_MIL",
"CEL_MIL",
"EBD_MIL",
"EOL_MIL",
"EPAS_MIL",
"EPB_MIL",
"ESS_MIL",
"EYESIGHT",
"HEVCM_MIL",
"HEV_MIL",
"NAV_TOMTOM",
"OPL_MIL",
"PHEV",
"RAB_MIL",
"RCC",
"REARBRK",
"RPOIA",
"SRS_MIL",
"TEL_MIL",
"TIF_36",
"TIR_35",
"TPMS_MIL",
"VDC_MIL",
"WASH_MIL",
"g2"
], |
Ok, so it sounds like the vehicle_features could be used to filter out certain things like the tire pressure then! Unless Subaru provide details around that I could see it being a lot of work to reverse engineer... Funny that it's spelled |
Ahh TIL, here's a reddit thread with Canadians griping about how Subaru commonly sell vehicles without TPMS in Canada. Kinda makes sense in a way that they don't offer it in Canada. Here in Quebec where I live by law we have to put on snow tires every winter and apparently it costs more to change tires when TPMS enabled, and also TPMS get affected by large temperature fluctuations like we get. |
Wow, I had no idea Subaru sold cars without TPMS. I updated the latest pre-release to check for TPMS before adding the tire pressure sensors. So this should fix the original bug you reported, as well as eliminate the tire pressure entities from appearing in the first place for unsupported vehicles. https://github.com/G-Two/homeassistant-subaru/releases/tag/v0.7.15rc1 |
Nice, thanks for looking into this so thoroughly! One last question: Is there any support for locating the vehicle? I can do that through the MySubaru app, and I’d love to setup some automations for when the car leaves/returns etc… |
Yes, there should be a device tracker entity in HA that shows your vehicle's last reported location. |
Oh wow, that's sweet, thanks! I didn't think to look for it because it wasn't on the overview card. |
I just installed this integration, and it seems to be working fine, other than I keep getting an error message even when I'm not actually doing anything.
Here's the error I'm seeing in the logs:
The text was updated successfully, but these errors were encountered: