Giter Club home page Giter Club logo

homebridge-volvo's Introduction

homebridge-volvo

verified-by-homebridge homebridge-webos-tv apache-2.0-license

About

This is a plugin for Homebridge, allowing you to control your Volvo car, and aims to replicate most of the functionality from the official Volvo On Call app.

Installation

Plugin installation

  1. Install Homebridge using: npm install -g homebridge
  2. Install homebridge-volvo using: npm install -g homebridge-volvo
  3. Configure homebridge-volvo by editing your ~/.homebridge/config.json file, or use config-ui-x. See example below:

Configuration

Basic Configuration Example:

{
  "accessory": "Volvo",
  "name": "Volvo",
  "email": "[email protected]",
  "password": "1234",
  "region": ""
}

Full Configuration Example:

{
  "accessory": "Volvo",
  "name": "My Volvo Car",
  "email": "[email protected]",
  "password": "1234",
  "region": "",
  "VIN": "YV1AX8850J3766769",
  "updateInterval": 10,
  "engineStartDuration": 15,
  "batteryLowThreshold": 5,
  "enabledFeatures": {
    "carLocatorSupported": true,
    "honkAndOrBlink": true,
    "honkAndBlink": true,
    "remoteHeaterSupported": true,
    "unlockSupported": true,
    "lockSupported": false,
    "preclimatizationSupported": true,
    "engineStartSupported": true,
    "highVoltageBatterySupported": true
  }
}

Configuration Parameters:

  • name: Required string. Name of the accessory. Siri uses this parameter for identifying your car.
  • email: Required string. Volvo On Call account email.
  • password: Required string. Volvo On Call account password.
  • region: Required string. Volvo On Call region.
    Values:
    • "": Europe
    • "na": North America
    • "cn": China
  • VIN: Optional string. VIN of your Volvo vehicle. Only required if you have multiple vehicles associated with your account.
  • updateInterval: Optional number (default: 5). Refresh interval in seconds from API.
  • engineStartDuration: Optional number greater than or equal to 1, less than or equal to 15 (default: 15). Duration of remote engine start in minutes.
  • batteryLowThreshold: Optional number greater than or equal to 1, less than or equal to 99 (default: 20). Percentage threshold for battery low notification. Only applicable if you have an EV or plugin hybrid.
  • enabledFeatures: Optional object (default: all enabled). Manually enable or disable features. Homebridge-volvo will automatically detect the features available on your car. This is only useful for disableling features for security reasons, such as lock/unlock. Properties:
    • carLocatorSupported: Optional boolean (default: true)
    • honkAndOrBlink: Optional boolean (default: true)
    • honkAndBlink: Optional boolean (default: true)
    • remoteHeaterSupported: Optional boolean (default: true)
    • unlockSupported: Optional boolean (default: true)
    • lockSupported: Optional boolean (default: true)
    • preclimatizationSupported: Optional boolean (default: true)
    • engineStartSupported: Optional boolean (default: true)
    • highVoltageBatterySupported: Optional boolean (default: true)

homebridge-volvo's People

Contributors

dependabot[bot] avatar drakkhen avatar trympet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-volvo's Issues

XC60 Plug-In

Seems Homekit UI getse messed up if all featurea enabled. Also, the lock/unlock does not work. Lights, horn, pre-climate works. Lights & Horn seems to be behind the same feature so one cannot disable only one of them. Start engine might not work. Not sure.

And a question, should location info be visible somewhere?

Polestar?

Does this also work for Polestar?

Climate feature no response

Issues:
The climate feature no response, the feature is grayed out in Home app. The other feathers all work fine.

Homebridge logs:
[2021-03-07, 3:27:00 p.m.] [Volvo] Initializing Volvo accessory...
[2021-03-07, 3:27:00 p.m.] [Volvo] Starting homebridge-volvo
[2021-03-07, 3:27:02 p.m.] [Volvo]
Features available:
carLocatorSupported
honkAndOrBlink
honkAndBlink
unlockSupported
lockSupported
preclimatizationSupported
engineStartSupported
[2021-03-07, 3:27:02 p.m.] [Volvo]
Features enabled:
carLocatorSupported
honkAndOrBlink
honkAndBlink
unlockSupported
lockSupported
preclimatizationSupported
engineStartSupported
[2021-03-07, 3:27:02 p.m.] [Volvo] Got vehicle 2019 XC40 with registration number null.

