Quelle: http://www.wviewweather.com/
Hardware: synology ds212+ mit DSM 4.0
Wetterstation: Oregon WMR88
ich habe die Software vwiew und die erforderlichen Module mit nativ gcc kompiliert
diese Anleitung sind nur die Sammlung meiner rohen Notizen
- dadurch ist nicht jedes cd etc. enthalten
- ich bitte um Entschuldigung
nachdem Wview einige Tage erfolgreich lief, habe ich das Projekt stillgelegt, da es mir nicht gelungen ist, die Festplatte zum Spin-Down zu zwingen (opt gemountet auf USB-Stick etc)
Voraussetzung:
frisch installiertes OSM 4.0 mit eingerichtetem IPKG
http://www.synology-wiki.de/index.php/IPKG
Hinweise:
- immer den prefix=/opt beim gcc setzen - sonst wird das Zeug nicht in den /opt Pfad installiert (make install)!!
- der Umweg über sudo ist nicht notwendig, Ihr könnt es auch als root direkt ausführen
- wegen des USB-Zugriffes und der fehlenden udev-Regeln in der Synology müssen Programme mit libusb-Zugriff sowieso als root gestartet werden
los geht es:
Viel Spaß
Hardware: synology ds212+ mit DSM 4.0
Wetterstation: Oregon WMR88
ich habe die Software vwiew und die erforderlichen Module mit nativ gcc kompiliert
diese Anleitung sind nur die Sammlung meiner rohen Notizen
- dadurch ist nicht jedes cd etc. enthalten
- ich bitte um Entschuldigung
nachdem Wview einige Tage erfolgreich lief, habe ich das Projekt stillgelegt, da es mir nicht gelungen ist, die Festplatte zum Spin-Down zu zwingen (opt gemountet auf USB-Stick etc)
Voraussetzung:
frisch installiertes OSM 4.0 mit eingerichtetem IPKG
http://www.synology-wiki.de/index.php/IPKG
Hinweise:
- immer den prefix=/opt beim gcc setzen - sonst wird das Zeug nicht in den /opt Pfad installiert (make install)!!
- der Umweg über sudo ist nicht notwendig, Ihr könnt es auch als root direkt ausführen
- wegen des USB-Zugriffes und der fehlenden udev-Regeln in der Synology müssen Programme mit libusb-Zugriff sowieso als root gestartet werden
los geht es:
Rich (BBCode):
$ ssh root@192.168.1.xy
> ipkg install sudo
admin is not in the sudoers file
>visudo
admin ALL=(ALL) ALL
exit
$ ssh admin@192.168.1.xy
$ ssh admin@192.168.1.43
> sudo ipkg update
> sudo ipkg install nano make gcc coreutils
----------------- radlib ------------------------
> wget http://freefr.dl.sourceforge.net/project/radlib/radlib/radlib-2.11.3/radlib-2.11.3.tar.gz
> tar zxvf radlib-2.11.3.tar.gz
> cd radlib-2.11.3/
> ./configure --prefix=/opt --enable-sqlite
> make
../h/radsqlite.h:69:21: error: sqlite3.h: No such file or directory
check > find / -name sqlite3.h 2>/dev/null
> sudo ipkg install sqlite
Installing sqlite (3.7.3-1) to root...
Installing readline (6.1-2) to root...
> find / -name sqlite*.h 2>/dev/null
/volume1/@optware/include/sqlite3.h
> make
/volume1/@optware/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_sa_restorer_v2@GLIBC_PRIVATE'
/volume1/@optware/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_rt_sa_restorer_v2@GLIBC_PRIVATE'
/volume1/@optware/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_rt_sa_restorer_v1@GLIBC_PRIVATE'
/volume1/@optware/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_sa_restorer_v1@GLIBC_PRIVATE'
Lösung: http://forum.synology.com/enu/viewtopic.php?f=90&t=30132
als root einloggen:
cd /volume1/@optware/arm-none-linux-gnueabi/lib/
mkdir lib_disabled
mv libpthread* ./lib_disabled/
cp /lib/libpthread.so.0 ./
ln -s libpthread.so.0 libpthread.so
ln -s libpthread.so.0 libpthread-2.5.so
zurück zu
> cd /volume1/Daten/src/radlib-2.11.3/
> make
> sudo make install
-------- check ---------------------
> sudo ipkg list_installed
binutils - 2.19.1-1 - The GNU assembler and linker and related tools
coreutils - 8.4-1 - Bunch of heavyweight *nix core utilities
gcc - 4.2.3-1 - The GNU Compiler Collection.
libc-dev - 2.5-5 - libc development files.
libnsl - 2.5-4 - Network Services Library
make - 3.82-1 - examines files and runs commands necessary for compilation
nano - 2.2.6-1 - A pico like editor
ncurses - 5.7-1 - NCurses libraries
readline - 6.1-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
sqlite - 3.7.3-1 - SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
sudo - 1.8.1.2-1 - System utility to execute commands as the superuser
wget - 1.12-2 - A network utility to retrieve files from the Web
----------- installiere libusb 1.0 ------------
Hinweis: version 0.1 aus ipkg geht nicht
cd /volume1/Daten/src
> wget http://kent.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.8/libusb-1.0.8.tar.bz2
> tar -j -xvf libusb-1.0.8.tar.bz2
> cd libusb-1.0.8/
> ./configure --prefix=/opt
> make
> sudo make install
----------- installiere wviev ------------
Vorbereitung
> sudo ipkg install libpng
Installing libpng (1.2.44-1) to root...
Installing zlib (1.2.5-1) to root...
> sudo ipkg install gawk libgd
Installing gawk (4.0.0-1) to root...
Installing libgd (2.0.35-6) to root...
Installing libjpeg (6b-3) to root...
Installing freetype (2.3.6-1) to root...
Installing fontconfig (2.8.0-0) to root...
Installing expat (2.0.1-1) to root...
Installing gconv-modules (2.5-1) to root...
> sudo ipkg install libcurl libcurl-dev
Installing libcurl (7.24.0-1) to root...
Installing openssl (0.9.8p-1) to root...
Installing libcurl-dev (7.24.0-1) to root...
> wget http://ignum.dl.sourceforge.net/project/wview/wview/wview-5.19.0/wview-5.19.0.tar.gz
> tar zxvf wview-5.19.0.tar.gz
> cd wview-5.19.0/
> ./configure --prefix=/opt
>make
> sudo make install
==> /opt/var/wview has been created with distro examples
==> /opt/etc/wview has been created with distro examples
This is a first time install so the station type will be set to "simulator".
To change the station type, run "wviewconfig" or use the wviewmgmt web interface to change it.
You will need to stop wview and clear the databases of simulator data after you have changed the station type:
#> wviewcleardata
This is a first time install so the generation templates will be set to "chrome-standard-US units".
To change this run "wviewhtmlconfig" to configure the template directory
after you have configured wview for metric units.
If you want start/stop control of wview from the Management Web Site
(and you are comfortable giving the http server user account sudo privileges):
Add the http user to the sudo group:
#> sudo adduser www-data sudo
Set the sudo group to no password required privileges in /etc/sudoers:
#> sudo visudo
(Make sure the line [%sudo ALL=NOPASSWD: ALL] is at the bottom of the /etc/sudoers file)
To start/stop wview:
#> sudo /etc/init.d/wview start|stop
StartScript
> sudo cp /volume1/Daten/src/wview-5.19.0/examples/NSLU2/wview /opt/etc/init.d/
> ln -s /opt/var/wviewmgmt/ /volume1/web/wviewmgmt
> ln -s /opt/var/wview/ /volume1/web/weather
-------------- Synology Webdienste einichten und open_basedir einrichten------
+ Web Station
+ MySQL
in DMS 4.0
Webdienste/PHP-Einstellungen
( ) PHP Safe Mode Exec Dir deaktivieren
(x) Zugriffsbeschränkung open_basedir auf
/opt/etc/wview:/opt/var/wview:/etc.defaults:/usr/bin/php:/usr/syno/synoman:/etc:/var/run:/tmp:/var/spool/php:/volume1/@tmp/php:/var/services/web:/var/services/photo:/var/services/blog:/var/services/homes
verhindert u.a. den Fehler
SqliteDBOpen /opt/var/wview/archive/wview-archive.sdb failed: safe_mode/open_basedir prohibits opening /opt/var/wview/archive/wview-archive.sdb
------------
Webserver will keine Symlinks auf Ordner mit Permission 777, deshalb Kopie der Ordner
cd ... web...
> cp -r /opt/var/wview/img ./
> cp -r /opt/var/wviewmgmt ./
> mv img weather
Generation Target Path: /volume1/web/weather/
Template Source Path: /opt/etc/wview/html
> /opt/etc/init.d/wview start
Starting wview daemons:
sh /opt/etc/wview/pre-generate.sh: Permission denied
sh: /opt/etc/wview/post-generate.sh: Permission denied
> chmod 744 /opt/etc/wview/pre-generate.sh
> chmod 744 /opt/etc/wview/post-generate.sh
> /opt/etc/init.d/wview start
Starting wview daemons:
nach ein paar Minuten
> cat /volume1/web/weather/parameterlist.htm | egrep "barometer|inside|outside|hourrain|dailyRain|monthlyRain"
insideTemp=21.5<br>
insideHumidity=46<br>
outsideTemp=7.3<br>
outsideHumidity=56<br>
outsideHeatIndex=7.3<br>
outsideDewPt=-0.9<br>
barometer=1051.9<br>
dailyRain=0.00<br>
dailyRainMM=0.0<br>
monthlyRain=0.00<br>
hourrain=0.00<br>
Wetterwebseite konfigurieren: http://192.168.1.xy/wviewmgmt/services.php
Wetter ansehen: http://192.168.1.xy/weather/Current.htm
Konfiguration auf deutsch
http://dokuwiki.nausch.org/doku.php/wetter:wview:start
Wetterdatenbank
/opt/var/wview/archive/wview-archive.sdb
> find /opt/ -name "*.sdb" -exec ls -al {} \;
-rw-r--r-- 1 root root 40960 Mar 10 23:49 /opt/var/wview/archive/wview-hilow.sdb
-rw-r--r-- 1 root root 2048 Mar 10 01:27 /opt/var/wview/archive/wview-noaa.sdb
-rw-r--r-- 1 root root 51200 Mar 10 23:45 /opt/var/wview/archive/wview-archive.sdb
-rw-r--r-- 1 root root 3072 Mar 10 01:40 /opt/var/wview/archive/wview-history.sdb
-rw-rw-rw- 1 root root 27648 Mar 10 23:48 /opt/etc/wview/wview-conf.sdb
Runtime-Überprüfung
> tail -n 100 -f /var/log/messages
metrische Einheiten einrichten
/wviewmgmt/file_generation.php
[x] Enable Metric Units For Generation?
[x] Metric Rain Use Millimeters?
[ ] Generate Graphics With Both US and Metric Units?
Luftdruck Grafiken
DiskStation> cat /opt/etc/wview/images.conf | grep -i baro
barom.png "Barometer" hPa 0 5
baromday.png "Barometer" hPa 0 30
baromweek.png "Barometer (Hourly Avg)" hPa 0 123
barommonth.png "Barometer (Hourly Avg)" hPa 0 31
baromyear.png "Barometer (Daily Avg)" hPa 0 32
Viel Spaß
Zuletzt bearbeitet: