wview package is no longer in the openwrt 15.05 feeds due to not having a maintainer, and in general is getting old. I would recommend considering pywws instead, a howto can be found here: pywws Python Weather Station HowTo
wview is a collection of unix daemons which interface with a supported weather station to retrieve archive records (if generated by the station) and current conditions. More info on www.wviewweather.com
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 and High/Low (HILOW) data are stored in SQLite3 databases. 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.
So you can have a perfect weather information page on your router
As an example I use a TP-Link TL-WDR4300 and a TFA Nexus weather station which is a derivate of Hideki. (AKA Hideki, Nexus, Mebus, Irox, Honeywell, Cresta TE923, TE923W, TE821W, WXR810, DV928). More stations on www.wviewweather.com
I took the TL-WDR4300 because of RAM, FLASH and 2 USB Ports. One for storage (I used USB Stick with 1 GB, but less is also good) and second port for the Nexus. If your router has only one USB port you can use a HUB, * or if you have enough Flash space free, you can install it all internally, and revert the symlinks to USB that the openwrt wview package comes with.
I used OpenWRT version ATTITUDE ADJUSTMENT (12.09, r36088) (* Someone else also got it working in 15.05)
You have to follow/need to know this upfront:
And you should know how to login via ssh to your OpenWRT…
But now an overview of all packages and basic installation.
wviewPackage which installs some programs, daemons and sample config files
Please install also the following packages, because wview depends on it. Maybe some are already installed.
zlib- compression library
libpng- png image library
libreadline- command line functions
gawk- GNU awk
libgd- graphics drawing library
libsqlite3- SQLite3 database library
radlib- rapid application development library - must be installed with SQLite support (–enable-sqlite)
libcurl- "C" URL HTTP library - optional, required for Weather Underground
Of course we need a kernel module for communication with the weather station. To check which driver you have to install you need to know the Vendor and ProdID.
Helpful is this package
usbutils- USB devices listing utilities
You can now check the Vendor and ProdID with
You will get something like this:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 001 Device 003: ID 1130:6801 Tenx Technology, Inc. Bus 001 Device 004: ID 4146:ba01 USBest Technology Intuix Flash Drive
The Nexus has the ID 1130:6801.
To check which driver you need you can take a look into
# cat /proc/bus/usb/devices
You will get something like this:
... T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=1130 ProdID=6801 Rev= 3.02 S: Product= C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none) E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms ...
As you can see in line I: we need a HID driver for the Nexus.
kmod-usb-hid- Kernel support for USB HID devices such as keyboards and mice
If you have not a Nexus weather station you may need a different driver, but I assume that many will work with HID. (Please confirm your station here…)
I installed also some kernel modules for NLS (Native Language Support). Maybe not necessary.
You will need also some files from the latest wview Weather System package from Sourceforge because not all needed files are included in the OpenWRT wview package.
Please unpack the tarball Sourceforge and search for he following directory:
You have to copy this directory later to your USB-stick.
# opkg install wview zlib libpng libreadline gawk libgd libsqlite3 radlib libcurl
* If a wview or radlib package is not available in your package list, such as for me in 15.05 on ramips mt7620, check in past versions, i found them in 14.07 and they ended up working. Just dl the ipk and specify it to opkg install "package.ipk", and opkg will install it and dependencies.
# opkg install usbutils
And now the driver for the weather station.
# opkg install kmod-usb-hid kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8
You can prepare the external memory upfront with your PC… it saves some time. I used a Linux system and a USB stick with ext4 filesystem… but vfat will also work.
This is the structure of the directories on the USB Stick that you have to generate:
wview-data/measurements-archive wview-html wview-img
Because the wview package is lacking some files you have to copy the html files of the source tarball
wview-html on the USB stick.
The USB stick is now ready.
Now, please mount the prepared USB Stick on
If you do not have the dir
extusb, just make it…
If you don't know how to mount the stick, just check Mounting.Filesystems to mount any filesystem.
If you have installed all packages above, prepared and mounted the USB stick… you are ready to config.
First you have to create the databases for archive and config.
# cd /mnt/extusb/wview-data/measurements-archive/ # sqlite3 wview-archive.sdb '.read /etc/wview/wview-archive.sql' # cd /etc/wview/ # sqlite3 wview-conf.sdb '.read /etc/wview/wview-conf.sql'
Second you have to start the wview config program with:
* You can also setup and use wview's web based admin "wviewmgmt" .
# wviewconfigNow answer all questions …
No, not really… for a first test you can leave all parameters default except the following:
Important questions and answers for Nexus are
You will find the interface for your weather station in
The best is you check
/dev before you connect your weather station and directly after.
/dev/new file or maybe
/dev/dir/new file show you the name of the device.
* This seems to only work on first connection, to otherwise look for what dev node it is associated with, run after plug-in or out:
dmesg | grep tty
Important directories are
Third: We need one additional link for the generated html files.
# ln -snf /mnt/extusb/wview-img /www/weather
Fourth: Last config to do is to choose a html template. I prefer classic
If everything worked fine you will get something like this
Which template skin do you want to use for your site? wview site skins currently supported: classic - default wview skin chrome - classic with a chrome effect (chrome): classic Site skin classic selected... With extended data graphics. With metric units. Saving old HTML directory to html-20131012.232546 ... ...done. Saving old config files... ... done. HTML setup complete: you may now customize template files in /etc/wview/html
If it is not looking like this and if you got some error messages… please check this Howto and proof that you have mounted the USB stick, have all directories, made all steps and if this not helps read and amend
/etc/init.d/wview appropriately for your particular setup! Here you have to check especially the directories and devices.
OK, I hope everything is fine and you have no errors…
Now we are ready to start…
/etc/init.d/wview startto start all daemons
Check system log for messages, to follow log updates in a seperate ssh terminal use:
If everything is fine you can reach your weather page with
To stop, just type
/etc/init.d/wview stopto stop all daemons
To enable/disable start on boot:
/etc/init.d/wview enableThis simply creates a symlink:
/etc/rc.d/S99wview → ../init.d/wview
/etc/init.d/wview disableThis removes the symlink again, * Alternatively you can do this in the System→Startup section of LuCI if installed.
If you find some errors in this Howto or have additional info… just edit this Howto. Thank you.
Have fun! Maik**