Homebridge config:
"accessories": [
{
"name": "Volvo",
"email": "xxx",
"password": "xxx",
"region": "na",
"engineStartDuration": 15,
"enabledFeatures": {
"carLocatorSupported": true,
"honkAndOrBlink": true,
"honkAndBlink": true,
"remoteHeaterSupported": true,
"unlockSupported": true,
"lockSupported": true,
"preclimatizationSupported": true,
"engineStartSupported": true,
"highVoltageBatterySupported": true
},
"accessory": "Volvo"
}

Home app screenshot:
image
Volvo on Call app screenshot:
image

Environment:
Node.js Version: v14.15.5:
NPM Version: v7.5.4:
Homebridge Version v1.3.2:
Homebridge Volvo Plugin Version: v1.0.5:
Homebridge Config UI X Plugin Version: v4.39.1:
Operating System: Raspian:

plug in not visible

Hello I have installed and configured the plug in according to the specifications. Unfortunately it is not visible in Homkit. What have I done wrong?
Bildschirmfoto 2021-12-11 um 17 39 13

contact sensor state

hello

i do get the error
[2/28/2021, 10:46:35 PM] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected number and received undefined. See https://git.io/JtMGR for more info.

when I go to the mentioned link, it says i should contact the developper ...

i am in europe, have a volvo V60 and running homebridge v1.3.1 on raspberry pi
plugin: homebridge-volvo v1.0.5

How to "compile" this plugin for testing?

@trympet: I realize this is WELL outside the scope of this particular project, and forgive me for creating a separate "Issue", but I figured that might be the most appropriate method..

I'm a grey-bearded Javascript (and other languages) developer. I only really understand traditional in-browser javascript, but I'm trying to to get up to speed on modern JS/TS development. There's a lot (LOT) to learn!

Since I'm tinkering with this plugin, I'd like to use my fork as the source on my own Homebridge instance. But when I did sudo npm install -g github:drakkhen/homebridge-volvo on my pi the plugin did not work at all. It installed without any explicit errors but the /usr/lib/node_modules/homebridge-volvo directory did not contain a dist/ directory (it had node_modules and a few other files but nothing from src/). Seems like some post-processing/building did not trigger.

I'm totally at a loss as to what magic duct-tape didn't fire off to make my github-based-npm-install work. I simply forked the repo and make a few tiny changes, but I don't get why the build process would be affected.

Do you have any tips or resources that you can link me to so that I can use my fork for final testing before submitting PRs? Thanks!

Battery Level 0% after restart Homebridge

@trympet
I hope not to bother. ๐Ÿ™ˆ

I noticed that every time I restart Homebridge (or I have to) the battery level (in my case fuel level) is showing 0%.
In Eve App I have to go to the settings and just open the device and in a second the correct level is loaded.
However, when restart Homebridge to reproduce the bug, the level is again 0% until I open the device again.

Not a serious problem, but maybe you see a chance to fix this in one of the next plugin updates.
Hope this info helps.

Thanks again for your time and interest in your fan base. ๐Ÿ˜‰

ScreenFlow 2020-08-29 21_46_21

No VIN

] Failed to start homebridge-volvo with Error: No vehicles found matching the VIN number you provided (YV1XMYEXACTVIN222222).
at VolvoPlatform.GetVehicleSync (/usr/local/lib/node_modules/homebridge-volvo/src/index.ts:85:11)
at new VolvoPlatform (/usr/local/lib/node_modules/homebridge-volvo/src/index.ts:36:27)
at /usr/local/lib/node_modules/homebridge/src/server.ts:350:50
at Array.forEach ()
at Server.loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:270:29)
at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:162:12)

If i don't put my vin same error with (undefined) as the VIN...

My car is a Volvo XC40 full electric P8 . Volvo on call is ok . Homebridge on Rpi3 .

2FA becoming mandatory!

I got notice from Volvo that the app will soon start requiring 2FA. This will likely break this plugin unless it is updated to handle it.

Is anybody maintaining this or is anybody up to the task of forking the plugin when this happens?

Contact Sensor State

Hello,

I have the same problem with this warning.

This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined)

Volvo XC60 2019
Location: NA

Thank you

Cannot connect

Hi I live in EU and get the same error as in the previous issue : [My Volvo Car] Failed to start homebridge-volvo with Error: getaddrinfo ENOTFOUND vocapi-..wirelesscar.net.

Can you please help? By the way, I had to put a dot "." in the region. When I only put "", it would not write it and would get an error saying, that region was not specified.

Failed to start homebridge-volvo with Error: No vehicles found matching

What am I doing wrong? The VIN number is okay, and the app is working on the iphone.

