itchannel / fordpass-ha

Fordpass integration for Home Assistant
301 stars 53 forks source link

My windows statuses are still broken #329

Open frankie-boy-hgv opened 10 months ago

frankie-boy-hgv commented 10 months ago

Hi,

Not sure if it should be fixed already, but my individuel window statuses are still incorrect. I think my previous json can be used.

Regards,

Frank

gniknalu commented 10 months ago

To add some color, it reports "closed" but adds:

icon: mdi:car-door
friendly_name: fordpass_windowPosition
UNSPECIFIED_FRONT: 
updateTime: '2023-10-12T12:39:39Z'
oemCorrelationId: '76361'
value:
  doubleRange:
    lowerBound: 0
    upperBound: 0
vehicleWindow: UNSPECIFIED_FRONT
vehicleOccupantRole: DRIVER
vehicleSide: DRIVER
pimisen commented 10 months ago

same here, but not using it

frankie-boy-hgv commented 10 months ago

same here, but not using it

I have to, my wife and kids sometimes don't close the windows, so a notification when it starts raining can be useful to send the right person to the car to close it. :-D

itchannel commented 10 months ago

So Windows is a right pain so far in the new API.

This is literally all I see from everyones Json so far:

        "windowStatus": [
            {
                "updateTime": "2023-10-10T22:13:56Z",
                "oemCorrelationId": "50883",
                "value": {
                    "doubleRange": {
                        "lowerBound": 0.0,
                        "upperBound": 0.0
                    }
                },
                "vehicleWindow": "UNSPECIFIED_FRONT",
                "vehicleOccupantRole": "DRIVER",
                "vehicleSide": "DRIVER"
            }
        ],

So i took the values of 0.0 being closed as everyone had the same.

I have noticed some more information in the events section but I believe that data is from past events, so going to take me a while to figure out what's the best approach.

itchannel commented 10 months ago

Potentially I can pull the data from here, but would need someone to manually test the code for me as I don't have window support of my vehicles and I don't have enough data for my fake testing API.

It still looks like 0.0 is up, so would love to see what down looks like.

image

frankie-boy-hgv commented 10 months ago

Kuga_OpenWindows_Charging.json (Uploaded a new file. Seems like some floats were formatted in the old file)

Here you are, all windows open and charging.

itchannel commented 10 months ago

Thanks for that very helpful.

Now know that 100 is fully open

              "value": {
                    "doubleRange": {
                        "lowerBound": 100.0,
                        "upperBound": 100.0
                    }
                },

However it does still only show one window under windowStatus so will have to look at the events bit as that does at least show all windows open.

frankie-boy-hgv commented 10 months ago

Yep, kind of strange they didn't make it the same way as the doors and tires. Maybe they figure it out themselves and make it the same way as doors and tires. Maybe it's smart to fix other bugs first 😉

frankie-boy-hgv commented 10 months ago

Some information about the lowerbound and upperbound values when the window is a bit open: image

gniknalu commented 10 months ago

I just went out to the vehicle, started it and partially opened both front windows. The sensor report "Open" with the following details:

UNSPECIFIED_FRONT: 
updateTime: '2023-10-13T21:24:18Z'
oemCorrelationId: '76592'
value:
  doubleRange:
    lowerBound: 10
    upperBound: 60
vehicleWindow: UNSPECIFIED_FRONT
vehicleOccupantRole: DRIVER
vehicleSide: DRIVER

icon: mdi:car-door
friendly_name: fordpass_windowPosition

So the UppoerBound and LowerBound are fantastic - they're indicating the window is partially open! I'm not sure how to differentiate between the different window positions based on vehicleSide: DRIVER vs vehicleOccupantRole: DRIVERvs vehicleWindow: UNSPECIFIED_FRONT

itchannel commented 10 months ago

So my plan is to tidy that section up a little and parse the data to display nicely.

SquidBytes commented 10 months ago

349