Page 2 of 2

Re: Python Plugin: OpenAQ

Posted: Wednesday 26 August 2020 21:37
by FireWizard
Hi,

@Jan Jansen

You are probably right, as I found that I'm using an older version, which updates every hour and not every minute.
Looked into the source, but except of that line I cannot find anything that indicates the update frequency.

So @Xorfor has to answer this question.

Regards

Re: Python Plugin: OpenAQ

Posted: Wednesday 26 August 2020 21:53
by Xorfor
Fortunately openaq.org allows unlimited requests in their API :) .

Because of a big change in Oct 2019 in the plugin, the self.__MINUTES was not used anymore. I have updated the plugin and implemented this again and now the plugin will update the sensors only once per hour.

Re: Python Plugin: OpenAQ

Posted: Thursday 27 August 2020 20:36
by Jan Jansen
@ Xorfor,

Thanks for your time and attention, it works as desired!

Regards
Jan

Re: Python Plugin: OpenAQ

Posted: Thursday 27 August 2020 22:45
by FireWizard
@Xorfor,

I have installed the new version and I can confirm that it works as intended.

Regards

Re: Python Plugin: OpenAQ

Posted: Tuesday 24 November 2020 13:24
by rrozema
(Air quality) openaq returned a status: 504
It has been doing this since yesterday. It's probably them having an issue, not a problem of the plugin.

Re: Python Plugin: OpenAQ

Posted: Tuesday 24 November 2020 14:59
by FireWizard
Hi,

I think, it is an incident, as I saw it only once in the log:
2020-11-23 21:29:33.373 Error: (Air Quality) openaq returned a status: 504
From: https://developer.mozilla.org/en-US/doc ... Status/504
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
Regards

Re: Python Plugin: OpenAQ

Posted: Tuesday 24 November 2020 16:05
by rrozema
FireWizard wrote: Tuesday 24 November 2020 14:59 Hi,

I think, it is an incident, as I saw it only once in the log:
2020-11-23 21:29:33.373 Error: (Air Quality) openaq returned a status: 504
From: https://developer.mozilla.org/en-US/doc ... Status/504
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
Regards
I agree that it is probably an incident at their side, and as such it will probably go away once they discover there's a problem in their server(s). However, it is happening every +- 5 minutes in my log, so that's why I wanted to share this to let others know it is not just them ;-). I also see 503 errors every now and then.

Re: Python Plugin: OpenAQ

Posted: Wednesday 10 February 2021 20:09
by waltervl
Seems that Xorfor was so nice to update the plugin yesterday to the new OpenAq V2 Api. I just tried and it seems to work. I get measurements but have to wait 1 hour to see if they update....

So in the plugin folder of OpenAQ do a git pull and it should work again after an update of the OpenAQ Hardware in Domoticz.

Re: Python Plugin: OpenAQ

Posted: Wednesday 03 January 2024 9:40
by Derik
Hi... looks the plugin is gone on git..
Only after a new setup in domoticz is in my db the plugin "working"...
And i cannot remove the plugin because he is not there..
Some a solution?

Re: Python Plugin: OpenAQ

Posted: Saturday 19 October 2024 13:09
by waltervl
I am currently updating this plugin as it now needs an API key to get the data. It is testing at the moment. I will report back when it is working properly...

Re: Python Plugin: OpenAQ

Posted: Saturday 19 October 2024 15:20
by waltervl
It is running now for some hours, everything seems to be OK.
So the modified fork is here:
https://github.com/waltervl/Domoticz-OpenAQ-Plugin

To update from the old plugin
1. Edit the config file in the .git folder of the plugin and change the url from Xorfor into waltervl

Code: Select all

url = https://github.com/waltervl/Domoticz-OpenAQ-Plugin.git
2. Do a "git pull" in the plugin folder to update the plugin.
3. Register on OpenAQ and get your API KEY from https://explore.openaq.org/account.
4. Restart Domoticz
5. Go to menu Setup - Hardware, select the plugin hardware gateway and add the API KEY to the OpenAQ plugin configuration.
6. Click on Update. Now the plugin will start and succeeds to login and update the existing devices.

Alternative for step 1 and 2 is to go to the github repository, copy the contents of the plugin.py and paste it into the plugin.py of your Domoticz server and so overwiting is contents.