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

Cheap home surveillance camera

Very cheap way to implement home surveillance camera.

All you need is:

– old Android phone

– home wifi router (I assume this should already be in every apartament)

– access to some free DNS service (I use http://www.noip.com/free)

 

Install application from Google Play

https://play.google.com/store/apps/details?id=com.pas.webcam

The configuration is very straight forward. Assuming your phone is configured to use your home WIFIyou should be able to access your streaming right away – just type on your computer the address (something like 192.168.1.xx:8080) and after selecting desired streaming technology you should see your stream. The next step would be to forward traffic from your router to your android phone:

Configure port forwarding on your router

There is a great page that will help you do that – I don’t want to write my own tutorial if something that great is available http://portforward.com/english/routers/port_forwarding/default.htm Just find your router brand and model and follow the steps. IP Webcam by default works on port 8080 so you need to forward your android phone ip port 8080 to some external port on your router like 8081 for example. The problem at this point is that you would need to know  your routers external IP address to access it from internet. Of course you could check the ip on one of the pages http://whatismyipaddress.com/ or better http://www.moanmyip.com/ but that is typically changing (depending on your ISP of course). To get access to your router from internet you need to:

Configure your router to register on one of the free DNS services

This way you will be able to access your camera IP Webcam from anywhere. Here is good link that should get you started http://www.tp-link.com/en/article/?faqid=419 of course if you are using different router brand the configuration will be slightly different, but the principle should remain the same.

Assuming your domain will be something like “myself.no-ip.com” your camera should be available under myself.no-ip.com:8081

 

enjoy