Simple Electrical Outlet Control Over Internet via IP-Camera

Numerous Chinese eBay sellers inexpensively sell wireless remote control electrical outlets of the type shown below. For examples simply search “IR Remote Control Outlet” on eBay. You will find them for sale for as little as $3.68 US. The socket shown below is the subject of this article and is wirelessly controlled via Infra-red light (IR). There is a virtually identical looking radio controlled version, which will not be discussed in this article. Those that are marked in English typically exhibit the KAKA brand name.

IR Controlled Socket

IR Controlled Socket

KAKA has some rather ingenious features on this socket. The female connections are designed to accept worldwide plugs –  European 2-pin, USA/Japanese 2 blade or 3 prong,  UK heavy blades and Australian angled plugs.  The male blades on the rear can be configured USA parallel style or Australian angled style. Not very child proof but rather clever. One side has a second USA style polarized blade receptacle. It exhibits the EU certification CE seal which, may or may not be legitimate. There is no USA Underwriter Laboratory UL seal.

The IR controlled socket can be programmed to most any IR transmitter button by pressing the black training button while pointing a remote at it an pressing the desired button. For example, any unused button on a TV remote can be programmed for use with the IR controlled electrical socket. In my case, I purchased a socket that came with a little single button IR remote. My reason for wanting to buy the little single button IR remote was so that I could wire it up to be controlled by the relay output of an Internet connected video camera.

Before I write about the camera I must announce – Do Not contact me with technical questions regarding such Internet video cameras. Instead, post your questions on the forum at It is the best place for questions if your vendor is not helpful – but try the vendor’s technical support first.

Shenzhen China has a number of Internet video cameras (IP-Camera) that are quite powerful for their sub $100 price – typically around $60US plus or minus a bit. The most commonly know brand is Foscam. Foscam has the best support and posts firmware updates on their website. There are a number of lookalikes the best of which, in my opinion, are WansView and EasyN, which have support, although a bit less responsive than Foscam, and will supply firmware updates via email, when requested. WansView is the OEM for all, or most, of the better cameras. There are also some newer entries into the market with similar looking products but with marginal quality parts and non-existent support.

I prefer the 640×480 mjpeg version which, in addition to being the most commonly available and least expensive, provides adequate video quality and is very compatible with Linux operating systems. The newer H.264 HD cameras only work well with Windows and even then you must load a Chinese Active-X component that fails Microsoft’s certification verification. I use no Microsoft or Apple products so I reject any product that is proprietary to Windows or iOS. In any case, for general surveillance I find 640×480 to be quite adequate. Newer versions of these cameras incorporate a  solenoid switchable infrared filter to provide truer daytime colors – mostly green. I also have little use for these IR-cut filters because they add complexity that will ultimately break, provide little of value for indoor use and I don’t personally care if, when used outdoors, the color green is more of a gray. Other people don’t feel this way, but I am more interested in the content than color accuracy. If you watch the video you may notice that my screen appears different from the stock WansView camera. This is because I loaded a custom webui that has some extra features – but, the function is the same as other cameras for the purposes described herein.

Example of IP-Camera

Most of the indoor versions of these 640×480 resolution cameras have a plug (usually green) on the back of the camera (See below) with a set of contacts that are a relay output and another for a sensor input.

green-connectorThe web interface (webui) of the IP-Camera has icons for operating and releasing the relay. They are typically a chain link and a broken chain link, as shown below.

Camera Relay Buttons

Camera Relay Buttons

So, my goal is to wire the IP-camera’s relay output to the pad on the IR remote such that I can remotely control an electrical outlet through the web interface of the co-located IP-camera.

To better explain what I did, I made a video of the entire project.In the video I show how to wire up a small dedicated IR transmitter to the camera’s relay output and demonstrate the camera operating the electrical socket over the Internet.

Look at the video below and all will be revealed.

This entry was posted in Electronics, hardware, IP-Camera. Bookmark the permalink.

5 Responses to Simple Electrical Outlet Control Over Internet via IP-Camera

  1. acassis says:

    Hi Celem,
    Thanks for you comments on my blog (
    This is a nice project, thanks for sharing it. Now I realized your found my blog thanks to my wireless IP camera hacking:
    I will add your blog to my favorites, I like your hacking posts.
    []’s, Alan


  2. Zohar says:

    Hi celem

    Can you please tell abit about the 2 “Sensor” contact?
    How can they be use, and what do they do?

    Thank you


    • celem says:

      I assume that you are referring to the sensor contacts on the camera. If so, their intended purpose is connect an external passive infrared sensor (PIR sensor). For a description of a PIR see


  3. Maksims says:

    Could you please give link where possible to download this custom WebUi


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s