Skip to main content

HTPC/Home Automation

Go Search
Home
HTPC/Home Automation
  
North Texas PC User's Group > HTPC/Home Automation > Team Discussion > Hank Williams comments on PDUs and cameras  

Team Discussion

Modify settings and columns
Use the Team Discussion list to hold newsgroup-style discussions on topics relevant to your team.
  
View: 
Post
Edited: 6/12/2013 10:56 AM
Picture Placeholder: William Parker
William Parker
Hank Williams comments on PDUs and cameras
At the May 2013 meeting Hank Williams shared some of the things he is doing at his home with Power Distribution Units (PDU) and security cameras. These are notes that Hank put together so you would have a starting place if you are trying to accomplish the same thing. Thanks Hank! Bill.

 

After the fact, this essay is an attempt to document most of the ad-hoc home automation and video comments I made during the May 2013 meeting.

WRT home automation, for many, that flexible term usually means the ability to remotely (via the home LAN or the Internet) turn devices on or off such as lighting, air conditioning, etc. Years ago before computer networks, remote control was achieved by calling a phone number and then sending a certain sequence of touch tones to a programmed controller that listened to the phone line then triggered certain relay contacts. The touch tone or Dual-Tone Multi-Frequency (DTMF) technique is sometimes still used today, particularly to control remote radio transmitters. But today, remote control usually implies use of the Internet to access a web page that controls various relay contacts. The most common appliance for doing this is a web enabled power distribution device or PDU. The need to remotely hard-boot server computers was the initial application for web enabled PDUs, but the applications have expanded to any device such as a light bulb or air conditioning. It would help if the term PDU was routinely used for such devices, but often other terms are used 

Typically, a PDU has an embedded web server, some sort of a simple login and password, and a simple web page that can alter various settings and configurations. Beyond that, there can be a wide variances and combination of options. For example, sometimes, a LED will locally show whether a relay or socket is powered or not; and sometimes there is no external indication of a relay's condition. Sometimes there is local and direct mechanical control over the on-off switch setting, and sometimes the switch setting can only be changed via the web page. Sometimes, these devices directly switch power to a 120 volt socket; or sometimes, these devices only power a relay, and the user needs to do additional wiring to control devices. Some devices even include an embedded microcontroller that can ping distant web sites such as Google to assure a web connection is present. When no Internet is detected, the unit will boot itself or a router in an attempt to re-establish an Internet connection. Some such PDU web page servers can host only one remote session at a time, some can support multiple simultaneous logins. Not mentioned during the user group are a host of other features that could be included with a PDU, such as partially diming a light, reporting temperature, humidity, or power consumption of one or more attached loads.

We discussed briefly the Belkin WiMo - a Wi-Fi device that plugs into a 120volt duplex power plug and includes a pass-through power socket that can be switched on or off via an Apple I-Phone. Apparently, so far, this device is not available for Android devices or generic desktop or tablet browsers. I imagine this limit will be overcome soon. Each WiMo costs around $50.

Not discussed during the meeting was a device just introduced last month from Panamax BlueVOLT product line that adds networked power control via a ZigBee wireless gateway to the Internet. The BB-ZB1 Ethernet to ZigBee wireless gateway (~$99) talks to potentially hundreds of nearby ZigBee transceivers in small devices that plug into wall sockets. The devices that plug into wall sockets are known as the MD2-ZB (~$99). These devices present two power plugs that can be remotely controlled as well as controlled by a push button located by each plug. Also, the powered status of each plug is shown on the wall device. In addition to providing on-off capability for whatever is plugged into the device, the device can report power consumption data. Very sophisticated, and I plan to try a few soon.

During the user group, I remotely powered a two-socket PDU that I use for my Skype buddies to reach out and turn on a light and buzzer to prompt me to get online. I'll try to bring one of these in to the next SIG meeting, as well as connect some other PDUs to remotely control. I have since researched the site where I purchased the device I use as a "bat-light," and PImfg.com no longer sells them :( They were around $100.

It is interesting to me that in the three above PDU examples, it cost about $50 to remotely control an outlet, whether the network is connected by wire, Wi-Fi, or ZigBee. The ZigBee approach also requires a gateway, but only one gateway is needed on the premises.

 

WRT cameras, wow, that subject is very broad. I guess the best place to start is by dividing cameras into two categories: analog or digital. You may have thought wired and wireless is another common division among cameras, but I wouldn’t agree. There can be a wireless data transmission element associated with any camera. But regardless of how that element is implemented, just about every networked camera still needs power. For me, just reducing (but not eliminating) the requirement for wires means there is no wireless option, in my humble opinion. If you want battery-powered video surveillance, I suggest you look into wildlife or "game" cameras. They don't connect to the Internet, but most are easy to hide and can operate up to six months on standby taking day or night pictures when motion is detected. They store the pictures or short videos on removable SD cards.

