Page 1 of 1
Problems with AirqualityWorld and Purpleair Blocks
Posted: Sat Sep 30, 2023 2:38 pm
by meteobescano
Hello,
I recently purchased two Air Quality sensors.
I installed the Purpleair 1.0 block and tried to put the sensor ID number in the block and it didn't work. I got the ID from the Purpleair email and I think it is 6 numbers but I can't get it to work.
I tried to configure the other sensor in the Air Quality World block. I enter my address:
https://aqicn.org/station/spain-bescan% ... eobescano/
It doesn't work either.
Can someone help me configure these two sensors on the page?
Thank you so much
Re: Problems with AirqualityWorld and Purpleair Blocks
Posted: Sat Sep 30, 2023 8:35 pm
by FSC830
Did not use this sensors, but took a look in block and to purpleair.com.
Seems, that the API call was modified by purpleair, the URL for the API request is totally different then in block.
So my guess, its not so easy to modify the block quickly.
As far as I can see at purpleair.com you need not only your sensor ID, but an API key too (and may be a read key).
Did you get all of these (sensor ID, API key, read key) in confirmation mail when registering the sensors?
Regards
Re: Problems with AirqualityWorld and Purpleair Blocks
Posted: Mon Oct 02, 2023 2:32 pm
by meteobescano
Thanks for your answer...
In the Purpleair email after registering the sensor I received different urls:
• Sensor summary JSON is here:
https://www.purpleair.com/data.json?sho ... ey=xxxxxxx
• Sensor details JSON is here:
https://www.purpleair.com/json?show=185 ... =xxxxxxxxx
I thought that the number 185613 was the JSON number that the block asks for in the configuration.
It seems that it is not correct.
In reference to the API, I think that now it has an economic cost and therefore you have to request it.
Regarding the airqualityWorld Block, can you know why it doesn't interpret the URL of my sensor?
Thank you very much and sorry for my questions
Re: Problems with AirqualityWorld and Purpleair Blocks
Posted: Tue Oct 03, 2023 5:43 am
by FSC830
As said, the API was modified and it seems, that the URL in block for calling the data is not correct any longer.
My guess, you did register you sensors as "private sensors"?
Referring to the purplecair webpage you need 3 different variables for a private sensor: the sensor ID, the API key and a read key.
But if private data or not, referring the API reference the URL always starts with
https://api.purpleair.com/v1/..., so it seems, that the URL you use is not correct any more.
Regards
Re: Problems with AirqualityWorld and Purpleair Blocks
Posted: Sun Oct 08, 2023 9:21 pm
by davidefa
@meteobescano
The block
airQualitySensor supports the purpleair sensor.
If you prefer the look of purpleair block I can take a look and update it ( not sure if I still have a valid purple air token/key )
For the airQualityWorld I think only the urls that begin with:
https://aqicn.org/city can be used.
Those with
https://aqicn.org/station ( as your in bescano ) can not.