iobroker.netatmo
Advanced tools
Comparing version 2.0.4 to 2.0.5
{ | ||
"common": { | ||
"name": "netatmo", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"title": "Netatmo", | ||
@@ -19,2 +19,14 @@ "titleLang": { | ||
"news": { | ||
"2.0.5": { | ||
"en": "Catch communication errors better", | ||
"de": "Kommunikationsfehler besser einfangen", | ||
"ru": "Поймать ошибки общения лучше", | ||
"pt": "Apanhar erros de comunicação melhor", | ||
"nl": "Vertaling:", | ||
"fr": "Attrapez les erreurs de communication mieux", | ||
"it": "Cattura errori di comunicazione migliore", | ||
"es": "Errores de comunicación de captura mejor", | ||
"pl": "Błędy komunikacji", | ||
"zh-cn": "失误" | ||
}, | ||
"2.0.4": { | ||
@@ -91,14 +103,2 @@ "en": "Fix crash case with Smoke detector events", | ||
"zh-cn": "重要提示:州 ID 中的人名(欢迎)现在被 _ 替换!\n修复哨兵报告的另一个潜在崩溃案例" | ||
}, | ||
"1.5.1": { | ||
"en": "Fix jsonconfig for Client secret", | ||
"de": "Korrigieren Sie jsonconfig für das Clientgeheimnis", | ||
"ru": "Исправить jsonconfig для секрета клиента", | ||
"pt": "Corrigir jsonconfig para segredo do cliente", | ||
"nl": "jsonconfig voor clientgeheim repareren", | ||
"fr": "Correction de jsonconfig pour le secret client", | ||
"it": "Correggi jsonconfig per il segreto del client", | ||
"es": "Arreglar jsonconfig para el secreto del cliente", | ||
"pl": "Napraw jsonconfig dla tajnego klienta", | ||
"zh-cn": "修复客户端密码的 jsonconfig" | ||
} | ||
@@ -105,0 +105,0 @@ }, |
@@ -85,3 +85,3 @@ /** | ||
let errorMessage = ''; | ||
if (body && response.headers['content-type'].indexOf('application/json') !== -1) { | ||
if (body && response && response.headers['content-type'].indexOf('application/json') !== -1) { | ||
errorMessage = JSON.parse(body); | ||
@@ -93,3 +93,3 @@ if (this.refresh_token && errorMessage.error && (errorMessage.error.code === 2 || errorMessage.error.code === 3)) { | ||
errorMessage = errorMessage && (errorMessage.error.message || errorMessage.error); | ||
} else if (typeof response !== 'undefined') { | ||
} else if (response !== undefined) { | ||
errorMessage = `Status code${response.statusCode}`; | ||
@@ -235,3 +235,3 @@ } else { | ||
glob_lib_adapter && glob_lib_adapter.log.debug(`netatmo: authenticate err ${err}`); | ||
glob_lib_adapter && glob_lib_adapter.log.debug(`netatmo: authenticate status ${response}` && response.statusCode); | ||
glob_lib_adapter && glob_lib_adapter.log.debug(`netatmo: authenticate status ${response && response.statusCode}`); | ||
glob_lib_adapter && glob_lib_adapter.log.debug(`netatmo: authenticate body ${body}`); | ||
@@ -290,3 +290,3 @@ if (err || !response || response.statusCode !== 200) { | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'Authenticate refresh error', false, callback); | ||
@@ -357,3 +357,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getUser error', false, callback, this.getUser.bind(this, callback)); | ||
@@ -414,3 +414,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getDevicelist error', false, callback, this.getDevicelist.bind(this, options, callback)); | ||
@@ -472,3 +472,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getStationsDataError error', false, callback, this.getStationsData.bind(this, options, callback)); | ||
@@ -528,3 +528,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'gethomecoachsdata error', false, callback, this.getCoachData.bind(this, options, callback)); | ||
@@ -585,3 +585,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getThermostatsDataError error', false, callback, this.getThermostatsData.bind(this, options, callback)); | ||
@@ -709,3 +709,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
const error = this.handleRequestError(err, response, body, 'getMeasure error', false, callback, this.getMeasure.bind(this, options, callback)); | ||
@@ -779,3 +779,3 @@ if (callback) { | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getThermstate error', false, callback, this.getThermstate.bind(this, options, callback)); | ||
@@ -843,3 +843,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'switchSchedule error', false, callback, this.switchSchedule.bind(this, options, callback)); | ||
@@ -920,3 +920,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'setSyncSchedule error', false, callback, this.setSyncSchedule.bind(this, options, callback)); | ||
@@ -1002,3 +1002,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'setThermpoint error', false, callback, this.setThermpoint.bind(this, options, callback)); | ||
@@ -1073,3 +1073,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'setstate error', false, callback, this.switchSchedule.bind(this, options, callback)); | ||
@@ -1140,3 +1140,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'homesdata error', false, callback, this.homesdata.bind(this, options, callback)); | ||
@@ -1308,3 +1308,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'homestatus error', false, callback, this.homesdata.bind(this, options, callback)); | ||
@@ -1377,3 +1377,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getHomeData error', false, callback, this.getHomeData.bind(this, options, callback)); | ||
@@ -1446,3 +1446,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getNextEvents error', false, callback, this.getNextEvents.bind(this, options, callback)); | ||
@@ -1515,3 +1515,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getLastEventOf error', false, callback, this.getLastEventOf.bind(this, options, callback)); | ||
@@ -1580,3 +1580,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getEventsUntil error', false, callback, this.getEventsUntil.bind(this, options, callback)); | ||
@@ -1647,3 +1647,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getCameraPicture error', false, callback, this.getCameraPicture.bind(this, options, callback)); | ||
@@ -1694,3 +1694,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
if (callback) { | ||
@@ -1736,3 +1736,3 @@ callback(err, body, qs); | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'dropWebHook error'); | ||
@@ -1788,3 +1788,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'setPersonsAway error'); | ||
@@ -1840,3 +1840,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'setPersonsHome error'); | ||
@@ -1932,3 +1932,3 @@ } | ||
}, (err, response, body) => { | ||
if (err || response.statusCode !== 200) { | ||
if (err || !response || response.statusCode !== 200) { | ||
return this.handleRequestError(err, response, body, 'getevents error', false, callback, this.getevents.bind(this, options, callback)); | ||
@@ -1935,0 +1935,0 @@ } |
{ | ||
"name": "iobroker.netatmo", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "ioBroker netatmo Adapter", | ||
@@ -5,0 +5,0 @@ "author": "Patrick Arns <iobroker@patrick-arns.de>", |
@@ -72,2 +72,5 @@ ![Logo](admin/netatmo.png) | ||
## Changelog | ||
### 2.0.5 (2022-09-16) | ||
* (Apollon77) Catch communication errors better | ||
### 2.0.4 (2022-09-15) | ||
@@ -74,0 +77,0 @@ * (Apollon77) Fix crash case with Smoke detector events |
358817
242