diff --git a/README.md b/README.md index 92371a1..d1db852 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,8 @@ Station does not answer to scheduler commands, so only listener mode is supporte Latest version +#### 0.10.3 Bugfixes + #### 0.10.2 Bugfixes #### 0.10.0 Added new sensors for Lightning, Piezo elements, DP250 and minor fixes diff --git a/io-package.json b/io-package.json index 981e981..31ad6fa 100644 --- a/io-package.json +++ b/io-package.json @@ -1,8 +1,12 @@ { "common": { "name": "sainlogic", - "version": "0.10.2", + "version": "0.10.3", "news": { + "0.10.3": { + "en": "Bugfixes last listener update at Ecowitt and forwarder", + "de": "Fehlerbehebungen last listener update und forwarder bei Ecowitt" + }, "0.10.2": { "en": "Bugfixes and new datapoints of battery level of some sensors", "de": "Fehlerbehebungen und neue Datenpunkte für Batterieslevels von ein paar Sensoren" diff --git a/lib/listener.js b/lib/listener.js index 18fee43..ad8266c 100644 --- a/lib/listener.js +++ b/lib/listener.js @@ -100,11 +100,12 @@ class Listener { request.on('end', () => { this.adapter.log.debug('Listener body is ' + my_body); json_response = parse(my_body); - this.adapter.setStates(new Date(), this.extract_values(json_response)); this.adapter.log.debug('Listener received EW update: ' + JSON.stringify(json_response)); json_response.last_listener_update = JSON.stringify(json_response); //this.adapter.setStateAsync('info.last_listener_update', { val: JSON.stringify(json_response), ack: true }); response.end('ok'); + this.adapter.setStates(new Date(), this.extract_values(json_response)); + }); @@ -112,9 +113,9 @@ class Listener { // forward to another host const fwd_url = new URL(this.forward_url); - got(fwd_url, { method: 'POST', retry: 0, body: my_body }).then(response => { - this.adapter.log.info(response.body.url); - this.adapter.log.info(response.body.explanation); + got(fwd_url, { method: 'POST', retry: {limit: 0} , body: my_body }).then(got_response => { + this.adapter.log.info(got_response.body.url); + this.adapter.log.info(got_response.body.explanation); }).catch(error => { this.adapter.log.info(error); }); diff --git a/package.json b/package.json index 5e02831..e649b4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iobroker.sainlogic", - "version": "0.10.2", + "version": "0.10.3", "description": "Read data from a sainlogic based weather station", "author": { "name": "Daniel Draes",