Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  further fixes
  updated readme + history, version-bump
  fixed problem where zero-measurement-values were not applied to characteristics
  switched to default history handling (timer & length)
  • Loading branch information
Sebastian Kroll committed May 29, 2018
2 parents 50f9e82 + 101b22c commit f214cc1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## version history

### 0.3.6
- fixed bug were zero-measurement-values were not applied to characteristics (https://github.com/skrollme/homebridge-eveatmo/issues/15)
- switched to default history length and timer-handling

### 0.3.5
- updated "low-battery"-handling and switched to different service-uuid for _Rain1H_ and _Rain24H_

Expand Down
8 changes: 4 additions & 4 deletions accessory/eveatmo-rain-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ module.exports = function(pHomebridge) {
var result = {};
var dashboardData = accessoryData.dashboard_data;
if (dashboardData) {
if (dashboardData.sum_rain_1) {
if (dashboardData.hasOwnProperty("sum_rain_1")) {
result.rainLevelSum1 = Math.round(dashboardData.sum_rain_1 * 1000) / 1000;
}
if (dashboardData.sum_rain_24) {
if (dashboardData.hasOwnProperty("sum_rain_24")) {
result.rainLevelSum24 = Math.round(dashboardData.sum_rain_24 * 1000) / 1000;
}
}
Expand All @@ -83,11 +83,11 @@ module.exports = function(pHomebridge) {
applyWeatherData(weatherData) {
var dataChanged = false;

if (weatherData.rainLevelSum1 && this.rainLevelSum1 != weatherData.rainLevelSum1) {
if (weatherData.hasOwnProperty("rainLevelSum1") && this.rainLevelSum1 != weatherData.rainLevelSum1) {
this.rainLevelSum1 = weatherData.rainLevelSum1;
dataChanged = true;
}
if (weatherData.rainLevelSum24 && this.rainLevelSum24 != weatherData.rainLevelSum24) {
if (weatherData.hasOwnProperty("rainLevelSum24") && this.rainLevelSum24 != weatherData.rainLevelSum24) {
this.rainLevelSum24 = weatherData.rainLevelSum24;
dataChanged = true;
}
Expand Down
6 changes: 3 additions & 3 deletions accessory/eveatmo-room-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module.exports = function(pHomebridge) {
this.addService(serviceBattery);
}

this.historyService = new FakeGatoHistoryService("room", this, {size: 40320, storage:'fs', disableTimer: true});
this.historyService = new FakeGatoHistoryService("room", this, {storage:'fs'});

} catch (err) {
this.log.warn("Could not process service files for " + accessoryConfig.name);
Expand All @@ -93,7 +93,7 @@ module.exports = function(pHomebridge) {
var result = {};
var dashboardData = accessoryData.dashboard_data;
if (dashboardData) {
if (dashboardData.Temperature) {
if (dashboardData.hasOwnProperty("Temperature")) {
result.currentTemperature = dashboardData.Temperature;
}
if (dashboardData.CO2) {
Expand All @@ -119,7 +119,7 @@ module.exports = function(pHomebridge) {
applyWeatherData(weatherData) {
var dataChanged = false;

if (weatherData.currentTemperature && this.currentTemperature != weatherData.currentTemperature) {
if (weatherData.hasOwnProperty("currentTemperature") && this.currentTemperature != weatherData.currentTemperature) {
this.currentTemperature = weatherData.currentTemperature;
dataChanged = true;
}
Expand Down
6 changes: 3 additions & 3 deletions accessory/eveatmo-weather-accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = function(pHomebridge) {
this.addService(serviceBattery);
}

this.historyService = new FakeGatoHistoryService("weather", this, {size: 40320, storage:'fs', disableTimer: true});
this.historyService = new FakeGatoHistoryService("weather", this, {storage:'fs'});

} catch (err) {
this.log.warn("Could not process service files for " + accessoryConfig.name);
Expand Down Expand Up @@ -103,7 +103,7 @@ module.exports = function(pHomebridge) {
var result = {};
var dashboardData = accessoryData.dashboard_data;
if (dashboardData) {
if (dashboardData.Temperature) {
if (dashboardData.hasOwnProperty("Temperature")) {
result.currentTemperature = dashboardData.Temperature;
}
if (dashboardData.Humidity) {
Expand All @@ -123,7 +123,7 @@ module.exports = function(pHomebridge) {
applyWeatherData(weatherData) {
var dataChanged = false;

if (weatherData.currentTemperature && this.currentTemperature != weatherData.currentTemperature) {
if (weatherData.hasOwnProperty("currentTemperature") && this.currentTemperature != weatherData.currentTemperature) {
this.currentTemperature = weatherData.currentTemperature;
dataChanged = true;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-eveatmo",
"version": "0.3.5",
"version": "0.3.6",
"description": "Homebridge plugin which adds a Netatmo weatherstation as HomeKit device and tries to act like Elgato Eve Room/Weather",
"license": "ISC",
"keywords": [
Expand Down

0 comments on commit f214cc1

Please sign in to comment.