Marcin Barabasz

imagination is more important than knowledge… A. Einstein


Leave a comment

Cheap WIFI Switch review (KK-SP3)

20150625_22135520150625_22141020150625_22142020150625_221349

This time I would like to share my experience of a cheap Chinese wifi switch that i bought on Ebay for approx. 16$, plenty of sellers offer it. It is advertised to be able to operate from mobile phone via dedicated app. I was really hoping I wouldn’t need to use it for anything more than configuring connection to my home wifi:).

After receiving the package after few weeks from ordering I was really surprised how good it actually looked. The only drawback was the need to use power switch adapter – but it is not that bad since it is hidden under the switch when plugged in.

After connecting the switch to my home wifi using dedicated android app (There is a manual included). I could indeed turn the device connected on and off – it did it’s job pretty well, but that was not a main purpose I bought this device.

After a little googling I was able to connect to it via ssh.

username: root; password: p9z34cCapture

It turned out that it is actually powered by Linux koven 3.10.26 – very nice indeed – always good to see some familiar interface. This distribution is of course very limited to fit this small device but anyway great to have another Linux device at home.

The next thing was to be able to interface the switch over some well recognized channel- like REST for example.

Here is how I did it (from linux prompt):


mkdir /www/cgi-bin

chmod 755 cgi-bin

Download a cgi script from link and put it to cgi-bin directory.

After that you should be able to control the switch with using:

http://192.168.1.13/cgi-bin/relay.cgi?on

http://192.168.1.13/cgi-bin/relay.cgi?off

(replace 192.168.1.13 with the ip of your kankun)

Using this few small steps I can now utilize this switch in my home automation solution. It will be a topic of a separate post so stay tuned.


Leave a comment

Useless box

When I saw it for the first time I knew I was going to build one myself.

Part list:

– Wooden box (I got it for 14 PLN in http://www.empik.com/)

– ON-ON Switch

– Servo (I used cheap Chinese servo from ebay – you can get one for as little as 2$ with free shipping)

– limit switch

– 2AA battery holder

– some wires

– PCB laminate

– Glue gun

– solder

I got electronic parts from local DIY shop for 5PLN total.

First thing is to reassemble the wooden box so that the hinges are on the other side (the box should open lengthwise instead of width wise). Then cut the lid so that both parts are separated. The lid should be cut with less angle so that it closes freely.

Next you need to do is to remove electronics from servo, and limiting pin as well if it exists. The end product should be servo with two wires connected straight to motor.

Next you need to wire things together. It is really not that hard – and nice exercise. The end goal is to have servo rotating in one direction until limit switch is pressed and when ON-ON switch is switched the servo should start turning in other direction that’s it really.

Actually the most tricky part is to attach servo to the box, and construct the arm so that it will open the box and turn the switch. After few failed prototypes made out of cardboard you should get it right. The final piece is made of PCB laminate.

At the end just attach the ON-ON switch to the box and your useless box is ready!

My working piece looks like this http://youtu.be/zVWqqiD8Rmk

 

enjoy