toto / homebridge-airrohr

HomeBridge module for the DIY luftdaten.info particulates sensor. See http://luftdaten.info how to build your own
http://luftdaten.info
MIT License
52 stars 12 forks source link

No more data pulled using the public API #30

Closed pbksol closed 5 years ago

pbksol commented 5 years ago

Since a few weeks the plugin fails to receive data using the Public API.

[AirRohr] Could not get sensor data: Error: Request Failed. Status Code: 302

roboterm commented 5 years ago

Same here. Even if I use this URL http://data.sensor.community/airrohr/v1/sensor/16522/ which answers with a well formatted json it will not work.

martinnock commented 5 years ago

For me it works with new URL like this http://data.sensor.community/airrohr/v1/sensor/9268/

pbksol commented 5 years ago

That URL delivers the exact same JSON content. The plugin fails to parse the data. I have no time to dig deeper. If the plugin is no longer maintained I might do at some time.

roboterm commented 5 years ago

The URLs above are correct and the plugin works fine for me now. I rechecked my config.json and forgot the "/" at the end shameonme.

roboterm commented 5 years ago

closed by 5d9dd68

pbksol commented 5 years ago

So… Der 302 HTTP-Status ist es, woran das Plugin scheitert. Der bisherige API-URL wird umgeleitet und das Plugin erwartet immer einen 200er und scheitert daher. Das war der entscheidende Unterschied – die Rückgabe der Daten über die API war zwar optisch korrekt, aber der HTTP-Code war das Problem. Ich mach hier wieder zu.

brandungskieker commented 5 years ago

In my opinion the issue wasn't fixed yet. What's your reason for closing this ticket?

roboterm commented 5 years ago

@brandungskieker I changed the example config.json to the new URL. If you apply these changes to your config the plugin should work.