Skip to content
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

vehicle Smart #1 not working #12884

Closed
cyberways opened this issue Mar 12, 2024 · 16 comments
Closed

vehicle Smart #1 not working #12884

cyberways opened this issue Mar 12, 2024 · 16 comments
Assignees
Labels
bug Something isn't working devices Specific device support

Comments

@cyberways
Copy link

Describe the bug

Good morning,
we use evcc with a BMW i3s for several months now and are very happy with it. Thank you for such great software!
Now we have a Smart #1 that also should be supported by evcc, but does not show the SoC and support charging to a selected SoC. Config. and logs see below.
As I read in the docs smart does not support autoselection of the vehicle connected. Is it normal behaviour that adding the smart to the config also disables auto-detection of the BMW that formerly worked fine, or do we have a bug here?

Steps to reproduce

see above.

Configuration details

vehicles:
- type: template
  template: bmw
  title: BMW i3s
  user: ***
  password: ***
  vin: ***
  capacity: 40
  icon: car
  cache: 6m
  maxCurrent: 9
  name: bmwi3s

- name: smart
  type: template
  template: smart-hello
  title: smart
  icon: car
  cache: 6m
  capacity: 62
  maxCurrent: 10
  user: ***
  password: ***

Log details

./evcc vehicle smart

smart
-----
.Soc:         json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s(<nil>)
Capacity:     62.0kWh
Range:        json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s(<nil>)
Odometer:     json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s(<nil>)
Climater:     json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s(<nil>)
Position:     json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s(<nil>)
OnIdentified: MaxCurrent:10
Features:     []


and logfile in every output block while evcc is charging the smart:

Mar 09 13:26:07 evcc[23227]: [lp-1  ] ERROR 2024/03/09 13:26:07 vehicle soc: json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s(<nil>)

What type of operating system are you running?

Linux

Version

0.124.9

@VolkerK62
Copy link
Contributor

try it by adding the vin to the vehicle config.

@andig
Copy link
Member

andig commented Mar 13, 2024

Bitte mal

evcc vehicle  --log trace smart

Hier ist wohl ein Wert plötzlich gar nicht mehr gefüllt...

@andig andig added the question Rather clarification than issue label Mar 13, 2024
@cyberways
Copy link
Author

VIN zur Konfig. hinzugefügt (ohne Erfolg) und log trace gestartet.

Login bei smart erfolgreich, liefert eine Menge JSON mit sehr persönlichen Daten und einen Login-Token.
Beschaffung des Access-Token und Session-Token klappt anschließend auch.
Von Interesse sind wohl die letzten beiden Zeilen des Dialogs. Die Daten kommen alle, und damit sollte eigentlich auch eine automatische Erkennung des ladenden Fahrzeugs möglich sein. Danke!

