Weather Station Technology

Network Overview for Weather and Video Delivery

What weather station hardware does SDRC use?


How is the data published to other web sites?

  • SDRC publishes it's data to Weather Underground as it is a popular site for others to subscribe and view local weather data. Here are the instructions for publishing data to Weather Underground from your Ambient Weather station.


How do you get the paragraph of text that describes the weather conditions?

    • Our website is built on WordPress and we use the Weather Station plugin.
    • Under Weather Station Setting you can add a connection to the Ambient Weather Network. The plugin will gather the data and make it available for publication.
    • Once Weather Station is installed and configured, you can add HTML similar to the following which WordPress will parse. See the documentation for the Weather Station plugin for exact details.

On [live-weather-station-livetextual device_id='f4:cf:a2:8a:9a:7b'
module_id='m0:c0:00:00:00:02' measure_type='last_refresh'
element='measure_timestamp' format='local-date' fx='none'
color='#000000' speed='2000'] at
[live-weather-station-livetextual device_id='f4:cf:a2:8a:9a:7b'
module_id='m0:c0:00:00:00:02' measure_type='last_refresh'
element='measure_timestamp' format='local-time' fx='none'
color='#000000' speed='2000'] the temperature was
[live-weather-station-livetextual device_id='f4:cf:a2:8a:9a:7b'
module_id='m1:c0:00:00:00:02' measure_type='temperature'
element='measure_value' format='computed-unit' fx='none'
color='#000000' speed='2000'] with the wind at
[live-weather-station-livetextual device_id='f4:cf:a2:8a:9a:7b'
module_id='m2:c0:00:00:00:02' measure_type='windstrength'
element='measure_value' format='computed-unit' fx='none'
color='#000000' speed='2000'] from the
[live-weather-station-livetextual device_id='f4:cf:a2:8a:9a:7b'
module_id='m2:c0:00:00:00:02' measure_type='windangle'
element='measure_value' format='short-text' fx='none' color='#000000'
speed='2000']. The humidity level was
[live-weather-station-livetextual device_id='f4:cf:a2:8a:9a:7b'
module_id='m1:c0:00:00:00:02' measure_type='humidity'
element='measure_value' format='computed-unit' fx='none'
color='#ffffff' speed='2000'].

How do you publish a live video stream?

The actual implementation may be beyond the scope of this website, so write if you want to explore how this is done beyond what is presented here.

The camera is a standard HIKVISION Outdoor Dome camera. Ours was donated, so we don't have any particular model to recommend. Any camera that can provide an RTSP stream via HTTP will likely work. The camera is connected via Ethernet to the rowing club's infrastructure and is Powered over Ethernet.

On the rowing club's network is a raspberry Pi that runs a small service encapsulating an ffmpeg command that converts the RTSP stream to a format compatible with Youtube's free Live Streaming offering in YouTube Studio. You'll want to be sure to Schedule a live stream rather than go live directly. The scheduled streams will stay up and can be reused, live streams will get shutdown after a period of inactivity.


# Installed in /lib/systemd/system/webcam.service
Description=Webcam RTSP to Youtube transcoder

ExecStart=/bin/bash /home/pi/


# Installed in /home/pi/

YOUTUBE_URL="rtmp://" # Server URL

# Internal web camera IP is xx.xx.xx.xx

IP=your camera IP address
QUIET='-loglevel panic'

# Uncomment the empty QUIET variable below to see debugging output

ffmpeg ${QUIET} -hide_banner -ar 44100 -acodec pcm_s16le -f s16le -ac 2 -channel_layout 2.1 -i /dev/zero -i rtsp://your-camera-password@${IP}:${RTSP_PORT}/Streaming/Channels/101?tcp -rtsp_transport tcp -ss 2 -c:v copy -shortest -f flv "$YOUTUBE_URL/$KEY"

Use these commands  to install and enable the service when the above two files are in place

sudo systemctl daemon-reload
sudo systemctl enable webcam.service
sudo service webcam start

Grabbing a still image from the webcam for use by Ambient Weather

The bash script below is run via crontab for the pi user every minute and captures a still image from the camera. Transferring this image to a public webserver with a URL that can be put into the Ambient Weather dashboard configuration is beyond the scope of this document.

# Installed in /home/pi/



until [[ $size_download -ge $min_expected_size || $i -ge $retry ]]
size_download=`curl -s -w "%{size_download}" -o bayview-sample.jpg http://${RTSP_USER}@${RTSP_IP}:${RTSP_PORT}/Streaming/Channels/101/picture`
let i++
# echo $i $size_download
sleep 1

if [ $size_download -ge $min_expected_size ]
mv bayview-sample.jpg bayview.jpg

Video Snapshot on the website

<a href="https://your-public-server/images/bayview.jpg" target="_blank"><img src="https://your-public-server/images/bayview.jpg" alt="Mission Bay" width="560" height="315" name="tcimage0"></a>
  var tcimages = new Array();
  tcimages[0] = "https://your-public-server/images/bayview.jpg";
  interval = 15000;
  function Refresh() {
    ts = new Date().getTime(); 
    for (i=0; i < tcimages.length; i++) { 
      document.images["tcimage" + i].src = tcimages[i] + "?ts=" + ts;
      console.log('Refresh: ', ts );
      console.log('document.images: ', document.images["tcimage0"])
  setTimeout("Refresh()", interval);

Live video on the weather page

This is the code that embeds a live YouTube video on a web page.

<iframe width="560" height="315" src="" allow="autoplay; encrypted-media" allowfullscreen></iframe>