iobroker.bluelink
Advanced tools
Comparing version 1.0.7 to 1.0.8
{ | ||
"common": { | ||
"name": "bluelink", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"news": { | ||
"1.0.8": { | ||
"en": "Add charge start/stop option", | ||
"de": "Ladestart/-stopp-Option hinzufügen", | ||
"ru": "Добавить опцию запуска / остановки зарядки", | ||
"pt": "Adicionar opção de iniciar / parar carga", | ||
"nl": "Start/stop-optie voor opladen toevoegen", | ||
"fr": "Ajouter une option de démarrage/arrêt de charge", | ||
"it": "Aggiungi l'opzione di avvio/arresto della carica", | ||
"es": "Agregue la opción de inicio / parada de carga", | ||
"pl": "Dodaj opcję rozpoczęcia/zatrzymania ładowania", | ||
"zh-cn": "添加充电开始/停止选项" | ||
}, | ||
"1.0.7": { | ||
@@ -7,0 +19,0 @@ "en": "Fix for KIA Sorento (Diesel)", |
71
main.js
@@ -108,2 +108,10 @@ 'use strict'; | ||
break; | ||
case 'charge': | ||
this.log.info('Start charging'); | ||
response = await vehicle.startCharge(); | ||
break; | ||
case 'stop_charge': | ||
this.log.info('Stop charging'); | ||
response = await vehicle.stopCharge(); | ||
break; | ||
case 'battery': | ||
@@ -142,3 +150,3 @@ if (!state.ack) { | ||
this.log.info('Login to api'); | ||
this.log.debug(this.config.vin); | ||
const tmpConfig = { | ||
@@ -244,2 +252,3 @@ username: this.config.username, | ||
} | ||
} else { | ||
@@ -249,2 +258,21 @@ //Bei Hyundai sieht es anders aus: | ||
} | ||
//Nur für Elektro Fahrzeuge - Battery | ||
await this.setStateAsync('vehicleStatus.dte', { val: newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.totalAvailableRange.value, ack: true }); | ||
await this.setStateAsync('vehicleStatus.evModeRange', { val: newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.evModeRange.value, ack: true }); | ||
if (newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.gasModeRange != undefined) { | ||
//Only for PHEV | ||
await this.setStateAsync('vehicleStatus.gasModeRange', { val: newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.gasModeRange.value, ack: true }); | ||
} | ||
await this.setStateAsync('vehicleStatus.battery.soc', { val: newStatus.vehicleStatus.evStatus.batteryStatus, ack: true }); | ||
await this.setStateAsync('vehicleStatus.battery.charge', { val: newStatus.vehicleStatus.evStatus.batteryCharge, ack: true }); | ||
await this.setStateAsync('vehicleStatus.battery.plugin', { val: newStatus.vehicleStatus.evStatus.batteryPlugin, ack: true }); | ||
//Ladezeit anzeigen, da noch nicht klar welche Werte | ||
await this.setStateAsync('vehicleStatus.battery.minutes_to_charged', { val: newStatus.vehicleStatus.evStatus.remainTime2.atc.value, ack: true }); | ||
this.log.debug('Folgende Ladezeiten Moeglichkeiten wurden gefunden:'); | ||
this.log.debug(JSON.stringify(newStatus.vehicleStatus.evStatus.remainTime2)); | ||
} else { | ||
@@ -254,14 +282,2 @@ //Kein Elektromodell, Diesel etc | ||
// Battery | ||
await this.setStateAsync('vehicleStatus.dte', { val: newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.totalAvailableRange.value, ack: true }); | ||
await this.setStateAsync('vehicleStatus.evModeRange', { val: newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.evModeRange.value, ack: true }); | ||
if (newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.gasModeRange != undefined) { | ||
//Only for PHEV | ||
await this.setStateAsync('vehicleStatus.gasModeRange', { val: newStatus.vehicleStatus.evStatus.drvDistance[0].rangeByFuel.gasModeRange.value, ack: true }); | ||
} | ||
await this.setStateAsync('vehicleStatus.battery.soc', { val: newStatus.vehicleStatus.evStatus.batteryStatus, ack: true }); | ||
await this.setStateAsync('vehicleStatus.battery.charge', { val: newStatus.vehicleStatus.evStatus.batteryCharge, ack: true }); | ||
await this.setStateAsync('vehicleStatus.battery.plugin', { val: newStatus.vehicleStatus.evStatus.batteryPlugin, ack: true }); | ||
// nur für Kia | ||
@@ -273,6 +289,2 @@ if(newStatus.vehicleStatus.battery != undefined) { | ||
//Ladezeit anziegen, da noch nicht kla welche Werte | ||
await this.setStateAsync('vehicleStatus.battery.minutes_to_charged', { val: newStatus.vehicleStatus.evStatus.remainTime2.atc.value, ack: true }); | ||
this.log.debug('Folgende Ladezeiten Moeglichkeiten wurden gefunden:'); | ||
this.log.debug(JSON.stringify(newStatus.vehicleStatus.evStatus.remainTime2)); | ||
@@ -294,3 +306,28 @@ //Location | ||
async setControlObjects() { | ||
await this.setObjectNotExistsAsync('control.charge', { | ||
type: 'state', | ||
common: { | ||
name: 'Start charging', | ||
type: 'boolean', | ||
role: 'button', | ||
read: true, | ||
write: true, | ||
}, | ||
native: {}, | ||
}); | ||
this.subscribeStates('control.charge'); | ||
await this.setObjectNotExistsAsync('control.charge_stop', { | ||
type: 'state', | ||
common: { | ||
name: 'Stop charging', | ||
type: 'boolean', | ||
role: 'button', | ||
read: true, | ||
write: true, | ||
}, | ||
native: {}, | ||
}); | ||
this.subscribeStates('control.charge_stop'); | ||
await this.setObjectNotExistsAsync('control.lock', { | ||
@@ -297,0 +334,0 @@ type: 'state', |
{ | ||
"name": "iobroker.bluelink", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Adapter to control Hyundai or Kia vehicle", | ||
@@ -5,0 +5,0 @@ "author": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72155
970