You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@ For more detailed information see http://dev.netatmo.com
7
7
I have no relation with the netatmo company, I wrote this because I needed it myself,
8
8
and published it to save time to anyone who would have same needs.
9
9
10
+
Following the implementation of "Home" everywhere in the Netatmo API with various behavior, the library has been adjusted to include the home parameters in most calls.
11
+
If you are using a single account with a single home and single weather station, the library has been implemented so that your code should continue to run without change.
12
+
13
+
If you have multiple homes or were supplying a station name in some method calls, you will have to adapt your code :
14
+
- to supply a home name when looking for data for most class initializers
15
+
- to use the new station name set by Netatmo (which is not your previously set value)
16
+
17
+
10
18
### Install ###
11
19
12
20
To install lnetatmo simply run:
@@ -18,6 +26,9 @@ To install lnetatmo simply run:
18
26
pip install lnetatmo
19
27
20
28
Depending on your permissions you might be required to use sudo.
29
+
30
+
It is a single file module, on platforms where you have limited access, you just have to clone the repo and take the lnetatmo.py in the same directory than your main program.
31
+
21
32
Once installed you can simple add lnetatmo to your python scripts by including:
Requires : an authorization object (ClientAuth instance)
240
-
241
+
* Input : : an authorization object (ClientAuth instance), an optional home name, an optional station name
241
242
242
243
Return : a WeatherStationData object. This object contains most administration properties of stations and modules accessible to the user and the last data pushed by the station to the Netatmo servers.
243
244
244
245
Raise a lnetatmo.NoDevice exception if no weather station is available for the given account.
245
246
247
+
If no home is specified, the first returned home will be set as default home. Same apply to station.
248
+
If you have only one home and one station, you can safely ignore these new parameters. Note that return order is undefined. If you have multiple homes and a weather station in only one, the default home may be the one without station and the call will fail.
249
+
250
+
**Breaking change**
251
+
> If you used the station name in the past in any method call, you should be aware that Netatmo decided to rename your station with their own value thus your existing code will have to be updated.
252
+
246
253
Properties, all properties are read-only unless specified:
247
254
248
255
@@ -443,8 +450,9 @@ Methods :
443
450
If you just need the current temperature and humidity reported by a sensor with associated min and max values on the last 24 hours, you can get it all with only one call that handle all required steps including authentication :
* Input : optional station name and/or module name (if no station name is provided, default_station will be used, if no module name is provided, station sensor will be reported).
455
+
if no home is specified, first returned home will be used
448
456
* Output : A tuple of 6 values (Temperature, Humidity, minT, MaxT, minH, maxH)
0 commit comments