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

Missing fuel sensor in Renault #69682

Closed
matteos1 opened this issue Apr 8, 2022 · 15 comments · Fixed by #69900
Closed

Missing fuel sensor in Renault #69682

matteos1 opened this issue Apr 8, 2022 · 15 comments · Fixed by #69900

Comments

@matteos1
Copy link

matteos1 commented Apr 8, 2022

The problem

Please insert the value of fuel.

What version of Home Assistant Core has the issue?

2022.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Renault

Link to integration documentation on our website

https://www.home-assistant.io/integrations/renault

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

renault documentation
renault source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @epenet, mind taking a look at this issue as it has been labeled with an integration (renault) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@epenet
Copy link
Contributor

epenet commented Apr 8, 2022

What is the problem?

And please enable debug and provide logs

logger:
  default: info
  logs:
    homeassistant.components.renault: debug
    renault_api: debug

@matteos1
Copy link
Author

matteos1 commented Apr 9, 2022

Is it possible to insert the remaining fuel between the sensors?

@epenet
Copy link
Contributor

epenet commented Apr 11, 2022

The remaining fuel is already available:

RenaultSensorEntityDescription(
key="fuel_quantity",
coordinator="cockpit",
data_key="fuelQuantity",
entity_class=RenaultSensor[KamereonVehicleCockpitData],
icon="mdi:fuel",
name="Fuel Quantity",
native_unit_of_measurement=VOLUME_LITERS,
state_class=SensorStateClass.MEASUREMENT,
requires_fuel=True,
value_lambda=_get_rounded_value,
),
RenaultSensorEntityDescription(

If you do not enable logging, and you do not provide logs, we cannot help you.

@matteos1
Copy link
Author

image

@matteos1
Copy link
Author

There isn't fuel sensor

@epenet
Copy link
Contributor

epenet commented Apr 11, 2022

If you do not enable logging, and you do not provide logs, we cannot help you.

@matteos1
Copy link
Author

matteos1 commented Apr 11, 2022

2022-04-11 23:43:18 INFO (MainThread) [homeassistant.setup] Setting up renault
2022-04-11 23:43:18 INFO (MainThread) [homeassistant.setup] Setup of domain renault took 0.0 seconds
2022-04-11 23:44:52 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 200 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/a8759926-0890-4f39-a9de-68bf96956800/vehicles?country=IT: {"accountId":"a8759926-0890-4f39-a9de-68bf96956800","country":"IT","vehicleLinks":[{"brand":"RENAULT","vin":"VF1RJA00766720000","status":"ACTIVE","linkType":"OWNER","garageBrand":"RENAULT","mileage":20096,"mileageUnit":"km","mileageDate":"2021-08-18","startDate":"2020-10-26","createdDate":"2020-10-26T06:00:43.742183Z","lastModifiedDate":"2022-04-11T06:45:39.027640Z","ownershipStartDate":"2020-12-17","cancellationReason":{},"preferredDealer":{"dealerId":"38013362_001","dealerName":"AUTONORD FIORETTO SPA","brand":"RENAULT","createdDate":"2020-12-20T14:57:02.939854Z","lastModifiedDate":"2020-12-20T14:57:02.939854Z"},"connectedDriver":{"role":"MAIN_DRIVER","createdDate":"2020-12-20T14:13:57.932714Z","lastModifiedDate":"2020-12-20T14:13:57.932714Z"},"vehicleDetails":{"vin":"VF1RJA00766720000","registrationDate":"2020-12-17","firstRegistrationDate":"2020-12-17","engineType":"H4M","engineRatio":"632","modelSCR":"CL5","deliveryCountry":{"code":"IT","label":"ITALY"},"family":{"code":"XJA","label":"XJA FAMILY","group":"007"},"tcu":{"code":"AIVCT","label":"WITH AIVC CONNECTION UNIT","group":"E70"},"navigationAssistanceLevel":{"code":"","label":"","group":""},"battery":{"code":"BTAAR1","label":"BTAAR1 BATTERY","group":"968"},"radioType":{"code":"NA406","label":"AIVI FULL NAV DAB 6 SPEAKERS","group":"425"},"registrationCountry":{"code":"IT"},"brand":{"label":"RENAULT"},"model":{"code":"XJA1VP","label":"CLIO V","group":"971"},"gearbox":{"code":"BVH4","label":"HYBRID 4 SPEED GEARBOX","group":"427"},"version":{"code":"INT MUH6UY"},"energy":{"code":"ESS","label":"PETROL","group":"019"},"registrationNumber":"GC559VF","vcd":"STANDA/XJA/BJA/EA3/MU/ESS/DG/TEMP/TR4X2/AFURGE/RV/ABS/CA02/TN/PBNCH/LAC/VT/CPE/RET04/SPROJA/RALU17/CEAVRH/SANCL/AIRBA2/SERIE/DRA/DRAP06/HARM01/ATAR03/SGAV03/SGAR02/TECNM/BANAL/KM/MCSOL2/TPRM3/AVREPL/SSDECA/ABLAVI/ESPHSA/FPAS2/ALEVA/SOP03C/SSADPC/STHPLG/SKTGRV/VLMOU1/RETRCR/TRSEV1/RETC/LVAVIP/LVAREI/SASURV/RSGALT/SGSCHA/ITA01/APL03/SAN346/PANP02/FSTPO/ALOUC5/PART01/CMAR3P/SAN417/NA406/BVH4/ECLHB3/RDIF20/PNSTRD/ISOFIX/ENPH01/HRGM01/SANFLT/CSRGAC/SANACF/SDPCLV/TLRP00/FRDIS1/SPRODI/SAN613/AVFAP/AIRBDE/CHC03/PSMREC/E06U/SSPTLP/CHBASE/SANCML/SSFLEX/SDRQAR/SEXTIN/M2018/PHAS1/SPRTQT/SAN913/SSAPLC/THABT1/5DHS/HYB05/1KWH29/BTAAR1/VEC374/XJA1VP/NB004/SUSNPI/H4M/NOADR/SSCAEC/DLIGM2/PGPRT2/SRANCF/FEUAR3/SCDVIT/SANC09/SKTPOU/SKTPGR/SSCCPC/SSPREM/FDIU2/MAPSTD/RCALL/MET04/DANGMO/ECOMOD/SDCOSP/SSRCAR/AIVCT/PRCHR1/AVGSI/ITPK4/MLEXP1/SPERTA/PERB01/PERC01/SSPERG/SPERTP/SPERTS/VOLNCH/SSACTE/NODAA/REACTI/EV1GA1/AVTSR1/DWGE01/AVC1A/1234Y/NOLIE/NOLII/NOLIS/LIECHS/AEBS07/WOSRE/PRAHL/AVCAM","assets":[{"assetType":"PICTURE","renditions":[{"resolutionType":"ONE_MYRENAULT_LARGE","url":"https://3dv.renault.com/ImageFromBookmark?configuration=STANDA%2FBJA%2FEA3%2FESS%2FDG%2FRV%2FCA02%2FVT%2FCPE%2FRET04%2FSPROJA%2FRALU17%2FDRA%2FDRAP06%2FHARM01%2FATAR03%2FSGAV03%2FSGAR02%2FTECNM%2FKM%2FMCSOL2%2FABLAVI%2FESPHSA%2FFPAS2%2FALEVA%2FSOP03C%2FSSADPC%2FVLMOU1%2FRETRCR%2FRETC%2FLVAREI%2FRSGALT%2FPANP02%2FNA406%2FBVH4%2FECLHB3%2FRDIF20%2FCSRGAC%2FSANACF%2FTLRP00%2FAIRBDE%2FCHBASE%2FM2018%2FSSAPLC%2FTHABT1%2FHYB05%2FNOADR%2FSSCAEC%2FDLIGM2%2FPGPRT2%2FSRANCF%2FFEUAR3%2FSKTPOU%2FRCALL%2FMET04%2FDANGMO%2FECOMOD%2FSSRCAR%2FAIVCT%2FPRCHR1%2FAVGSI%2FITPK4%2FMLEXP1%2FSPERTA%2FPERB01%2FPERC01%2FSSPERG%2FSPERTP%2FSPERTS%2FREACTI%2FEV1GA1%2FAVTSR1%2FDWGE01%2FNOLIE%2FNOLII%2FAEBS07%2FAVCAM&databaseId=f457977c-94e9-4746-aba4-b465dcccc955&bookmarkSet=RSITE&bookmark=EXT_34_DESSUS&profile=HELIOS_OWNERSERVICES_LARGE"},{"resolutionType":"ONE_MYRENAULT_SMALL","url":"https://3dv.renault.com/ImageFromBookmark?configuration=STANDA%2FBJA%2FEA3%2FESS%2FDG%2FRV%2FCA02%2FVT%2FCPE%2FRET04%2FSPROJA%2FRALU17%2FDRA%2FDRAP06%2FHARM01%2FATAR03%2FSGAV03%2FSGAR02%2FTECNM%2FKM%2FMCSOL2%2FABLAVI%2FESPHSA%2FFPAS2%2FALEVA%2FSOP03C%2FSSADPC%2FVLMOU1%2FRETRCR%2FRETC%2FLVAREI%2FRSGALT%2FPANP02%2FNA406%2FBVH4%2FECLHB3%2FRDIF20%2FCSRGAC%2FSANACF%2FTLRP00%2FAIRBDE%2FCHBASE%2FM2018%2FSSAPLC%2FTHABT1%2FHYB05%2FNOADR%2FSSCAEC%2FDLIGM2%2FPGPRT2%2FSRANCF%2FFEUAR3%2FSKTPOU%2FRCALL%2FMET04%2FDANGMO%2FECOMOD%2FSSRCAR%2FAIVCT%2FPRCHR1%2FAVGSI%2FITPK4%2FMLEXP1%2FSPERTA%2FPERB01%2FPERC01%2FSSPERG%2FSPERTP%2FSPERTS%2FREACTI%2FEV1GA1%2FAVTSR1%2FDWGE01%2FNOLIE%2FNOLII%2FAEBS07%2FAVCAM&databaseId=f457977c-94e9-4746-aba4-b465dcccc955&bookmarkSet=RSITE&bookmark=EXT_34_DESSUS&profile=HELIOS_OWNERSERVICES_SMALL_V2"}]}],"yearsOfMaintenance":12,"connectivityTechnology":"NONE","easyConnectStore":false,"electrical":false,"rlinkStore":false,"deliveryDate":"2020-12-17","retrievedFromDhs":false,"engineEnergyType":"HEV","radioCode":""}}]}
2022-04-11 23:44:59 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 200 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/a8759926-0890-4f39-a9de-68bf96956800/kamereon/kca/car-adapter/v2/cars/VF1RJA00766720000/cockpit?country=IT: {"data":{"type":"Car","id":"VF1RJA00766720000","attributes":{"fuelAutonomy":62.0,"fuelQuantity":3.0,"totalMileage":39624.03}}}
2022-04-11 23:44:59 DEBUG (MainThread) [homeassistant.components.renault.renault_vehicle] Finished fetching VF1RJA00766720000 cockpit data in 3.805 seconds (success: True)
2022-04-11 23:46:06 DEBUG (MainThread) [homeassistant.components.renault.renault_vehicle] Finished fetching VF1RJA00766720000 hvac_status data in 69.986 seconds (success: False)
2022-04-11 23:46:06 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 403 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/a8759926-0890-4f39-a9de-68bf96956800/kamereon/kca/car-adapter/v1/cars/VF1RJA00766720000/res-state?country=IT: {"type":"FUNCTIONAL","messages":[{"code":"err.func.403","message":"{\"errors\":[{\"status\":\"403\",\"code\":\"security.access\",\"detail\":\"Access is denied for this resource\"}]}"}],"errors":[{"errorCode":"err.func.403","errorMessage":"{\"errors\":[{\"status\":\"403\",\"code\":\"security.access\",\"detail\":\"Access is denied for this resource\"}]}"}],"error_reference":"FUNCTIONAL"}
2022-04-11 23:46:06 DEBUG (MainThread) [homeassistant.components.renault.renault_vehicle] Finished fetching VF1RJA00766720000 res_state data in 70.917 seconds (success: False)
2022-04-11 23:46:07 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 200 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/a8759926-0890-4f39-a9de-68bf96956800/kamereon/kca/car-adapter/v1/cars/VF1RJA00766720000/location?country=IT: {"data":{"type":"Car","id":"VF1RJA00766720000","attributes":{"gpsDirection":null,"gpsLongitude":13.7697991666667,"gpsLatitude":45.6560613888889,"lastUpdateTime":"2022-04-11T19:13:06Z"}}}
2022-04-11 23:46:07 DEBUG (MainThread) [homeassistant.components.renault.renault_vehicle] Finished fetching VF1RJA00766720000 location data in 71.041 seconds (success: True)
2022-04-11 23:46:07 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 502 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/a8759926-0890-4f39-a9de-68bf96956800/kamereon/kca/car-adapter/v1/cars/VF1RJA00766720000/lock-status?country=IT: {"type":"TECHNICAL","messages":[{"code":"err.tech.502","message":"{\"errors\":[{\"status\":\"502\",\"code\":\"gateway.processing\",\"title\":\"VNEXT\",\"detail\":\"an internal error occured while processing request : 403 FORBIDDEN\"}]}"}],"errors":[{"errorCode":"err.tech.502","errorMessage":"{\"errors\":[{\"status\":\"502\",\"code\":\"gateway.processing\",\"title\":\"VNEXT\",\"detail\":\"an internal error occured while processing request : 403 FORBIDDEN\"}]}"}],"error_reference":"TECHNICAL"}
2022-04-11 23:46:07 DEBUG (MainThread) [homeassistant.components.renault.renault_vehicle] Finished fetching VF1RJA00766720000 lock_status data in 71.041 seconds (success: False)
2022-04-11 23:46:07 INFO (MainThread) [homeassistant.components.renault.renault_vehicle] Ignoring endpoint VF1RJA00766720000 res_state as it is denied for this vehicle: This endpoint is denied: ('err.func.403', 'Access is denied for this resource')
2022-04-11 23:46:07 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.renault
2022-04-11 23:46:07 INFO (MainThread) [homeassistant.components.button] Setting up button.renault
2022-04-11 23:46:07 INFO (MainThread) [homeassistant.components.select] Setting up select.renault
2022-04-11 23:46:07 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.renault
2022-04-11 23:46:17 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.renault
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 39, in async_get_config_entry_diagnostics
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 40, in <listcomp>
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 61, in _get_vehicle_diagnostics
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 62, in <dictcomp>
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 39, in async_get_config_entry_diagnostics
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 40, in <listcomp>
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 61, in _get_vehicle_diagnostics
File "/usr/src/homeassistant/homeassistant/components/renault/diagnostics.py", line 62, in <dictcomp>

@matteos1
Copy link
Author

matteos1 commented Apr 12, 2022

in the log appear fuel but not in UI

@epenet
Copy link
Contributor

epenet commented Apr 12, 2022

The data is available.

{
    "data":{
        "type":"Car",
        "id":"VF1xxx",
        "attributes": {
            "fuelAutonomy":62.0,
            "fuelQuantity":3.0,
            "totalMileage":39624.03
        }
    }
}

I have to check more why the sensor is not created....

@matteos1
Copy link
Author

ok thank you
the model is renault clio

@epenet
Copy link
Contributor

epenet commented Apr 12, 2022

I have created a PR in the renault-api library: hacf-fr/renault-api#589

But it seems that we are missing some lines in your log file. Did you filter it manually? I need ALL responses from [renault_api.kamereon]

In particular I need the response code for hvac-status.
It is easier if you can respond in the PR...

@matteos1
Copy link
Author

2022-04-12 00:26:24 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 502 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/a8759926-0890-4f39-a9de-68bf96956800/kamereon/kca/car-adapter/v1/cars/VF1RJA00766726890/hvac-status?country=IT: {"type":"TECHNICAL","messages":[{"code":"err.tech.502","message":"{"errors":[{"status":"502","code":"gateway.processing","title":"VNEXT","detail":"Error occurred when requesting VNEXT vehicleData API for vehicle Vehicle(vehicleUuid=40e14471-8780-4187-9f6f-088be443d5c4, brand=RENAULT, isCrossBadge=null, gateway=AVN, canGeneration=Optional[C1A], usageCountry=Optional.empty, energy=HYBRID_ELECTRIC, familyCode=XJA, manufacturingDate=null) and userId 511181: vnext error http_code=403"}]}"}],"errors":[{"errorCode":"err.tech.502","errorMessage":"{"errors":[{"status":"502","code":"gateway.processing","title":"VNEXT","detail":"Error occurred when requesting VNEXT vehicleData API for vehicle Vehicle(vehicleUuid=40e14471-8780-4187-9f6f-088be443d5c4, brand=RENAULT, isCrossBadge=null, gateway=AVN, canGeneration=Optional[C1A], usageCountry=Optional.empty, energy=HYBRID_ELECTRIC, familyCode=XJA, manufacturingDate=null) and userId 511181: vnext error http_code=403"}]}"}],"error_reference":"TECHNICAL"}

@epenet epenet mentioned this issue Apr 12, 2022
22 tasks
@epenet epenet changed the title Renault Missing fuel sensor in Renault Apr 12, 2022
@epenet epenet added this to the 2022.4.3 milestone Apr 12, 2022
@epenet
Copy link
Contributor

epenet commented Apr 12, 2022

Fix is merged in the parent library, and PR created: #69900. If it is approved here, it should be available in the patch release.
In the meantime, you can test it as a custom component, but just updating the manifest.json with the new version of the library.

@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants