-
Notifications
You must be signed in to change notification settings - Fork 8
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
Odd data behavior #119
Comments
Yeah it seems like HA is using all metric values for you (2757 hPa is about 39.9 psi) but displaying imperial unit names. I haven't received any other reports of this issue. Which version of HA are you using? Can you attach your HA generated device diagnostics output here? |
Core 2024.2.5
UI 20240207.1
I enabled debug logging, it will be a while before the car talks
…On Sun, May 5, 2024 at 8:04 PM G-Two ***@***.***> wrote:
Yeah it seems like HA is using all metric values for you (2757 hPa is
about 39.9 psi) but displaying imperial unit names. I haven't received any
other reports of this issue. Which version of HA are you using? Can you
attach your HA generated device diagnostics output here?
—
Reply to this email directly, view it on GitHub
<#119 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALTMOOOGROJY2GRASSACZDZA3CIXAVCNFSM6AAAAABHG5J24OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVGAYDMOBVGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Something really odd is going on here. I'll show you just an excerpt
rather than the whole thing.
```
2024-05-05 21:25:39.676 DEBUG (MainThread) [custom_components.subaru]
Subaru data {'climate': [],
'vehicle_status': {'AVG_FUEL_CONSUMPTION': 9.7,
'DISTANCE_TO_EMPTY_FUEL': 530,
'DOOR_BOOT_POSITION': 'CLOSED',
'DOOR_ENGINE_HOOD_POSITION': 'CLOSED',
'DOOR_FRONT_LEFT_POSITION': 'OPEN',
'DOOR_FRONT_RIGHT_POSITION': 'CLOSED',
'DOOR_REAR_LEFT_POSITION': 'CLOSED',
'DOOR_REAR_RIGHT_POSITION': 'CLOSED',
'HEADING': None,
'LAST_UPDATED_DATE': '2024-05-05T16:48:00.000+0000',
'ODOMETER': 913,
'REMAINING_FUEL_PERCENT': '97',
'TIMESTAMP': datetime.datetime(2024, 5, 5, 16, 48,
tzinfo=datetime.timezone.utc),
'TYRE_PRESSURE_FRONT_LEFT': 2620,
'TYRE_PRESSURE_FRONT_RIGHT': 2551,
'TYRE_PRESSURE_REAR_LEFT': 2482,
'TYRE_PRESSURE_REAR_RIGHT': 2413,
'VEHICLE_STATE_TYPE': 'IGNITION_OFF',
'WINDOW_FRONT_LEFT_STATUS': 'OPEN',
'WINDOW_FRONT_RIGHT_STATUS': 'CLOSE',
'WINDOW_REAR_LEFT_STATUS': 'CLOSE',
'WINDOW_REAR_RIGHT_STATUS': 'CLOSE',
'WINDOW_SUNROOF_STATUS': 'CLOSE'}}
```
If I run `subarulink vehicle_status` I get the same results. Now, here's
the strange part. I ran `subarulink -i` then `show raw` a few days ago and
got this:
```
'vehicleStatus': {'data': {'avgFuelConsumptionLitersPer100Kilometers': 9.6,
'avgFuelConsumptionMpg': 24.5,
'tirePressureFrontLeft': None,
'tirePressureFrontLeftPsi': '39.99',
'tirePressureFrontRight': None,
'tirePressureFrontRightPsi': '39',
'tirePressureRearLeft': None,
'tirePressureRearLeftPsi': '38',
'tirePressureRearRight': None,
'tirePressureRearRightPsi': '37',
'tyreStatusFrontLeft': 'UNKNOWN',
'tyreStatusFrontRight': 'UNKNOWN',
'tyreStatusRearLeft': 'UNKNOWN',
'tyreStatusRearRight': 'UNKNOWN',
'vehicleStateType': 'IGNITION_OFF',
'odometerValue': 567,
'odometerValueKilometers': 913,
```
I can't figure out the pattern here. "tire" vs "tyre" okay I guess.
```
***@***.***:~$ subarulink vehicle_status | grep -i odo
'ODOMETER': 567,
```
Sometimes I get:
```
'odometerUnit': 'MILES',
*```*
*```*
Orange> ***@***.***:~$ echo 'show raw' | subarulink -i | grep -i odometer
Odometer: 567 miles
'odometer': 505,
'odometerUnit': 'MILES',
'odometerValue': 567,
'odometerValueKilometers': 913,
```
the first two are in 'condition' and the second two are in 'vehicleStatus'
...
On Sun, May 5, 2024 at 9:21 PM Christopher Piggott ***@***.***>
wrote:
… Core 2024.2.5
UI 20240207.1
I enabled debug logging, it will be a while before the car talks
On Sun, May 5, 2024 at 8:04 PM G-Two ***@***.***> wrote:
> Yeah it seems like HA is using all metric values for you (2757 hPa is
> about 39.9 psi) but displaying imperial unit names. I haven't received any
> other reports of this issue. Which version of HA are you using? Can you
> attach your HA generated device diagnostics output here?
>
> —
> Reply to this email directly, view it on GitHub
> <#119 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AALTMOOOGROJY2GRASSACZDZA3CIXAVCNFSM6AAAAABHG5J24OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVGAYDMOBVGE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
The HA diagnostics output feature would be more helpful for me to trace down the issue since it will show me a single snapshot of the current HA state and the associated JSON dump of the raw mysubaru.com API data (used to create the HA state) in a single file. vehicleStatus is the raw JSON provided by the mysubaru.com API. The 'tyre' vs 'tire' naming is on them. They've changed their field names/casing over the years, so I try to keep things consistently named in vehicle_status (which contains the data after it has been processed by subarulink). vehicle_status is provided by the subarulink package and what is used by the home assistant integration to set the state for the various sensors. For subarulink>=0.7.10, it should only supply US customary unit values (i.e. HA will convert to metric, if configured). If vehicle_status is supplying metric unit values in your case, then I need to see the raw data to figure out if there is an API inconsistency coming from mysubaru.com EDIT: Corrected to state subarulink>=0.7.10 |
subaru-e8c7878473ca0b27d2edffd38f782e79-Orange-953c6067ab6078a765313226cc0a21fa.json Got it. Thanks for pointing to the download link. Also thanks for having the foresight to have it automatically scrub identifying information from the file, kudos :) |
That's strange, it's behaving like an older release of subarulink (metric values for tire pressure, odometer, and fuel economy in Can you enable debug logging for the subaru custom component, and then restart the component and then check your logs. I'd like to see what it is reporting for the first log entry (which should be the version of subarulink actually being run). Example:
|
Sure.
Also, inside the container:
|
I'd like to try to duplicate the issue on my end. Can you point me to a guide (or show me) how you setup your home assistant container with a non-root user? This would also help me with #118 |
I upgraded from the version of this integration that comes with home assistant to the latest github and there are two things going haywire:
Update: the odometer change is because it's now showing kilometers rather than miles. I'm not where where it got the notion it should do this.
The tire pressure I haven't figured out but "show raw" returns this:
and "show all" returns this:
so I think the library is right, and the home assistant end is somehow goofed ...
The text was updated successfully, but these errors were encountered: