![]() |
wBox monitor pogodowy |
wBox weather monitor |
![]() |
PL Andreovia.pl | Mid-Life UK | San Sebastián ES | Europa Cafe TH | Komoka Weather CA |
Aplikacja wBox służy do wyświetlania w sposób ciągły bieżących warunków meteorologicznych, na podstawie danych z własnej stacji pogodowej oraz prognozy, udostępnianej przez serwis meteorologiczny YR.NO. Według założeń, strona jest uruchamiana na tablecie lub telefonie, w trybie pełnoekranowym przeglądarki, dane są odświeżane co 20 sekund, niektóre elementy są animowane.
Program jest przeznaczony dla osób zaznajomionych z meteorologią, dlatego zrezygnowałem z etykiet opisujących wyświetlane informacje. Wdrożenie i dostosowanie aplikacji do swoich potrzeb wymaga pewnej wiedzy i doświadczenia. Takie rozwiązanie jest trudniejsze, ale daje duże możliwości samodzielnego dostosowania i rozbudowy aplikacji.
Na tabletach z systemem Android używam przeglądarki Dolphin Express. Stację pogodową obsługuje program Cumulus MX, który zbiera dane i regularne przesyła je na FTP.
Zobacz szczegółowy opis informacji, jakie mogą być wyświetlane w układzie poziomym, oraz w układzie pionowym.
Opis dotyczy trzeciej wersji aplikacji wBox, w której jest bardzo wiele zmian a największe dotyczą źródła prognozy (pliki JSON), kalkulacji i wyświetlania. Jeżeli posługiwałeś się wersją pierwszą lub drugą, to przed instalacją wersji trzeciej najlepiej… zapomnij o tym, co wiesz :) Niektóre elementy, jak np. alert FEN'48, będą widoczne tylko wówczas, kiedy odpowiednie wartości spełniają warunki ustalone w konfiguracji.
FOLDERY I PODSTAWOWE PLIKI
font | – | folder fontów używanych w aplikacji |
ico | – | folder ikon prognozy pogody |
img | – | folder ikon aplikacji wBox |
lib | – | folder bibliotek: pliki JavaScript (*.js), stylu *.css itd. |
lib/wBox.js | – | podstawowy skrypt wBox, dla ewentualnych modyfikacji |
lib/wBox.min.js | – | podstawowy skrypt wBox w wersji skompresowanej, standardowo 'przypięty' do stron |
lib/wBoxIni.js | – | podstawowy plik konfiguracyjny |
lib/wBox.css | – | arkusz stylów wBox |
lib/realmoreT.txt | – | wzorzec z tagami (zmiennymi) dla pliku realmore.txt (patrz niżej) |
wBoxV2f.html | – | strona wBox wyświetlająca informacje meteorologiczne w układzie pionowym z prognozą dwudniową |
wBoxH3f.html | – | strona wBox wyświetlająca informacje meteorologiczne w układzie poziomym z prognozą trzydniową |
wVARf.html | – | strona testowa, pokazująca nazwy i bieżące wartości zmiennych użytych w aplikacji |
Pliki danych używane w aplikacji, generowane z innych źródeł: |
||
realtime.txt | – | generowany przez Cumulus MX: zestaw danych podstawowych |
realmore.txt | – | generowany przez Cumulus MX: zestaw danych dodatkowych |
Foldery aplikacji wBox mogą być współdzielone dla innych aplikacji i/lub danych, np. z programu Cumulus, używanych do prezentacji warunków pogodowych na stronie internetowej właściciela stacji.
URUCHOMIENIE APLIKACJI
- Pobierz pakiet startowy plików.
- Umieść pliki na FTP w folderze docelowym - u mnie jest to folder weather.
- Skopiuj plik lib/realmoreT.txt do folderu web w programie Cumulus MX.
- W konfiguracji programu Cumulus MX Settings/Extra web files dopisz wiersz umożliwiający przetwarzanie i wysyłanie na FTP pliku, na przykład:
- W pliku lib/wBoxIni.js
– wpisz współrzędne (Latitude, Longitude) dla swojej lokalizacji (możesz to sprawdzić np. w GoogleMaps),
– wpisz skrócone nazwy dni tygodnia. - W konfiguracji programu Cumulus MX Settings/Internet settings ustaw konfigurację dla obrazu fazy księżyca:
- Sprawdź, czy w folderach FTP pojawiły się już dane z Twojej stacji (pliki: realtime.txt i realmore.txt, _iMoon.png).
Jeśli zrobiłeś wszystko poprawnie strony wBoxV2f.html i wBoxH3f.html już powinny działać.
KONFIGURACJA
Informacje opisowe, np. nazwa własna stacji pogodowej, wpisane są w kodzie html i tam trzeba je zmienić.
Dostępne opcje konfiguracji właściwe dla danego układu graficznego strony umieszczone są na dole plików wBoxH3f.html, wBoxV2f.html (w końcowych wierszach):
parametr | wartości dopuszczalne |
znaczenie |
reComp | 0 lub 1 | kompas wiatrowy normalny lub odwrócony (południe na górze) |
fiHumg | (różne) | średnica okręgu dla wykresu wilgotności [!!!] |
fiRose | (różne) | średnica wykresu róży wiatrów [!!!] |
fdPrec | (różne) | mnożnik (krotność) dla wykresu opadów [!!!] |
viPext | 0 lub 1 | widoczność: ciśnienie minimalne i maksymalne |
viHome | 0 lub 1 | widoczność: temperatura i wilgotność w domu (tylko układ pionowy) |
vidBg1 | 0 lub 1 | debug: szybkie zmiany ciśnienie |
vidBg2 | 0 lub 1 | debug: tendencje zmian: temperatura, ciśnienie; smile |
vidBg3 | 0 lub 1 | debug: prognoza teraz: temperatura, ciśnienie |
vidBg4 | 0 lub 1 | debug: kalkulacje do alertu FEN |
Pozostałe opcje konfiguracji w pliku wBoxIni.js (wspólne dla stron):
parametr | wartości ustawione |
znaczenie |
FENtmp | 2.5 | alert FEN'48: mnożnik (krotność) wzrostu temperatury |
FENprs | 10 | alert FEN'48: spadek ciśnienia hPa |
FENspd | 23 | alert FEN'48: prędkość wiatru co najmniej 25m/s |
FENdrA | 135 | alert FEN'48: kierunek wiatru od 135° |
FENdrB | 315 | alert FEN'48: kierunek wiatru do 315° |
bigPrs | 14 | zmiana hPa dla alertu 'wielka zmiana ciśnienia' (na pojutrze) |
Nie zmieniaj wartości bez świadomej i wyraźnej potrzeby!
TIPS & TRICKS
- Po uruchomieniu prześlij mi proszę link do wBox'a na twojej stronie - chciałbym pokazać innym jakie to proste :)
- W plikach wBoxH3f.html, wBoxV2f.html, wBox.js jest wiele komentarzy (po polsku) opisujących działanie.
- Alert FEN'48 jest kalkulowany na podstawie prognozy, dotyczy możliwości wystąpienia pojutrze silnych wiatrów i dużego wzrostu temperatury.
- Słupek prognozy opadów jest podzielony na sekcje co 2mm opadu (na przykład 5 'kafelków' oznacza prognozę 10mm opadów).
- Czas hh:mm:ss przekreślony czerwonymi symbolami X (tylko układ pionowy) oznacza, że dane są nieaktualne: serwer lub stacja pogodowa wyłączone, brak internetu itd.
- Prognozowana prędkość wiatru jest pokazana przy pomocy standardowych symboli prędkości wiatru na mapie synoptycznej.
- Odwrócenie kompasu wiatrowego jest bardzo przydatne, kiedy tablet zlokalizowany jest na południowej ścianie pokoju.
- W interwałach prognozy doba (24h) podzielona jest następująco:
od godz. 6:00 rano, do godz. 12:00 w południe od godz. 12:00 w południe, do godz. 18:00 po południu od godz. 18:00 po południu, do godz. 24:00 w nocy od godz. 24:00 w nocy, do godz. 6:00 rano - Kolory elementów aplikacji dopasowałem tak, aby wyświetlanie przez 24h na dobę nie męczyło wzroku… i tabletu :)
- W miarę możliwości proszę, nie zmieniaj czcionki domyślnej Signika - bardzo ją lubię :)
- Wykres prognozowanych zmian ciśnienia odnosi się do szarej linii bazowej ciśnienia średniego: powyżej jest ciśnienie wysokie, poniżej niskie.
- Ikonka rękaw lotniczy (do pomiaru prędkości wiatru) jest animowana, wychyla się zależnie od prędkości wiatru.
- Bla, bla, bla - trzynastka jest pechowa :(
- Alert UV jest widoczny, jeżeli wartości są > 6 (uznane za niebezpieczne).
- Jeśli używasz własnych ikon prognozy pogody, to plik przemianowania nazw znajdziesz TU.
- Ciesz się życiem :)
The wBox application is used to display current weather conditions on a continuous basis, based on data from its own weather station and forecast provided by the YR.NO weather service. According to the assumptions, the website is launched on a tablet or phone, in full-screen browser mode, the data is refreshed every 20 seconds, some elements are animated.
The program is intended for people familiar with meteorology, which is why I gave up labels describing the displayed information. Implementing and adapting the application to your needs requires some knowledge and experience. This solution is more difficult, but it gives great opportunities for self-adaptation and development of the application.
I use the Dolphin Express browser on Android tablets. The weather station is operated by Cumulus MX, which collects data and regularly sends it to FTP.
See a detailed description of the information that can be displayed horizontally, and vertically.
The description applies to the third version of the wBox application, in which there are a lot of changes and the biggest ones concern the calculation and display of the forecast. If you used the first or second version, it is best before you install the third version... forget about what you know :) Some items, such as the FEN'48 alert, will only be visible if the appropriate values meet the conditions set in the configuration.
FOLDERS AND BASIC FILES
font | – | fonts folder used in the application |
ico | – | weather forecast icon folder |
img | – | wBox application icon folder |
lib | – | library folder: JavaScript files (*.js), style *.css itd. |
lib/wBox.js | – | basic wBox script |
lib/wBox.min.js | compressed basic wBox script | |
lib/wBox.css | – | style sheet wBox |
lib/realmoreT.txt | – | pattern with tags (variables) for the realmore.txt file (see below) |
wBoxV2f.html | – | wBox page displaying meteorological information in a vertical layout, forecast for two days |
wBoxH3f.html | – | wBox page displaying meteorological information in a horizontal layout, forecast for three days |
wVARf.html | – | test page showing the names and current values of the variables used in the application |
Data files used in the application, generated from other sources: |
||
realtime.txt | – | Cumulus MX generated: master data set |
realmore.txt | – | Cumulus MX generated: additional data set |
The wBox application folders can be shared for other applications and/or data, e.g. from Cumulus, used to present weather conditions on the station owner's website.
STARTING APPLICATION
- Download file startup package.
- Put the files on FTP in the destination folder - my folder is called weather.
- Copy the lib/realmoreT.txt file to the web folder in Cumulus MX.
- In the program configuration Cumulus MX Settings/Extra web files append a line to enable processing and sending the file to FTP, for example:
- In the lib/wBoxIni.js file
– enter the coordinates (Latitude, Longitude) for your location (you can check it e.g. in GoogleMaps),
– enter the abbreviation of the days of the week. - In the Cumulus MX Settings / Internet settings configuration, set the configuration for the moon phase image:
- Check if the FTP folder contains data from your station (files: realtime.txt and realmore.txt, _iMoon.png)
If you did everything correctly, wBoxV2f.html and wBoxH3f.html should be working.
CONFIGURATION
Descriptive information, e.g. the weather station's own name, is entered in the html code and you must change it there.
The available configuration options specific to the page layout are listed at the bottom of the wBoxH3f.html, wBoxV2f.html files (in the final lines):
parameter |
acceptable |
description |
reComp | 0 or 1 | wind compass: normal or inverted (South on top) |
fiHumg | (different) | circle diameter for humidity chart [!!!] |
fiRose | (different) | diameter of the windrose chart [!!!] |
fdPrec | (different) | multiplier for the precipitation chart [!!!] |
viPext | 0 or 1 | visibility: minimum and maximum pressure |
viHome | 0 or 1 | visibility: temperature and humidity in the house (only vertical layout) |
vidBg1 | 0 or 1 | debug: rapid pressure changes |
vidBg2 | 0 or 1 | debug: tendencies of changes: temperature, pressure; smile |
vidBg3 | 0 or 1 | debug: forecast now: temperature, pressure |
vidBg4 | 0 or 1 | debug: calculations for the alert FEN'48 |
Other configuration options in the wBoxIni.js file (common for pages):
parameter |
proposed |
description |
FENtmp | 2.5 | alert FEN'48: multiplier of temperature increase |
FENprs | 10 | alert FEN'48: pressure drop hPa |
FENspd | 25 | alert FEN'48: wind speed at least 25m/s |
FENdrA | 135 | alert FEN'48: wind direction from 135° |
FENdrB | 315 | alert FEN'48: wind direction to 315° |
bigPrs | 14 | hPa change for the 'big pressure change' alert (the day after tomorrow) |
Do not change value without a conscious and clear need!
TIPS & TRICKS
- After starting please send me a link to wBox on your website - I would like to show others how easy it is :)
- In the wBoxH3f.html, wBoxV2f.html, wBox.js files there are many comments (in Polish) describing the operation.
- FEN'48 alert is calculated on the basis of forecasts regarding the possibility of strong winds the day after tomorrow and high temperature rise.
- The precipitation forecast bar is divided into sections every 2mm (for example, 5 'tiles' means a 10mm precipitation forecast).
- Time hh:mm:ss crossed out with red X (vertical layout only) means that the data is out of date: server or weather station turned off, no internet connection etc.
- The forecast wind speed is shown using standard wind speed symbols on the synoptic map (I didn't find the English website).
- Reversing the wind compass is very useful when the tablet is located on the south wall of the room.
- In the forecast intervals, the day (24h) is divided as follows:
from 6:00 am to 12:00 noon from 12:00 noon, until 18:00 in the afternoon from 18:00 in the afternoon until 24:00 at night from 24:00 at night, up to 6:00 in the morning - I have adjusted the colors of the application elements so that displaying 24 hours does not strain your eyes... and the tablet :)
- If possible, please do not change the default Signika font - I like it very much :)
- The pressure prognosis graph refers to the gray baseline of medium pressure: pressure above is high, below pressure is low.
- The windsock icon (for measuring the wind speed) is animated and it tilts according to the wind speed.
- Blah, blah, blah - thirteen is unlucky :(
- UV alert is visible if the values are > 6 (considered unsafe).
- If you are using your own weather forecast icons, you can find the rename file HERE.
- Enjoy your life :)