×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

meteostationWEB cloud flag 0 when clouds: 100% (SOLVED)

  • Posts: 89
  • Thank you received: 16
I am rebuilding my meteostation with the new sensors: BME280, TSL2591 in addition to my old MLX90614.
All are connected to the I2C bus on an arduino Uno.

All work fine with I2CScanner and the Adafruit test programs.

I have uploaded the indiduinoMETEO.ino file from the indi-3rdparty/indi-duino/devices/Firmwares/indiduinoMETEO

I didnt have any luck with meteostationSQM_sk.xml so I edited meteostation_sk.xml

<code>
31,32c31,32
< <defNumber name="WEATHER_SKY_QUALITY" label="Sky Qual (mag/arcsec2)" format="%4.2f" min="0" max="10240" step="1">
< <indiduino pin="21" type="input" mul="0.01" add="0"/>
---
> <defNumber name="WEATHER_IR_RADIANCE" label="IR Radiance" format="%5.0f" min="0" max="10240" step="1">
> <indiduino pin="21" type="input" mul="1" add="0"/>
47c47
< <defLight name="frezzing" label="Freezing">
---
> <defLight name="frezzing" label="frezzing">
97,99c97,99
< <defNumberVector device="Arduino MeteoStation" name="LIGHT" label="SQM" group="Raw Sensors" state="Idle" perm="ro" timeout="60">
< <defNumber name="LIGHT" label="SQM (mag/arcsec2)" format="%4.2f" min="0" max="10240" step="0.01">
< <indiduino pin="21" type="input" mul="0.01" add="0"/>
---
> <defNumberVector device="Arduino MeteoStation" name="LIGHT" label="IR Radiance" group="Raw Sensors" state="Idle" perm="ro" timeout="60">
> <defNumber name="LIGHT" label="LIGHT" format="%5.0f" min="0" max="10240" step="1">
> <indiduino pin="21" type="input" mul="1" add="0"/>
106c106
< <defLight name="MLX_FAIL" label="MLX Failure">
---
> <defLight name="IR" label="IR Failure">
110c110
< <defLight name="SQM_FAIL" label="TSL Failure">
---
> <defLight name="HR" label="HR Failure">
114c114
< <defLight name="BME_FAIL" label="BME Failure">
---
> <defLight name="P" label="P Failure">
</code>

I had to edit the javascript in index.html
<code>
329c329
< sqm.setValueAnimated(data.Light);
---
> sqm.setValueAnimated(data.SQM);

</code>

When I startMETEO.sh, I see a fewMessages and things seem to work well enough.

But I see that my cloud flag is not set correctly

{'date': datetime.datetime(2020, 2, 16, 18, 8, 7), 'ds': {'HR': 57.78, 'Thr': 0.0, 'IR': 19.75, 'Tir': 20.65, 'P': 991.7, 'Tp': 20.75, 'Dew': 12.15, 'Light': 14.62, 'T': 20.75, 'clouds': 100.0, 'skyT': 12.55, 'cloudFlag': 0.0, 'dewFlag': 0.0, 'frezzingFlag': 0.0}}

and even though I have run it for a while I only see RTdata.json and no Min Max or Avg .json files.

Any ideas?

Adrian
Last edit: 4 years 1 month ago by Adrian.
4 years 2 months ago #49607

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16
My mistake again
The RTdata.json file shows
{"cloudFlag": 1.0, "dewFlag": 0.0, "clouds": 100.0, "HR": 56.76, "Light": 16.17, "IR": 20.69, "Thr": 0.0, "Tir": 21.8, "Dew": 12.8, "P": 992.0, "frezzingFlag": 0.0, "Tp": 21.75, "TIME": "Sun Feb 16 18:34:22 2020", "skyT": 13.15, "T": 21.75}

Where as the RRD file contains
{'date': datetime.datetime(2020, 2, 16, 18, 34, 42), 'ds': {'HR': 56.64, 'Thr': 0.0, 'IR': 20.65, 'Tir': 21.75, 'P': 992.1, 'Tp': 21.75, 'Dew': 12.75, 'Light': 16.0, 'T': 21.75, 'clouds': 100.0, 'skyT': 13.1, 'cloudFlag': 1.0, 'dewFlag': 0.0, 'frezzingFlag': 0.0}}
4 years 2 months ago #49609

Please Log in or Create an account to join the conversation.

  • Posts: 89
  • Thank you received: 16
Problem wasn't me this time.

In case anyone else has a problem with this.

The recent updates to indiduinoMETEO.ino have
- put in a divider by 100.0 on the mlx reads (not sure if this is for a different version of the Adafruit library or a different sensor)
- reveresed the meaning of the cloudy and freezing flags.
400,403c400,401
<     //Tir = mlx.readAmbientTempC() / 100.0;
<     Tir = mlx.readAmbientTempC();
<     //IR = mlx.readObjectTempC() / 100.0;
<     IR = mlx.readObjectTempC();
---
>     Tir = mlx.readAmbientTempC() / 100.0;
>     IR = mlx.readObjectTempC() / 100.0;
512c510
<     if (cloudy==IPS_ALERT) {
---
>     if (cloudy==IPS_OK) {
524c522
<     if (frezzing==IPS_ALERT) {
---
>     if (frezzing==IPS_OK) {
1279d1276
<     runMeteoStation();
1280a1278
>     runMeteoStation();

Now my meteostation is reporting the correct flags for cloudy and freezing :-)



Marking this as SOLVED
The following user(s) said Thank You: Gonzothegreat, Gilles Gagnon
4 years 1 month ago #50157
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 294
  • Thank you received: 54
Good that you found a solution to the meteostationWEB problem. I should get myself to use it as its more user friendly than reading a table of weather data.

Thanks.
4 years 1 month ago #50171

Please Log in or Create an account to join the conversation.

Time to create page: 0.242 seconds