Wi-fi tunnel -> RcSwitch for light control

image

Background


Quite often, chandeliers controlled using a wireless remote control that operates at a frequency of 433 \ 315 mhz began to appear in our homes.

In my apartment, such a chandelier was the first to appear in the room. Later, when our family was replenished with two children, I was forced out to “live” in the kitchen, and the wireless light control in my new home was sorely lacking. In this connection, from a well-known site, a 4-channel wireless module was ordered.

image

And the process of “tuning” the kitchen chandelier began. To create the nightlight mode, an LED tape was glued and hung on the first channel of the block.

image

The remaining channels of the unit are used to control regular chandelier lamps. One channel, however, remained free. The power supply for the tape fit in the chandelier bowl, but the unit itself didn’t manage to be pushed into it, I had to take it out.

image

Life has become easier. But I don’t know how the rest, but for me these very remotes began to be constantly lost. I had to do something about it.

Iron part


Based on the well-known esp8266 microcontroller, using the firmware from the homes-smart.ru website, I assembled a simple gateway, namely, a transmitter with a chandelier control frequency was connected to the module. With the help of Arduino I removed the codes for the buttons of the “room” and “kitchen” remotes.

image

The module with ESP is soldered to a makeshift adapter, on the back of which a voltage regulator of 3.3 volts and a small capacitor are installed, so as not to worry about powering the module. The ESP connects to the transmitter via an adapter.

Software part


Everything would be fine, but there was a problem, the firmware I used did not have such a user web interface. Therefore, it was possible to execute commands only through an http request.

To solve this problem, clients were written under windows phone and android (in alpha state). To write an application for windows, I used Visual Studio 2015 RC. This was my first acquaintance with programming for this platform. I want to note that in comparison with programming for Android, this platform did not cause any difficulties. Everything worked right out of the box.

imageimage

Then the client’s time for Android came and then the difficulties began. Earlier, I tried programming for Android in the Eclipse environment and everything seemed to work out fine for me. But for some reason I managed to reinstall this environment. I drew attention to the fact that in the new Visual Studio there was an opportunity to create projects for Android, but this direction did not go with me either. As a result, an easier way was chosen using the wonderful resource appinventor.mit.edu. Quickly threw the project, uploaded it to the phone, and it worked.

image

However, he did not manage to bring it to the end. The kids do not give a step without them, so there is absolutely no personal time.

PS This is my first article on Habré, do not judge much, I tried to describe as fully as possible how much my literacy and my children allowed, which did not give rest throughout the story. So this is where I end. It's time to go entertain the children.

I hope my idea will be useful to someone.

Mentioned and used materials

Firmware: http://homes-smart.ru/
Client for Windows Phone: yadi.sk/d/53y6SsmljZGpm
Client for Android (not yet completed): ai2.appinventor.mit.edu/#6244931076096000

Also popular now: