iobroker.netatmo
Advanced tools
Comparing version 0.3.1 to 0.4.0
{ | ||
"common": { | ||
"name": "netatmo", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"title": "Netatmo Adapter", | ||
@@ -32,3 +32,4 @@ "desc": { | ||
"event_time": 12, | ||
"unknown_person_time": 24 | ||
"unknown_person_time": 24, | ||
"location_elevation": 0 | ||
}, | ||
@@ -35,0 +36,0 @@ "objects": [ |
@@ -46,2 +46,5 @@ /* jshint -W097 */// jshint strict:false | ||
if (!adapter.config.location_elevation) | ||
adapter.config.location_elevation = 0; | ||
if (adapter.config.netatmoWeather) { | ||
@@ -48,0 +51,0 @@ scope += " read_station"; |
@@ -6,2 +6,4 @@ module.exports = function (myapi, myadapter) { | ||
var dewpoint = require('dewpoint'); | ||
this.requestUpdateWeatherStation = function () { | ||
@@ -89,2 +91,34 @@ api.getStationsData({}, function (err, data) { | ||
if (aModule.dashboard_data && (typeof aModule.dashboard_data.Temperature) !== "undefined" && (typeof aModule.dashboard_data.Humidity) !== "undefined") { | ||
var dp = new dewpoint(myadapter.config.location_elevation); | ||
var point = dp.Calc(+aModule.dashboard_data.Temperature, +aModule.dashboard_data.Humidity); | ||
adapter.setObjectNotExists(aParent + ".Temperature.DewPoint", { | ||
type: "state", | ||
common: { | ||
name: "Dew point temperature", | ||
type: "number", | ||
role: "indicator.temperature", | ||
read: true, | ||
write: false, | ||
unit: "°C" | ||
} | ||
}); | ||
adapter.setObjectNotExists(aParent + ".Humidity.AbsoluteHumidity", { | ||
type: "state", | ||
common: { | ||
name: "Absolute humidity in gram per kilogram air", | ||
type: "number", | ||
role: "indicator.humidity", | ||
read: true, | ||
write: false, | ||
unit: "g/kg" | ||
} | ||
}); | ||
adapter.setState(aParent + ".Temperature.DewPoint", {val: point.dp.toFixed(1), ack: true}); | ||
adapter.setState(aParent + ".Humidity.AbsoluteHumidity", {val: point.x.toFixed(3), ack: true}); | ||
} | ||
if (aModule.wifi_status) { | ||
@@ -91,0 +125,0 @@ var wifiStatus = "good"; |
{ | ||
"name": "iobroker.netatmo", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "ioBroker netatmo Adapter", | ||
@@ -34,2 +34,3 @@ "author": { | ||
"dependencies": { | ||
"dewpoint": "^1.0.0", | ||
"netatmo-homey": "^2.1.0" | ||
@@ -52,2 +53,2 @@ }, | ||
"readmeFilename": "README.md" | ||
} | ||
} |
@@ -16,2 +16,6 @@ ![Logo](admin/netatmo.png) | ||
### 0.4.0 | ||
* (PArns) Added absolute humidity | ||
* (PArns) Added dewpoint | ||
### 0.3.1 | ||
@@ -18,0 +22,0 @@ * (PArns) Reuse of preconfigured OAuth Client data |
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
106770
1750
59
1
2
+ Addeddewpoint@^1.0.0
+ Addeddewpoint@1.0.0(transitive)