1 (edited by smatofu 2013-04-01 10:59:50)

Topic: Weather in the clock overlay

This shows current temperature, wind direction, and speed (mph) in the clock overlay. The data is taken from the defined airport and updated about every 1 hour.


This is how it looks:

https://docs.google.com/file/d/0B6BWC33 … sp=sharing


Offline-mode firmware ver. 22

This is how to get it:
1. Open Weather Data Editor (zwapi.sh)
2. Enter the following code, replace KDFW with your airport code :
....
....
wget -q --output-document=/tmp/6.png "http://radar.weather.gov/ridge/lite/N0R/FWS_1.png"
wget -q --output-document=/tmp/7.png "http://radar.weather.gov/ridge/lite/N0R/FWS_0.png"
wget -q --output-document=/tmp/img1.gif "http://www.srh.noaa.gov/images/fxc/fwd/ … _full1.gif"
wget -q --output-document=/tmp/img2.gif "http://www.srh.noaa.gov/images/fxc/fwd/ … _full2.gif"
wget -q --output-document=/tmp/img3.gif "http://www.srh.noaa.gov/images/fxc/fwd/ … _full3.gif"
wget -q --output-document=/tmp/img4.gif "http://www.srh.noaa.gov/images/fxc/fwd/ … _full4.gif"
wget -q --output-document=/tmp/myweather.xml "http://w1.weather.gov/xml/current_obs/KDFW.xml"
# STOP MODIFYING BELOW THIS LINE. DO NOT MODIFY ANY OF THE REST OF THE FILE.

....
....
....
# this code goes below: cp /tmp/x /mnt/storage/zurk/lighty/html/zurksofw/rss


rm -f /tmp/myclockoverlay.xml
rm -f /tmp/myclockoverlay1.xml
rm -f /tmp/myclockoverlay2.xml

echo "<overlay format='%l:%M%P %a %d%b %n" >/tmp/myclockoverlay.xml
grep "<temp_f>" /tmp/myweather.xml  >>/tmp/myclockoverlay.xml
echo "F  " >>/tmp/myclockoverlay.xml
grep "<wind_dir>" /tmp/myweather.xml  >>/tmp/myclockoverlay.xml
grep "<wind_mph>" /tmp/myweather.xml  >>/tmp/myclockoverlay.xml
echo "' x='2' y='160' width='316' height='80' textsize='32'/>" >>/tmp/myclockoverlay.xml
rm -f /tmp/myweather.xml

sed -i 's/<temp_f>//g' /tmp/myclockoverlay.xml
sed -i 's/<\/temp_f>//g' /tmp/myclockoverlay.xml
sed -i 's/<wind_dir>//g' /tmp/myclockoverlay.xml
sed -i 's/<\/wind_dir>//g' /tmp/myclockoverlay.xml
sed -i 's/<wind_mph>//g' /tmp/myclockoverlay.xml
sed -i 's/<\/wind_mph>//g' /tmp/myclockoverlay.xml

sed -i 's/[Nn]orth/N/g' /tmp/myclockoverlay.xml
sed -i 's/[Ee]ast/E/g' /tmp/myclockoverlay.xml
sed -i 's/[Ss]outh/S/g' /tmp/myclockoverlay.xml
sed -i 's/[Ww]est/E/g' /tmp/myclockoverlay.xml
sed -i 's/Variable/Var/g' /tmp/myclockoverlay.xml
#enter TAB below after s/ to remove TAB characters
sed -i 's/    //g' /tmp/myclockoverlay.xml

tr '\n' ' ' </tmp/myclockoverlay.xml >/tmp/myclockoverlay1.xml
tr -d '\b\r' ' ' </tmp/myclockoverlay1.xml >/tmp/myclockoverlay2.xml

rm -f /psp/clockoverlay.xml
cp /tmp/myclockoverlay2.xml /psp/clockoverlay.xml

killall chumbyflashplayer.x

rm -f /tmp/x
rm -f /mnt/storage/widgetcache/*
sync

...
...
...