--
[smart-hello] TRACE 2024/03/13 13:25:27 GET https://api.ecloudeu.com/remote-control/vehicle/status/HESXA*****?latest=true&target=&userId=*****
[smart-hello] TRACE 2024/03/13 13:25:27 {"code":"1000","data":{"result":{"serviceResult":{"error":null,"operationResult":1},"sessionId":"PS048*****"},"vehicleStatus":{"basicVehicleStatus":{"usageMode":"1","engineStatus":"engine_off","position":{"altitude":"","posCanBeTrusted":"","latitude":"","carLocatorStatUploadEn":"false","marsCoordinates":"","longitude":""},"carMode":"0","speed":"0.0","speedValidity":"false","direction":""},"notification":{"notifForEmgyCallStatus":"0"},"eg":{"enableRunning":"false","blocked":{"status":"0"},"panicStatus":"false"},"parkTime":{"status":"1710332486825"},"configuration":{"propulsionType":"4","fuelType":"4","vin":"HESXA*****"},"updateTime":"****","additionalVehicleStatus":{"maintenanceStatus":{"tyreTempWarningPassengerRear":"0","daysToService":"349","engineHrsToService":"500","odometer":"1904.000","brakeFluidLevelStatus":"3","tyreTempDriverRear":"12.000","tyreTempWarningPassenger":"0","tyreTempWarningDriverRear":"0","mainBatteryStatus":{"stateOfCharge":"1","chargeLevel":"94.3","energyLevel":"0","stateOfHealth":"0","powerLevel":"0","voltage":"14.225"},"tyreTempDriver":"12.000","tyreTempPassengerRear":"12.000","tyrePreWarningDriver":"0","distanceToService":"28096","tyrePreWarningPassengerRear":"0","tyreTempWarningDriver":"0","tyreStatusPassengerRear":"258.124","tyreStatusPassenger":"249.886","tyreStatusDriverRear":"255.378","serviceWarningStatus":"0","tyreStatusDriver":"258.124","tyreTempPassenger":"12.000","tyrePreWarningDriverRear":"0","tyrePreWarningPassenger":"0","washerFluidLevelStatus":"1"},"electricVehicleStatus":{"disChargeUAct":"0.0","disChargeSts":"0","wptFineAlignt":"0","chargeLidAcStatus":"2","distanceToEmptyOnBatteryOnly":"269","distanceToEmptyOnBattery100Soc":"324","chargeSts":"0","averPowerConsumption":"-83.8","chargerState":"2","timeToTargetDisCharged":"2047","distanceToEmptyOnBattery20Soc":"65","disChargeConnectStatus":"3","chargeLidDcAcStatus":"1","dcChargeSts":"0","ptReady":"0","chargeLevel":"89","statusOfChargerConnection":"3","dcDcActvd":"1","indPowerConsumption":"1000","dcDcConnectStatus":"0","disChargeIAct":"0.0","dcChargeIAct":"-6.9","chargeUAct":"407.7","bookChargeSts":"0","chargeIAct":"6.000","timeToFullyCharged":"155"},"chargeHvSts":"1","drivingBehaviourStatus":{"gearAutoStatus":"0","gearManualStatus":"0","engineSpeed":"0.000"},"runningStatus":{"ahbc":"0","goodbye":"0","homeSafe":"0","cornrgLi":"0","frntFog":"0","stopLi":"0","tripMeter1":"1050.3","approach":"0","tripMeter2":"26.1","indFuelConsumption":"0","hiBeam":"0","engineCoolantLevelStatus":"3","fuelEnLevel":"0","loBeam":"0","posLiRe":"0","ltgShow":"0","welcome":"0","drl":"0","fuelLevelPct":"0","ahl":"0","fuelEnCns":"0","trunIndrLe":"0","trunIndrRi":"0","afs":"0","dbl":"0","avgSpeed":"","posLiFrnt":"0","reverseLi":"0","hwl":"0","reFog":"0","flash":"0","allwl":"0","fuelEnCnsFild":"0"},"trailerStatus":{"trailerTurningLampSts":"0","trailerFogLampSts":"0","trailerBreakLampSts":"0","trailerReversingLampSts":"0","trailerPosLampSts":"0"},"climateStatus":{"drvHeatSts":"0","winPosDriver":"0","rrVentDetail":"0","rlVentSts":"0","passVentSts":"0","interiorTemp":"19.300","passVentDetail":"0","sunroofPos":"101","cdsClimateActive":"false","sunroofOpenStatus":"1","rrHeatingDetail":"0","winStatusPassenger":"2","fragActive":false,"winStatusDriver":"2","drvVentSts":"0","winStatusPassengerRear":"2","sunCurtainRearOpenStatus":"1","preClimateActive":false,"rlHeatingDetail":"0","winPosPassengerRear":"0","curtainPos":"0","rlVentDetail":"0","curtainOpenStatus":"1","climateOverHeatProActive":"true","rrVentSts":"0","rrHeatingSts":"0","winPosPassenger":"0","steerWhlHeatingSts":"2","drvVentDetail":"0","winPosDriverRear":"0","exteriorTemp":"11.500","rlHeatingSts":"0","winStatusDriverRear":"2","defrost":"false","drvHeatDetail":"2","passHeatingDetail":"2","airBlowerActive":"false","sunCurtainRearPos":"101","passHeatingSts":"0"},"drivingSafetyStatus":{"doorLockStatusDriverRear":"1","srsCrashStatus":"0","doorOpenStatusPassengerRear":"0","doorPosPassengerRear":"0","doorOpenStatusDriver":"0","seatBeltStatusPassenger":"false","doorPosDriver":"0","seatBeltStatusThPassengerRear":"false","electricParkBrakeStatus":"1","doorLockStatusDriver":"1","seatBeltStatusThDriverRear":"false","tankFlapStatus":"2","seatBeltStatusPassengerRear":"false","doorOpenStatusPassenger":"0","doorPosPassenger":"0","vehicleAlarm":{"alrmTrgSrc":"0"},"doorPosDriverRear":"0","centralLockingStatus":"2","seatBeltStatusDriver":"false","doorLockStatusPassenger":"1","seatBeltStatusMidRear":"false","trunkLockStatus":"1","seatBeltStatusDriverRear":"false","engineHoodOpenStatus":"0","doorOpenStatusDriverRear":"0","doorLockStatusPassengerRear":"1","trunkOpenStatus":"0"},"pollutionStatus":{"interiorPM25":"1","interiorSecondPM25Level":"0","interiorPM25Level":"0","relHumSts":"80","exteriorPM25Level":"0"}},"temStatus":{"swVersion":null,"serialNumber":null,"powerSource":null,"networkAccessStatus":{"mobileNetwork":null,"simInfo":{"iccId":null,"imsi":null,"msisdn":null}},"mcuVersion":null,"mpuVersion":null,"backupBattery":{"stateOfCharge":null,"stateOfHealth":null,"voltage":null},"hwVersion":null,"powerMode":null,"healthStatus":null,"sleepCycleNextWakeupTime":null,"rvsEnable":"true","imei":null,"state":null,"connectivityStatus":null}}},"success":true,"hint":null,"httpStatus":"OK","sessionId":"***","message":null}
.Soc: json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s()
Capacity: 62.0kWh
Range: json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s()
Odometer: json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s()
Climater: json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s()
Position: json: invalid use of ,string struct tag, trying to unmarshal "" into int: %!s()
OnIdentified: MaxCurrent:10
Features: []

