This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems uploading AQM data to ThingSpeak
#1
Photo 
Hi All,

I wonder if anyone can help me with a problem uploading AQM data to ThingSpeak.

I'm running a WD Compact Rx (Software version WeatherDuino_P2ESP8266_RX_v4.0_b002) and have:

1) Enabled the TS upload:
Code:
 
// --------------------------------------------------------------------------------------
//   Enable / Disable data transmission to ThingSpeak
// --------------------------------------------------------------------------------------
#define ENABLE_TS_UPLOAD   1                         // 1= Enable, 0= Disable

2) Set the API key:
Code:
 
// --------------------------------------------------------------------------------------
//   ThingSpeak Credentials - Just needed if you want to upload data to a ThingSpeak channel
// --------------------------------------------------------------------------------------
const char* TS_WRITEAPIKEY = "xxxxxxxxxxxxxxxxx";   // Put here your ThingSpeak WRITE key
Which is definitely correct. Here it is copied from the channel -  xxxxxxxxxxxxxxxxxxx

3) Enabled the internet connection and confirmed it is working.
4) Set up my ThingSpeak channel with four fields PM2.5, PM10, AQI and CO2 as per this thread: https://www.meteocercal.info/forum/Threa...ThingSpeak

However, I am getting no data appearing in the channel after 10 mins or more: https://thingspeak.com/channels/1082934

Any help with debugging this would be much appreciated.

Rgds,

Zak


EDIT by ADMIN: ThingSpeak WRITE key replaced by xxxxxxxxxxxxxxxxx
Reply
#2
Hi Zak,

What you get if you enable this?

Code:
#define PRINT_DEBUG_TS_UPLOAD

Which ESP8266 boards manager are you using?

Rgs
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#3
Evening!

Thanks for the quick reply :-)

With the compact Rx connected by USB cable, the correct COM port selected and 19200 baud set, I get no output to the serial monitor with the code enabled.

I'm using version 2.6.3 of the board manager.

Rgds,

Zak
(16-06-2020, 23:54)Werk_AG Wrote: Hi Zak,

What you get if you enable this?
Code:
#define PRINT_DEBUG_TS_UPLOAD

Which ESP8266 boards manager are you using?

Rgs
Reply
#4
(17-06-2020, 00:04)Zack_ster Wrote: With the compact Rx connected by USB cable, the correct COM port selected and 19200 baud set, I get no output to the serial monitor with the code enabled.

I'm using version 2.6.3 of the board manager.

If with the PRINT_DEBUG_TS_UPLOAD option enabled, you don't get any output on the serial monitor, that means your receiver isn't receiving any data from the Air Quality Monitor.
By other words, if Air Quality Index is zero, the routine to upload to ThingSpeak isn't executed, that explains the absence of output on the serial monitor, otherwise you should always get something.

Rgs.
Reply
#5
Wink 
Oops, I must have had something configured wrongly last night. I now get an output on the serial monitor. It is confirming a connection attempt and that the connection fails.

I have double checked the channel setup and the API key and can see no errors, so am a little stuck for further ideas! I have a standard home network setup, so the compact Rx is behind a router. However, I don't think it's a network problem as the WU upload works fine: https://www.wunderground.com/dashboard/pws/ISHIRENE2 and my Cumulus uploads are also working: http://www.shirenewtonweather.info/ 

If you have any more ideas it would be much appreciated.  Smile

Zak.

P.S The calibration of the CO2 sensor seemed to work, but I think it is drifting a bit. Much of the reason for getting ThingSpeak working is to see if the drift is normal diurnal variation that you have discussed in other posts, or if I have a sensor problem.
Reply
#6
(17-06-2020, 11:44)Zack_ster Wrote: ...
If you have any more ideas it would be much appreciated.  Smile

Hi Zak,

The upload to ThingSpeak is been working for me since long time, and is still working. Also, I don't have received any complaints about it... however, it is also part of my job following other communities, and more and more, the ThingSpeak Team is recommending people to use their own Arduino library, instead of custom code. Inclusive there are many people reporting that systems that had worked for years are not working so well now. They also confirmed that did changes in some of their servers.
This discussion on the ThingSpeak community isn't new, but the last statement from ThinkSpeak team, again suggesting people to start using their own lib is from 28 Apr 2020.

Besides requiring the API key, seems that some servers now also need the channel number.

Usually I react fast to these news, and I already modified the Pro2 Compact, and AQMII softwares, to work with their library.

On next weekend, I will publish the updated versions.



(17-06-2020, 11:44)Zack_ster Wrote: P.S The calibration of the CO2 sensor seemed to work, but I think it is drifting a bit. Much of the reason for getting ThingSpeak working is to see if the drift is normal diurnal variation that you have discussed in other posts, or if I have a sensor problem.

Remember the error margin of the MHZ19 is +-50ppm, don't expect a completely precise reading. Measuring outside CO2 with a good degree of precision is a complex task, which requires complex and expensive equipment. There are good topics on the forum about this matter.
The main idea behind the CO2 sensor is spreading the sensibility to the importance of being conscientious about the CO2 emissions.
Reply
#7
Thanks for your detailed reply and in advance for your work on the code to solve the issue. It makes sense that something has changed at the ThingSpeak end as I've triple checked everything!

On the subject of CO2 measurement, the drift i'm seeing is of the order of several hundred PPM, so well over the normal sensor error. Being able to to visulaise the change with respect to time will help me determine if the sensor is OK.

Kind rgds,

Zak
(17-06-2020, 23:59)Werk_AG Wrote:
(17-06-2020, 11:44)Zack_ster Wrote: ...
If you have any more ideas it would be much appreciated.  Smile

Hi Zak,

The upload to ThingSpeak is been working for me since long time, and is still working. Also, I don't have received any complaints about it... however, it is also part of my job following other communities, and more and more, the ThingSpeak Team is recommending people to use their own Arduino library, instead of custom code. Inclusive there are many people reporting that systems that had worked for years are not working so well now. They also confirmed that did changes in some of their servers.
This discussion on the ThingSpeak community isn't new, but the last statement from ThinkSpeak team, again suggesting people to start using their own lib is from 28 Apr 2020.

Besides requiring the API key, seems that some servers now also need the channel number.

Usually I react fast to these news, and I already modified the Pro2 Compact, and AQMII softwares, to work with their library.

On next weekend, I will publish the updated versions.

 
(17-06-2020, 11:44)Zack_ster Wrote: P.S The calibration of the CO2 sensor seemed to work, but I think it is drifting a bit. Much of the reason for getting ThingSpeak working is to see if the drift is normal diurnal variation that you have discussed in other posts, or if I have a sensor problem.

Remember the error margin of the MHZ19 is +-50ppm, don't expect a completely precise reading. Measuring outside CO2 with a good degree of precision is a complex task, which requires complex and expensive equipment. There are good topics on the forum about this matter.
The main idea behind the CO2 sensor is spreading the sensibility to the importance of being conscientious about the CO2 emissions.
Reply
#8
(18-06-2020, 22:43)Zack_ster Wrote: ...
Thanks for your detailed reply and in advance for your work on the code to solve the issue.

Zak, it isn't an issue on the code, as it is working for a large number of users, including me The issue (which isn't also an issue) is with the Thingspeak servers, which due to load, in some countries they can't answer as fast as before. One of the suggestions of the guys from Thingspeak team is just add a delay to wait for server response. As said, instead of adding delay, I preferred to modify WeatherDuino code to use their own lib.

Regarding the CO2 sensor, when doing a zero point calibration manually (your model doesn't allow doing it remotely), be sure that the sensor is at fresh air for at least 20 minutes, and when putting HD pin to GND for 10 seconds, make sure your breath doesn't reach the sensor, this is very important.

Also check if your MHZ-19 is model A or model B. B is newer and best.
Reply
#9
Good morning and thanks very much for all your research and work on the latest release. Data is now being uploaded perfectly to my ThingSpeak channel :-).

Just to let you know, there is a small error in the compact Rx code: the WU Credentials names are different on the Credentials.h tab to the NET tab. In the Credentials.h tab the names are:
 
Code:
// --------------------------------------------------------------------------------------
//   WU Credentials 
// --------------------------------------------------------------------------------------
const char* WU_STATION_ID = "ISHIRENE2";         // WU Station ID
const char* WU_PWD        = "FIXV9HBT";         // WU Station Key
On the NET tab they are:
Code:
    Data += WUNDERGROUND_STATION_ID;
    Data += WUNDERGROUND_PWD;

I did zero using the method you suggested and i have confirmed it is the B model. I can now see if my sensor is responding normally.

Thank again and kind regards,

Zak
Reply
#10
(20-06-2020, 10:37)Zack_ster Wrote: Just to let you know, there is a small error in the compact Rx code: the WU Credentials names are different on the Credentials.h tab to the NET tab. In the Credentials.h tab the names are:
 
Code:
// --------------------------------------------------------------------------------------
//   WU Credentials 
// --------------------------------------------------------------------------------------
const char* WU_STATION_ID = "ISHIRENE2";         // WU Station ID
const char* WU_PWD        = "FIXV9HBT";         // WU Station Key
On the NET tab they are:
Code:
    Data += WUNDERGROUND_STATION_ID;
    Data += WUNDERGROUND_PWD;

Thank you Zak, already fixed it.

Rgs.
Reply




Users browsing this thread: 1 Guest(s)