Both analog and digital cameras can be interfaced with the Internet to allow remote viewing, but analog cameras will need some add-on equipment to enable network capabilities. Analog cameras are usually connected to a monitor or recorder via RG-9 or higher quality coax, at least for short distances. For long distances such as up to a mile, baluns can be used to translate the low voltage (~1volt) signal to a twisted pair cable. Regardless of the connection media involved, analog cameras (sometimes called closed circuit TV or CCTV) have to, at some point, be processed by a video server that translates the analog video into a stream or network packets that can be carried by an IP network. There are all sorts of video servers - for one to four or more cameras at varying frame rates. The most common server is embedded into a stand along digital video recorder (DVR) or PCI card. That approach allows one IP address to access multiple cameras at various frame rates, sometimes allowing the connection of up to 64 cameras, but usually only 4-16 cameras are supported per server or card.

Digital or IP cameras, on the other hand, include some sort of data compression technology combined with tiny embedded video servers. Once configured, they need no other device on location other than a high speed internet connection. As you can expect, they are more expensive because each camera includes an independent web server instead of multiple cameras being combined into one server such as a DVR plus one or more types of video image compression to conserve the use of bandwidth.

Less complexity within the camera device isn't the only reason analog is less expensive. Typically, analog cameras produce lower video quality. For example, they usually use NTSC video standards, interlaced video, and offer resolution limited to 400 or 600 lines of video. That limit is imposed by compatibility with NTSC signals. On the other hand, analog video can sometime produce a more usable picture if the camera has what is called Wide Dynamic Range (WDR). WDR cameras adjust the light exposure of individual groups of pixels so as to somewhat overcome scenes with strong high-contrast backlighting and/or shadows. For example, a camera that lacks WDR is almost useless for daytime use in a strip mall retail shop because an exposure for the bright outside sunlight will leave subjects inside the store lost in shadows. If the exposure is adjusted to better see inside objects, the overwhelming bright outside sunlight will blur the picture. Imagine what it would be like to try to photograph the label printed on a light bulb when the light is on. With a WDR camera, that is actually possible without any adjustment whatsoever. Without WDR, you will never get a usable picture.

To improve most analog quality shortfalls, a new standard called HD CCTV is developing. The motivation for developing this technology is to make use of pre-existing coax wiring installations - since the labor to pull new Cat5 cabling can cost a lot more than new IP cameras. HD CCTV can achieve HD (1080p) analog video which, in turn, is processed by a server to turn the analog video into streamed networked packets. However, there are few standards and limited hardware options available yet. Anyway, back to IP cameras.

IP cameras tend to have better quality, particularly for viewing or capturing motion events because most IP camera sensors use progressive scan video. On the other hand, WDR (discussed earlier) is not yet common for IP cameras - possibly for two reasons. WDR processing requires extra electrical power, and it adds a lot more complexity and cost to a camera that is already costly because it includes a dedicated web server plus video compression functions. IP cameras often offer the option to be powered over Ethernet (POE) connection - if connected to a POE enabled Ethernet switch. When WDR processing is added to basic camera functions, the power required exceeds what POE can support. However, newer POE standards are increasing the power available, and newer chip technology is reducing the power needed to perform computer tasks. That means WDR will eventually become more common and affordable in future products.

For image detail, IP cameras have the most options, some that have sensors of up to 14 megapixels. The cost can be astronomical, however, not just for the camera, but the higher quality lens that is needed to resolve such detail. And another trade off is network saturation. Few cameras with 2+ megapixel cameras can stream at 30 frames per second for TV-like fluid motion, and if you put several such cameras on a single network, there will be many packet collisions and throughput slow-downs. But, on the other hand, security video is usually quite adequate at as little as 5 frames per second or sometimes less. In spite of high prices for megapixel cameras, they can actually be the least expensive option for many applications because they can provide wide views that are most useful for situational awareness, and yet, when necessary, they can be zoomed into small areas and still reveal detail such as faces or license plates. So in many scenarios, an individual megapixel camera can provide better coverage and cost less for a large area than installing and wiring up several less capable cameras. On the other hand, an incredibly cheap $30, 300 line analog camera can be perfect if the subject matter such as a person's face fills most of the frame, because, in the end, the ultimate measure of video quality is all about how many pixels are on the target.

We did not discuss the wide range of image processing that is available for networked cameras, but the field is immense - and expensive. In general, the term analogics is used for such processing, and it can be performed on-camera or elsewhere. For example, through software, any images can be compared to a baseline image to detect objects that are expected but found absent, or objects that are not expected and found present. For example, analogics can detect a brief case left unattended in a waiting room, or can detect that a piece of equipment or furniture has been moved - setting off an alarm to notify an attendant to take a look. Similarly, analogics can distinguish the characteristics of differing objects by size and motion. This processing can distinguish between people and other animals or children vs adults. That capability could be used to count people walking down a path, or alert on a variety of conditions such as a running adult (distress?), or an adult that doesn’t move for an extended period (stalking?), or an adult that is prone (injured?), a vehicle that is speeding, and so on. The point of such sophisticated software is to alert an attendant if something suspicious occurs because, after all, almost no video surveillance is directly monitored by anybody. This is because there would be no way to overcome the boredom and fatigue of watching hours of dull video that usually reveals nothing at all. Machines can do much more effective and efficient analysis of real time video.

