gruijter / com.gruijter.openaq

Homey app that integrates OpenAQ.org
GNU General Public License v3.0
1 stars 0 forks source link

Seems like selecting a specific luftdaten sensor provides no data #3

Closed Bavoc closed 3 years ago

Bavoc commented 3 years ago

Hi,

I've just started using this app in homey. And I've just set up my own luftdaten sensor (https://maps.sensor.community/?nowind#14/51.0254/5.4677) So, first of all, many thanks!

I think a found a bug: When adding "LD moniter@Homey", the "device" show results and actually seems to show my data. But, when I specifically select my own sensor (or another nearby) I don't receive any data on that device in homey.

Maybe something you can look into?

Thanks!

Bavoc commented 3 years ago

Hi,

I also have an additional question/issue Since I want to use this data in our home ventilation (since neighbors are burning a lot of rubbish and causing local air pollution) I need the data as recent as possible, and looking at the data it didn't seem the most recent. (directly from my sensor, in luftdaten and in homey) So I started to investigating the luftdaten API. It seems like the api returns the last 2 measurements per station, and in homey, even though it is reset every minute (setting) I seem to see older data.

Can it be that you are not using 'the most recent' entry from the reply of the api of luftdaten?

Update: the api sometimes provides multiple results at once. So probably I only get an older value when multiple measurements are included.

Here's an example api reply from my sensor as well as a screenshot from Homey app: screenshot_Homey_APIresponse2 api_response_2.txt

and one other response: api_resp_part1 api_resp_part2 api_resp_part3 api_response.txt

Many thanks! Bavo

gruijter commented 3 years ago

Hi Bavoc. Thx for the feedback and your research so far.

on short notice I have no time to look into this, but I will keep it on my backlog.

Bavoc commented 3 years ago

Thx!

gruijter commented 3 years ago

I just fixed both issues. Please install from here and let me know if it now works correctly for you:

https://homey.app/nl-nl/app/com.gruijter.openaq/Outdoor-AirQuality/test/

Bavoc commented 3 years ago

Hi,

first of all, Many thanks and Happy New Year!

only positive feedback so far: 1) newest data = Good! I've just tested and data seems live/newest data from my sensor. much better/highly appreciated!

2) adding a specific sensor = works good as well!

My thanks! Bavo I'll keep using this test version for a while, if I notice something strange, I'll let you know in the upcoming days, but it looks really good!

gruijter commented 3 years ago

Super! I'll close the issue. Reopen it if you do find issues.