forked from mteel/wview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wview-Old-User-Manual.html
executable file
·3603 lines (2891 loc) · 157 KB
/
wview-Old-User-Manual.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>wview User Manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<a href="#topofpage"></a>
<h1 align="center">wview User Manual</h1>
<p align="center">Nov. 12, 2009</p>
<p align="left">
<h2><strong>Contents</strong></h2><br>
1. <a href="#1. Overview">Overview</a><br>
2. <a href="#2. Distribution Contents">Distribution Contents</a><br>
3. <a href="#3. Prerequisites">Prerequisites</a><br>
4. <a href="#4. Build and Install">Build and Install</a><br>
5. <a href="#5. Cross Compiling">Cross Compiling</a><br>
6. <a href="#6. Configuration">Configuration</a><br>
7. <a href="#7. Weather Station Configuration">Weather Station Configuration</a><br>
7.1 <a href="#7.1 Station Simulator">Station Simulator</a><br>
7.2 <a href="#7.2 Davis Vantage Pro/Pro2 Console">Davis Vantage Pro/Pro2 Console</a><br>
7.3 <a href="#7.3 Vaisala WXT510">Vaisala WXT510</a><br>
7.4 <a href="#7.4 La Crosse WS-2300 Series">La Crosse WS-2300 Series</a><br>
7.5 <a href="#7.5 Oregon Scientific WMR918 Series">Oregon Scientific WMR918 Series</a><br>
8. <a href="#8. Metric Units and Internationalization">Metric Units and Internationalization</a><br>
9. <a href="#9. Run Environment Description">Run Environment Description</a><br>
10. <a href="#10. Configuration Files Description">Configuration Files Description</a><br>
11. <a href="#11. Using a MySQL or PostgreSQL Server to Store Data">Using a MySQL or PostgreSQL Server to Store Data</a><br>
12. <a href="#12. Setting Up FTP Transfers">Setting Up FTP Transfers</a><br>
13. <a href="#13. Alarms and wview As a Data Feed Engine">Alarms and wview As a Data Feed Engine</a><br>
14. <a href="#14. Secure File Transfer (rsync/ssh)">Secure File Transfer (rsync/ssh)</a><br>
15. <a href="#15. Miscellaneous">Miscellaneous</a><br>
16. <a href="#16. CWOP - Submitting Your Data to NOAA and the CWOP System">CWOP - Submitting Your Data to NOAA and the CWOP System</a><br>
17. <a href="#17. Wunderground/Weatherforyou - Submitting Your Data to Weather Underground and/or Weatherforyou">Wunderground/Weatherforyou - Submitting Your Data to Weather Underground and/or Weatherforyou</a><br>
18. <a href="#18. AWEKAS - Providing Your Data to Awekas">AWEKAS - Providing Your Data to Awekas</a><br>
19. <a href="#19. Using a Linksys NSLU2 as the wview Host">Using a Linksys NSLU2 as the wview Host</a><br>
20. <a href="#20. Porting New Stations To wview">Porting New Stations To wview</a><br>
21. <a href="#21. Sensor Calibration">Sensor Calibration</a><br>
22. <a href="#22. Data Stored in SQLite3 (And How to Use It)">Data Stored in SQLite3 (And How to Use It)</a><br>
23. <a href="#23. wviewmgmt - The New Way to Manage wview">wviewmgmt - The New Way to Manage wview</a><br>
24. <a href="#24. Troubleshooting">Troubleshooting</a><br><br>
</p>
<a name="1. Overview"></a>
<hr size=2 noshade>
<h2>1. Overview</h2>
wview is a collection of linux/unix daemons which interface with a supported
weather station to retrieve archive records (if generated by the station) and
current conditions. The stations currently supported are:<br>
Davis Vantage Pro/Pro2<br>
Vaisala WXT510<br>
La Crosse WS-23XX<br>
Oregon Scientific WMR9X8/WMR928N<br>
<br>
If the station does not generate archive records internally, wview will auto-generate
archive records based on the sensor readings collected for that interval. The
archive records are stored in the Davis WLK file format (thus Weatherlink-generated
archive files can often be used by wview). At a configurable interval, wview will
utilize the archive history and current conditions to generate weather images
(buckets, dials and graphs) and HTML web pages based on user-configurable HTML
templates.<br><br>
Features:<br>
<ul>
<li>24x7x365 reliability.</li>
<li>Fast image and HTML/XML file generation.</li>
<li>Non-GUI, headless, lightweight (size and resources).</li>
<li>Embeddable - can be deployed on low-power embedded systems such as the Linksys
NSLU2.</li>
<li>Multi-Lingual - HTML/XML templates, labels and text.</li>
<li>US (Imperial) or Metric Units - can be easily configured for metric or US units
of measure.</li>
<li>SQLite Archive Storage - archive data is stored in an SQLite3 relational database.</li>
<li>Remote Upload - web pages and images can be transferred to a remote web server
via an ftp or secure ssh process included with wview.</li>
<li>Alarms - the wview alarm daemon wvalarmd can be enabled to deliver current
conditions to TCP socket clients as a near real-time data feed engine. wvalarmd
can also be configured to function as a weather data alarm generator to user
specified scripts or binaries.</li>
<li>CWOP - can be configured to submit data to CWOP.</li>
<li>Wunderground - can be configured to submit data to Wunderground.</li>
<li>Awekas - can be configured to submit data to Awekas.</li>
<li>Weatherforyou - can be configured to submit data to Weatherforyou.</li>
<li>RSS Feeds - processes XML template files and includes a default weather data
RSS feed template.</li>
</ul>
<br>
<a name="2. Distribution Contents"></a>
<hr size=2 noshade>
<h2>2. Distribution Contents</h2>
<table align="center" border="0" width="100%">
<tbody>
<tr>
<td align="left" width="30%">
/stations/common
</td>
<td align="left" width="70%">
Source directory for the station daemon
</td>
</tr>
<tr>
<td align="left" width="30%">
/stations/VantagePro
</td>
<td align="left" width="70%">
Source directory for the Davis Vantage Pro/Pro2 interface
</td>
</tr>
<tr>
<td align="left" width="30%">
/stations/Simulator
</td>
<td align="left" width="70%">
Source directory for the station simulator
</td>
</tr>
<tr>
<td align="left" width="30%">
/stations/WXT510
</td>
<td align="left" width="70%">
Source directory for the Vaisala WXT510 interface
</td>
</tr>
<tr>
<td align="left" width="30%">
/stations/WS-2300
</td>
<td align="left" width="70%">
Source directory for the La Crosse WS-23XX interface
</td>
</tr>
<tr>
<td align="left" width="30%">
/stations/WMR918
</td>
<td align="left" width="70%">
Source directory for the Oregon Scientific WMR9X8 interface
</td>
</tr>
<tr>
<td align="left" width="30%">
/htmlgenerator
</td>
<td align="left" width="70%">
Source directory for the file generator
</td>
</tr>
<tr>
<td align="left" width="30%">
/common
</td>
<td align="left" width="70%">
Common source and build files
</td>
</tr>
<tr>
<td align="left" width="30%">
/wviewmgmt
</td>
<td align="left" width="70%">
Source directory for the wview management web site
</td>
</tr>
<tr>
<td align="left" width="30%">
/examples/conf
</td>
<td align="left" width="70%">
Example config files (see description below)
</td>
</tr>
<tr>
<td align="left" width="30%">
/examples/html/classic
</td>
<td align="left" width="70%">
Example HTML template files and tag description file parameters.txt
(see description below)
</td>
</tr>
<tr>
<td align="left" width="30%">
/examples/html/chrome
</td>
<td align="left" width="70%">
Example HTML template files and tag description file parameters.txt
(see description below)
</td>
</tr>
<tr>
<td align="left" width="30%">
/utilities/archive-be2le
</td>
<td align="left" width="70%">
Source directory for the wview archive directory Big-Endian to
Little-Endian command line convertor
</td>
</tr>
<tr>
<td align="left" width="30%">
/utilities/archive-le2be
</td>
<td align="left" width="70%">
Source directory for the wview archive directory Little-Endian to
Big-Endian command line convertor
</td>
</tr>
<tr>
<td align="left" width="30%">
/utilities/wlk2sqlite
</td>
<td align="left" width="70%">
Source directory for the wview WLK to SQLite3 archive convertor
</td>
</tr>
<tr>
<td align="left" width="30%">
/utilities/sqlite2wlk
</td>
<td align="left" width="70%">
Source directory for the wview SQLite3 to WLK archive convertor
</td>
</tr>
<tr>
<td align="left" width="30%">
/configure
</td>
<td align="left" width="70%">
build configuration script to be executed before building wview
</td>
</tr>
<tr>
<td align="left" width="30%">
/cross-compile
</td>
<td align="left" width="70%">
Contains example configure scripts for cross compilation. libz, libpng,
libgd, librad and wview scripts are included (and should be built in that
order). Use these scripts instead of "./configure" to configure these
libraries for cross compilation. These scripts configure for arm-linux
targets but could easily be edited for a different target.
</td>
</tr>
<tr>
<td align="left" width="30%">
/scripts
</td>
<td align="left" width="70%">
Contains example helper scripts for wview installation and update.
</td>
</tr>
<tr>
<td align="left" width="30%">
/ChangeLog
</td>
<td align="left" width="70%">
The release notes file
</td>
</tr>
<tr>
<td align="left" width="30%">
/wview-User-Manual.html
</td>
<td align="left" width="70%">
This file, the User Manual
</td>
</tr>
<tr>
<td align="left" width="30%">
/wview-Quick-Start.html
</td>
<td align="left" width="70%">
Quick Start Guide
</td>
</tr>
<tr>
<td align="left" width="30%">
/wview-Quick-Start-MacOSX.html
</td>
<td align="left" width="70%">
MacOSX-specific Quick Start Guide
</td>
</tr>
<tr>
<td align="left" width="30%">
/wview-Quick-Start-Debian.html
</td>
<td align="left" width="70%">
Debian-specific Quick Start Guide
</td>
</tr>
<tr>
<td align="left" width="30%">
/UPGRADE
</td>
<td align="left" width="70%">
Notes on upgrading from previous versions
</td>
</tr>
</tbody>
</table>
<br><br>
<a name="3. Prerequisites"></a>
<hr size=2 noshade>
<h2>3. Prerequisites</h2>
<h3><u>Libraries</u></h3>
<pre>
Note: Some of these libraries may be represented as "-dev" or similar in your
package management utility, i.e., "libcurl-dev". If they are, you should install
the dev version in order to get the development libraries that radlib/wview needs.
</pre>
<ul>
<li>
<strong>libz</strong> - compression library
</li>
<li>
<strong>libpng</strong> - png image library
</li>
<li>
<strong>libreadline5-dev</strong> - readline library
</li>
<li>
<strong>gawk</strong> - gnu pattern processing language
</li>
<li>
<strong>libsqlite3</strong> - SQLite3 database run time library - make sure
the older version (2.x.y) is not installed - it may be named libsqlite0
(debian, kubuntu) or some other package name - you can only
have SQLite3 libraries and development environment installed
</li>
<li>
<strong>libsqlite3-dev</strong> - SQLite3 database development library -
make sure the older version (2.x.y) is not installed - it may be
named libsqlite0-dev (debian, kubuntu) or some other package name - you can only
have SQLite3 libraries and development environment installed
</li>
<li>
<strong>sqlite3</strong> - SQLite3 database command line utility
</li>
<li>
<strong>libgd2</strong> - graphics drawing library - may require installation -
<a href="http://www.boutell.com/gd/">http://www.boutell.com/gd/</a>
</li>
<li>
<strong>radlib</strong> - rapid application development library -
must be installed with SQLite support (--enable-sqlite) -
<a href="http://www.radlib.teel.ws">http://www.radlib.teel.ws</a>
</li>
<li>
<strong>libssl</strong> - secure socket library - optional, required for libcurl
</li>
<li>
<strong>libcurl</strong> - "C" URL HTTP library - optional, required for Weather Underground or Weatherforyou -
<a href="http://curl.haxx.se/libcurl/">http://curl.haxx.se/libcurl/</a>
</li>
<li>
<strong>sendmail</strong> - email transfer agent - optional, required for email alerts
</li>
<li>
<strong>sendEmail</strong> - command line email sending utility - optional, required for email alerts
</li>
<li>
<strong>mysql-client</strong> - MySQL client utilities (including mysqlimport) - optional, required for MySQL exports
</li>
</ul>
<h3><u>System</u></h3>
<ul>
<li>
<strong>ntp/xntp</strong> - Network Time Protocol - a configured and functional NTP
daemon should be enabled on the host system to keep system and weather
station time accurate and in sync
</li>
<li>
<strong>apache</strong> - in order to serve your weather site to the world,
an http server is required - other http servers will work too. If you are
going to export your site to another server or to your ISP account site,
then an http server is not required on the wview server.
</li>
<li>
<strong>php5 and php5-sqlite3</strong> - optionally needed for browser-based
configuration (requires apache or similar)
</li>
<li>
<strong>Serial/Ethernet/USB port</strong> - an available interface port
is required to connect to the Weather Station<br><br>
<ul>
<li>Serial</li>
<li>Ethernet - a terminal server or ethernet to serial server is required -
set up as decribed above for the serial port and configured in transparent
data mode (no control character processing) with no packet delimiter.
wview allows you to specify the hostname and port of your serial server.
The <a href="http://www.neteon.net/">Neteon</a> GW21E, Lantronix MSS1-T
and Xyplex Maxserver 1600 have been confirmed to work with wview. See
the <a href="#15. Miscellaneous">Miscellaneous</a> section for my
configuration notes on the GW21E and the MSS1-T.</li>
<li>USB</li>
</ul>
</li>
</ul>
<h3><u>Weather Station - one of the following:</u></h3>
<ul>
<li>
<strong>Vantage Pro or Vantage Pro2 Weather Station with Console</strong><br>
<ul>
<li>
<strong>WeatherLink for Vantage Pro or Pro2, Windows, Serial or USB</strong> -
the windows software is not required, but this is the only way to obtain the
serial or USB data logger
</li>
</ul>
</li>
<li>
<strong>Vaisala WXT510</strong><br>
</li>
<li>
<strong>La Crosse WS-2300 Series</strong><br>
</li>
<li>
<strong>Oregon Scientific WMR918/928N/968 Series</strong><br>
</li>
<li>
<strong>Station Simulator (for demos and testing)</strong><br>
</li>
<li>
<!-- New Station -->
</li>
</ul>
<br><br>
<a name="4. Build and Install"></a>
<hr size=2 noshade>
<h2>4. Build and Install</h2>
<pre>
Select one of the following methods based on your OS/distribution.
4.1 Debian and Derivatives (ubuntu, kubuntu, xubuntu)
Use the scripts/wview-install-debian script. It is also available at:
<a href="http://sourceforge.net/projects/wview/files/wview/wview-install-debian/download">wview-install-debian</a>
It will install all prerequisites (via apt-get) and the latest wview.
4.2 Mac OSX >= 10.4
4.2.1 Install XCode for your OSX version:
<a href="https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20505">Download XCode</a>
4.2.2 Install MacPorts: <a href="http://distfiles.macports.org/MacPorts/">Download MacPorts</a>
4.2.3 Execute the following from the command line:
> sudo port -d selfupdate
> sudo port install wview
This will install all prerequisites and wview.
4.3 Manual Installation
4.3.1 Extract in the location [wview_bld_path] of your choosing:
> cd [wview_bld_path]
> tar zxvf wview-x.y.z.tar.gz
4.3.2 Change directory to the wview root source directory:
> cd [wview_bld_path/wview-x.y.z]
4.3.3 Run the configure script to create the build files for your platform:
Note: If the environment variable HTTP_DOC_ROOT is defined prior to
invocation of the configure script, the install target will
install wviewmgmt (The Web Management Tool) to the http document
root specified.
Note: [station_enable_str] refers to the appropriate enable string in the
list of stations in the previous section *for your station*.
=> Possible Configuration Arguments:
[station_enable_str] - one of:
[none] --enable-station-vpro is default
--enable-station-vpro
--enable-station-wxt510
--enable-station-ws2300
--enable-station-wmr918
--enable-station-sim
Optional HTTP Services Support - one of:
[none] No Wunderground/Weatherforyou support (default)
--enable-http
=> Examples:
[(default)]
> HTTP_DOC_ROOT=/var/www ./configure [station_enable_str]
[Wunderground]
> HTTP_DOC_ROOT=/var/www/weather ./configure [station_enable_str] --enable-http
=> Note:
Execute "./configure --help" to see user configurable options. Be careful
changing any of the prefix values, this has an effect on wview
configuration.
4.3.4 Build:
> make
4.3.5 Install:
> sudo make install
Note: The following build targets are available:
make - default target builds all source
make clean - deletes binaries and object files
make install - makes "default" then installs the binaries to
${exec-prefix}/bin (usually /usr/local/bin); copies
example config files and run environment (from .../bin)
to $prefix/etc/wview and $prefix/var/wview respectively,
preserving existing data files and configuration if they
already exist
4.3.6 Configure to run at system boot (if new install):
Select the appropriate wview run script -
wview-x.y.z/examples/SuSE|RedHat|FreeBSD|FedoraCore|Debian|NSLU2 (based on your OS/distro)
Copy it to the proper location for your system:
SuSE: cp wview-x.y.z/examples/SuSE/wview /etc/init.d
FreeBSD: cp wview-x.y.z/examples/FreeBSD/wview /etc/rc.d
FedoraCore: cp wview-x.y.z/examples/FedoraCore/wview /etc/rc.d/init.d
Debian: cp wview-x.y.z/examples/Debian/wview /etc/init.d
Make sure it is executable:
SuSE: chmod +x /etc/init.d/wview
FreeBSD: chmod +x /etc/rc.d/wview
FedoraCore: chmod +x /etc/rc.d/init.d/wview
Debian: chmod +x /etc/init.d/wview
Create a symbolic link in the runlevel directory you boot your server:
Fedora/Redhat to boot into runlevel 3:
> cd /etc/rc.d/rc3.d
> ln -s ../init.d/wview S98wview
Debian/ubuntu:
> update-rc.d wview defaults 99
Other distros will be some variation of this.
wview will now be started when the system is booted.
Note: You can start/stop wview using this run script:
> /etc/init.d/wview start *or*
> /etc/init.d/wview stop
Run Script Notes:
1) These are example scripts - ergo their location in the distro under the
examples directory. Don't be afraid to edit the appropriate one for your
system to your configuration and install location.
2) Whatever "--prefix" you select during the configure step (default =
/usr/local), the wview start scripts are automatically updated to include
the proper prefix for binary file and run directories.
3) You should use the same "--prefix=xxx" specification when configuring
radlib and wview. Further, this should be the default install location
for libraries and library headers in your system - i.e., prefix/lib and
prefix/include for libgd2.a, libpng.a, libz.a and gd.h respectively. Do
not select a non-default prefix (/usr/local) randomly.
4.3.7 Add radlib location to shared library cache:
If you get errors similar to:
/usr/local/bin/wviewd: error while loading shared libraries:
librad.so.0: cannot open shared object file: No such file or directory
you need to either copy the latest wview start script from the distro
(examples/<your_distro>/wview) to your start script location (see the
preceeding section), or add the radlib shared library location
(/usr/local/lib) to your shared library cache (see /etc/ld.so.conf) and run
ldconfig.
</pre>
<br><br>
<a name="5. Cross Compiling"></a>
<hr size=2 noshade>
<h2>5. Cross Compiling</h2>
<pre>
See the scripts in /cross-compile for "./configure" alternatives.
This directory contains example configure scripts for cross compilation. libz,
libpng, libgd, librad and wview scripts are included (and should be built in
that order). Use these scripts instead of "./configure" to configure these
libraries for cross compilation. These scripts configure for arm-linux
targets but can be edited for other targets.
Note: The config-radlib-arm-linux and config-wview-arm-linux scripts will accept
up to 3 additional configure options.
The general build sequence is:
> ./config-[pkgname]-arm-linux
> make
[become root]
> make install
All libs and applications are installed in the toolchain root, defined in the
config scripts.
The general build order is:
libz
libpng
libgd2
libreadline5
libsqlite
librad
wview
</pre>
<br><br>
<a name="6. Configuration"></a>
<hr size=2 noshade>
<h2>6. Configuration</h2>
<pre>
Note: See the appropriate station configuration section <a href="#7. Weather Station Configuration">7. Weather Station Configuration</a>
for a procedure to configure your weather station prior to running wview for
the first time.
Note: See the <a href="#10. Configuration Files Description">Configuration Files Description</a> and <a href="#9. Run Environment Description">Run Environment Description</a>
sections for detailed information concerning files and directories mentioned here.
6.1 (Mandatory) Read the distro (or online) version of the file UPGRADE.
6.2 (Mandatory) Configure wview
Use one of the following methods:
6.2.1 Web Access ($distro/wviewmgmt)
The wview SQLite3 configuration database can be updated using a browser and
hosting an http server on the wview server. The directory $distro/wviewmgmt
provides a web interface for wview configuration. The default password is
"wview". See the section on the wviewmgmt Manager for setup and use details.
6.2.2 wviewconfig
The wview SQLite3 configuration database can be updated using the configure
script "wviewconfig". This script asks questions interactively then updates
(backing up the existing file) the file $prefix/etc/wview/wview-conf.sdb based
on the answers. It uses your previous settings as the default selections where
appropriate. It will also allow interactive enabling/disabling of optional wview
capabilities such as alarms or file transfer via ftp or ssh. See the relevant
sections of this manual for details concerning configuration of the optional
capabilities.
wviewconfig can be safely used for existing installs. It uses the current
settings as the default choices, so you don't have to remember what your
prior settings were. It will also allow the configuration of new wview
optional capabilities while remaining backward compatible with all versions
of wview since the 1.0.0 release.
6.3 (Mandatory) Run the wviewhtmlconfig Script
Customizing HTML Templates For Your Site
Note: Changing HTML templates in $prefix/etc/wview/html does not require a restart
of wview. The changes you make will take effect at the next htmlgend
generation cycle.
Note: Changing the config files images.conf, images-user.conf,
html-templates.conf and (if supported) forecast.conf does not require
a restart of wview (as of version 3.1.0), but does require a HUP signal
to be sent to htmlgend to cause these files to be re-read. Do this as
follows (this will also toggle log verbosity):
sudo kill -s HUP `cat $prefix/var/wview/htmlgend.pid`
As of version 3.5.0, a new configuration script for template setup has been
added: wviewhtmlconfig. You should run this first to configure which site
skin you want to use and to setup the default imperial or metric graphics.
To run it (as root) enter "wviewhtmlconfig" at the command line, it is interactive
and will save your old $prefix/etc/wview/html directory to $prefix/etc/wview/html-DATE.TIME.
As wview users contribute new skins they will be added to the wview distribution
and supported by the wviewhtmlconfig script.
HTML template files (in $prefix/etc/wview/html) should be customized to your language and
your design preferences. The configuration file html-templates.conf specifies the
template files to be used for generation. You may add or remove from this list as
needed.
Edit copies placed in $prefix/etc/wview/html directory, either by use of the "wviewhtmlconfig"
script or manually copied for upgrades.
The HTML tags "!--stationCity--" and "!--stationState--" should not be removed
from template files for which you want the station location included. wview will
replace these tags with the values you specify for "STATION_CITY" and "STATION_STATE"
in $prefix/etc/wview/wview-conf.sdb.
The default wview "skin" is provided in the distribution at:
examples/html/classic. For information on creating your own skin, see the file
"examples/html/Template-Skins-HOWTO.txt".
The default configuration supports different homepage templates based on day or night.
These templates are "index-day.htx" and "index-night.htx" in
$prefix/etc/wview/html-templates.conf. If you want one standard homepage template INSTEAD
of day/night templates, uncomment "index.htx" and comment the day/night templates
in the $prefix/etc/wview/html-templates.conf file. See the example html-templates.conf file
in the distro for more details. You may either create soft links to the day and
night templates you want to use in $prefix/etc/wview/html
(ln -s index-clouds.htx index-day.htx), or copy the files you want to
index-day.htx and index-night.htx.
There is now support for XML file generation. XML templates should be named
"*.xtx" and placed in $prefix/etc/wview/html. An example RSS feed template is
included in the distro: examples/html/wxrss.xtx. An href to it is included
in all home page template examples so the RSS feed may be discovered while
visiting your home page. wxrss.xtx should be edited for your site when placed
in $prefix/etc/wview/html either manually or via "make install".
There is now support for "generic" template file types. For any template
file named "example.[ext]x" and listed in html-templates.conf, wview will
generate a file named "example.[ext]". For example, "myscript.phpx" listed
in html-templates.conf and found in $prefix/var/wview/html will have all wview
tags replaced and the resulting file will be named "myscript.php". Please
note that if you are using FTP to transfer your files you will need to add
rules for any new extensions you want to support in the wview-conf.sdb database.
There is support for two new html tags - forecast rule and forecast icon.
The new tags are !--forecastRule-- and !--forecastIcon-- (brackets omitted)
respectively.
The configuration file forecast.conf allows the user to define the icon
files and text associated with the forecast rules. See the example
forecast.conf file for details. The icon tag will be replaced by an image
html construct pointing at the appropriate icon image file. The rule tag will
be replaced by the corresponding text string defined in forecast.conf.
Because these capabilities require 35 KB or more of memory (and I think the
VP forecasts are hokey), they are disabled by default.
There is now support for html template macro file inclusion in html template
files. The new meta-tag is !--include filename.xxx-- (brackets omitted). Any
template macro file that is to be included in one or more html templates should
be listed BEFORE any templates including it in the $prefix/etc/wview/html-templates.conf
configuration file. There is no restriction on the levels of inclusion, just be
sure you specify macro templates early in the html-templates.conf file.
Note that you can create any page template design you like - the file
examples/html/parameterlist.txt contains a list of all html tags supported by wview.
These tags are replaced by the actual data when the html page is generated by wview.
6.4 (New Installs) Existing Weatherlink Archive Files
If you have existing archive files (*.wlk) that you want to import, use the new
wlk2sqlite utility to import all archive records into the SQLite3 database
prior to starting wview. It will find them and use them for historical charts
and NOAA reports. Be sure they were collected using the same archive interval
that you are going to use for your VP with wview. See the section
<a href="#7.2 Davis Vantage Pro/Pro2 Console">Preparing a New Vantage Pro Console</a> for more details.
Note: If you need to convert archive files from big endian to little endian,
use the arc_be2le utility (specifying source and destination directories).
This will convert all WLK files in the source
directory and place them in the destination directory specified. Folks
moving from a PPC-based Mac to a PC host (for example) would need to do
this conversion on their existing archive directory.
Note: If you need to convert archive files from little endian to big endian,
use the arc_le2be utility (specifying source and destination directories).
This will convert all WLK files in the source
directory and place them in the destination directory specified. Folks
moving from a PC host to an NSLU2 embedded host or a PPC-based Mac
(for example) would need to do this conversion on their existing archive
directory.
Note: Execution of wlk2sqlite may require modifying the dynamic library load
path, i.e.:
>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
You'll know you need this if trying to execute wlk2sqlite produces the
following message:
*wlk2sqlite: error while loading shared libraries: librad.so.0:
cannot open shared object file: No such file or directory*
... or similar message.
6.5 (Optional) Alarms or Weather Data Feeds
If weather data alarm processing and/or TCP stream socket server for data
feeds is desired, edit $prefix/etc/wview/wview-conf.sdb - changing to fit your requirements.
See <a href="#13. Alarms and wview As a Data Feed Engine">Alarms and wview As a Data Feed Engine</a> for details.
6.6 (Optional) FTP File Transfer
If ftp of files to a remote host is desired, edit the wview configuration database
$prefix/etc/wview/wview-conf.sdb - changing to fit your environment.
See <a href="#12. Setting Up FTP Transfers">Setting Up FTP Transfers</a> for details.
6.7 (Optional) Secure rsync Remote Synchronization
If secure rsync synchronization of files to a remote host is desired, edit the
wview configuration database $prefix/etc/wview/wview-conf.sdb - changing to
fit your environment.
See <a href="#14. Secure File Transfer (rsync/ssh)">Secure File Transfer (rsync/ssh)</a> for details.
6.8 Date Formats in Images and Generated Files
The format of the date in images and generated files can now be defined in
$prefix/etc/wview/wview-conf.sdb.
Prior to version 3.2.2 the date format was fixed depending on whether US or metric units were used.
Valid formats are those allowed by strftime(3).
6.9 Pre/Post-Generation Scripts
The script file $prefix/etc/wview/pre-generate.sh (if it exists) will
be executed by the htmlgend daemon immediately before the generation of all images
and templates. The script file $prefix/etc/wview/post-generate.sh (if it exists) will
be executed by the htmlgend daemon immediately following the generation of all images
and templates. This can be used to perform custom transformations of generated images
or files. It should NOT be used to perform network tasks such as FTP or other tasks
which may block and interrupt execution of the htmlgend daemon.
Note: Empty generation scripts should be renamed so wview does not execute them,
which in rare cases can cause zombie processes.
</pre>
<br><br>
<a name="7. Weather Station Configuration"></a>
<hr size=2 noshade>
<h2>7. Weather Station Configuration</h2>
<pre>
This chapter contains station-specific configuration instructions.
</pre>
<br>
<a name="7.1 Station Simulator"></a>
<hr size=2 noshade>
<h2>7.1 Station Simulator</h2>
<pre>
The Simulator station requires no physical weather station. It is a quick and
easy way to demo wview. It also provides an excellent debug platform as cyclic
data is generated. There is no station setup, just configure wview for the
Simulator (--enable-station-sim) then choose Station Type *Simulator* when you run
wviewconfig after build/install.
</pre><br>
<a name="7.2 Davis Vantage Pro/Pro2 Console"></a>
<hr size=2 noshade>
<h2>7.2 Davis Vantage Pro/Pro2 Console</h2>
7.2.1 Preparing a New Vantage Pro Console
<pre>
If you are installing a new VP console, there are a few initial settings
that you need to set up so that your weather station and wview operate
properly. Configuration of archive interval, station location (elevation,
latitude and longitude) and your desired rain season start month must be
set up before you start wview for the first time.
Below is a short description of each of these:
Archive Interval - this determines how often the VP console will generate
an archive record and store it in its internal memory.
These records are retrieved by wview from the console
and stored in the archive files (and the archive database,
if database archiving is enabled). The valid values are:
5, 10, 15, 30, 60 (minutes). Keep in mind that the
shorter the archive interval, the more records that will be
generated. More records means a shorter time span for
internal storage in the VP console memory and larger archive
files on the wview server disk (and larger database tables
if stored in a database). I use an archive interval of 5
minutes. TO AVOID HAVING TO DELETE ALL OF YOUR ARCHIVE DATA
LATER IN ORDER TO CHANGE THE ARCHIVE INTERVAL, IT IS VERY
IMPORTANT THAT YOU MAKE THIS CHOICE CAREFULLY AND NOT
CHANGE IT AFTER ARCHIVE DATA HAS BEEN STORED BY WVIEW.
This does NOT effect how often HTML files containing
current conditions are generated or the up to the minute
values they contain, this is controlled by the configuration
value "HTMLGEN_GENERATE_INTERVAL" in wview-conf.sdb. It will effect
the granularity of your charts for the last 24 hours.
Elevation - this is given in feet above (or below) sea level. This is
the recommended way to calibrate your barometer.
Lat/Long - this describes the location of your weather station.
Rain Season Start - this defines the first month of each year when yearly
rain totals will begin. Most people will use a value of
"1" here.
In order to set these parameters in the VP console, the "vpinstall" script is
provided with the wview distribution. Note that all of these can be configured
using the On-Screen VP console setup utility. After building and installing wview,
the vpinstall script can be found in ${exec-prefix}/bin (usually /usr/local/bin). It
is an interactive script which queries you for these initial values then uses the
vpconfig utility to commit them to your new VP console. Once completed, it is
advisable to wait 10 minutes or so before starting wview for the first time as
it takes the VP console a little while to "digest" the new settings, in
particular for the barometer.
</pre>
<br>
7.2.2 Vantage Pro Plus Extended Sensor Support
<pre>
7.2.2.1 Overview
Note: If you do not have a Vantage Pro Plus or Vantage Pro2 Plus and
you haven't added additional sensors ($$) to your VP, then there
is no reason to enable Plus extended data in wview-conf.sdb or to
enable extended sensor generation in images.conf. You will only be
wasting CPU cycles as the extended sensors will not be populated
with anything meaningful.
The Vantage Pro Plus adds Solar Radiation, UV and Evapotranspiration (ET)
sensors with the potential to add other sensors. wview provides support
for historical charts (day, month and year) for the following VP Plus
sensors:
Solar Radiation
UV
ET
LeafTemp1
LeafTemp2
LeafWetness1
LeafWetness2
SoilTemp1
SoilTemp2
SoilTemp3
SoilTemp4
ExtraHumidity1
ExtraHumidity2
ExtraTemp1
ExtraTemp2
ExtraTemp3
SoilMoisture1
SoilMoisture2
SoilMoisture3
SoilMoisture4
wview also can generate current condition buckets for Radiation,
UV and ET.
7.2.2.2 Configuration
-------- wview-conf.sdb
-- Update $prefix/etc/wview/wview-conf.sdb (see configuration instructions)
-- Modify the following parameter so it is enabled (yes):
HTMLGEN_EXTENDED_DATA
-------- images.conf
-- If this is a new install, skip to 12.2.2.2. To upgrade, you will need
to copy the new extended data image definitions from the distribution
example file images.conf found in .../wview-x.y.z/examples/conf.
The new definitions begin with the heading:
"################# V P P L U S D A T A B U C K E T S #################"
Copy all definitions below this heading to your existing images.conf
file.
-- Edit $prefix/etc/wview/images.conf
-- Starting at the VP Plus Data Buckets header, enable all desired sensor
images by removing all "#" characters from the beginning of the line.
Remember, if you don't have the physical sensor installed on your
station, you should not enable the corresponding images for it - it
only wastes resources. At a minimum, it is safe to enable Radiation,
UV and ET images if you have a Plus station.
-- For each new image you have enabled, translate or edit the title and
units strings as needed (no spaces in the units label).
-- Save and Exit the editor
-------- html-templates.conf
-- Edit $prefix/etc/wview/html-templates.conf
-- Replace the corresponding old references with:
almanac_Plus.htx
Current_Plus.htx
Daily_Plus.htx
Monthly_Plus.htx
Yearly_Plus.htx
Leave index.htx unchanged.
-- Save and Exit the editor
-------- index.htx
-- Copy the Plus index.htx template over the standard file:
cp $prefix/etc/wview/html/index_Plus.htx $prefix/etc/wview/html/index.htx
-- Edit the index.htx file as usual to customize for your station,
language and content preferences.
-------- Current_Plus.htx
-- If upgrading, copy the example Current_Plus.htx file from
the distribution to your wview config tree:
cp wview-x.y.z/examples/html/Current_Plus.htx $prefix/etc/wview/html
-- Edit $prefix/etc/wview/html/Current_Plus.htx as usual to customize
for your station, language and content preferences.
-- Save and Exit the editor
-------- Daily_Plus.htx
-- If upgrading, copy the example Daily_Plus.htx file from
the distribution to your wview config tree:
cp wview-x.y.z/examples/html/Daily_Plus.htx $prefix/etc/wview/html
-- Edit $prefix/etc/wview/html/Daily_Plus.htx
-- Delete all extended data image references that are NOT supported by
your station. Find the comment lines:
!-- ***** Extended Data Begin ***** --