iobroker.evcc
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "IP-Adresse zu Ihrer evcc-Installation" | ||
"ip_help": "IP-Adresse zu Ihrer evcc-Installation", | ||
"port": "Port", | ||
"port_help": "Port zu Ihrer evcc-Installation" | ||
} |
{ | ||
"general": "General", | ||
"polltime": "Intervall", | ||
"polltime_help": "Intervall in seconds, to lookup to evcc", | ||
"polltime": "Interval", | ||
"polltime_help": "Interval in seconds, to lookup to evcc", | ||
"ip": "IP", | ||
"ip_help": "IP-Adres to your evcc instalation" | ||
"ip_help": "IP-Adress to your evcc instalation", | ||
"port": "Port", | ||
"port_help": "Port to your evcc instalation" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "Dirección IP de su instalación evcc" | ||
"ip_help": "Dirección IP de su instalación evcc", | ||
"port": "Puerto", | ||
"port_help": "Puerto a su instalación evcc" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "Adresse IP à votre installation evcc" | ||
"ip_help": "Adresse IP à votre installation evcc", | ||
"port": "Port", | ||
"port_help": "Port vers votre installation evcc" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "IP-Adres alla tua installazione evcc" | ||
"ip_help": "IP-Adres alla tua installazione evcc", | ||
"port": "Porta", | ||
"port_help": "Porta alla tua installazione evcc" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IK P", | ||
"ip_help": "IP-Adres naar uw evcc-installatie" | ||
"ip_help": "IP-Adres naar uw evcc-installatie", | ||
"port": "Haven", | ||
"port_help": "Poort naar uw evcc-installatie" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "Adres IP do instalacji evcc" | ||
"ip_help": "Adres IP do instalacji evcc", | ||
"port": "Port", | ||
"port_help": "Port do instalacji evcc" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "Endereços IP para sua instalação evcc" | ||
"ip_help": "Endereços IP para sua instalação evcc", | ||
"port": "Porta", | ||
"port_help": "Porta para sua instalação evcc" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "IP", | ||
"ip_help": "IP-адреса для вашей установки evcc" | ||
"ip_help": "IP-адреса для вашей установки evcc", | ||
"port": "Порт", | ||
"port_help": "Перенос на вашу установку evcc" | ||
} |
@@ -6,3 +6,5 @@ { | ||
"ip": "知识产权", | ||
"ip_help": "IP 地址到您的 evcc 安装" | ||
"ip_help": "IP 地址到您的 evcc 安装", | ||
"port": "港口", | ||
"port_help": "移植到您的 evcc 安装" | ||
} |
@@ -28,2 +28,12 @@ { | ||
}, | ||
"port": { | ||
"newLine": false, | ||
"type": "number", | ||
"label": "port", | ||
"help": "port_help", | ||
"min": 1, | ||
"sm": 12, | ||
"md": 6, | ||
"lg": 6 | ||
}, | ||
"_spacer": { | ||
@@ -30,0 +40,0 @@ "type": "divider", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=loadpoint.js.map |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -35,2 +35,3 @@ "use strict"; | ||
this.polltime = 0; | ||
this.timeout = 1000; | ||
this.maxLoadpointIndex = -1; | ||
@@ -51,4 +52,4 @@ this.on('ready', this.onReady.bind(this)); | ||
this.config.ip = this.config.ip.replace('://', ''); | ||
//this.config.ip = this.config.ip.replace('/', ''); | ||
this.ip = this.config.ip; | ||
// add port to ip | ||
this.ip = this.config.ip + ':' + this.config.port; | ||
this.log.debug('Final Ip:' + this.ip); | ||
@@ -68,2 +69,3 @@ } | ||
this.polltime = this.config.polltime; | ||
this.timeout = (this.polltime * 1000) - 500; //'500ms unter intervall' | ||
} | ||
@@ -153,3 +155,3 @@ else { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/state'); | ||
(0, axios_1.default)('http://' + this.ip + '/api/state').then(async (response) => { | ||
(0, axios_1.default)('http://' + this.ip + '/api/state', { timeout: this.timeout }).then(async (response) => { | ||
this.log.debug('Get-Data from evcc:' + JSON.stringify(response.data)); | ||
@@ -283,3 +285,3 @@ //Global status Items | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.min', | ||
read: true, | ||
@@ -296,3 +298,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value', | ||
read: true, | ||
@@ -309,3 +311,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.max', | ||
read: true, | ||
@@ -322,3 +324,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value', | ||
read: true, | ||
@@ -335,3 +337,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value', | ||
read: true, | ||
@@ -349,3 +351,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value', | ||
read: true, | ||
@@ -361,3 +363,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -373,3 +375,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -385,3 +387,3 @@ write: false, | ||
type: 'string', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -397,3 +399,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -409,3 +411,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -421,3 +423,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -433,3 +435,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -445,3 +447,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'value.current', | ||
read: true, | ||
@@ -457,3 +459,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -469,3 +471,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -481,3 +483,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -493,3 +495,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -505,3 +507,3 @@ write: false, | ||
type: 'string', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -517,3 +519,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -529,3 +531,3 @@ write: false, | ||
type: 'string', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -541,3 +543,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -553,3 +555,3 @@ write: false, | ||
type: 'string', | ||
role: 'button', | ||
role: 'info.name', | ||
read: true, | ||
@@ -565,3 +567,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'info.name', | ||
read: true, | ||
@@ -577,3 +579,3 @@ write: false, | ||
type: 'string', | ||
role: 'button', | ||
role: 'info.name', | ||
read: true, | ||
@@ -589,3 +591,3 @@ write: false, | ||
type: 'boolean', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -601,3 +603,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -613,3 +615,3 @@ write: false, | ||
type: 'number', | ||
role: 'button', | ||
role: 'info.status', | ||
read: true, | ||
@@ -625,3 +627,3 @@ write: false, | ||
type: 'string', | ||
role: 'button', | ||
role: 'info.name', | ||
read: true, | ||
@@ -636,3 +638,3 @@ write: false, | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/mode/pv'); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/pv').then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/pv', { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -645,3 +647,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/mode/minpv'); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/minpv').then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/minpv', { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -654,3 +656,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/mode/now'); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/now').then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/now', { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -663,3 +665,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/mode/off'); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/off').then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mode/off', { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -672,3 +674,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/targetsoc/' + value); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/targetsoc/' + value).then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/targetsoc/' + value, { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -681,3 +683,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/minsoc/' + value); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/minsoc/' + value).then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/minsoc/' + value, { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -690,3 +692,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/mincurrent/' + value); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mincurrent/' + value).then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/mincurrent/' + value, { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -699,3 +701,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/maxcurrent/' + value); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/maxcurrent/' + value).then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/maxcurrent/' + value, { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -708,3 +710,3 @@ }).catch(error => { | ||
this.log.debug('call: ' + 'http://' + this.ip + '/api/loadpoints/' + index + '/phases/' + value); | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/phases/' + value).then(() => { | ||
axios_1.default.post('http://' + this.ip + '/api/loadpoints/' + index + '/phases/' + value, { timeout: this.timeout }).then(() => { | ||
this.log.info('Evcc update successful'); | ||
@@ -711,0 +713,0 @@ }).catch(error => { |
@@ -103,2 +103,10 @@ { | ||
{ | ||
"_id": "info", | ||
"type": "channel", | ||
"common": { | ||
"name": "Information" | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "info.connection", | ||
@@ -117,2 +125,10 @@ "type": "state", | ||
{ | ||
"_id": "status", | ||
"type": "channel", | ||
"common": { | ||
"name": "Status" | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "status.batteryConfigured", | ||
@@ -261,2 +277,2 @@ "type": "state", | ||
] | ||
} | ||
} |
{ | ||
"name": "iobroker.evcc", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Controll evcc over rest api", | ||
@@ -23,17 +23,21 @@ "author": { | ||
"devDependencies": { | ||
"@alcalzone/release-script": "^2.2.2", | ||
"@iobroker/adapter-dev": "^1.0.0", | ||
"@iobroker/testing": "^3.0.1", | ||
"@types/chai": "^4.3.1", | ||
"@alcalzone/release-script": "^3.5.8", | ||
"@alcalzone/release-script-plugin-iobroker": "^3.5.8", | ||
"@alcalzone/release-script-plugin-license": "^3.5.8", | ||
"@iobroker/adapter-dev": "^1.0.1", | ||
"@iobroker/testing": "^4.0.0", | ||
"@tsconfig/node14": "^1.0.3", | ||
"@types/chai": "^4.3.3", | ||
"@types/chai-as-promised": "^7.1.5", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^14.18.16", | ||
"@types/node": "^14.18.26", | ||
"@types/proxyquire": "^1.3.28", | ||
"@types/sinon": "^10.0.11", | ||
"@types/sinon": "^10.0.13", | ||
"@types/sinon-chai": "^3.2.8", | ||
"@typescript-eslint/eslint-plugin": "^5.23.0", | ||
"@typescript-eslint/parser": "^5.23.0", | ||
"@typescript-eslint/eslint-plugin": "^5.35.1", | ||
"@typescript-eslint/parser": "^5.35.1", | ||
"chai": "^4.3.6", | ||
"chai-as-promised": "^7.1.1", | ||
"eslint": "^8.15.0", | ||
"eslint": "^8.23.0", | ||
"eslint-plugin-react": "^7.31.8", | ||
"mocha": "^10.0.0", | ||
@@ -45,3 +49,3 @@ "proxyquire": "^2.1.3", | ||
"source-map-support": "^0.5.21", | ||
"ts-node": "^10.7.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "~4.5.5" | ||
@@ -62,3 +66,3 @@ }, | ||
"check": "tsc --noEmit", | ||
"lint": "eslint --ext .ts,.tsx src/ admin/src/", | ||
"lint": "eslint --ext .ts,.tsx src/", | ||
"release": "release-script", | ||
@@ -71,2 +75,2 @@ "translate": "translate-adapter" | ||
"readmeFilename": "README.md" | ||
} | ||
} |
@@ -23,2 +23,5 @@ ![Logo](admin/evcc.png) | ||
--> | ||
### 0.0.5 (2022-10-14) | ||
* update for latest-repository | ||
### 0.0.4 (2022-08-08) | ||
@@ -25,0 +28,0 @@ * first release |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
56
0
1
79327
27
22
926