Does anybody have an idea?

Thanks

[Volvo] Got account for xxxx
[10-2-2024 22:19:21] [Volvo] You have 0 vehicle(s) associated with your account.
[10-2-2024 22:19:21] [Volvo] Failed to start homebridge-volvo with Error: No vehicles found matching the VIN number you provided xxxxx
at VolvoPlatform.GetVehicleSync (/usr/lib/node_modules/homebridge-volvo/src/index.ts:85:11)
at new VolvoPlatform (/usr/lib/node_modules/homebridge-volvo/src/index.ts:36:27)
at /usr/lib/node_modules/homebridge/src/server.ts:379:50
at Array.forEach ()
at Server.loadAccessories (/usr/lib/node_modules/homebridge/src/server.ts:299:29)
at Server.start (/usr/lib/node_modules/homebridge/src/server.ts:179:12)

Battery Level

Unfortunately at the moment I can't test. But the next weekend is coming. :)

However, I noticed that the battery level is showing a warning all over.
My V90 is not electro or hybrid ๐Ÿ™ˆ๐Ÿ™‰๐Ÿ™Š - it's sad I know -
Can the fuel level also be reflected in the battery level or disabled? Fuel level of course would be a dream.

And by the way, regardless if the plugin will work for me 100% or not, @trympet you should have a PayPal or Buy Me A Coffee Button here. I'm happy to spend you a drink or two for your work and great support. ๐Ÿค—

Napkin 14 07 20, 6 10 28 PM

Got SIGTERM, shutting down ...[Volvo] Failed to update vehicle status from Volvo On Call API.

@trympet Hey there. I hope you are doing well.

My Homebridge did shut down this morning due to the Volvo Plugin.
After manually restart everything was working again.

However, this error probably shouldn't crash and shutting down the whole homebridge?

Maybe a small fix for a future update.

Thanks again for your time and work. ๐Ÿ‘

Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]: [2020-8-24 7:29:47] [Volvo] Failed to update vehicle status from Volvo On Call API.
Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]: [2020-8-24 7:29:47] Error: send ENETUNREACH 224.0.0.251:5353
Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]:     at doSend (dgram.js:683:16)
Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]:     at defaultTriggerAsyncIdScope (internal/async_hooks.js:351:12)
Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]:     at afterDns (dgram.js:629:5)
Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]:     at processTicksAndRejections (internal/process/task_queues.js:85:21)
Aug 24 07:29:47 raspberrypi-3BPlus homebridge[437]: [2020-8-24 7:29:47] Got SIGTERM, shutting down Homebridge...

Temperature

I do not have the opportunity to see the temperature from the car. We do not yet have a weather station connected to our smart home, and then it would be nice to have access to the outdoor temperature from the car for so long.

is that possible?

New feature : Start/Stop hvBattery charging

Hi guys,

Wonderful plugin. I was looking for it since 2018 :)
I tried to find the VOC API endpoint to start/stop the hvBattery charging status, but I was not able to.
Have you? (maybe it doesn't exist... but there is a dedicated action in the VOC App for that... there must be an endpoint ???!!!)

It would be great to have a homekit switch to pause/resume the car charging when plugged.

Thanks.

Option to not expose the climate feature

It appears that either my car (XC40) does not support remote climate or that it just doesn't work. This is not related to the plugin of course.

However, due to that the Home app will always show the car as not responding although the other services work fine.

Would it be possible to add a configuration option to choose not to expose the climate feature?

Thanks in advance.

TypeError: Cannot read property 'honkAndBlink' of undefined

Hey @trympet
Thanks for bringing your plugin to npm.
Manuell Installation worked without an error.

pi@raspberrypi-3BPlus:~ $ sudo npm install -g homebridge-volvo
+ [email protected]
added 37 packages from 69 contributors in 65.029s

However, when starting homebridge this error is in the log and Homebridge is crashing.

Maybe you have an idea? Volvo V90 (Early 2020)

Thanks in advance.

Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]: [2020-7-13 17:23:21] TypeError: Cannot read property 'honkAndBlink' of undefined
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Object.getSensorNames (/usr/local/lib/node_modules/homebridge-volvo/src/helpers.ts:45:3)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at new VolvoPlatform (/usr/local/lib/node_modules/homebridge-volvo/src/index.ts:30:24)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at /usr/local/lib/node_modules/homebridge/src/server.ts:357:50
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Array.forEach (<anonymous>)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Module._compile (internal/modules/cjs/loader.js:1138:30)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
Jul 13 17:23:21 raspberrypi-3BPlus homebridge[25674]: [2020-7-13 17:23:21] Got SIGTERM, shutting down Homebridge...

