Working. I have to just test it little more.
If you need second opinion
yes I need help.
This will be first WiFiLogger export function where you can choose Real Time Data, or latest archive records.
For a month or two all of you could use last record using
http://WFL_IP/lastlog.jsonThis is a file to export via MQTT, or HTTP. Should be triggered when new records was made in data logger.
Where is a problem?
Wind direction. Real time data has wind direction from 0 to 360 degree.
In arch records wind direction is 0-15 = N, NNE, ESE ....
if (wind == 0xFF) return S_Dash;
switch (wind) {
case 0: //N
return F("N"); break;
case 1: //NNE
return F("NNE"); break;
case 2: // NE
return F("NE"); break;
case 3: // ENE
return F("ENE"); break;
case 4: // E
return F("E"); break;
case 5: // ESE
return F("ESE"); break;
case 6: // SE
return F("SE"); break;
case 7: // SSE
return F("SSE"); break;
case 8: // S
return F("S"); break;
case 9: // SSW
return F("SSW"); break;
case 10: // SW
return F("SW"); break;
case 11: // WSW
return F("WSW"); break;
case 12: // W
return F("W"); break;
case 13: // WNW
return F("WNW"); break;
case 14: // NW
return F("NW"); break;
case 15: // NNW
return F("NNW"); break;
}
May I simply export it as degrees?
Wind - Deegre
0 - 0
1 - 22,5
2 - 45
3 - 67,5
4 - 90
5 - 112,5
6 - 135
7 - 157,5
8 - 180
9 - 202,5
10 - 225
11 - 247,5
12 - 270
13 - 292,5
14 - 315
15 - 337,5
Another problem is a dew point. Will it be ok when I will calculare dew point using arch. temperature and arch. humidity?