Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Only 4 sensors show up for Catur II Hybrid Plugin #137

Closed
scapman opened this issue Mar 28, 2021 · 9 comments · Fixed by #139
Closed

Only 4 sensors show up for Catur II Hybrid Plugin #137

scapman opened this issue Mar 28, 2021 · 9 comments · Fixed by #139
Labels
enhancement New feature or request

Comments

@scapman
Copy link

scapman commented Mar 28, 2021

Issues not containing the minimum requirements will be closed:

  • Issues without a description (using the header is not good enough) will be closed.
  • Issues without debug logging will be closed.
  • Issues without configuration will be closed

-->

Version of the custom_component

Version 3.0.7
-->

Configuration

No yaml configuration

Describe the bug

I have a Captur II Hybrid Plugin and I can onnly see 4 entities:

  • Fuel Autonomy
  • Fuel Quantity
  • Location
  • Mileage

In previous verisons of the componet I was used to see all the other plugins about the EV components of the car.

Debug log

2021-03-28 12:49:10 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 200 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/ea29c6e3-e28d-4cd1-b2d4-4c09b0d9e661/kamereon/kca/car-adapter/v1/cars/VF1RJB00xxxxxxxx/location?country=IT: {"data":{"type":"Car","id":"VF1RJB00xxxxxxxx","attributes":{"gpsLatitude":43.33525358,"gpsLongitude":11.33296415,"lastUpdateTime":"2021-03-28T10:19:01Z"}}}
2021-03-28 12:49:10 DEBUG (MainThread) [custom_components.renault.renault_vehicle] Finished fetching VF1RJB00xxxxxxxx location data in 1.214 seconds
2021-03-28 12:49:12 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 200 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/ea29c6e3-e28d-4cd1-b2d4-4c09b0d9e661/kamereon/kca/car-adapter/v2/cars/VF1RJB00xxxxxxxxx/cockpit?country=IT: {"data":{"type":"Car","id":"VF1RJB00xxxxxxxx","attributes":{"fuelAutonomy":258.0,"fuelQuantity":21.0,"totalMileage":2993.33}}}
2021-03-28 12:49:12 DEBUG (MainThread) [custom_components.renault.renault_vehicle] Finished fetching VF1RJB00xxxxxxxxx cockpit data in 3.097 seconds

Add your logs here.

@scapman scapman changed the title Hallo. Only 4 sensors show up for Catur II Hybrid Plugin Mar 28, 2021
@epenet
Copy link
Collaborator

epenet commented Mar 28, 2021

Hi,

If you can, please take a look at this issue on renault-api: hacf-fr/renault-api#48 and try to generate a fixture file similar to the ones in there: https://github.com/hacf-fr/renault-api/tree/main/tests/fixtures/kamereon/vehicles.
You should attempt to create a file called captur_ii.2.json with your own vehicle specs.
The URL in the logs should be in the form https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/ACCOUNT_ID/vehicles/VIN/details?country=COUNTRY

If you are unable to make a PR on renault-api, then please update this issue with some extra logs, in particular adding the initialisation logs.

@epenet epenet added the enhancement New feature or request label Mar 29, 2021
@scapman
Copy link
Author

scapman commented Mar 29, 2021