@Haleo
Copy link

Haleo commented Mar 13, 2024

Bei mir exakt das selbe Problem. Login funktioniert. evcc vehicle --log trace smart zeigt bei mir das selbe Verhalten. SOC ist nicht zu sehen.

@cyberways

This comment was marked as off-topic.

@andig andig added bug Something isn't working and removed question Rather clarification than issue labels Mar 14, 2024
@andig andig self-assigned this Mar 14, 2024
@andig
Copy link
Member

andig commented Mar 14, 2024

@marco79cgn willst Du mal einen Blick drauf werfen? Vmtl. hat Smart das bescheuerte "Zahlen als Strings" Format jetzt noch kaputter gemacht, so dass es jetzt manuell dekodiert werden muss. Ich komme aktuell nicht dazu mir das anzuschauen...

@andig andig added the devices Specific device support label Mar 15, 2024
@Haleo
Copy link

Haleo commented Mar 18, 2024

Ich habe zur Sicherheit übers Wochenende EVCC von Grund auf neu eingerichtet und erhalte wieder den selben Fehler beim Smart. Das Widget von @marco79cgn und so läuft sauber. Die Einrichtung müsste eigentlich von dieser Seite her passen.

@andig
Copy link
Member

andig commented Mar 18, 2024

Ich habe zur Sicherheit übers Wochenende EVCC von Grund auf neu eingerichtet

Das ist nie notwendig. evcc besteht aus einer einzigen Konfigurationsdatei plus Datenbank.

@andig
Copy link
Member

andig commented Mar 23, 2024

Mangels Testdaten/Feedback machen wir hier zu.

@andig andig closed this as completed Mar 23, 2024
@Haleo
Copy link

Haleo commented Mar 23, 2024

Schade, wenn ich hätte helfen können gerne melden. @marco79cgn bei dir geht noch alles? Keine Chance bei mir. SOC wird mit besagtem Fehler einfach nicht mehr angezeigt. :-(

@andig
Copy link
Member

andig commented Mar 23, 2024

@Haleo dann gerne Zugangsdaten an info@evcc.io zum Testen. Danke!

@Haleo
Copy link

Haleo commented Mar 23, 2024

Verflixt und zugenäht. Ich habe ein neues Smart-Konto erstellt (das ich mit Dir teilen wollte) und den digitalen Schlüssel diesem freigegeben. Über dieses neue Konto bekomme ich nun den SOC ohne Fehler. Ich habe keine Ahnung wieso. Dementsprechend wäre das mein Lösungsansatz für @cyberways. :-) Für mich ist das Thema damit erledigt. Danke für Eure tolle SW-Lösung und den super Support.

@cyberways

This comment was marked as off-topic.

@Haleo
Copy link

Haleo commented Mar 26, 2024

@cyberways Bei mir sieht das sauber aus. Er lädt aber immer 1A unter dem Maximum. Muss ich mal beobachen. Wallbox ist ein go-echarger Homefix v3 bei mir. Jetzt ist ja wieder mehr Sonne da. Melde mich bei Dir. Allerdings hat das bisher immer problemlos funktioniert, inkl. Phasenumschaltung und allem. Gibt ja verschiedene Versionen des OBC. Mein Smart wurde im April 23 gebaut und hat nicht die erste Version.

@sffbigmac
Copy link

sffbigmac commented Aug 14, 2024

@Haleo hat sich da was ergeben? Seit ein paar Tagen sehe ich plötzlich auch das Problem mit meinem smart #1.

vehicle odometer: json: cannot unmarshal number 0.0 into Go struct field .Data.VehicleStatus.AdditionalVehicleStatus.ElectricVehicleStatus.indPowerConsumption of type int: %!s(<nil>)

In der hellosmart app zeigt er mir den soc allerdings an. evcc mal auf latest geupdated bringt auch keine Änderung.

@sffbigmac
Copy link

sffbigmac commented Aug 15, 2024

EDIT: lasst uns im follow-up thread weiter diskutieren: #15014 (comment)

@andig habe gesehen dass du den PR #13021 zugemacht hattest. Ich sehe wie oben erwähnt aktuell allerdings noch weiterhin genau das Problem. Hier mal ein Auszug aus dem trace was die smart API lieferte (zu dem Zeitpunkt war der smart allerdings nicht an der Wallbox verbunden):

"electricVehicleStatus":{
"disChargeUAct":"0.0",
"disChargeSts":"0",
"wptFineAlignt":"0",
"chargeLidAcStatus":"2",
"distanceToEmptyOnBatteryOnly":"199",
"distanceToEmptyOnBattery100Soc":"406",
"chargeSts":"0",
"averPowerConsumption":"-84.4",
"chargerState":"0",
"timeToTargetDisCharged":"2047",
"distanceToEmptyOnBattery20Soc":"81",
"disChargeConnectStatus":"0",
"chargeLidDcAcStatus":"2",
"dcChargeSts":"0",
"ptReady":"0",
"chargeLevel":"52",
"statusOfChargerConnection":"0",
"dcDcActvd":"0",
"indPowerConsumption":"0.0",
"dcDcConnectStatus":"0",
"disChargeIAct":"0.0",
"dcChargeIAct":"0.0",
"chargeUAct":"0.0",
"bookChargeSts":"0",
"chargeIAct":"0.000",
"timeToFullyCharged":"2047"
}

Egal ob ich ihn an der WB zum Laden hängen habe oder nicht, das Problem ist das gleiche. EVCC zeigt den SOC nicht mehr an und besagter Error steht im Log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working devices Specific device support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants