Very warm and wet weekend – and the Webcam is back – A Guide to the Setup!

the rain has begun.  It won’t stop more than a few minutes or hours until Sunday.  As I detailed yesterday, the west coast is in the crosshairs with some potentially extreme amounts.  Our totals are I think a little less sure but should get into the 30-50 range for the three days.

Spring temperatures

Check out the temperature map for Saturday.

Saturday 10AM reddish Orange is up to 15°C
Saturday 10AM reddish Orange is up to 15°C

Some very warm sub tropical Pineapple Express air will be coming our way.  We may even get a taste of that air later today (Friday) as well and it should linger until Sunday.  Whenever the wind blows, it should feel quite pleasant.

Webcam fixing itself now.

image
Wrapping the USB and Ethernet extension cables in tinfoil and electrical tape to try to limit any interference from other power cables on the long run from my upper floor where the cameras live to the basement where the computer is.
image
The cameras themselves. You can see the USB cables wrapped in green tape. The two cameras connect to a hub on the floor and the hub connects to a USB extender that converts USB to a network cable so it can go longer runs. However, the longer the run the more interference and the weaker the signal.
Also upstairs with the cameras, a Belkin Wemo.  A little device I discovered in the Staples clearance bin last year for 75% off that can be turned off and on wirelessly over the network.  Very handy for my situation!
Also upstairs with the cameras, a Belkin Wemo. A little device I discovered in the Staples clearance bin last year for 75% off that can be turned off and on wirelessly over the network. Very handy for my situation!
image
The network cable runs down the wall to our new wiring closet in the basement. This is likely where most of the interference occurs because of all the gear. I haven’t been able to shield the wires coming down the wall with tinfoil and tape like I did upstairs, but i did buy a new CAT 7 patch cable that connects the upstairs and routes it to a basement network jack. CAT7 cables (the purple one I’m holding) are very heavily shielded (so no need for tinfoil) compared to the regular blue CAT5 cables you can see in the picture.
image
From the wiring closet the camera signal runs through the (un shielded) network cable to my desk in the basement. I then have another CAT7 cable connecting to the final end of the USB extender that converts it back to USB and plugs into my Mac Mini.

After trying a hardware solution – more shielding – to keep my webcams from disconnecting themselves from the computer, I’ve instead moved to a less optimal, but at this point more effective software based strategy.  Basically, I have created a script that will monitor the webcams and restart them and the software they use to snap pictures.

A screenshot of my Mac mini desktop showing the Virtual machine that exclusively runs WindowsXP for the webcam software.  I can control the Virtual machine through the Mac remotely and through scripts.
A screenshot of my Mac mini desktop showing the Virtual machine that exclusively runs WindowsXP for the webcam software. The webcam software is specialized for the Olympus SP500 cameras that I use.  There are two instances of the software running.  One to control each camera. It saves the images every minute to a common folder that the Virtual machine and mac mini host share.  I can control the Virtual machine through the Mac remotely and through scripts.  If it was a separate windows computer it would be much hard to control the webcam software remotely.
A snapshot of the new code that checks for delays in the webcam and restarts the cameras and software if it notices a delay.
A snapshot of the new code that checks for delays in the webcam and restarts the cameras and software if it notices a delay.

The code snapshot is from a much larger script that is actually responsible for both looking after the webcams and uploading the latest weather values and images to the website.  It runs every minute.  This looks like a crazy amount of gobbledygook but thankfully the internet provides examples that I can easily tweak for my own situation. :) At the top you can see it checking the “date”.  It actually checks if the image is more than 180 seconds, or 3 minutes, old. It does this for both cameras. If it is, then one or both of the cameras has probably disconnected and they need to be re-booted.

The lines with “VBoxManage” are what close the software running in Windows XP.  The next lines starting with “curl” control the WeMo power device.  A keen eye might notice that the only difference between the two huge chunks of writing that start with “curl” is the first has a 0 (off) and next has a 1 (on).  Oh, binary.

The VBoxManage starts the software in Windows XP again and away it goes!  And no, I’m not worried abut you seeing my username and password for the Windows XP box since it’s not actually connected to the internet and doesn’t do anything but make the cameras take pictures.  That is not my normal password :)

Oh, and if you’re wondering.  The lines that say “sleep” are delays, in seconds, that give the cameras and software time to boot before the next command is run.  Otherwise it all happens too fast for the hardware and software to keep up and the connections fail.

For the tech heads:  The Mac Mini is running MacOS X 10.10 “Yosemite”.  It has a 4 core 2.3GHz Intel Core i7 CPU with a 1TB HD and 16GB of RAM (very recently upgraded from 4GB of RAM to be able to run the Virtual Machine nicely).  In time I hope to upgrade it to a SSD, but it will be a while before the Solid state drives come down in price for me to afford it.  It also has a couple external hard drives, one for storage of media and one for backup.

Heavy Rain on the Way.

The showers this morning should end this morning and we should have a mostly dry day.

However, by afternoon, the clouds and showers will return and they won’t let up until after the weekend.

Friday daytime rain

Rain should start around 10AM Friday.

By Saturday morning values will be mixed, but we could see anywhere up to 50mm of rain depending where you are in the area.

wa_pcp24.60.0000-3

Areas on the west coast are looking at 10 inches in 24hrs between Friday and Saturday morning in red in the map above.  That’s 260mm!  The mountain rivers will surely be running fast.

The model has an interesting pattern showing quite the shadow from the rain.  So I’m not entirely confident in its prediction of 30mm for us.  But we shall see.

Saturday almost as wet.

Things scale back a bit on Saturday through Sunday morning to “only 100mm” for the West Coast and almost nothing predicted for the Valley except showers.

wa_pcp24.84.0000-2

But again it’s a strange prediction so be ready for significantly more than the 8mm it predicts here.

Things should calm down a bit on Sunday but you can still expect some showers.  Then we should get a break on Monday.

Happy Thursday!