diff --git a/.gitignore b/.gitignore index 07d2fb1b..41b6ff99 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ dist/ *.pyc .DS_Store -archive/ access.token cov.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index ccf1fc70..bfca525f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - +## [8.0.1] + +### Added + +- NLFE Legrand dimmer switch evolution + +### Changed + +- + +### Deprecated + +- + +### Removed + +- + +### Fixed + +- + +### Security + +- + ## [8.0.0] ### Added @@ -342,9 +368,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix crash when station name is not contained in the backend data -[unreleased]: https://github.com/jabesq/pyatmo/compare/v8.0.0...HEAD -[7.5.0]: https://github.com/jabesq/pyatmo/compare/v7.6.0...v8.0.0 -[7.5.0]: https://github.com/jabesq/pyatmo/compare/v7.5.0...v7.6.0 +[unreleased]: https://github.com/jabesq/pyatmo/compare/v8.0.1...HEAD +[8.0.1]: https://github.com/jabesq/pyatmo/compare/v8.0.0...v8.0.1 +[8.0.0]: https://github.com/jabesq/pyatmo/compare/v7.6.0...v8.0.0 +[7.6.0]: https://github.com/jabesq/pyatmo/compare/v7.5.0...v7.6.0 [7.5.0]: https://github.com/jabesq/pyatmo/compare/v7.4.0...v7.5.0 [7.4.0]: https://github.com/jabesq/pyatmo/compare/v7.3.0...v7.4.0 [7.3.0]: https://github.com/jabesq/pyatmo/compare/v7.2.0...v7.3.0 diff --git a/fixtures/camera_data_empty.json b/fixtures/archive/camera_data_empty.json similarity index 100% rename from fixtures/camera_data_empty.json rename to fixtures/archive/camera_data_empty.json diff --git a/fixtures/camera_data_events_until.json b/fixtures/archive/camera_data_events_until.json similarity index 100% rename from fixtures/camera_data_events_until.json rename to fixtures/archive/camera_data_events_until.json diff --git a/fixtures/camera_home_data.json b/fixtures/archive/camera_home_data.json similarity index 100% rename from fixtures/camera_home_data.json rename to fixtures/archive/camera_home_data.json diff --git a/fixtures/camera_home_data_disconnected.json b/fixtures/archive/camera_home_data_disconnected.json similarity index 100% rename from fixtures/camera_home_data_disconnected.json rename to fixtures/archive/camera_home_data_disconnected.json diff --git a/fixtures/camera_home_data_no_homes.json b/fixtures/archive/camera_home_data_no_homes.json similarity index 100% rename from fixtures/camera_home_data_no_homes.json rename to fixtures/archive/camera_home_data_no_homes.json diff --git a/fixtures/camera_image_sample.jpg b/fixtures/archive/camera_image_sample.jpg similarity index 100% rename from fixtures/camera_image_sample.jpg rename to fixtures/archive/camera_image_sample.jpg diff --git a/fixtures/camera_ping.json b/fixtures/archive/camera_ping.json similarity index 100% rename from fixtures/camera_ping.json rename to fixtures/archive/camera_ping.json diff --git a/fixtures/camera_set_state_error.json b/fixtures/archive/camera_set_state_error.json similarity index 100% rename from fixtures/camera_set_state_error.json rename to fixtures/archive/camera_set_state_error.json diff --git a/fixtures/camera_set_state_error_already_on.json b/fixtures/archive/camera_set_state_error_already_on.json similarity index 100% rename from fixtures/camera_set_state_error_already_on.json rename to fixtures/archive/camera_set_state_error_already_on.json diff --git a/fixtures/camera_set_state_error_wrong_parameter.json b/fixtures/archive/camera_set_state_error_wrong_parameter.json similarity index 100% rename from fixtures/camera_set_state_error_wrong_parameter.json rename to fixtures/archive/camera_set_state_error_wrong_parameter.json diff --git a/fixtures/camera_set_state_ok.json b/fixtures/archive/camera_set_state_ok.json similarity index 100% rename from fixtures/camera_set_state_ok.json rename to fixtures/archive/camera_set_state_ok.json diff --git a/fixtures/error_scope.json b/fixtures/archive/error_scope.json similarity index 100% rename from fixtures/error_scope.json rename to fixtures/archive/error_scope.json diff --git a/fixtures/home_coach_no_devices.json b/fixtures/archive/home_coach_no_devices.json similarity index 100% rename from fixtures/home_coach_no_devices.json rename to fixtures/archive/home_coach_no_devices.json diff --git a/fixtures/home_coach_simple.json b/fixtures/archive/home_coach_simple.json similarity index 100% rename from fixtures/home_coach_simple.json rename to fixtures/archive/home_coach_simple.json diff --git a/fixtures/home_data_empty.json b/fixtures/archive/home_data_empty.json similarity index 100% rename from fixtures/home_data_empty.json rename to fixtures/archive/home_data_empty.json diff --git a/fixtures/home_data_no_devices.json b/fixtures/archive/home_data_no_devices.json similarity index 100% rename from fixtures/home_data_no_devices.json rename to fixtures/archive/home_data_no_devices.json diff --git a/fixtures/home_data_no_homes.json b/fixtures/archive/home_data_no_homes.json similarity index 100% rename from fixtures/home_data_no_homes.json rename to fixtures/archive/home_data_no_homes.json diff --git a/fixtures/home_data_nohomename.json b/fixtures/archive/home_data_nohomename.json similarity index 100% rename from fixtures/home_data_nohomename.json rename to fixtures/archive/home_data_nohomename.json diff --git a/fixtures/home_data_simple.json b/fixtures/archive/home_data_simple.json similarity index 100% rename from fixtures/home_data_simple.json rename to fixtures/archive/home_data_simple.json diff --git a/fixtures/home_status_empty.json b/fixtures/archive/home_status_empty.json similarity index 100% rename from fixtures/home_status_empty.json rename to fixtures/archive/home_status_empty.json diff --git a/fixtures/home_status_error_and_data.json b/fixtures/archive/home_status_error_and_data.json similarity index 100% rename from fixtures/home_status_error_and_data.json rename to fixtures/archive/home_status_error_and_data.json diff --git a/fixtures/home_status_error_invalid_id.json b/fixtures/archive/home_status_error_invalid_id.json similarity index 100% rename from fixtures/home_status_error_invalid_id.json rename to fixtures/archive/home_status_error_invalid_id.json diff --git a/fixtures/home_status_error_missing_home_id.json b/fixtures/archive/home_status_error_missing_home_id.json similarity index 100% rename from fixtures/home_status_error_missing_home_id.json rename to fixtures/archive/home_status_error_missing_home_id.json diff --git a/fixtures/home_status_error_missing_parameters.json b/fixtures/archive/home_status_error_missing_parameters.json similarity index 100% rename from fixtures/home_status_error_missing_parameters.json rename to fixtures/archive/home_status_error_missing_parameters.json diff --git a/fixtures/home_status_error_mode_not_authorized.json b/fixtures/archive/home_status_error_mode_not_authorized.json similarity index 100% rename from fixtures/home_status_error_mode_not_authorized.json rename to fixtures/archive/home_status_error_mode_not_authorized.json diff --git a/fixtures/invalid_grant.json b/fixtures/archive/invalid_grant.json similarity index 100% rename from fixtures/invalid_grant.json rename to fixtures/archive/invalid_grant.json diff --git a/fixtures/oauth2_token.json b/fixtures/archive/oauth2_token.json similarity index 100% rename from fixtures/oauth2_token.json rename to fixtures/archive/oauth2_token.json diff --git a/fixtures/public_data_error_mongo.json b/fixtures/archive/public_data_error_mongo.json similarity index 98% rename from fixtures/public_data_error_mongo.json rename to fixtures/archive/public_data_error_mongo.json index d99e5487..16f62ec5 100644 --- a/fixtures/public_data_error_mongo.json +++ b/fixtures/archive/public_data_error_mongo.json @@ -3,4 +3,4 @@ "message": "failed to connect to server [localhost:27020] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27020]", "code": 0 } -} \ No newline at end of file +} diff --git a/fixtures/public_data_simple.json b/fixtures/archive/public_data_simple.json similarity index 100% rename from fixtures/public_data_simple.json rename to fixtures/archive/public_data_simple.json diff --git a/fixtures/thermostat_data_simple.json b/fixtures/archive/thermostat_data_simple.json similarity index 100% rename from fixtures/thermostat_data_simple.json rename to fixtures/archive/thermostat_data_simple.json diff --git a/fixtures/too_many_connections.json b/fixtures/archive/too_many_connections.json similarity index 100% rename from fixtures/too_many_connections.json rename to fixtures/archive/too_many_connections.json diff --git a/fixtures/weatherstation_data_simple.json b/fixtures/archive/weatherstation_data_simple.json similarity index 100% rename from fixtures/weatherstation_data_simple.json rename to fixtures/archive/weatherstation_data_simple.json diff --git a/fixtures/weatherstation_data_unreachable_station.json b/fixtures/archive/weatherstation_data_unreachable_station.json similarity index 100% rename from fixtures/weatherstation_data_unreachable_station.json rename to fixtures/archive/weatherstation_data_unreachable_station.json diff --git a/fixtures/weatherstation_measure.json b/fixtures/archive/weatherstation_measure.json similarity index 100% rename from fixtures/weatherstation_measure.json rename to fixtures/archive/weatherstation_measure.json diff --git a/fixtures/getstationsdata.json b/fixtures/getstationsdata.json index 822cf9dd..ba724705 100644 --- a/fixtures/getstationsdata.json +++ b/fixtures/getstationsdata.json @@ -1,652 +1,750 @@ { - "body": { - "devices": [ - { - "_id": "12:34:56:37:11:ca", - "cipher_id": "enc:16:zjiZF/q8jTScXVdDa/kvhUAIUPGeYszaD1ClEf8byAJkRjxc5oth7cAocrMUIApX", - "date_setup": 1544558432, - "last_setup": 1544558432, - "type": "NAMain", - "last_status_store": 1559413181, - "module_name": "NetatmoIndoor", - "firmware": 137, - "last_upgrade": 1544558433, - "wifi_status": 45, - "reachable": true, - "co2_calibrating": false, - "station_name": "MyStation", - "data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"], - "place": { - "altitude": 664, - "city": "Frankfurt", - "country": "DE", - "timezone": "Europe/Berlin", - "location": [52.516263, 13.377726] - }, - "dashboard_data": { - "time_utc": 1559413171, - "Temperature": 24.6, - "CO2": 749, - "Humidity": 36, - "Noise": 37, - "Pressure": 1017.3, - "AbsolutePressure": 939.7, - "min_temp": 23.4, - "max_temp": 25.6, - "date_min_temp": 1559371924, - "date_max_temp": 1559411964, - "temp_trend": "stable", - "pressure_trend": "down" + "body": { + "devices": [ + { + "_id": "12:34:56:37:11:ca", + "cipher_id": "enc:16:zjiZF/q8jTScXVdDa/kvhUAIUPGeYszaD1ClEf8byAJkRjxc5oth7cAocrMUIApX", + "date_setup": 1544558432, + "last_setup": 1544558432, + "type": "NAMain", + "last_status_store": 1559413181, + "module_name": "NetatmoIndoor", + "firmware": 137, + "last_upgrade": 1544558433, + "wifi_status": 45, + "reachable": true, + "co2_calibrating": false, + "station_name": "MyStation", + "data_type": [ + "Temperature", + "CO2", + "Humidity", + "Noise", + "Pressure" + ], + "place": { + "altitude": 664, + "city": "Frankfurt", + "country": "DE", + "timezone": "Europe/Berlin", + "location": [ + 52.516263, + 13.377726 + ] + }, + "dashboard_data": { + "time_utc": 1559413171, + "Temperature": 24.6, + "CO2": 749, + "Humidity": 36, + "Noise": 37, + "Pressure": 1017.3, + "AbsolutePressure": 939.7, + "min_temp": 23.4, + "max_temp": 25.6, + "date_min_temp": 1559371924, + "date_max_temp": 1559411964, + "temp_trend": "stable", + "pressure_trend": "down" + }, + "modules": [ + { + "_id": "12:34:56:36:fc:de", + "type": "NAModule1", + "module_name": "NetatmoOutdoor", + "data_type": [ + "Temperature", + "Humidity" + ], + "last_setup": 1544558433, + "reachable": true, + "dashboard_data": { + "time_utc": 1559413157, + "Temperature": 28.6, + "Humidity": 24, + "min_temp": 16.9, + "max_temp": 30.3, + "date_min_temp": 1559365579, + "date_max_temp": 1559404698, + "temp_trend": "down" + }, + "firmware": 46, + "last_message": 1559413177, + "last_seen": 1559413157, + "rf_status": 65, + "battery_vp": 5738, + "battery_percent": 87 }, - "modules": [ - { - "_id": "12:34:56:36:fc:de", - "type": "NAModule1", - "module_name": "NetatmoOutdoor", - "data_type": ["Temperature", "Humidity"], - "last_setup": 1544558433, - "reachable": true, - "dashboard_data": { - "time_utc": 1559413157, - "Temperature": 28.6, - "Humidity": 24, - "min_temp": 16.9, - "max_temp": 30.3, - "date_min_temp": 1559365579, - "date_max_temp": 1559404698, - "temp_trend": "down" - }, - "firmware": 46, - "last_message": 1559413177, - "last_seen": 1559413157, - "rf_status": 65, - "battery_vp": 5738, - "battery_percent": 87 + { + "_id": "12:34:56:07:bb:3e", + "type": "NAModule4", + "module_name": "Kitchen", + "data_type": [ + "Temperature", + "CO2", + "Humidity" + ], + "last_setup": 1548956696, + "reachable": true, + "dashboard_data": { + "time_utc": 1559413125, + "Temperature": 28, + "CO2": 503, + "Humidity": 26, + "min_temp": 25, + "max_temp": 28, + "date_min_temp": 1559371577, + "date_max_temp": 1559412561, + "temp_trend": "up" }, - { - "_id": "12:34:56:07:bb:3e", - "type": "NAModule4", - "module_name": "Kitchen", - "data_type": ["Temperature", "CO2", "Humidity"], - "last_setup": 1548956696, - "reachable": true, - "dashboard_data": { - "time_utc": 1559413125, - "Temperature": 28, - "CO2": 503, - "Humidity": 26, - "min_temp": 25, - "max_temp": 28, - "date_min_temp": 1559371577, - "date_max_temp": 1559412561, - "temp_trend": "up" - }, - "firmware": 44, - "last_message": 1559413177, - "last_seen": 1559413177, - "rf_status": 73, - "battery_vp": 5687, - "battery_percent": 83 + "firmware": 44, + "last_message": 1559413177, + "last_seen": 1559413177, + "rf_status": 73, + "battery_vp": 5687, + "battery_percent": 83 + }, + { + "_id": "12:34:56:07:bb:0e", + "type": "NAModule4", + "module_name": "Livingroom", + "data_type": [ + "Temperature", + "CO2", + "Humidity" + ], + "last_setup": 1548957209, + "reachable": true, + "dashboard_data": { + "time_utc": 1559413093, + "Temperature": 26.4, + "CO2": 451, + "Humidity": 31, + "min_temp": 25.1, + "max_temp": 26.4, + "date_min_temp": 1559365290, + "date_max_temp": 1559413093, + "temp_trend": "stable" }, - { - "_id": "12:34:56:07:bb:0e", - "type": "NAModule4", - "module_name": "Livingroom", - "data_type": ["Temperature", "CO2", "Humidity"], - "last_setup": 1548957209, - "reachable": true, - "dashboard_data": { - "time_utc": 1559413093, - "Temperature": 26.4, - "CO2": 451, - "Humidity": 31, - "min_temp": 25.1, - "max_temp": 26.4, - "date_min_temp": 1559365290, - "date_max_temp": 1559413093, - "temp_trend": "stable" - }, - "firmware": 44, - "last_message": 1559413177, - "last_seen": 1559413093, - "rf_status": 84, - "battery_vp": 5626, - "battery_percent": 79 + "firmware": 44, + "last_message": 1559413177, + "last_seen": 1559413093, + "rf_status": 84, + "battery_vp": 5626, + "battery_percent": 79 + }, + { + "_id": "12:34:56:03:1b:e5", + "type": "NAModule2", + "module_name": "Garden", + "data_type": [ + "Wind" + ], + "last_setup": 1549193862, + "reachable": true, + "dashboard_data": { + "time_utc": 1559413170, + "WindStrength": 4, + "WindAngle": 217, + "GustStrength": 9, + "GustAngle": 206, + "max_wind_str": 21, + "max_wind_angle": 217, + "date_max_wind_str": 1559386669 }, - { - "_id": "12:34:56:03:1b:e5", - "type": "NAModule2", - "module_name": "Garden", - "data_type": ["Wind"], - "last_setup": 1549193862, - "reachable": true, - "dashboard_data": { - "time_utc": 1559413170, - "WindStrength": 4, - "WindAngle": 217, - "GustStrength": 9, - "GustAngle": 206, - "max_wind_str": 21, - "max_wind_angle": 217, - "date_max_wind_str": 1559386669 - }, - "firmware": 19, - "last_message": 1559413177, - "last_seen": 1559413177, - "rf_status": 59, - "battery_vp": 5689, - "battery_percent": 85 + "firmware": 19, + "last_message": 1559413177, + "last_seen": 1559413177, + "rf_status": 59, + "battery_vp": 5689, + "battery_percent": 85 + }, + { + "_id": "12:34:56:05:51:20", + "type": "NAModule3", + "module_name": "Yard", + "data_type": [ + "Rain" + ], + "last_setup": 1549194580, + "reachable": true, + "dashboard_data": { + "time_utc": 1559413170, + "Rain": 0, + "sum_rain_24": 0, + "sum_rain_1": 0 }, - { - "_id": "12:34:56:05:51:20", - "type": "NAModule3", - "module_name": "Yard", - "data_type": ["Rain"], - "last_setup": 1549194580, - "reachable": true, - "dashboard_data": { - "time_utc": 1559413170, - "Rain": 0, - "sum_rain_24": 0, - "sum_rain_1": 0 - }, - "firmware": 8, - "last_message": 1559413177, - "last_seen": 1559413170, - "rf_status": 67, - "battery_vp": 5860, - "battery_percent": 93 - } + "firmware": 8, + "last_message": 1559413177, + "last_seen": 1559413170, + "rf_status": 67, + "battery_vp": 5860, + "battery_percent": 93 + } + ] + }, + { + "_id": "12 :34: 56:36:fd:3c", + "station_name": "Valley Road", + "date_setup": 1545897146, + "last_setup": 1545897146, + "type": "NAMain", + "last_status_store": 1581835369, + "firmware": 137, + "last_upgrade": 1545897125, + "wifi_status": 53, + "reachable": true, + "co2_calibrating": false, + "data_type": [ + "Temperature", + "CO2", + "Humidity", + "Noise", + "Pressure" + ], + "place": { + "altitude": 69, + "city": "Valley", + "country": "AU", + "timezone": "Australia/Hobart", + "location": [ + 148.444226, + -41.721282 ] }, - { - "_id": "12 :34: 56:36:fd:3c", - "station_name": "Valley Road", - "date_setup": 1545897146, - "last_setup": 1545897146, - "type": "NAMain", - "last_status_store": 1581835369, - "firmware": 137, - "last_upgrade": 1545897125, - "wifi_status": 53, - "reachable": true, - "co2_calibrating": false, - "data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"], - "place": { - "altitude": 69, - "city": "Valley", - "country": "AU", - "timezone": "Australia/Hobart", - "location": [148.444226, -41.721282] - }, - "read_only": true, - "dashboard_data": { - "time_utc": 1581835330, - "Temperature": 22.4, - "CO2": 471, - "Humidity": 46, - "Noise": 47, - "Pressure": 1011.5, - "AbsolutePressure": 1002.8, - "min_temp": 18.1, - "max_temp": 22.5, - "date_max_temp": 1581829891, - "date_min_temp": 1581794878, - "temp_trend": "stable", - "pressure_trend": "stable" + "read_only": true, + "dashboard_data": { + "time_utc": 1581835330, + "Temperature": 22.4, + "CO2": 471, + "Humidity": 46, + "Noise": 47, + "Pressure": 1011.5, + "AbsolutePressure": 1002.8, + "min_temp": 18.1, + "max_temp": 22.5, + "date_max_temp": 1581829891, + "date_min_temp": 1581794878, + "temp_trend": "stable", + "pressure_trend": "stable" + }, + "modules": [ + { + "_id": "12 :34: 56:36:e6:c0", + "type": "NAModule1", + "module_name": "Module", + "data_type": [ + "Temperature", + "Humidity" + ], + "last_setup": 1545897146, + "battery_percent": 22, + "reachable": false, + "firmware": 46, + "last_message": 1572497781, + "last_seen": 1572497742, + "rf_status": 88, + "battery_vp": 4118 }, - "modules": [ - { - "_id": "12 :34: 56:36:e6:c0", - "type": "NAModule1", - "module_name": "Module", - "data_type": ["Temperature", "Humidity"], - "last_setup": 1545897146, - "battery_percent": 22, - "reachable": false, - "firmware": 46, - "last_message": 1572497781, - "last_seen": 1572497742, - "rf_status": 88, - "battery_vp": 4118 - }, - { - "_id": "12:34:56:05:25:6e", - "type": "NAModule3", - "module_name": "Rain Gauge", - "data_type": ["Rain"], - "last_setup": 1553997427, - "battery_percent": 82, - "reachable": true, - "firmware": 8, - "last_message": 1581835362, - "last_seen": 1581835354, - "rf_status": 78, - "battery_vp": 5594, - "dashboard_data": { - "time_utc": 1581835329, - "Rain": 0, - "sum_rain_1": 0, - "sum_rain_24": 0 - } + { + "_id": "12:34:56:05:25:6e", + "type": "NAModule3", + "module_name": "Rain Gauge", + "data_type": [ + "Rain" + ], + "last_setup": 1553997427, + "battery_percent": 82, + "reachable": true, + "firmware": 8, + "last_message": 1581835362, + "last_seen": 1581835354, + "rf_status": 78, + "battery_vp": 5594, + "dashboard_data": { + "time_utc": 1581835329, + "Rain": 0, + "sum_rain_1": 0, + "sum_rain_24": 0 } + } + ] + }, + { + "_id": "12:34:56:32:a7:60", + "home_name": "Ateljen", + "date_setup": 1566714693, + "last_setup": 1566714693, + "type": "NAMain", + "last_status_store": 1588481079, + "module_name": "Indoor", + "firmware": 177, + "last_upgrade": 1566714694, + "wifi_status": 50, + "reachable": true, + "co2_calibrating": false, + "data_type": [ + "Temperature", + "CO2", + "Humidity", + "Noise", + "Pressure" + ], + "place": { + "altitude": 93, + "city": "Gothenburg", + "country": "SE", + "timezone": "Europe/Stockholm", + "location": [ + 11.6136629, + 57.7006827 ] }, - { - "_id": "12:34:56:32:a7:60", - "home_name": "Ateljen", - "date_setup": 1566714693, - "last_setup": 1566714693, - "type": "NAMain", - "last_status_store": 1588481079, - "module_name": "Indoor", - "firmware": 177, - "last_upgrade": 1566714694, - "wifi_status": 50, - "reachable": true, - "co2_calibrating": false, - "data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"], - "place": { - "altitude": 93, - "city": "Gothenburg", - "country": "SE", - "timezone": "Europe/Stockholm", - "location": [11.6136629, 57.7006827] - }, - "dashboard_data": { - "time_utc": 1588481073, - "Temperature": 18.2, - "CO2": 542, - "Humidity": 45, - "Noise": 45, - "Pressure": 1013, - "AbsolutePressure": 1001.9, - "min_temp": 18.2, - "max_temp": 19.5, - "date_max_temp": 1588456861, - "date_min_temp": 1588479561, - "temp_trend": "stable", - "pressure_trend": "up" - }, - "modules": [ - { - "_id": "12:34:56:32:db:06", - "type": "NAModule1", - "last_setup": 1587635819, - "data_type": ["Temperature", "Humidity"], - "battery_percent": 100, - "reachable": false, - "firmware": 255, - "last_message": 0, - "last_seen": 0, - "rf_status": 255, - "battery_vp": 65535 - } + "dashboard_data": { + "time_utc": 1588481073, + "Temperature": 18.2, + "CO2": 542, + "Humidity": 45, + "Noise": 45, + "Pressure": 1013, + "AbsolutePressure": 1001.9, + "min_temp": 18.2, + "max_temp": 19.5, + "date_max_temp": 1588456861, + "date_min_temp": 1588479561, + "temp_trend": "stable", + "pressure_trend": "up" + }, + "modules": [ + { + "_id": "12:34:56:32:db:06", + "type": "NAModule1", + "last_setup": 1587635819, + "data_type": [ + "Temperature", + "Humidity" + ], + "battery_percent": 100, + "reachable": false, + "firmware": 255, + "last_message": 0, + "last_seen": 0, + "rf_status": 255, + "battery_vp": 65535 + } + ] + }, + { + "_id": "12:34:56:1c:68:2e", + "station_name": "Bol\u00e5s", + "date_setup": 1470935400, + "last_setup": 1470935400, + "type": "NAMain", + "last_status_store": 1588481399, + "module_name": "Inne - Nere", + "firmware": 177, + "last_upgrade": 1470935401, + "wifi_status": 13, + "reachable": true, + "co2_calibrating": false, + "data_type": [ + "Temperature", + "CO2", + "Humidity", + "Noise", + "Pressure" + ], + "place": { + "altitude": 93, + "city": "Gothenburg", + "country": "SE", + "timezone": "Europe/Stockholm", + "location": [ + 11.6136629, + 57.7006827 ] }, - { - "_id": "12:34:56:1c:68:2e", - "station_name": "Bol\u00e5s", - "date_setup": 1470935400, - "last_setup": 1470935400, - "type": "NAMain", - "last_status_store": 1588481399, - "module_name": "Inne - Nere", - "firmware": 177, - "last_upgrade": 1470935401, - "wifi_status": 13, - "reachable": true, - "co2_calibrating": false, - "data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"], - "place": { - "altitude": 93, - "city": "Gothenburg", - "country": "SE", - "timezone": "Europe/Stockholm", - "location": [11.6136629, 57.7006827] + "dashboard_data": { + "time_utc": 1588481387, + "Temperature": 20.8, + "CO2": 674, + "Humidity": 41, + "Noise": 34, + "Pressure": 1012.1, + "AbsolutePressure": 1001, + "min_temp": 20.8, + "max_temp": 22.2, + "date_max_temp": 1588456859, + "date_min_temp": 1588480176, + "temp_trend": "stable", + "pressure_trend": "up" + }, + "modules": [ + { + "_id": "12:34:56:02:b3:da", + "type": "NAModule3", + "module_name": "Regnm\u00e4tare", + "last_setup": 1470937706, + "data_type": [ + "Rain" + ], + "battery_percent": 81, + "reachable": true, + "firmware": 12, + "last_message": 1588481393, + "last_seen": 1588481386, + "rf_status": 67, + "battery_vp": 5582, + "dashboard_data": { + "time_utc": 1588481386, + "Rain": 0, + "sum_rain_1": 0, + "sum_rain_24": 0.1 + } }, - "dashboard_data": { - "time_utc": 1588481387, - "Temperature": 20.8, - "CO2": 674, - "Humidity": 41, - "Noise": 34, - "Pressure": 1012.1, - "AbsolutePressure": 1001, - "min_temp": 20.8, - "max_temp": 22.2, - "date_max_temp": 1588456859, - "date_min_temp": 1588480176, - "temp_trend": "stable", - "pressure_trend": "up" + { + "_id": "12:34:56:03:76:60", + "type": "NAModule4", + "module_name": "Inne - Uppe", + "last_setup": 1470938089, + "data_type": [ + "Temperature", + "CO2", + "Humidity" + ], + "battery_percent": 14, + "reachable": true, + "firmware": 50, + "last_message": 1588481393, + "last_seen": 1588481374, + "rf_status": 70, + "battery_vp": 4448, + "dashboard_data": { + "time_utc": 1588481374, + "Temperature": 19.6, + "CO2": 696, + "Humidity": 41, + "min_temp": 19.6, + "max_temp": 20.5, + "date_max_temp": 1588456817, + "date_min_temp": 1588481374, + "temp_trend": "stable" + } }, - "modules": [ - { - "_id": "12:34:56:02:b3:da", - "type": "NAModule3", - "module_name": "Regnm\u00e4tare", - "last_setup": 1470937706, - "data_type": ["Rain"], - "battery_percent": 81, - "reachable": true, - "firmware": 12, - "last_message": 1588481393, - "last_seen": 1588481386, - "rf_status": 67, - "battery_vp": 5582, - "dashboard_data": { - "time_utc": 1588481386, - "Rain": 0, - "sum_rain_1": 0, - "sum_rain_24": 0.1 - } - }, - { - "_id": "12:34:56:03:76:60", - "type": "NAModule4", - "module_name": "Inne - Uppe", - "last_setup": 1470938089, - "data_type": ["Temperature", "CO2", "Humidity"], - "battery_percent": 14, - "reachable": true, - "firmware": 50, - "last_message": 1588481393, - "last_seen": 1588481374, - "rf_status": 70, - "battery_vp": 4448, - "dashboard_data": { - "time_utc": 1588481374, - "Temperature": 19.6, - "CO2": 696, - "Humidity": 41, - "min_temp": 19.6, - "max_temp": 20.5, - "date_max_temp": 1588456817, - "date_min_temp": 1588481374, - "temp_trend": "stable" - } - }, - { - "_id": "12:34:56:32:db:06", - "type": "NAModule1", - "module_name": "Ute", - "last_setup": 1566326027, - "data_type": ["Temperature", "Humidity"], - "battery_percent": 81, - "reachable": true, - "firmware": 50, - "last_message": 1588481393, - "last_seen": 1588481380, - "rf_status": 61, - "battery_vp": 5544, - "dashboard_data": { - "time_utc": 1588481380, - "Temperature": 6.4, - "Humidity": 91, - "min_temp": 3.6, - "max_temp": 6.4, - "date_max_temp": 1588481380, - "date_min_temp": 1588471383, - "temp_trend": "up" - } + { + "_id": "12:34:56:32:db:06", + "type": "NAModule1", + "module_name": "Ute", + "last_setup": 1566326027, + "data_type": [ + "Temperature", + "Humidity" + ], + "battery_percent": 81, + "reachable": true, + "firmware": 50, + "last_message": 1588481393, + "last_seen": 1588481380, + "rf_status": 61, + "battery_vp": 5544, + "dashboard_data": { + "time_utc": 1588481380, + "Temperature": 6.4, + "Humidity": 91, + "min_temp": 3.6, + "max_temp": 6.4, + "date_max_temp": 1588481380, + "date_min_temp": 1588471383, + "temp_trend": "up" } + } + ] + }, + { + "_id": "12:34:56:1d:68:2e", + "date_setup": 1470935500, + "last_setup": 1470935500, + "type": "NAMain", + "last_status_store": 1588481399, + "module_name": "Basisstation", + "firmware": 177, + "last_upgrade": 1470935401, + "wifi_status": 13, + "reachable": true, + "co2_calibrating": false, + "data_type": [ + "Temperature", + "CO2", + "Humidity", + "Noise", + "Pressure" + ], + "place": { + "altitude": 93, + "city": "Gothenburg", + "country": "SE", + "timezone": "Europe/Stockholm", + "location": [ + 11.6136629, + 57.7006827 ] }, - { - "_id": "12:34:56:1d:68:2e", - "date_setup": 1470935500, - "last_setup": 1470935500, - "type": "NAMain", - "last_status_store": 1588481399, - "module_name": "Basisstation", - "firmware": 177, - "last_upgrade": 1470935401, - "wifi_status": 13, - "reachable": true, - "co2_calibrating": false, - "data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"], - "place": { - "altitude": 93, - "city": "Gothenburg", - "country": "SE", - "timezone": "Europe/Stockholm", - "location": [11.6136629, 57.7006827] + "dashboard_data": { + "time_utc": 1588481387, + "Temperature": 20.8, + "CO2": 674, + "Humidity": 41, + "Noise": 34, + "Pressure": 1012.1, + "AbsolutePressure": 1001, + "min_temp": 20.8, + "max_temp": 22.2, + "date_max_temp": 1588456859, + "date_min_temp": 1588480176, + "temp_trend": "stable", + "pressure_trend": "up" + }, + "modules": [] + }, + { + "_id": "12:34:56:80:bb:26", + "station_name": "MYHOME (Palier)", + "date_setup": 1558709904, + "last_setup": 1558709904, + "type": "NAMain", + "last_status_store": 1644582700, + "module_name": "Palier", + "firmware": 181, + "last_upgrade": 1558709906, + "wifi_status": 57, + "reachable": true, + "co2_calibrating": false, + "data_type": [ + "Temperature", + "CO2", + "Humidity", + "Noise", + "Pressure" + ], + "place": { + "altitude": 329, + "city": "Someplace", + "country": "FR", + "timezone": "Europe/Paris", + "location": [ + 6.1234567, + 46.123456 + ] + }, + "home_id": "91763b24c43d3e344f424e8b", + "home_name": "MYHOME", + "dashboard_data": { + "time_utc": 1644582694, + "Temperature": 21.1, + "CO2": 1339, + "Humidity": 45, + "Noise": 35, + "Pressure": 1026.8, + "AbsolutePressure": 974.5, + "min_temp": 21, + "max_temp": 21.8, + "date_max_temp": 1644534255, + "date_min_temp": 1644550420, + "temp_trend": "stable", + "pressure_trend": "up" + }, + "modules": [ + { + "_id": "12:34:56:80:1c:42", + "type": "NAModule1", + "module_name": "Outdoor", + "last_setup": 1558709954, + "data_type": [ + "Temperature", + "Humidity" + ], + "battery_percent": 27, + "reachable": false, + "firmware": 50, + "last_message": 1644582699, + "last_seen": 1644582699, + "rf_status": 68, + "battery_vp": 4678 }, - "dashboard_data": { - "time_utc": 1588481387, - "Temperature": 20.8, - "CO2": 674, - "Humidity": 41, - "Noise": 34, - "Pressure": 1012.1, - "AbsolutePressure": 1001, - "min_temp": 20.8, - "max_temp": 22.2, - "date_max_temp": 1588456859, - "date_min_temp": 1588480176, - "temp_trend": "stable", - "pressure_trend": "up" + { + "_id": "12:34:56:80:c1:ea", + "type": "NAModule3", + "module_name": "Rain", + "last_setup": 1563734531, + "data_type": [ + "Rain" + ], + "battery_percent": 21, + "reachable": true, + "firmware": 12, + "last_message": 1644582699, + "last_seen": 1644582699, + "rf_status": 79, + "battery_vp": 4256, + "dashboard_data": { + "time_utc": 1644582686, + "Rain": 3.7, + "sum_rain_1": 0, + "sum_rain_24": 6.9 + } }, - "modules": [] - }, - { - "_id": "12:34:56:80:bb:26", - "station_name": "MYHOME (Palier)", - "date_setup": 1558709904, - "last_setup": 1558709904, - "type": "NAMain", - "last_status_store": 1644582700, - "module_name": "Palier", - "firmware": 181, - "last_upgrade": 1558709906, - "wifi_status": 57, - "reachable": true, - "co2_calibrating": false, - "data_type": ["Temperature", "CO2", "Humidity", "Noise", "Pressure"], - "place": { - "altitude": 329, - "city": "Someplace", - "country": "FR", - "timezone": "Europe/Paris", - "location": [6.1234567, 46.123456] + { + "_id": "12:34:56:80:44:92", + "type": "NAModule4", + "module_name": "Bedroom", + "last_setup": 1575915890, + "data_type": [ + "Temperature", + "CO2", + "Humidity" + ], + "battery_percent": 28, + "reachable": true, + "firmware": 51, + "last_message": 1644582699, + "last_seen": 1644582654, + "rf_status": 67, + "battery_vp": 4695, + "dashboard_data": { + "time_utc": 1644582654, + "Temperature": 19.3, + "CO2": 1076, + "Humidity": 53, + "min_temp": 19.2, + "max_temp": 19.7, + "date_max_temp": 1644534243, + "date_min_temp": 1644553418, + "temp_trend": "stable" + } }, - "home_id": "91763b24c43d3e344f424e8b", - "home_name": "MYHOME", - "dashboard_data": { - "time_utc": 1644582694, - "Temperature": 21.1, - "CO2": 1339, - "Humidity": 45, - "Noise": 35, - "Pressure": 1026.8, - "AbsolutePressure": 974.5, - "min_temp": 21, - "max_temp": 21.8, - "date_max_temp": 1644534255, - "date_min_temp": 1644550420, - "temp_trend": "stable", - "pressure_trend": "up" + { + "_id": "12:34:56:80:7e:18", + "type": "NAModule4", + "module_name": "Bathroom", + "last_setup": 1575915955, + "data_type": [ + "Temperature", + "CO2", + "Humidity" + ], + "battery_percent": 55, + "reachable": true, + "firmware": 51, + "last_message": 1644582699, + "last_seen": 1644582654, + "rf_status": 59, + "battery_vp": 5184, + "dashboard_data": { + "time_utc": 1644582654, + "Temperature": 19.4, + "CO2": 1930, + "Humidity": 55, + "min_temp": 19.4, + "max_temp": 21.8, + "date_max_temp": 1644534224, + "date_min_temp": 1644582039, + "temp_trend": "stable" + } }, - "modules": [ - { - "_id": "12:34:56:80:1c:42", - "type": "NAModule1", - "module_name": "Outdoor", - "last_setup": 1558709954, - "data_type": ["Temperature", "Humidity"], - "battery_percent": 27, - "reachable": true, - "firmware": 50, - "last_message": 1644582699, - "last_seen": 1644582699, - "rf_status": 68, - "battery_vp": 4678, - "dashboard_data": { - "time_utc": 1644582648, - "Temperature": 9.4, - "Humidity": 57, - "min_temp": 6.7, - "max_temp": 9.8, - "date_max_temp": 1644534223, - "date_min_temp": 1644569369, - "temp_trend": "up" - } - }, - { - "_id": "12:34:56:80:c1:ea", - "type": "NAModule3", - "module_name": "Rain", - "last_setup": 1563734531, - "data_type": ["Rain"], - "battery_percent": 21, - "reachable": true, - "firmware": 12, - "last_message": 1644582699, - "last_seen": 1644582699, - "rf_status": 79, - "battery_vp": 4256, - "dashboard_data": { - "time_utc": 1644582686, - "Rain": 3.7, - "sum_rain_1": 0, - "sum_rain_24": 6.9 - } + { + "_id": "12:34:56:03:1b:e4", + "type": "NAModule2", + "module_name": "Garden", + "data_type": [ + "Wind" + ], + "last_setup": 1549193862, + "reachable": true, + "dashboard_data": { + "time_utc": 1559413170, + "WindStrength": 4, + "WindAngle": 217, + "GustStrength": 9, + "GustAngle": 206, + "max_wind_str": 21, + "max_wind_angle": 217, + "date_max_wind_str": 1559386669 }, - { - "_id": "12:34:56:80:44:92", - "type": "NAModule4", - "module_name": "Bedroom", - "last_setup": 1575915890, - "data_type": ["Temperature", "CO2", "Humidity"], - "battery_percent": 28, - "reachable": true, - "firmware": 51, - "last_message": 1644582699, - "last_seen": 1644582654, - "rf_status": 67, - "battery_vp": 4695, - "dashboard_data": { - "time_utc": 1644582654, - "Temperature": 19.3, - "CO2": 1076, - "Humidity": 53, - "min_temp": 19.2, - "max_temp": 19.7, - "date_max_temp": 1644534243, - "date_min_temp": 1644553418, - "temp_trend": "stable" - } - }, - { - "_id": "12:34:56:80:7e:18", - "type": "NAModule4", - "module_name": "Bathroom", - "last_setup": 1575915955, - "data_type": ["Temperature", "CO2", "Humidity"], - "battery_percent": 55, - "reachable": true, - "firmware": 51, - "last_message": 1644582699, - "last_seen": 1644582654, - "rf_status": 59, - "battery_vp": 5184, - "dashboard_data": { - "time_utc": 1644582654, - "Temperature": 19.4, - "CO2": 1930, - "Humidity": 55, - "min_temp": 19.4, - "max_temp": 21.8, - "date_max_temp": 1644534224, - "date_min_temp": 1644582039, - "temp_trend": "stable" - } - }, - { - "_id": "12:34:56:03:1b:e4", - "type": "NAModule2", - "module_name": "Garden", - "data_type": ["Wind"], - "last_setup": 1549193862, - "reachable": true, - "dashboard_data": { - "time_utc": 1559413170, - "WindStrength": 4, - "WindAngle": 217, - "GustStrength": 9, - "GustAngle": 206, - "max_wind_str": 21, - "max_wind_angle": 217, - "date_max_wind_str": 1559386669 - }, - "firmware": 19, - "last_message": 1559413177, - "last_seen": 1559413177, - "rf_status": 59, - "battery_vp": 5689, - "battery_percent": 85 - } + "firmware": 19, + "last_message": 1559413177, + "last_seen": 1559413177, + "rf_status": 59, + "battery_vp": 5689, + "battery_percent": 85 + } + ] + }, + { + "_id": "00:11:22:2c:be:c8", + "station_name": "Zuhause (Kinderzimmer)", + "type": "NAMain", + "last_status_store": 1649146022, + "reachable": true, + "favorite": true, + "data_type": [ + "Pressure" + ], + "place": { + "altitude": 127, + "city": "Wiesbaden", + "country": "DE", + "timezone": "Europe/Berlin", + "location": [ + 8.238054275512695, + 50.07585525512695 ] }, - { - "_id": "00:11:22:2c:be:c8", - "station_name": "Zuhause (Kinderzimmer)", - "type": "NAMain", - "last_status_store": 1649146022, - "reachable": true, - "favorite": true, - "data_type": ["Pressure"], - "place": { - "altitude": 127, - "city": "Wiesbaden", - "country": "DE", - "timezone": "Europe/Berlin", - "location": [8.238054275512695, 50.07585525512695] - }, - "read_only": true, - "dashboard_data": { - "time_utc": 1649146022, - "Pressure": 1015.6, - "AbsolutePressure": 1000.4, - "pressure_trend": "stable" - }, - "modules": [ - { - "_id": "00:11:22:2c:ce:b6", - "type": "NAModule1", - "data_type": ["Temperature", "Humidity"], - "reachable": true, - "last_message": 1649146022, - "last_seen": 1649145996, - "dashboard_data": { - "time_utc": 1649145996, - "Temperature": 7.8, - "Humidity": 87, - "min_temp": 6.5, - "max_temp": 7.8, - "date_max_temp": 1649145996, - "date_min_temp": 1649118465, - "temp_trend": "up" - } + "read_only": true, + "dashboard_data": { + "time_utc": 1649146022, + "Pressure": 1015.6, + "AbsolutePressure": 1000.4, + "pressure_trend": "stable" + }, + "modules": [ + { + "_id": "00:11:22:2c:ce:b6", + "type": "NAModule1", + "data_type": [ + "Temperature", + "Humidity" + ], + "reachable": true, + "last_message": 1649146022, + "last_seen": 1649145996, + "dashboard_data": { + "time_utc": 1649145996, + "Temperature": 7.8, + "Humidity": 87, + "min_temp": 6.5, + "max_temp": 7.8, + "date_max_temp": 1649145996, + "date_min_temp": 1649118465, + "temp_trend": "up" } - ] - } - ], - "user": { - "mail": "john@doe.com", - "administrative": { - "lang": "de-DE", - "reg_locale": "de-DE", - "country": "DE", - "unit": 0, - "windunit": 0, - "pressureunit": 0, - "feel_like_algo": 0 - } + } + ] + } + ], + "user": { + "mail": "john@doe.com", + "administrative": { + "lang": "de-DE", + "reg_locale": "de-DE", + "country": "DE", + "unit": 0, + "windunit": 0, + "pressureunit": 0, + "feel_like_algo": 0 } - }, - "status": "ok", - "time_exec": 0.91107702255249, - "time_server": 1559413602 - } - \ No newline at end of file + } + }, + "status": "ok", + "time_exec": 0.91107702255249, + "time_server": 1559413602 +} diff --git a/fixtures/homestatus_91763b24c43d3e344f424e8b.json b/fixtures/homestatus_91763b24c43d3e344f424e8b.json index 89157757..330d4452 100644 --- a/fixtures/homestatus_91763b24c43d3e344f424e8b.json +++ b/fixtures/homestatus_91763b24c43d3e344f424e8b.json @@ -1,361 +1,390 @@ { - "status": "ok", - "time_server": 1559292039, - "body": { - "home": { - "modules": [ - { - "id": "12:34:56:00:f1:62", - "type": "NACamera", - "monitoring": "on", - "sd_status": 4, - "alim_status": 2, - "locked": false, - "vpn_url": "https://prodvpn-eu-2.netatmo.net/restricted/10.255.123.45/609e27de5699fb18147ab47d06846631/MTRPn_BeWCav5RBq4U1OMDruTW4dkQ0NuMwNDAw11g,,", - "is_local": true - }, - { - "id": "12:34:56:00:fa:d0", - "type": "NAPlug", - "firmware_revision": 174, - "rf_strength": 107, - "wifi_strength": 42 - }, - { - "id": "12:34:56:00:01:ae", - "reachable": true, - "type": "NATherm1", - "firmware_revision": 65, - "rf_strength": 58, - "battery_level": 3793, - "boiler_valve_comfort_boost": false, - "boiler_status": false, - "anticipating": false, - "bridge": "12:34:56:00:fa:d0", - "battery_state": "high" - }, - { - "id": "12:34:56:03:a5:54", - "reachable": true, - "type": "NRV", - "firmware_revision": 79, - "rf_strength": 51, - "battery_level": 3025, - "bridge": "12:34:56:00:fa:d0", - "battery_state": "full" - }, - { - "id": "12:34:56:03:a0:ac", - "reachable": true, - "type": "NRV", - "firmware_revision": 79, - "rf_strength": 59, - "battery_level": 3029, - "bridge": "12:34:56:00:fa:d0", - "battery_state": "full" - }, - { - "type": "NDB", - "last_ftp_event": { - "type": 3, - "time": 1631444443, - "id": 3 - }, - "id": "12:34:56:10:f1:66", - "websocket_connected": true, - "vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.40/1111111111111/2222222222222,,", - "is_local": false, - "alim_status": 2, - "connection": "wifi", - "firmware_name": "2.18.0", - "firmware_revision": 2018000, - "homekit_status": "configured", - "max_peers_reached": false, - "sd_status": 4, - "wifi_strength": 66, - "wifi_state": "medium" - }, - { - "type": "NOC", - "firmware_revision": 3002000, - "monitoring": "on", - "sd_status": 4, - "connection": "wifi", - "homekit_status": "upgradable", - "floodlight": "auto", - "timelapse_available": true, - "id": "12:34:56:10:b9:0e", - "vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.41/333333333333/444444444444,,", - "is_local": false, - "network_lock": false, - "firmware_name": "3.2.0", - "wifi_strength": 62, - "alim_status": 2, - "locked": false, - "wifi_state": "high" - }, - { - "boiler_control": "onoff", - "dhw_control": "none", - "firmware_revision": 22, - "hardware_version": 222, - "id": "12:34:56:20:f5:44", - "outdoor_temperature": 8.2, - "sequence_id": 19764, - "type": "OTH", - "wifi_strength": 57 - }, - { - "battery_level": 4176, - "boiler_status": false, - "boiler_valve_comfort_boost": false, - "firmware_revision": 6, - "id": "12:34:56:20:f5:8c", - "last_message": 1637684297, - "last_seen": 1637684297, - "radio_id": 2, - "reachable": true, - "rf_strength": 64, - "type": "OTM", - "bridge": "12:34:56:20:f5:44", - "battery_state": "full" - }, - { - "id": "12:34:56:30:d5:d4", - "type": "NBG", - "firmware_revision": 39, - "wifi_strength": 65, - "reachable": true - }, - { - "id": "0009999992", - "type": "NBR", - "current_position": 0, - "target_position": 0, - "target_position_step": 100, - "firmware_revision": 16, - "rf_strength": 0, - "last_seen": 1638353156, - "reachable": true, - "bridge": "12:34:56:30:d5:d4" - }, - { - "id": "0009999993", - "type": "NBO", - "current_position": 0, - "target_position": 0, - "target_position:step": 100, - "firmware_revision": 22, - "rf_strength": 0, - "last_seen": 1671395511, - "reachable": true, - "bridge": "12:34:56:30:d5:d4" - }, - { - "id": "12:34:56:00:86:99", - "type": "NACamDoorTag", - "battery_state": "high", - "battery_level": 5240, - "firmware_revision": 58, - "rf_state": "full", - "rf_strength": 58, - "last_seen": 1642698124, - "last_activity": 1627757310, - "reachable": false, - "bridge": "12:34:56:00:f1:62", - "status": "no_news" - }, - { - "id": "12:34:56:00:e3:9b", - "type": "NIS", - "battery_state": "low", - "battery_level": 5438, - "firmware_revision": 209, - "rf_state": "medium", - "rf_strength": 62, - "last_seen": 1644569790, - "reachable": true, - "bridge": "12:34:56:00:f1:62", - "status": "no_sound", - "monitoring": "off" - }, - { - "id": "12:34:56:80:60:40", - "type": "NLG", - "offload": false, - "firmware_revision": 211, - "last_seen": 1644567372, - "wifi_strength": 51, - "reachable": true - }, - { - "id": "12:34:56:80:00:12:ac:f2", - "type": "NLP", - "on": true, - "offload": false, - "firmware_revision": 62, - "last_seen": 1644569425, - "power": 0, - "reachable": true, - "bridge": "12:34:56:80:60:40" - }, - { - "id": "12:34:56:80:00:c3:69:3c", - "type": "NLT", - "battery_state": "full", - "battery_level": 3300, - "firmware_revision": 42, - "last_seen": 0, - "reachable": false, - "bridge": "12:34:56:80:60:40" - }, - { - "id": "12:34:56:00:16:0e", - "type": "NLE", - "firmware_revision": 14, - "wifi_strength": 38 - }, - { - "id": "12:34:56:00:16:0e#0", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#1", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#2", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#3", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#4", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#5", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#6", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#7", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:16:0e#8", - "type": "NLE", - "bridge": "12:34:56:00:16:0e" - }, - { - "id": "12:34:56:00:00:a1:4c:da", - "type": "NLPC", - "firmware_revision": 62, - "last_seen": 1646511241, - "power": 476, - "reachable": true, - "bridge": "12:34:56:80:60:40" - }, - { - "id": "10:20:30:bd:b8:1e", - "type": "BNS", - "firmware_revision": 32, - "wifi_strength": 49, - "boiler_valve_comfort_boost": false, - "boiler_status": true, - "cooler_status": false - }, - { - "id": "00:11:22:33:00:11:45:fe", - "type": "NLF", - "on": false, - "brightness": 63, - "firmware_revision": 57, - "last_seen": 1657086939, - "power": 0, - "reachable": true, - "bridge": "12:34:56:80:60:40" - } - ], - "rooms": [ - { - "id": "2746182631", - "reachable": true, - "therm_measured_temperature": 19.8, - "therm_setpoint_temperature": 12, - "therm_setpoint_mode": "away", - "therm_setpoint_start_time": 1559229567, - "therm_setpoint_end_time": 0 - }, - { - "id": "2940411577", - "reachable": true, - "therm_measured_temperature": 27, - "heating_power_request": 0, - "therm_setpoint_temperature": 7, - "therm_setpoint_mode": "hg", - "therm_setpoint_start_time": 0, - "therm_setpoint_end_time": 0, - "anticipating": false, - "open_window": false - }, - { - "id": "2833524037", - "reachable": true, - "therm_measured_temperature": 24.5, - "heating_power_request": 0, - "therm_setpoint_temperature": 7, - "therm_setpoint_mode": "hg", - "therm_setpoint_start_time": 0, - "therm_setpoint_end_time": 0, - "anticipating": false, - "open_window": false - }, - { - "id": "1002003001", - "reachable": true, - "anticipating": false, - "heating_power_request": 0, - "open_window": false, - "humidity": 67, - "therm_measured_temperature": 22, - "therm_setpoint_temperature": 22, - "therm_setpoint_start_time": 1647462737, - "therm_setpoint_end_time": null, - "therm_setpoint_mode": "home" - } - ], - "id": "91763b24c43d3e344f424e8b", - "persons": [ - { - "id": "91827374-7e04-5298-83ad-a0cb8372dff1", - "last_seen": 1557071156, - "out_of_sight": true - }, - { - "id": "91827375-7e04-5298-83ae-a0cb8372dff2", - "last_seen": 1559282761, - "out_of_sight": false - }, - { - "id": "91827376-7e04-5298-83af-a0cb8372dff3", - "last_seen": 1559224132, - "out_of_sight": true - } - ] - } + "status": "ok", + "time_server": 1559292039, + "body": { + "home": { + "modules": [ + { + "id": "12:34:56:80:bb:26", + "type": "NAMain", + "firmware_revision": 202, + "wifi_state": "full", + "wifi_strength": 45, + "ts": 1702884705, + "temperature": 18.9, + "co2": 498, + "humidity": 33, + "noise": 47, + "pressure": 1034.8, + "absolute_pressure": 956.1 + }, + { + "id": "12:34:56:80:1c:42", + "type": "NAModule1", + "battery_state": "full", + "battery_level": 6690, + "firmware_revision": 53, + "rf_state": "full", + "rf_strength": 42, + "last_seen": 1702884800, + "reachable": true, + "bridge": "70:ee:50:37:11:ca", + "ts": 1702884697, + "temperature": 5.8, + "humidity": 65 + }, + { + "id": "12:34:56:00:f1:62", + "type": "NACamera", + "monitoring": "on", + "sd_status": 4, + "alim_status": 2, + "locked": false, + "vpn_url": "https://prodvpn-eu-2.netatmo.net/restricted/10.255.123.45/609e27de5699fb18147ab47d06846631/MTRPn_BeWCav5RBq4U1OMDruTW4dkQ0NuMwNDAw11g,,", + "is_local": true + }, + { + "id": "12:34:56:00:fa:d0", + "type": "NAPlug", + "firmware_revision": 174, + "rf_strength": 107, + "wifi_strength": 42 + }, + { + "id": "12:34:56:00:01:ae", + "reachable": true, + "type": "NATherm1", + "firmware_revision": 65, + "rf_strength": 58, + "battery_level": 3793, + "boiler_valve_comfort_boost": false, + "boiler_status": false, + "anticipating": false, + "bridge": "12:34:56:00:fa:d0", + "battery_state": "high" + }, + { + "id": "12:34:56:03:a5:54", + "reachable": true, + "type": "NRV", + "firmware_revision": 79, + "rf_strength": 51, + "battery_level": 3025, + "bridge": "12:34:56:00:fa:d0", + "battery_state": "full" + }, + { + "id": "12:34:56:03:a0:ac", + "reachable": true, + "type": "NRV", + "firmware_revision": 79, + "rf_strength": 59, + "battery_level": 3029, + "bridge": "12:34:56:00:fa:d0", + "battery_state": "full" + }, + { + "type": "NDB", + "last_ftp_event": { + "type": 3, + "time": 1631444443, + "id": 3 + }, + "id": "12:34:56:10:f1:66", + "websocket_connected": true, + "vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.40/1111111111111/2222222222222,,", + "is_local": false, + "alim_status": 2, + "connection": "wifi", + "firmware_name": "2.18.0", + "firmware_revision": 2018000, + "homekit_status": "configured", + "max_peers_reached": false, + "sd_status": 4, + "wifi_strength": 66, + "wifi_state": "medium" + }, + { + "type": "NOC", + "firmware_revision": 3002000, + "monitoring": "on", + "sd_status": 4, + "connection": "wifi", + "homekit_status": "upgradable", + "floodlight": "auto", + "timelapse_available": true, + "id": "12:34:56:10:b9:0e", + "vpn_url": "https://prodvpn-eu-6.netatmo.net/10.20.30.41/333333333333/444444444444,,", + "is_local": false, + "network_lock": false, + "firmware_name": "3.2.0", + "wifi_strength": 62, + "alim_status": 2, + "locked": false, + "wifi_state": "high" + }, + { + "boiler_control": "onoff", + "dhw_control": "none", + "firmware_revision": 22, + "hardware_version": 222, + "id": "12:34:56:20:f5:44", + "outdoor_temperature": 8.2, + "sequence_id": 19764, + "type": "OTH", + "wifi_strength": 57 + }, + { + "battery_level": 4176, + "boiler_status": false, + "boiler_valve_comfort_boost": false, + "firmware_revision": 6, + "id": "12:34:56:20:f5:8c", + "last_message": 1637684297, + "last_seen": 1637684297, + "radio_id": 2, + "reachable": true, + "rf_strength": 64, + "type": "OTM", + "bridge": "12:34:56:20:f5:44", + "battery_state": "full" + }, + { + "id": "12:34:56:30:d5:d4", + "type": "NBG", + "firmware_revision": 39, + "wifi_strength": 65, + "reachable": true + }, + { + "id": "0009999992", + "type": "NBR", + "current_position": 0, + "target_position": 0, + "target_position_step": 100, + "firmware_revision": 16, + "rf_strength": 0, + "last_seen": 1638353156, + "reachable": true, + "bridge": "12:34:56:30:d5:d4" + }, + { + "id": "0009999993", + "type": "NBO", + "current_position": 0, + "target_position": 0, + "target_position:step": 100, + "firmware_revision": 22, + "rf_strength": 0, + "last_seen": 1671395511, + "reachable": true, + "bridge": "12:34:56:30:d5:d4" + }, + { + "id": "12:34:56:00:86:99", + "type": "NACamDoorTag", + "battery_state": "high", + "battery_level": 5240, + "firmware_revision": 58, + "rf_state": "full", + "rf_strength": 58, + "last_seen": 1642698124, + "last_activity": 1627757310, + "reachable": false, + "bridge": "12:34:56:00:f1:62", + "status": "no_news" + }, + { + "id": "12:34:56:00:e3:9b", + "type": "NIS", + "battery_state": "low", + "battery_level": 5438, + "firmware_revision": 209, + "rf_state": "medium", + "rf_strength": 62, + "last_seen": 1644569790, + "reachable": true, + "bridge": "12:34:56:00:f1:62", + "status": "no_sound", + "monitoring": "off" + }, + { + "id": "12:34:56:80:60:40", + "type": "NLG", + "offload": false, + "firmware_revision": 211, + "last_seen": 1644567372, + "wifi_strength": 51, + "reachable": true + }, + { + "id": "12:34:56:80:00:12:ac:f2", + "type": "NLP", + "on": true, + "offload": false, + "firmware_revision": 62, + "last_seen": 1644569425, + "power": 0, + "reachable": true, + "bridge": "12:34:56:80:60:40" + }, + { + "id": "12:34:56:80:00:c3:69:3c", + "type": "NLT", + "battery_state": "full", + "battery_level": 3300, + "firmware_revision": 42, + "last_seen": 0, + "reachable": false, + "bridge": "12:34:56:80:60:40" + }, + { + "id": "12:34:56:00:16:0e", + "type": "NLE", + "firmware_revision": 14, + "wifi_strength": 38 + }, + { + "id": "12:34:56:00:16:0e#0", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#1", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#2", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#3", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#4", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#5", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#6", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#7", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:16:0e#8", + "type": "NLE", + "bridge": "12:34:56:00:16:0e" + }, + { + "id": "12:34:56:00:00:a1:4c:da", + "type": "NLPC", + "firmware_revision": 62, + "last_seen": 1646511241, + "power": 476, + "reachable": true, + "bridge": "12:34:56:80:60:40" + }, + { + "id": "10:20:30:bd:b8:1e", + "type": "BNS", + "firmware_revision": 32, + "wifi_strength": 49, + "boiler_valve_comfort_boost": false, + "boiler_status": true, + "cooler_status": false + }, + { + "id": "00:11:22:33:00:11:45:fe", + "type": "NLF", + "on": false, + "brightness": 63, + "firmware_revision": 57, + "last_seen": 1657086939, + "power": 0, + "reachable": true, + "bridge": "12:34:56:80:60:40" + } + ], + "rooms": [ + { + "id": "2746182631", + "reachable": true, + "therm_measured_temperature": 19.8, + "therm_setpoint_temperature": 12, + "therm_setpoint_mode": "away", + "therm_setpoint_start_time": 1559229567, + "therm_setpoint_end_time": 0 + }, + { + "id": "2940411577", + "reachable": true, + "therm_measured_temperature": 27, + "heating_power_request": 0, + "therm_setpoint_temperature": 7, + "therm_setpoint_mode": "hg", + "therm_setpoint_start_time": 0, + "therm_setpoint_end_time": 0, + "anticipating": false, + "open_window": false + }, + { + "id": "2833524037", + "reachable": true, + "therm_measured_temperature": 24.5, + "heating_power_request": 0, + "therm_setpoint_temperature": 7, + "therm_setpoint_mode": "hg", + "therm_setpoint_start_time": 0, + "therm_setpoint_end_time": 0, + "anticipating": false, + "open_window": false + }, + { + "id": "1002003001", + "reachable": true, + "anticipating": false, + "heating_power_request": 0, + "open_window": false, + "humidity": 67, + "therm_measured_temperature": 22, + "therm_setpoint_temperature": 22, + "therm_setpoint_start_time": 1647462737, + "therm_setpoint_end_time": null, + "therm_setpoint_mode": "home" + } + ], + "id": "91763b24c43d3e344f424e8b", + "persons": [ + { + "id": "91827374-7e04-5298-83ad-a0cb8372dff1", + "last_seen": 1557071156, + "out_of_sight": true + }, + { + "id": "91827375-7e04-5298-83ae-a0cb8372dff2", + "last_seen": 1559282761, + "out_of_sight": false + }, + { + "id": "91827376-7e04-5298-83af-a0cb8372dff3", + "last_seen": 1559224132, + "out_of_sight": true + } + ] } } +} diff --git a/src/pyatmo/modules/device_types.py b/src/pyatmo/modules/device_types.py index 82b23efe..0424c2cd 100644 --- a/src/pyatmo/modules/device_types.py +++ b/src/pyatmo/modules/device_types.py @@ -47,7 +47,8 @@ class DeviceType(str, Enum): NLD = "NLD" # Dimmer NLDD = "NLDD" # Dimmer NLE = "NLE" # Connected Ecometer - NLF = "NLF" # 2 wire light switch + NLF = "NLF" # Dimmer Light Switch + NLFE = "NLFE" # Dimmer Light Switch Evolution NLFN = "NLFN" # light switch with neutral NLG = "NLG" # Gateway NLGS = "NLGS" # Gateway standalone @@ -172,6 +173,7 @@ class DeviceCategory(str, Enum): DeviceType.NLC: DeviceCategory.switch, DeviceType.NLFN: DeviceCategory.dimmer, DeviceType.NLF: DeviceCategory.dimmer, + DeviceType.NLFE: DeviceCategory.dimmer, DeviceType.BNS: DeviceCategory.climate, DeviceType.NLPC: DeviceCategory.meter, DeviceType.NLE: DeviceCategory.meter, @@ -231,6 +233,7 @@ class DeviceCategory(str, Enum): DeviceType.NLPM: ("Legrand", "Mobile plug"), DeviceType.NLPBS: ("Legrand", "British standard plugs"), DeviceType.NLF: ("Legrand", "2 wire light switch/dimmer"), + DeviceType.NLFE: ("Legrand", "2 wire light switch/dimmer evolution"), DeviceType.NLIS: ("Legrand", "Double switch"), DeviceType.NLFN: ("Legrand", "Light switch/dimmer with neutral"), DeviceType.NLM: ("Legrand", "Light micro module"), diff --git a/src/pyatmo/modules/legrand.py b/src/pyatmo/modules/legrand.py index 03ab0a88..5be62285 100644 --- a/src/pyatmo/modules/legrand.py +++ b/src/pyatmo/modules/legrand.py @@ -62,7 +62,7 @@ class NLFN(Dimmer): class NLFE(Dimmer): - """Legrand On-Off dimmer switch.""" + """Legrand On-Off dimmer switch evolution.""" class NLM(Switch): diff --git a/tests/test_weather.py b/tests/test_weather.py index a3237733..6bd67d7d 100644 --- a/tests/test_weather.py +++ b/tests/test_weather.py @@ -136,8 +136,7 @@ async def test_async_weather_update(async_account): assert module.modules is None assert module.firmware_revision == 50 assert module.rf_strength == 68 - assert module.temperature == 9.4 - assert module.humidity == 57 + assert module.reachable is False module_id = "12:34:56:03:1b:e4" assert module_id in home.modules