Volvo OnCall

@trympet Hope you are doing well.
Any plans for this plugin? I assume you had the idea of having Volvo OnCall features showing up in HomeKit? Just wondering, because I would love to see such a great plugin. :)

Any news or development on this foreseeable? Thanks.

Volvo changed the login in requirement

Volvo updated the app. Now, at least in China, all accounts are required use a mobile phone number (11 digits) to login in instead of email.

PS: In order to use a mobile phone number to login in, account must include in (+country code) and (phone number). For example, +861355xxxxxxx.

Characteristic Warnings (keeps coming in my log file)

[21/06/2021, 13:48:36] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[21/06/2021, 13:48:36] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[21/06/2021, 13:48:36] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[21/06/2021, 13:48:36] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[21/06/2021, 13:48:36] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.
[21/06/2021, 13:48:36] [homebridge-volvo] This plugin generated a warning from the characteristic 'Contact Sensor State': characteristic value expected valid finite number and received "undefined" (undefined). See https://git.io/JtMGR for more info.

500 error on Volvo API?

I'm getting a 500 error in logs when the Volvo plugin is starting - did something change about their endpoints that is breaking the plugin?

Show "No Response" in HomeKit when vehicle is not responding

We were recently on vacation and after a few days the accessories exposed by homebridge-volvo showed "on" statuses, unexpectedly. According into the API docs "When the car has not been used for more than 3-5 days, the invocation command request may not be able to perform because is set in standby mode", and includes a table of the possible error status values here: https://developer.volvocars.com/apis/connected-vehicle/details/#vehicle-sleep-and-error-modes

I'm still super new to homebridge plugin development, but I believe we could throw this error in accessories' onGet (and onSet?) methods to immediately cause HomeKit to show accessories as "No Response", which I think would be the best and most accurate status since the vehicle's communication equipment is temporarily disabled.

throw new HapStatusError(HAPStatus.SERVICE_COMMUNICATION_FAILURE);

Error: getaddrinfo ENOTFOUND

Hi! I installed the plugin on both Synology Nas Docker or Windows 10, and got the same error, could you help? Thanks!

[2020-7-23 7:35:14 โ”œF10: AMโ”ค] Loading 1 accessories...
[2020-7-23 7:35:14 โ”œF10: AMโ”ค] [XC90] Initializing Volvo accessory...
[2020-7-23 7:35:14 โ”œF10: AMโ”ค] [XC90] Starting homebridge-volvo
[2020-7-23 7:35:14 โ”œF10: AMโ”ค] [XC90] Failed to start homebridge-volvo with Error: getaddrinfo ENOTFOUND vocapi.truewirelesscar.net
at extractValue (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge-volvo\node_modules\sync-rpc\lib\index.js:165:19)
at C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge-volvo\node_modules\sync-rpc\lib\index.js:175:12
at Object.request (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge-volvo\node_modules\sync-request\lib\index.js:28:15)
at REST.GetSync (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge-volvo\src\util\rest.ts:58:36)
at VolvoPlatform.GetVehicleSync (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge-volvo\src\index.ts:60:34)
at new VolvoPlatform (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge-volvo\src\index.ts:36:27)
at C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:357:50
at Array.forEach ()
at Server._loadAccessories (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:330:29)
at Server.start (C:\Users\10298\AppData\Roaming\npm\node_modules\homebridge\src\server.ts:156:12)
[2020-7-23 7:35:14 โ”œF10: AMโ”ค] [XC90] Shutting down homebridge-volvo.
[2020-7-23 7:35:14 โ”œF10: AMโ”ค] [XC90] Accessory Volvo returned empty set of services. Won't adding it to the bridge!

Reduce count of devices in Alexa?

Hi,
at first, great plugin! Thank you.

Is it possible to reduce the device count in Alexa?
Feature deactivation didn't help there.

I want to use only the heater/climate feature.

image

Excessive dns requests

Hi, thank you for this plugin, really good. ๐Ÿ‘๐Ÿป

Iโ€™ve noticed that the plugin is hammering the dns server with new queries all the time (vocapi.wirelesscar.net). About 45K/day. Is this really necessary?

plugin not working on my volvo XC60 2022

Hello there. First of all, thank you for putting together such great initiative.

Is there any need to adjust the config.json file to accomodate 2022 volvo car API? I am think of API key, or Vehicle TOKEN...

image

So far I am stuck with the error below...
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.