We also discussed infrared technology that is often marketed to allow cameras to see in the dark. I think most of those claims are overstated, misrepresented, and not rational - for a variety of reasons. First, IR cameras tend to have shorter lives. Why? Those little IR LEDs generate heat that is trapped inside the camera enclosure. Heat is one of the attributes that wears out electronics. Second, IR cameras aren't usually invisible when they operate. The darker it is, the more visible they usually become, because the darker it gets, the easier it is to spot the cherry red glow of the IR LEDs, especially if the IR is at around 840nm which is the most popular wavelength. IR becomes harder to see with the human eye when it gets around 890 nm, but most sensors lose IR sensitivity before that point. Third, the IR LEDs in every camera I've tested do not provide balanced illumination. There always tends to be a hot spot in the middle, with the image fading off around the edges. However, IR sources other than on-camera can be used to improve balanced lighting - as well as to confuse or disguise where the camera is actually located. Fourth, focus is often degraded when IR lighting is used because IR light is a different wavelength, the lens must be engineered with IR compatibility to be able to hold focus, and this added cost and capability, a feature only present on higher-end cameras. Fifth, IR illumination doesn't see colors. The image is mostly black and white. Sixth, all daylight cameras have an IR filter between the lens and the sensor to screen out IR light during bright sunlight - so as to increase the quality and color of the image. To see well with IR light, that filter has to be mechanically withdrawn from the light path, which is an added feature that is often absent unless buying a higher-end sensor.

But even if all the above issues were eliminated, the whole idea of IR lighting is irrational to me, because the likelihood of catching someone in darkness during the act of a crime, and being able to do something to catch them in the spur of the moment is a highly unlikely scenario because you probably aren't sitting around watching the camera in the first place; and what are you going to do if you are? Run out and hold the perp at gunpoint until the cops come - or just shoot the bum? Don't expect much joy from that line of reasoning.

A far more practical idea is to turn on the lights and maybe scare the perp away. If so, you forfeit the fantasy of catching the thug, but you achieve what should be the more important objective of preventing the crime. Of course, the perp may still keep coming even if security lights turn on. Well, if so, now you have a better quality picture that will show color of the clothes and so on, detail that IR camera will never provide. In summary, IR or night vision is great for allowing someone to sneak around in darkness undetected, but not so useful for someone who wants to keep a bad guy away.

Winding down, there are many expensive pan, tilt, zoom (PTZ) cameras that may seem appealing at first. In my experience, cheaper cameras provide a higher sense of security for less cost. For example, in less than a second, I can glance at three adjacent pictures on my browser window of nearly overlapping views of the front of my house. These views come from three relatively inexpensive cameras pointed to the east, north, and west. I cannot get the same fast situational awareness from a more expensive PTZ camera because I have to reposition it at least three times. I can efficiently store different positions to speed the PTZ process, but that takes more time than just a glance of three overlapping fixed-view weatherproof cameras that will cost significantly less than a PTZ camera plus a weatherproof enclosure. So, I've found that the situational awareness from multiple less expensive cameras is a better use for my money, in spite of the fun it might be to play with a PTZ camera.

Another thought, which applies to cameras, PDUs, or the entire scope of the "Internet of things" where more and more appliances become web enabled. The key to remote access for all these appliances is a router that is easy to program and, more importantly, a router which allows multiple of port forwarding scenarios. I've found Dlink routers to have perhaps the easiest single web page interface for port forwarding. However, many of their browsers only allow 20 ports to be forwarded. It is easy to exceed that number of devices over time. Netgear routers, on the other hand, have no apparent limit on the number of port forwarding setups, but the multiple page setup process is significantly more complicated than Dlink. I don't have any recent experience with Linksys or other routers. Another reason I prefer the Netgear brand is because they offer the largest variety of Ethernet switches that incorporate POE.

By the way, the setup software for many networked devices claim to be able to automatically configure the router to allow remote access whether using a dynamic or fixed local IP address. I've had unpredictable success with such claims, particularly if appliances from several manufacturers are on the same network. I prefer to always use fixed IP addresses for each device, and manually configure the router so I know exactly what is going on and can make notes in case I have to replace or upgrade the router at some point in the future. I find this approach to be a far more reliable technique than allowing a setup program try to automatically adjust router settings. Configuring a router for remote access might be a good subject for a future SIG meeting.

Another thought which applies to the Internet of things is how to deal with the possibility that your service provider provides you with a Dynamic (changing) Wide Area Network (WAN) or Internet IP address. The solution to such a situation is a Dynamic Domain Name Service (DDNS). There are many available. Often, devices intended to be remotely accessed over the Internet include use of a DDNS service. Independent DDNS services are also available, some free, some for fee. The entire subject could be yet another SIG meeting or separate essay. But for now, it might be good enough to know that generally, only one DDNS service is required. If you end up buying five different types of IP cameras and each provides a DDNS service, only one of the services needs to be present. Every device accessible on your local area network (LAN) can typically be reached through using just one DDNS service.

Cheers!

Hank