New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iobroker.easee

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iobroker.easee - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

16

io-package.json
{
"common": {
"name": "easee",
"version": "1.0.2",
"news": {
"version": "1.0.3",
"news": {
"1.0.3": {
"en": "Adapter crash fixed an other bugfixes",
"de": "Adapterabsturz behoben und weitere Bugfixes",
"ru": "Авария адаптера исправила другие исправления.",
"pt": "Falha do adaptador corrigida e outras correções de bugs",
"nl": "Adaptercrash heeft andere bugfixes opgelost",
"fr": "Le crash de l'adaptateur a corrigé une autre correction de bugs",
"it": "Il crash dell'adattatore ha risolto un altro bugfix",
"es": "La falla del adaptador corrigió otras correcciones de errores",
"pl": "Awaria adaptera naprawiono inne poprawki błędów",
"zh-cn": "适配器崩溃修复了其他错误修复"
},
"1.0.2": {

@@ -7,0 +19,0 @@ "en": "bugfix for the new stable version",

70

main.js

@@ -92,3 +92,3 @@ 'use strict';

} else {
this.log.info('Api login started');
this.log.debug('Api login started');
this.log.debug('Password is:' + this.config.client_secret);

@@ -131,3 +131,3 @@ const login = await this.login(this.config.username, this.config.client_secret);

this.log.info('Adaptor easee cleaned up everything...');
this.setState('info.connection', false, true);
this.setStateAsync('info.connection', false, true);
callback();

@@ -148,3 +148,3 @@ } catch (e) {

this.log.info('read new states from the API');
this.log.debug('read new states from the API');

@@ -167,21 +167,27 @@ //Lesen alle Charger aus

this.log.debug(JSON.stringify(charger));
try {
//Lesen den Status aus
const tmpChargerState = await this.getChargerState(charger.id);
//Lesen die config
const tmpChargerConfig = await this.getChargerConfig(charger.id);
//Lesen den Status aus
const tmpChargerState = await this.getChargerState(charger.id);
//Lesen die config
const tmpChargerConfig = await this.getChargerConfig(charger.id);
//Setzen die Daten der Charger
await this.setNewStatusToCharger(charger, tmpChargerState);
//Setzen die Daten der Charger
await this.setNewStatusToCharger(charger, tmpChargerState);
//Setzen die Config zum Charger
await this.setConfigStatus(charger, tmpChargerConfig);
//Setzen die Config zum Charger
await this.setConfigStatus(charger, tmpChargerConfig);
//setzen und erechnen der Energiedaten, aber gebremste
if(roundCounter > (minPollTimeEnergy/polltime)) {
//lesen der Energiedaten
const tmpChargerSession = await this.getChargerSession(charger.id);
//etzen die Objekte
this.setNewSessionToCharger(charger, tmpChargerSession);
//setzen und erechnen der Energiedaten, aber gebremste
if(roundCounter > (minPollTimeEnergy/polltime)) {
//lesen der Energiedaten
const tmpChargerSession = await this.getChargerSession(charger.id);
//etzen die Objekte
this.setNewSessionToCharger(charger, tmpChargerSession);
}
} catch (err) {
//geben die FEhlermeldng der API-funktion aus
this.log.error(err);
}
});

@@ -194,3 +200,3 @@ } else {

if(roundCounter > (minPollTimeEnergy/polltime)) {
this.log.info('Hole Energiedaten: ' + roundCounter);
this.log.debug('Hole Energiedaten: ' + roundCounter);
roundCounter = 0;

@@ -202,3 +208,3 @@ }

//Melden das Update
await this.setStateAsync('lastUpdate', new Date().toLocaleTimeString(), {ack: true});
await this.setStateAsync('lastUpdate', new Date().toLocaleTimeString(), true);
adapterIntervals.readAllStates = setTimeout(this.readAllStates.bind(this), polltime * 1000);

@@ -231,3 +237,3 @@ }

this.changeCircuitConfig(site.id, site.circuits[0].id, state.val);
this.log.info('Changes send to API');
this.log.debug('Changes send to API');
});

@@ -239,3 +245,3 @@

this.changeConfig(tmpControl[2], tmpControl[4], state.val);
this.log.info('Changes send to API');
this.log.debug('Changes send to API');
}

@@ -344,3 +350,3 @@ }

this.log.info('Login successful');
this.log.info('Easee Api Login successful');

@@ -402,2 +408,3 @@ accessToken = response.data.accessToken;

this.log.error(error);
throw new Error('Easee API error on charger state - stop refresh');
});

@@ -415,2 +422,3 @@ }

this.log.error(error);
throw new Error('Easee API error on charger config - stop refresh');
});

@@ -428,2 +436,3 @@ }

this.log.error(error);
throw new Error('Easee API error on charger site - stop refresh');
});

@@ -441,2 +450,3 @@ }

this.log.error(error);
throw new Error('Easee API error on charger session - stop refresh');
});

@@ -623,3 +633,3 @@ }

});
await this.setStateAsync(charger.id + '.id', charger.id);
await this.setStateAsync(charger.id + '.id', charger.id, true);

@@ -894,3 +904,3 @@ //name

});
await this.setStateAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.totalEnergyUsage', session.totalEnergyUsage);
await this.setStateAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.totalEnergyUsage', session.totalEnergyUsage, true);

@@ -908,3 +918,3 @@ await this.setObjectNotExistsAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.totalCost', {

});
await this.setStateAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.totalCost', session.totalCost);
await this.setStateAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.totalCost', session.totalCost, true);

@@ -922,3 +932,3 @@ await this.setObjectNotExistsAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.currencyId', {

});
await this.setStateAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.currencyId', session.currencyId);
await this.setStateAsync(charger.id + '.session.' + session.year + '.' + session.month+ '.currencyId', session.currencyId, true);

@@ -944,6 +954,6 @@ await this.setObjectNotExistsAsync(charger.id + '.session.' + session.year + '.total_year', {

//Jahreszähler umhängen
this.log.info('set session year data');
this.log.debug('set session year data');
if (tmpYear != session.year) {
//neues Jahr setzen alles zurück
this.setState(charger.id + '.session.' + session.year + '.total_year', session.totalEnergyUsage);
this.setStateAsync(charger.id + '.session.' + session.year + '.total_year', session.totalEnergyUsage, true);
tmpYearCount = session.totalEnergyUsage;

@@ -953,3 +963,3 @@ tmpYear = session.year;

tmpYearCount = tmpYearCount + session.totalEnergyUsage;
this.setState(charger.id + '.session.' + session.year + '.total_year', tmpYearCount);
this.setStateAsync(charger.id + '.session.' + session.year + '.total_year', tmpYearCount, true);
}

@@ -1057,3 +1067,3 @@ });

});
this.subscribeStates(charger.id + '.config.dynamicCircuitCurrentP3');
//this.subscribeStates(charger.id + '.config.dynamicCircuitCurrentP3');

@@ -1060,0 +1070,0 @@ await this.setObjectNotExistsAsync(charger.id + '.config.circuitMaxCurrentP1', {

{
"name": "iobroker.easee",
"version": "1.0.2",
"version": "1.0.3",
"description": "Adapter to connect Easee Wallbox",

@@ -5,0 +5,0 @@ "author": {

@@ -20,2 +20,4 @@ ![Logo](admin/easee.png)

## Changelog
### 1.0.3
* (Newan) Adapter crash fixed an other bugfixes

@@ -22,0 +24,0 @@ ### 1.0.1

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc