Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
133 stars 27 forks source link

Add new entities #30

Closed jesuisla91 closed 1 year ago

jesuisla91 commented 1 year ago

What would be interesting is to have additional entities:

all windows are closed
all doors including the tailgate are closed.
average fuel consumption.

sunroof opened or closed

After that, having the option of remotely closing the windows and sunroof ... but that's not possible :)

Dielee commented 1 year ago

All Windows, doors and tailgate are already supported. For average fuel consumption there is no API endpoint. Closing and opening windows isn't possible, sorry....

EDIT: Average fuel consumption seems to be available via the statistics endpoint. Sun roof seems to be available via the doors endpoint. I will add those two later today.

Dielee commented 1 year ago

Because you didn't fill out the issue template, I have to ask extra: are you using the addon or is your volvo2mqtt running in a separate docker container ?

Dielee commented 1 year ago

Please test v1.5.1

Dielee commented 1 year ago

Sunroof works starting version 1.5.4, confirmed by XC90 with sunroof owner.

jesuisla91 commented 1 year ago

Sunroof works ! thnak you :) In 1.5.5, the average fuel consumption seems to be wrong. On my XC40 the datat is 0,9 liters but the correct data has to be 9 liters.

Dielee commented 1 year ago

Can you please enable debug and send me the raw API response from the statistics endpoint ?

Dielee commented 1 year ago

With v1.5.6 you can adjust your multiplier value for average fuel consumption. Please test, as I can't test it...

jesuisla91 commented 1 year ago

Hello,

Thank you. It seems with this version the module can't launch. I didn't change any parameters.

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started Starting volvo2mqtt version v1.5.6 Traceback (most recent call last): File "/volvoAAOS2mqtt/./main.py", line 10, in authorize() File "/volvoAAOS2mqtt/volvo.py", line 48, in authorize get_vehicles() File "/volvoAAOS2mqtt/volvo.py", line 90, in get_vehicles raise Exception("Error getting vehicles: " + str(vehicles.status_code)) Exception: Error getting vehicles: 403 s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

Dielee commented 1 year ago

This has nothing to do with v1.5.6. The addon can't get your vehicles from API. Please check your vccapikey. Maybe you have done already 10.000 calls this day ?

jesuisla91 commented 1 year ago

I don't understand, I haven't changed the configuration settings and my vccapikey key hasn't changed. How do I know if I've made more than 10,000 calls?

Dielee commented 1 year ago

Just look in your developer account

jesuisla91 commented 1 year ago

oh you are right ! Requests today: 10 018 out of 10 000

It is because i set update interval to 15.

Thank you

I have to wait tomorow.

Dielee commented 1 year ago

Or just create a new app inside the developer center and change the vccapitoken in volvo2mqtt

jesuisla91 commented 1 year ago

The value "Distance to Empty" is not correct. If i have a real value of 40km on the car, but the value on the entity is 40 000km. I tried to change the parameter "odometerMultiplier" to 0,001 or 0.001 to have 40km, but it seems that decimal points are not accepted. I hope that you understand my porr english ... :)

Dielee commented 1 year ago

Please open a new issue and provide some infos and logs about your setup.