home-assistant-ecosystem / python-luftdaten

Python API for interacting with luftdaten.info
MIT License
5 stars 9 forks source link

Access a luftdaten sensor locally #4

Open mrueg opened 5 years ago

mrueg commented 5 years ago

This request might be a bit out of scope, but wanted to hear your opinion on that. As a user I would like to request sensor information locally from a sensor using the data.json or prometheus endpoint, so I don't have to rely on network connectivity to the outer world.

Use case: Sensor data is consumed and utilized to do home automation (e.g. close windows if values go high). This should not rely on internet connectivity or availability of the luftdaten platform.

fabaff commented 5 years ago

It looks like that this can be done easily. Simply allow to use a local URL for the data (e.g., http://{ip-des-sensors}/data.json) while instantiating the object.