HI.
Unfortunately I am not really able to make a PR.
Do you think the following log provides all the information needed?
(I have obfuscated VIN, Radio code and registration number.

2021-03-28 20:04:58 DEBUG (MainThread) [renault_api.kamereon] Received Kamereon response 200 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/ea29c6e3-e28d-4cd1-b2d4-4c09b0d9e661/vehicles?country=IT:

{
    "accountId": "ea29c6e3-e28d-4cd1-b2d4-4c09b0d9e661",
    "country": "IT",
    "vehicleLinks": [{
        "brand": "RENAULT",
        "vin": "VF1RJB0036XXXXXX",
        "status": "ACTIVE",
        "linkType": "OWNER",
        "garageBrand": "RENAULT",
        "startDate": "2020-10-07",
        "createdDate": "2020-10-07T09:17:44.692802Z",
        "lastModifiedDate": "2021-03-28T10:44:01.139649Z",
        "ownershipStartDate": "2020-09-30",
        "cancellationReason": {},
        "connectedDriver": {
            "role": "MAIN_DRIVER",
            "createdDate": "2020-10-08T17:36:39.445523Z",
            "lastModifiedDate": "2020-10-08T17:36:39.445523Z"
        },
        "vehicleDetails": {
            "vin": "VF1RJB00365XXXXXX",
            "registrationDate": "2020-09-30",
            "firstRegistrationDate": "2020-09-30",
            "engineType": "H4M",
            "engineRatio": "630",
            "modelSCR": "",
            "deliveryCountry": {
                "code": "IT",
                "label": "ITALY"
            },
            "family": {
                "code": "XJB",
                "label": "B+X OVER FAMILY",
                "group": "007"
            },
            "tcu": {
                "code": "AIVCT",
                "label": "WITH AIVC CONNECTION UNIT",
                "group": "E70"
            },
            "navigationAssistanceLevel": {
                "code": "",
                "label": "",
                "group": ""
            },
            "battery": {
                "code": "BT9AE1",
                "label": "BATTERY BT9AE1",
                "group": "968"
            },
            "radioType": {
                "code": "XXXXX",
                "label": "FULL NAV DAB ETH - AUDI",
                "group": "425"
            },
            "registrationCountry": {
                "code": "IT"
            },
            "brand": {
                "label": "RENAULT"
            },
            "model": {
                "code": "XJB1SU",
                "label": "CAPTUR II",
                "group": "971"
            },
            "gearbox": {
                "code": "BVH4",
                "label": "HYBRID 4 SPEED GEARBOX",
                "group": "427"
            },
            "version": {
                "code": "ITAMMHH 6UP"
            },
            "energy": {
                "code": "ESS",
                "label": "PETROL",
                "group": "019"
            },
            "registrationNumber": "XXXXXXX",
            "vcd": "STANDA/XJB/HJB/EA3/MM/ESS/DG/TEMP/TR4X2/AFURGE/RV/ABS/SBARTO/CA02/TN/PBNCH/LAC/VT/CPE/RET04/2RVLG/RALU17/CEAVRH/AIRBA2/SERIE/DRA/DRAP05/HARM01/ATAR03/SGAV01/SGAR02/BIYPC/BANAL/KM/TPRM3/AVREPL/SSDECA/SFIRBA/ABLAVI/ESPHSA/FPAS2/ALEVA/CACBL3/SOP03C/SSADPC/STHPLG/SKTGRV/VLCUIR/RETRCR/TRSEV1/REPNTC/LVAVIP/LVAREI/SASURV/KTGREP/SGSCHA/ITA01/APL03/FSTPO/ALOUC5/PART01/CMAR3P/FIPOU2/NA418/BVH4/ECLHB4/RDIF10/PNSTRD/ISOFIX/ENPH01/HRGM01/SANFLT/CSRFLY/SANACF/SDPCLV/TLRP00/SPRODI/SAN613/AVFAP/AIRBDE/CHC03/E06U/SAN806/SSPTLP/SANCML/SSFLEX/SDRQAR/SEXTIN/M2019/PHAS1/SPRTQT/SAN913/STHABT/5DHS/HYB06/010KWH/BT9AE1/VEC237/XJB1SU/NBT018/H4M/NOADR/DLIGM2/PGPRT2/FEUAR3/SCDVIT/SKTPOU/SKTPGR/SSCCPC/SSPREM/FDIU2/MAPSTD/RCALL/MET05/SDANGM/ECOMOD/SSRCAR/AIVCT/AVGSI/TPQNW/TSGNE/2TON/ITPK4/MLEXP1/SPERTA/SSPERG/SPERTP/VOLNCH/SREACT/AVTSR1/SWALBO/DWGE01/AVC1A/VSPTA/1234Y/AEBS07/PRAHL/RRCAM",
            "assets": [{
                "assetType": "PICTURE",
                "renditions": [{
                    "resolutionType": "ONE_MYRENAULT_LARGE",
                    "url": "https://3dv2.renault.com/ImageFromBookmark?configuration=HJB%2FEA3%2FESS%2FDG%2FTEMP%2FTR4X2%2FRV%2FSBARTO%2FCA02%2FTN%2FPBNCH%2FVT%2FCPE%2FRET04%2FRALU17%2FDRA%2FDRAP05%2FHARM01%2FBIYPC%2FKM%2FSSDECA%2FESPHSA%2FFPAS2%2FALEVA%2FSOP03C%2FSSADPC%2FVLCUIR%2FRETRCR%2FREPNTC%2FLVAVIP%2FLVAREI%2FALOUC5%2FNA418%2FBVH4%2FECLHB4%2FRDIF10%2FCSRFLY%2FSANACF%2FTLRP00%2FAIRBDE%2FCHC03%2FSSPTLP%2FSPRTQT%2FSAN913%2FHYB06%2FH4M%2FNOADR%2FDLIGM2%2FPGPRT2%2FFEUAR3%2FSSCCPC%2FRCALL%2FMET05%2FSDANGM%2FSSRCAR%2FAVGSI%2FITPK4%2FMLEXP1%2FSPERTA%2FSSPERG%2FSPERTP%2FVOLNCH%2FSREACT%2FDWGE01%2FRRCAM&databaseId=b2b4fefb-d131-4f8f-9a24-4223c38bc710&bookmarkSet=CARPICKER&bookmark=EXT_34_RIGHT_FRONT&profile=HELIOS_OWNERSERVICES_LARGE"
                }, {
                    "resolutionType": "ONE_MYRENAULT_SMALL",
                    "url": "https://3dv2.renault.com/ImageFromBookmark?configuration=HJB%2FEA3%2FESS%2FDG%2FTEMP%2FTR4X2%2FRV%2FSBARTO%2FCA02%2FTN%2FPBNCH%2FVT%2FCPE%2FRET04%2FRALU17%2FDRA%2FDRAP05%2FHARM01%2FBIYPC%2FKM%2FSSDECA%2FESPHSA%2FFPAS2%2FALEVA%2FSOP03C%2FSSADPC%2FVLCUIR%2FRETRCR%2FREPNTC%2FLVAVIP%2FLVAREI%2FALOUC5%2FNA418%2FBVH4%2FECLHB4%2FRDIF10%2FCSRFLY%2FSANACF%2FTLRP00%2FAIRBDE%2FCHC03%2FSSPTLP%2FSPRTQT%2FSAN913%2FHYB06%2FH4M%2FNOADR%2FDLIGM2%2FPGPRT2%2FFEUAR3%2FSSCCPC%2FRCALL%2FMET05%2FSDANGM%2FSSRCAR%2FAVGSI%2FITPK4%2FMLEXP1%2FSPERTA%2FSSPERG%2FSPERTP%2FVOLNCH%2FSREACT%2FDWGE01%2FRRCAM&databaseId=b2b4fefb-d131-4f8f-9a24-4223c38bc710&bookmarkSet=CARPICKER&bookmark=EXT_34_RIGHT_FRONT&profile=HELIOS_OWNERSERVICES_SMALL_V2"
                }]
            }],
            "yearsOfMaintenance": 12,
            "connectivityTechnology": "NONE",
            "easyConnectStore": false,
            "electrical": false,
            "rlinkStore": false,
            "deliveryDate": "2020-09-30",
            "retrievedFromDhs": false,
            "engineEnergyType": "PHEV",
            "radioCode": ""
        }
    }]
}

Thanks

@epenet
Copy link
Collaborator

epenet commented Mar 29, 2021

Thanks @scapman - I took the liberty to beautify the json.
Apparently Renault reports the the energy code as ESS for plug-in hybrid vehicles:

"energy": { "code": "ESS", "label": "PETROL", "group": "019" }

I think we will need to adjust to use engineEnergyType instead

"engineEnergyType": "PHEV"

@scapman
Copy link
Author

scapman commented Mar 29, 2021

Really thanks for your effort.
Please pardon my dumb question...
What should I do now in order to be able to see all the entities for my vehicle?

@epenet
Copy link
Collaborator

epenet commented Mar 29, 2021

@scapman
Copy link
Author

scapman commented Mar 29, 2021

Crystal Clear!
Thanks again!

@epenet
Copy link
Collaborator

epenet commented Mar 29, 2021

v3.0.8 has been published.
Can you please confirm it's working correctly?

@scapman
Copy link
Author

scapman commented Mar 29, 2021

Great job!
It works! I now can see 14 entities.
The only thing that seems not to work is HVAC.
In the log I see Vehicle model XJB1SU does not appear to support endpoint 'hvac-status'.

@jumpjack
Copy link

Browser page to query renault vehicles (Captur included), still in beta stage:

http://jumpjack.altervista.org/myrenault/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants