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
WeatherDuino AQM II
#1
Hi all, I have a problem compiling WeatherDuino AQM:

I downloaded the package, and then extract to C:\Users\XXX\Documents\Arduino\

When I verify the code with Arduino IDE 1.8.10 I got this error, someone have ideas?

I use SHT31, and SDS011 as dust sensor.

C:\Users\User\Documents\Arduino\WeatherDuino_AQM_II\v200\software\WeatherDuino_AQM_ESP8266_ASK_v200_b004\novaSDS.ino: In function 'void read_SDS()':

novaSDS:77:8: error: expected ';' before '}' token

        }

        ^

Più di una libreria trovata per "Wire.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\Wire
Più di una libreria trovata per "Timer.h"
Usata: C:\Program
Più di una libreria trovata per "ArduinoJson.h"
Usata: C:\Program
Più di una libreria trovata per "TimeLib.h"
Usata: C:\Program
Più di una libreria trovata per "ESP8266WebServer.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WebServer
Più di una libreria trovata per "ArduinoOTA.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ArduinoOTA
Più di una libreria trovata per "Adafruit_SHT31.h"
Usata: C:\Program
Più di una libreria trovata per "ESP8266WiFi.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266WiFi
Più di una libreria trovata per "ESP8266HTTPClient.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266HTTPClient
Più di una libreria trovata per "RH_ASK.h"
Usata: C:\Program
Più di una libreria trovata per "SPI.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\SPI
Più di una libreria trovata per "TimezoneESP8266.h"
Usata: C:\Program
Più di una libreria trovata per "ESP8266mDNS.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\ESP8266mDNS
Più di una libreria trovata per "SH1106.h"
Usata: C:\Program
Più di una libreria trovata per "HTU21D.h"
Usata: C:\Program
Più di una libreria trovata per "SoftwareSerial.h"
Usata: C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\libraries\SoftwareSerial
exit status 1
expected ';' before '}' token
Reply
#2
Hello Stefano90,

Thank you for reporting this issue when the SDS011 dust sensor is selected. I checked it, and confirm it.
The issue was fixed, please download and install the latest software version updated today.

From your logs, I'm seeing that you are using ESP82266 boards manager v2.6.3, which is many cases cause several issues with WeatherDuino software. Please downgrade it to v2.4.2

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



Reply
#3
Hello, Thank you very much, now it works!

I saw an JSON file with all data in local IP adress.

I created a simply PHP file to test data in my server, but I saw only empty data, this is the script:
<?php
//www.mywebsite.com/dust/SQL.php?privatekey=YOURKEY&PM25=99&PM100=98.7&AQI=97&CO2=96
$pm25 = $_GET["PM25"];
$pm100 = $_GET["PM100"];
$aqi = $_GET["AQI"];
$co2 = $_GET["CO2"];
$key = $_GET["privatekey"];
$id = $_GET["DevID"];

//print $pm100."|".$pm25."|".$aqi."|".$co2;
$scrivifile=$pm100."|".$pm25."|".$aqi."|".$co2;
    $filenameserver='dati.txt';
$file =  fopen($filenameserver, "w");
 fwrite($file, $scrivifile);
 fclose($file);
?>

if I want to change read interval of the sensor, have I to change these rows?
for example:
1) const byte readInterval  = 5;
2) if (!first4readings) divider = 12;
3) if (readCount_1H == 12)
Are there others?

Thank you.
Reply
#4
(17-02-2020, 10:43)Stefano90 Wrote: if I want to change read interval of the sensor, have I to change these rows?
for example:
Is good to know r1) const byte readInterval  = 5;
2) if (!first4readings) divider = 12;
3) if (readCount_1H == 12)
Are there others?

Thank you.


Hi Stefano90,

Is good to know that your AQMII is working.
Regarding changing the read intervals, its not so simple. If you change the read intervals among other problems, you will mess with the standard EPA 12 hours AQI calculations.
I strongly recommend that you keep things as they are. By other side, as you certainly understand, we can't give support for customized software changes, as this just leads to confusion among users.


I can't say if your PHP script works or not, but check this on the AQM II software:

Config_Options.h

Quote:#define ENABLE_AQM_TO_MYSERVER 1 // 1= Enable, 0= Disable

Credentials.h

