Smart Hello: fix api (#15938)
This commit is contained in:
parent
f9d590877b
commit
d9db30c7c7
3 changed files with 79 additions and 79 deletions
|
|
@ -60,5 +60,5 @@ var _ api.VehicleClimater = (*Provider)(nil)
|
|||
// Climater implements the api.VehicleClimater interface
|
||||
func (v *Provider) Climater() (bool, error) {
|
||||
res, err := v.statusG()
|
||||
return res.AdditionalVehicleStatus.ClimateStatus.PreClimateActive || res.AdditionalVehicleStatus.ClimateStatus.Defrost, err
|
||||
return bool(res.AdditionalVehicleStatus.ClimateStatus.PreClimateActive || res.AdditionalVehicleStatus.ClimateStatus.Defrost), err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ type Vehicle struct {
|
|||
|
||||
type VehicleStatus struct {
|
||||
BasicVehicleStatus struct {
|
||||
UsageMode int `json:"usageMode,string"` // "0",
|
||||
EngineStatus string `json:"engineStatus"` // "engine_off",
|
||||
UsageMode Int `json:"usageMode"` // "0",
|
||||
EngineStatus string `json:"engineStatus"` // "engine_off",
|
||||
Position struct {
|
||||
Altitude Int `json:"altitude"` // "117",
|
||||
PosCanBeTrusted Bool `json:"posCanBeTrusted"` // "true",
|
||||
|
|
@ -64,61 +64,61 @@ type VehicleStatus struct {
|
|||
CarLocatorStatUploadEn Bool `json:"carLocatorStatUploadEn"` // "true",
|
||||
Longitude Int `json:"longitude"` // "28..."
|
||||
}
|
||||
DistanceToEmpty int `json:"distanceToEmpty,string"` // "0",
|
||||
CarMode int `json:"carMode,string"` // "0",
|
||||
Speed float64 `json:"speed,string"` // "0.0",
|
||||
SpeedValidity bool `json:"speedValidity,string"` // "true",
|
||||
Direction int `json:"direction,string"` // "277"
|
||||
DistanceToEmpty Int `json:"distanceToEmpty"` // "0",
|
||||
CarMode Int `json:"carMode"` // "0",
|
||||
Speed float64 `json:"speed,string"` // "0.0",
|
||||
SpeedValidity Bool `json:"speedValidity"` // "true",
|
||||
Direction Int `json:"direction"` // "277"
|
||||
}
|
||||
UpdateTime int64 `json:"updateTime,string"` // "1703072512182",
|
||||
AdditionalVehicleStatus struct {
|
||||
MaintenanceStatus struct {
|
||||
TyreTempWarningPassengerRear int `json:"tyreTempWarningPassengerRear,string"` // "0",
|
||||
DaysToService int `json:"daysToService,string"` // "455",
|
||||
EngineHrsToService int `json:"engineHrsToService,string"` // "500",
|
||||
Odometer float64 `json:"odometer,string"` // "7854.000",
|
||||
BrakeFluidLevelStatus int `json:"brakeFluidLevelStatus,string"` // "3",
|
||||
TyreTempWarningPassengerRear Int `json:"tyreTempWarningPassengerRear"` // "0",
|
||||
DaysToService Int `json:"daysToService"` // "455",
|
||||
EngineHrsToService Int `json:"engineHrsToService"` // "500",
|
||||
Odometer float64 `json:"odometer,string"` // "7854.000",
|
||||
BrakeFluidLevelStatus Int `json:"brakeFluidLevelStatus"` // "3",
|
||||
MainBatteryStatus struct {
|
||||
StateOfCharge int `json:"stateOfCharge,string"` // "1",
|
||||
ChargeLevel float64 `json:"chargeLevel,string"` // "0.0",
|
||||
EnergyLevel int `json:"energyLevel,string"` // "0",
|
||||
StateOfHealth int `json:"stateOfHealth,string"` // "0",
|
||||
PowerLevel int `json:"powerLevel,string"` // "0",
|
||||
Voltage float64 `json:"voltage,string"` // "5.000"
|
||||
StateOfCharge Int `json:"stateOfCharge"` // "1",
|
||||
ChargeLevel float64 `json:"chargeLevel,string"` // "0.0",
|
||||
EnergyLevel Int `json:"energyLevel"` // "0",
|
||||
StateOfHealth Int `json:"stateOfHealth"` // "0",
|
||||
PowerLevel Int `json:"powerLevel"` // "0",
|
||||
Voltage float64 `json:"voltage,string"` // "5.000"
|
||||
}
|
||||
}
|
||||
ElectricVehicleStatus struct {
|
||||
DisChargeUAct float64 `json:"disChargeUAct,string"` // "0.0",
|
||||
DisChargeSts int `json:"disChargeSts,string"` // "0",
|
||||
WptFineAlignt int `json:"wptFineAlignt,string"` // "0",
|
||||
ChargeLidAcStatus int `json:"chargeLidAcStatus,string"` // "2",
|
||||
DistanceToEmptyOnBatteryOnly int `json:"distanceToEmptyOnBatteryOnly,string"` // "233",
|
||||
DistanceToEmptyOnBattery100Soc int `json:"distanceToEmptyOnBattery100Soc,string"` // "330",
|
||||
ChargeSts int `json:"chargeSts,string"` // "0",
|
||||
AverPowerConsumption float64 `json:"averPowerConsumption,string"` // "-85.5",
|
||||
ChargerState int `json:"chargerState,string"` // "0",
|
||||
TimeToTargetDisCharged int `json:"timeToTargetDisCharged,string"` // "2047",
|
||||
DistanceToEmptyOnBattery20Soc int `json:"distanceToEmptyOnBattery20Soc,string"` // "66",
|
||||
DisChargeConnectStatus int `json:"disChargeConnectStatus,string"` // "0",
|
||||
ChargeLidDcAcStatus int `json:"chargeLidDcAcStatus,string"` // "2",
|
||||
DcChargeSts int `json:"dcChargeSts,string"` // "0",
|
||||
PtReady int `json:"ptReady,string"` // "0",
|
||||
ChargeLevel int `json:"chargeLevel,string"` // "76",
|
||||
StatusOfChargerConnection int `json:"statusOfChargerConnection,string"` // "0",
|
||||
DcDcActvd int `json:"dcDcActvd,string"` // "0",
|
||||
IndPowerConsumption float64 `json:"indPowerConsumption,string"` // "1000",
|
||||
DcDcConnectStatus int `json:"dcDcConnectStatus,string"` // "0",
|
||||
DisChargeIAct float64 `json:"disChargeIAct,string"` // "0.0",
|
||||
DcChargeIAct float64 `json:"dcChargeIAct,string"` // "0.0",
|
||||
ChargeUAct float64 `json:"chargeUAct,string"` // "0.0",
|
||||
BookChargeSts int `json:"bookChargeSts,string"` // "0",
|
||||
ChargeIAct float64 `json:"chargeIAct,string"` // "0.000",
|
||||
TimeToFullyCharged int `json:"timeToFullyCharged,string"` // "2047"
|
||||
DisChargeUAct float64 `json:"disChargeUAct,string"` // "0.0",
|
||||
DisChargeSts Int `json:"disChargeSts"` // "0",
|
||||
WptFineAlignt Int `json:"wptFineAlignt"` // "0",
|
||||
ChargeLidAcStatus Int `json:"chargeLidAcStatus"` // "2",
|
||||
DistanceToEmptyOnBatteryOnly Int `json:"distanceToEmptyOnBatteryOnly"` // "233",
|
||||
DistanceToEmptyOnBattery100Soc Int `json:"distanceToEmptyOnBattery100Soc"` // "330",
|
||||
ChargeSts Int `json:"chargeSts"` // "0",
|
||||
AverPowerConsumption float64 `json:"averPowerConsumption,string"` // "-85.5",
|
||||
ChargerState Int `json:"chargerState"` // "0",
|
||||
TimeToTargetDisCharged Int `json:"timeToTargetDisCharged"` // "2047",
|
||||
DistanceToEmptyOnBattery20Soc Int `json:"distanceToEmptyOnBattery20Soc"` // "66",
|
||||
DisChargeConnectStatus Int `json:"disChargeConnectStatus"` // "0",
|
||||
ChargeLidDcAcStatus Int `json:"chargeLidDcAcStatus"` // "2",
|
||||
DcChargeSts Int `json:"dcChargeSts"` // "0",
|
||||
PtReady Int `json:"ptReady"` // "0",
|
||||
ChargeLevel Int `json:"chargeLevel"` // "76",
|
||||
StatusOfChargerConnection Int `json:"statusOfChargerConnection"` // "0",
|
||||
DcDcActvd Int `json:"dcDcActvd"` // "0",
|
||||
IndPowerConsumption float64 `json:"indPowerConsumption,string"` // "1000",
|
||||
DcDcConnectStatus Int `json:"dcDcConnectStatus"` // "0",
|
||||
DisChargeIAct float64 `json:"disChargeIAct,string"` // "0.0",
|
||||
DcChargeIAct float64 `json:"dcChargeIAct,string"` // "0.0",
|
||||
ChargeUAct float64 `json:"chargeUAct,string"` // "0.0",
|
||||
BookChargeSts Int `json:"bookChargeSts"` // "0",
|
||||
ChargeIAct float64 `json:"chargeIAct,string"` // "0.000",
|
||||
TimeToFullyCharged Int `json:"timeToFullyCharged"` // "2047"
|
||||
}
|
||||
ChargeHvSts int `json:"chargeHvSts,string"` // "1",
|
||||
ChargeHvSts Int `json:"chargeHvSts"` // "1",
|
||||
ClimateStatus struct {
|
||||
PreClimateActive bool `json:"preClimateActive"` // false,
|
||||
Defrost bool `json:"defrost,string"` // "false",
|
||||
PreClimateActive Bool `json:"preClimateActive"` // false,
|
||||
Defrost Bool `json:"defrost"` // "false",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const data = `{
|
|||
"error": null,
|
||||
"operationResult": 1
|
||||
},
|
||||
"sessionId": "PS0485700000000290629****"
|
||||
"sessionId": "PS048570000000020217505726155407"
|
||||
},
|
||||
"vehicleStatus": {
|
||||
"basicVehicleStatus": {
|
||||
|
|
@ -32,7 +32,7 @@ const data = `{
|
|||
"carMode": "0",
|
||||
"speed": "0.0",
|
||||
"speedValidity": "false",
|
||||
"direction": "0"
|
||||
"direction": ""
|
||||
},
|
||||
"notification": {
|
||||
"notifForEmgyCallStatus": "0"
|
||||
|
|
@ -45,7 +45,7 @@ const data = `{
|
|||
"panicStatus": "false"
|
||||
},
|
||||
"parkTime": {
|
||||
"status": "1723920451549"
|
||||
"status": "1725697061555"
|
||||
},
|
||||
"theftNotification": {
|
||||
"time": "1716550899",
|
||||
|
|
@ -54,38 +54,38 @@ const data = `{
|
|||
"configuration": {
|
||||
"propulsionType": "4",
|
||||
"fuelType": "4",
|
||||
"vin": "HESX****"
|
||||
"vin": "HESXA2C41PS048570"
|
||||
},
|
||||
"updateTime": "1723990612062",
|
||||
"updateTime": "1725702166883",
|
||||
"additionalVehicleStatus": {
|
||||
"maintenanceStatus": {
|
||||
"tyreTempWarningPassengerRear": "0",
|
||||
"daysToService": "191",
|
||||
"daysToService": "171",
|
||||
"engineHrsToService": "500",
|
||||
"odometer": "4973.000",
|
||||
"odometer": "5232.000",
|
||||
"brakeFluidLevelStatus": "3",
|
||||
"tyreTempDriverRear": "22.000",
|
||||
"tyreTempDriverRear": "23.000",
|
||||
"tyreTempWarningPassenger": "0",
|
||||
"tyreTempWarningDriverRear": "0",
|
||||
"mainBatteryStatus": {
|
||||
"stateOfCharge": "1",
|
||||
"chargeLevel": "96.2",
|
||||
"chargeLevel": "95.8",
|
||||
"energyLevel": "0",
|
||||
"stateOfHealth": "0",
|
||||
"powerLevel": "0",
|
||||
"voltage": "14.275"
|
||||
},
|
||||
"tyreTempDriver": "22.000",
|
||||
"tyreTempDriver": "23.000",
|
||||
"tyreTempPassengerRear": "22.000",
|
||||
"tyrePreWarningDriver": "0",
|
||||
"distanceToService": "25027",
|
||||
"distanceToService": "24768",
|
||||
"tyrePreWarningPassengerRear": "0",
|
||||
"tyreTempWarningDriver": "0",
|
||||
"tyreStatusPassengerRear": "244.394",
|
||||
"tyreStatusPassenger": "241.648",
|
||||
"tyreStatusPassengerRear": "241.648",
|
||||
"tyreStatusPassenger": "237.529",
|
||||
"tyreStatusDriverRear": "241.648",
|
||||
"serviceWarningStatus": "0",
|
||||
"tyreStatusDriver": "248.513",
|
||||
"tyreStatusDriver": "247.140",
|
||||
"tyreTempPassenger": "23.000",
|
||||
"tyrePreWarningDriverRear": "0",
|
||||
"tyrePreWarningPassenger": "0",
|
||||
|
|
@ -96,28 +96,28 @@ const data = `{
|
|||
"disChargeSts": "0",
|
||||
"wptFineAlignt": "0",
|
||||
"chargeLidAcStatus": "2",
|
||||
"distanceToEmptyOnBatteryOnly": "201",
|
||||
"distanceToEmptyOnBattery100Soc": "402",
|
||||
"distanceToEmptyOnBatteryOnly": "135",
|
||||
"distanceToEmptyOnBattery100Soc": "429",
|
||||
"chargeSts": "0",
|
||||
"averPowerConsumption": "-102.3",
|
||||
"chargerState": "4",
|
||||
"averPowerConsumption": "-86.3",
|
||||
"chargerState": "2",
|
||||
"timeToTargetDisCharged": "2047",
|
||||
"distanceToEmptyOnBattery20Soc": "80",
|
||||
"disChargeConnectStatus": "2",
|
||||
"distanceToEmptyOnBattery20Soc": "84",
|
||||
"disChargeConnectStatus": "3",
|
||||
"chargeLidDcAcStatus": "1",
|
||||
"dcChargeSts": "0",
|
||||
"ptReady": "0",
|
||||
"chargeLevel": "50",
|
||||
"statusOfChargerConnection": "2",
|
||||
"chargeLevel": "32",
|
||||
"statusOfChargerConnection": "3",
|
||||
"dcDcActvd": "1",
|
||||
"indPowerConsumption": "0.0",
|
||||
"dcDcConnectStatus": "0",
|
||||
"disChargeIAct": "0.0",
|
||||
"dcChargeIAct": "0.5",
|
||||
"chargeUAct": "0.0",
|
||||
"dcChargeIAct": "-11.6",
|
||||
"chargeUAct": "402.0",
|
||||
"bookChargeSts": "0",
|
||||
"chargeIAct": "0.000",
|
||||
"timeToFullyCharged": "2047"
|
||||
"chargeIAct": "8.200",
|
||||
"timeToFullyCharged": "390"
|
||||
},
|
||||
"chargeHvSts": "1",
|
||||
"drivingBehaviourStatus": {
|
||||
|
|
@ -132,7 +132,7 @@ const data = `{
|
|||
"cornrgLi": "0",
|
||||
"frntFog": "0",
|
||||
"stopLi": "0",
|
||||
"tripMeter1": "4118.8",
|
||||
"tripMeter1": "4378.6",
|
||||
"approach": "0",
|
||||
"tripMeter2": "0.0",
|
||||
"indFuelConsumption": "0",
|
||||
|
|
@ -173,7 +173,7 @@ const data = `{
|
|||
"rrVentDetail": "0",
|
||||
"rlVentSts": "0",
|
||||
"passVentSts": "0",
|
||||
"interiorTemp": "24.900",
|
||||
"interiorTemp": "26.800",
|
||||
"passVentDetail": "0",
|
||||
"sunroofPos": "101",
|
||||
"cdsClimateActive": "false",
|
||||
|
|
@ -198,7 +198,7 @@ const data = `{
|
|||
"steerWhlHeatingSts": "2",
|
||||
"drvVentDetail": "0",
|
||||
"winPosDriverRear": "0",
|
||||
"exteriorTemp": "23.500",
|
||||
"exteriorTemp": "22.500",
|
||||
"rlHeatingSts": "0",
|
||||
"winStatusDriverRear": "2",
|
||||
"defrost": "false",
|
||||
|
|
@ -241,7 +241,7 @@ const data = `{
|
|||
"trunkOpenStatus": "0"
|
||||
},
|
||||
"pollutionStatus": {
|
||||
"interiorPM25": "1",
|
||||
"interiorPM25": "11",
|
||||
"interiorSecondPM25Level": "0",
|
||||
"interiorPM25Level": "0",
|
||||
"relHumSts": "80",
|
||||
|
|
@ -281,7 +281,7 @@ const data = `{
|
|||
"success": true,
|
||||
"hint": null,
|
||||
"httpStatus": "OK",
|
||||
"sessionId": "6fab3f23b494976b2101eaff1f2c87cf",
|
||||
"sessionId": "40aedbf4c3bfb0bd05e37fa5deda1095",
|
||||
"message": "operation succeed"
|
||||
}`
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue