iobroker.aio
Advanced tools
Comparing version 0.0.3 to 0.1.0
@@ -54,4 +54,4 @@ "use strict"; | ||
this.config.ip = this.config.ip.replace('http', ''); | ||
this.config.ip = this.config.ip.replace(':', ''); | ||
this.config.ip = this.config.ip.replace('/', ''); | ||
this.config.ip = this.config.ip.replace('://', ''); | ||
//this.config.ip = this.config.ip.replace('/', ''); | ||
this.ip = this.config.ip; | ||
@@ -119,2 +119,19 @@ this.log.debug('Final Ip:' + this.ip); | ||
}); | ||
//Hole noch wetterdaten - s/R3EMSAPP_REAL.ems?file=Weather.json&_=1636144519854 | ||
(0, axios_1.default)('http://' + this.ip + '/R3EMSAPP_REAL.ems?file=Weather.json').then(async (response) => { | ||
this.log.debug('Get-Data from inverter:'); | ||
this.log.debug(JSON.stringify(response.data)); | ||
await this.setStateAsync('weather.Time', { val: response.data.WeatherInfo.Time, ack: true }); | ||
await this.setStateAsync('weather.Weather', { val: response.data.WeatherInfo.Weather, ack: true }); | ||
await this.setStateAsync('weather.CloudAll', { val: response.data.WeatherInfo.CloudAll, ack: true }); | ||
await this.setStateAsync('weather.TempUnit', { val: response.data.WeatherInfo.TempUnit, ack: true }); | ||
await this.setStateAsync('weather.Temperature', { val: response.data.WeatherInfo.Temperature, ack: true }); | ||
await this.setStateAsync('weather.Humidity', { val: response.data.WeatherInfo.Humidity, ack: true }); | ||
await this.setStateAsync('weather.WindDirection', { val: response.data.WeatherInfo.WindDirection, ack: true }); | ||
await this.setStateAsync('weather.WindSpeed', { val: response.data.WeatherInfo.WindSpeed, ack: true }); | ||
this.setState('info.connection', true, true); | ||
}).catch(error => { | ||
this.log.error(error.message); | ||
this.setState('info.connection', false, true); | ||
}); | ||
} | ||
@@ -121,0 +138,0 @@ catch (error) { |
{ | ||
"common": { | ||
"name": "aio", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"news": { | ||
"0.1.0": { | ||
"en": "Added weather infos", | ||
"de": "Wetterinfos hinzugefügt", | ||
"ru": "Добавлена информация о погоде", | ||
"pt": "Adicionadas informações sobre o clima", | ||
"nl": "Weerinformatie toegevoegd", | ||
"fr": "Ajout d'infos météo", | ||
"it": "Aggiunte informazioni meteo", | ||
"es": "Información meteorológica añadida", | ||
"pl": "Dodano informacje o pogodzie", | ||
"zh-cn": "添加了天气信息" | ||
}, | ||
"0.0.3": { | ||
@@ -323,4 +335,108 @@ "en": "fix object ids", | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.Time", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "Time", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.Weather", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "Weather", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.CloudAll", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "CloudAll", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.TempUnit", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "TempUnit", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.Temperature", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "Temperature", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.Humidity", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "Humidity", | ||
"type": "number", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.WindDirection", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "WindDirection", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
}, | ||
{ | ||
"_id": "weather.WindSpeed", | ||
"type": "state", | ||
"common": { | ||
"role": "state", | ||
"name": "WindSpeed", | ||
"type": "string", | ||
"read": true, | ||
"write": false, | ||
"def": false | ||
}, | ||
"native": {} | ||
} | ||
] | ||
} |
{ | ||
"name": "iobroker.aio", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "aio", | ||
@@ -23,3 +23,4 @@ "author": { | ||
"@iobroker/adapter-core": "^2.5.1", | ||
"react-icons": "^4.3.1" | ||
"react-icons": "^4.3.1", | ||
"axios": "^0.24.0" | ||
}, | ||
@@ -48,3 +49,2 @@ "devDependencies": { | ||
"@typescript-eslint/parser": "^5.2.0", | ||
"axios": "^0.24.0", | ||
"chai": "^4.3.4", | ||
@@ -51,0 +51,0 @@ "chai-as-promised": "^7.1.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7802047
37
72061
3
+ Addedaxios@^0.24.0
+ Addedaxios@0.24.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)