Remote power controls for the Hut

Some time ago I got a Web Power Switch 4 for the hut to remote control power for the scope, cameras, and PC and future stuff like roof control and a light to illuminate a webcam.  I believe this is now replaced by the Web Power Switch 5, but they seem to be pretty similar.  It’s connected to the network via Ethernet and has 8 outlets than can be powered on or off remotely using a web interface. Also, there are 2 “always on” outlets.

Web Power Switch 4

The gadget works fine with Macs, but there doesn’t seem to be any documentation at digital-loggers.com for Mac setup.  So here’s a stab at that.

For your Mac to communicate with your Web Power Switch (WPS), you need to be on the same subnet.  First, you need to find your your IP address.  From the Apple menu, open System Preferences.  Select the Network pane.

Network Pane

In this case, the IP address is 192.168.0.34. So 192.168.0 is your subnet.  This subnet should work happily with the power switch as is.  The example below assumes your network uses a different subnet.

Connect the web switch to your network, and try the default admin address, http://192.168.0.100 in your browser.  If it loads, you’ll see a user name and password field, and you’re good to go.  But chances are you have a different network setup, and the page will fail to load.

To get the switch and the Mac to talk, you need to connect the Mac to the switch with an ethernet cable (does not need to be a cross-over cable), change the Mac’s network settings to the WPS’s subnet so they can communicate.  Then, in the switch’s admin page, you can modify the switch’s settings to match your network.  When that’s accomplished, disconnect the cable between the mac and WPS.  Re-connect the WPS to your network, and reconnect the Mac to your network.  Restore the Mac’s original network settings.  Now you should be able to open the WPS admin page using the new settings.

Here’s more detail.
Collect your current network settings from the Mac System Preferences – Network panel.

If you are currently using Wifi, you can just turn off Wifi off, and select the Ethernet settings.  You are going to note your current settings so you can restore them to get back on your network.

jj mbp network settings

Select the advanced button.
Note your current settings:
IPv4 Address  192.168.1.146
Subnet  mask 255.255.255.0
Router  192.168.1.1

Connect an ethernet cable between your Web Power Switch and  your Mac.  With a modern Mac, it doesn’t need to be a crossover cable.

Turn your wifi off, if on,  from the Network settings or from the menu icon.
On your Ethernet settings TCP/IP tab:
Select “Configure iPv4 Manually”
Set IPv4 address to an address on your Web Power Switch subnet eg, 192.168.0.10
Subnet:  255.255.255.0
Router: blank is ok
Set Configure iPv6  to link-local only
Click OK
Click Apply

Open a browser and connect to to the Web Switch admin at 192.168.0.100.  Login with the default user name and password.
Click the Setup link on the left.
Change your password;  it’s recommended, if only to eliminate the annoying beep on startup.  You also may not want strangers to turn your stuff off.
Change network settings to an address on your subnet, for example
192.168.1.100
Subnet 255.255.255.0
router  192.168.1.1
WPS settings after change
You decide if you want the “Same subnet access only” box checked, depending on your needs.
Click Submit, this will update your settings and disconnect you.

Now back in Mac System Prefs network settings, restore your network settings to their original state and click OK and Apply.
Turn on Wifi, if that’s your normal network.
Close and reopen your browser, then test your settings on an external website, then test the Web Power Switch admin page, now at http://192.168.1.100.

How to save man pages from Terminal

One would expect it should be easy to save a man page from terminal for review, and it is, but it doesn’t work the way you expect.

I would expect that “man col > col.txt” should save a nice text file in the home directory, but the results are strange:

COL(1)              BSD General Commands Manual            COL(1)

NNAAMMEE
ccooll — filter reverse line feeds from input

SSYYNNOOPPSSIISS
ccooll [--bbffhhppxx] [--ll _n_u_m]

DDEESSCCRRIIPPTTIIOONN
The ccooll utility filters out reverse (and half reverse) line feeds so that
the output is in the correct order with only forward and half forward
line feeds, and replaces white-space characters with tabs where possible.

Similarly, trying to open the man pages using “man col | open -f” dutifully opens the mangled file in TextEdit.

The repeated characters are fossil behaviors from the days when bolding was accomplished by repeatedly backspacing and overprinting characters.  The col utility is the workaround for this behavior. The man for col says:

The col utility filters out reverse (and half reverse) line feeds so that
the output is in the correct order with only forward and half forward
line feeds, and replaces white-space characters with tabs where possible.

And we need to use the -b option :
-b      Do not output any backspaces, printing only the last character
written to each column position.

So to redirect the man file to a text file, use

man col | col -b > col.txt

which pipes ( | ) the man pages to the col utility, without backspaces, and then redirects it to a text file.  To open the man for col in TextEdit, use

man col | col -b | open -f

(The -f option for open sends to the default text editor.)

If you want the man pages as PDF, try:

man -t [your_command_name_here] | open -f -a Preview

This provides a nice looking output that respects the bolding.  The -t option for man formats the output as PostScript; the -a option for open lets you specify the application (Preview).

Driving to the Moon

After months of a restructuring study, it can’t be good to find yourself scheduled for a meeting with your VP at 8:15 am on the first day back after a holiday weekend.  Ascending in the elevator, the today’s-the-day atmosphere was palpable.  I had a brief meeting with the VP and a lady from HR, and I am now retired as of the end of the month.

When asked what it is I do, I must admit I have a hard time summing up.  My job (former job) has evolved over many years in a surprisingly fertile corporate ecosystem, the product of which was “interactive media”.  Our shop developed world-class internal and external websites, had outstanding video production facilities and personnel; we produced around 40 live webcasts annually from a well-equipped in-house studio, hundreds of on-demand videos, tens of thousands of DVDs.  A talented graphics staff produces print materials and carefully branded graphic and animation elements for web and video.

My role in this began as a video producer long ago, as pretty much a one-man-shop for training and public affairs videos for our coal mining division. Over several years I moved from the coal business to utility operating company to the corporate center.  I managed the in-house corporate studio for several years from the U-Matic tape to Beta-SP days, and began using computer controlled editing and the fabled Video Toaster, and eventually began non-linear digital editing on the Immix VideoCube.

old mousepads

Fossil media mousepads from the tape-digital layer.

It was obvious that computers were the future of video production, and that formats, platforms, and standards would continually mutate; operating systems would ebb and flow in importance.  As the department grew, I increasingly  became the person dealing with file storage, hard drives, operating system and application issues, hardware compatibility, upgrade management, servers, and networks.  I bid content a fond farewell and embraced codecs, compression, archives, and workflow automation. I deployed video across our corporate intranet with Real then WinMedia then QuickTime, and, as soon as it supported multicast, H.264 with Flash Media Server.  I set up digital asset management with Canto Cumulus, then Extensis Portfolio. Video assets were backed up with Retrospect, then as assets reached terabytes, on a Quantum tape library using Archiware Presstore. I looked after the Win Media servers, then QuickTime Servers, and when those retired, I set up Flash Media Server on a virtual Win Server 2008 box. The stupid fun of the whole thing is that whatever you do, it will be out of date shortly; the platform will change, a new architecture will emerge, or you just outgrow an application.  I learned to edit with 16mm film; now I’m ready for H.265.

I’ve had a long commute since moving to the countryside with my wife in the 1990’s and have often reflected on the stupidity of driving that far to go to work. About a hundred miles a day!  Fortunately Jean and I have been able to drive together since we both have worked downtown for most of that time.  Anyway, in the idle moments, it occurred to me that I put on enough miles to drive to the moon, which I put at about 250,000 miles. (It’s less, Wikipedia says it averages 238,900 miles, but 250 thou is easier to work in your head.)

OLYMPUS DIGITAL CAMERASo if I drive 100 miles a day, about 250 days per year, that’s 25,000 miles a year.  So in a mere 10 years, I get to the moon.  I started the long commute in 1993 or so, so by 2003, I was at the moon, and suppose I’ve been driving back ever since.  By the end of 2013, I’d be back in the Morrow County Spaceport.  But I’m a bit short of that, and seem to have fallen the last few miles.

Crash landing

I got a treadmill for Christmas, that, yes, I asked for.  So I’m trading one treadmill for another.  I seem to put in about 2 or 3 miles a day on it, in this fairly brutal winter of 2013.

schwinn treadmill

Perhaps some other celestial destination is in order.  The Space Station is only about 250 miles…I could be there in a few months!