Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lnetatmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
'Humidity' : 'b',
'Noise' : 'S',
'Pressure' : 'e',
'Rain' : 'f',
'When' : 'K'
}

Expand Down Expand Up @@ -193,7 +194,7 @@ def checkUpdated(self, station=None, delay=3600):
if time.time()-v['When'] < delay : ret.append(mn)
return ret if ret else None

def getMeasure(self, device_id, scale, mtype, module_id=None, date_begin=None, date_end=None, limit=None, optimize=False):
def getMeasure(self, device_id, scale, mtype, module_id=None, date_begin=None, date_end=None, limit=None, optimize=False, real_time=False):
postParams = { "access_token" : self.getAuthToken }
postParams['device_id'] = device_id
if module_id : postParams['module_id'] = module_id
Expand All @@ -203,6 +204,7 @@ def getMeasure(self, device_id, scale, mtype, module_id=None, date_begin=None, d
if date_end : postParams['date_end'] = date_end
if limit : postParams['limit'] = limit
postParams['optimize'] = "true" if optimize else "false"
postParams['real_time'] = "true" if real_time else "false"
return postRequest(_GETMEASURE_REQ, postParams)

def MinMaxTH(self, station=None, module=None, frame="last24"):
Expand Down
2 changes: 1 addition & 1 deletion usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Methods :
* Output : Sensors data dictionary (Key is sensor name)

AT the time of this document, Available measures types are :
* a full or subset of Temperature, Pressure, Noise, Co2, Humidity, When (measurement timestamp) for modules including station module
* a full or subset of Temperature, Pressure, Noise, Co2, Humidity, Rain (mm of precipitation during the last 5 minutes, or since the previous data upload), When (measurement timestamp) for modules including station module
* battery_vp : likely to be total battery voltage for external sensors (running on batteries) in mV (undocumented)
* rf_status : likely to be the % of radio signal between the station and a module (undocumented)

Expand Down