Quote:// --------------------------------------------------------------------------------------
// My Server Credentials
// --------------------------------------------------------------------------------------
const char* My_Server = "YOUR SERVER ADDRESS"; // Put here your server address
const char* Path_To_LogToSQL_PHPfile = "/NAME OF YOUR PHP SCRIPT";


Rgs
Reply
#5
(17-02-2020, 20:10)Werk_AG Wrote: Hi Stefano90,

Is good to know that your AQMII is working.


I can't say if your PHP script works or not, but check this on the AQM II software:

Config_Options.h
Quote:#define ENABLE_AQM_TO_MYSERVER 1 // 1= Enable, 0= Disable

Credentials.h
Quote:// --------------------------------------------------------------------------------------
// My Server Credentials
// --------------------------------------------------------------------------------------
const char* My_Server = "YOUR SERVER ADDRESS"; // Put here your server address
const char* Path_To_LogToSQL_PHPfile = "/NAME OF YOUR PHP SCRIPT";


Rgs

Hello, of course I set it as you show.
Device reaches server (and PHP file) because writes empty data.

I tried to open serial monitor (baud rate 19200, right COM port) in Arduino IDE but nothing is wrote in the console.

From the code must show something on the console
Reply
#6
I tried also to use your file..

txt log file shows a line like this:
[2020-02-18 10:12:21];0;0;0;0

In local web server I can see all parameters correctly.
Reply
#7
Hi Stefano,

could you please try to explain me which goal you want to reach?

Because the AQM II sets up a web server in your local LAN whichs answers with the JSON data if there is a query.

Your php script uses http get to transmit some signals - but I do not understand what you are trying to do because you first have to get them from your AQMII before you can transmit it to a webserver. Huh

Regards,
engolling
Reply
#8
(18-02-2020, 09:50)Stefano90 Wrote: ...

I tried to open serial monitor (baud rate 19200, right COM port) in Arduino IDE but nothing is wrote in the console.

From the code must show something on the console

Hi Stefano90,

To enable debug data on the serial monitor, you should enable it by removing the "//" at start of each line
These options are at Config_Options

Code:
// --------------------------------------------------------------------------------------
//   Debug helper - Uncomment for debug help
// --------------------------------------------------------------------------------------
//#define PRINT_DEBUG_WIFI
//#define PRINT_DEBUG_NTP
//#define PRINT_DEBUG_PM                
//#define PRINT_DEBUG_CO2                
//#define PRINT_DEBUG_TS_UPLOAD
//#define PRINT_DEBUG_MYSERVER_UPLOAD
Reply
#9
(18-02-2020, 23:07)engolling Wrote: Hi Stefano,

could you please try to explain me which goal you want to reach?

Because the AQM II sets up a web server in your local LAN whichs answers with the JSON data if there is a query.

Your php script uses http get to transmit some signals - but I do not understand what you are trying to do because you first have to get them from your AQMII before you can transmit it to a webserver. Huh

Regards,
engolling

@Engolling, the AQMII can send the data to a web server, exactly the same way the Pro2 PLUS or Compact do.
The php script included on the Pro2 PLUS software package can be used as an example, but obviously, it need to be modified according to personal needs.
Reply
#10
Hello again Stefano,

Regarding the PHP script, I wrote a small version to help you.


.rar   AirQuality_Log.rar (Size: 602 bytes / Downloads: 2)

- Upload it to the root of your webserver
- In Credentials (AQMII software) use:

Code:
// --------------------------------------------------------------------------------------
//   My Server Credentials
// --------------------------------------------------------------------------------------
const char* My_Server                 = "YOUR WEB SERVER ADDRESS";             // Put here your server address (Example: www.myserver.com)
const char* Path_To_LogToSQL_PHPfile  = "/AirQuality_Log.php";        // Name and path to AirQuality_Log.php file on My Server


#define MYSERVER_KEY     "test"                                      // Your private key for uploading AQM data to your

Reprogram you AQMII device and wait until the AQMII sends data to your web server, which happens at each 15 minutes.

You can also test the script by typing this in your browser:

Code:
http://YOUR WEB SERVER ADDRESS/AirQuality_Log.php?privatekey=test&DevID=MyAQMII&PM25=10&PM100=20&AQI=30&CO2=40

In the AirQuality_Log.txt file you should get something like this:

Code:
[2020-02-19 02:22:54];MyAQMII;10;20;30;40;

I tested the script, so I know it is working.
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply




Users browsing this thread: 1 Guest(s)