×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

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

3 months 2 weeks ago 3 months 1 week ago by procras.
procras
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
meteostationWEB cloud flag 0 when clouds: 100% (SOLVED) #49607
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 few

2020-02-16T17:49:13: Client 5: read: Connection reset by peer

Messages 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

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

3 months 2 weeks ago
procras
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
meteostationWEB cloud flag 0 when clouds: 100% (SOLVED) #49609
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}}

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

3 months 1 week ago
procras
Senior Boarder
Senior Boarder
Posts: 55
More
Topic Author
meteostationWEB cloud flag 0 when clouds: 100% (SOLVED) #50157
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
Attachments:
The following user(s) said Thank You Gonzothegreat, G_Gagnon

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

3 months 1 week ago
G_Gagnon
Expert Boarder
Expert Boarder
Posts: 87
Karma: 2
More
meteostationWEB cloud flag 0 when clouds: 100% (SOLVED) #50171
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.

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

Time to create page: 0.235 seconds