19 January, 2014

Raspberry Pi and IR remote control with LIRC

I have been planing for a while to add an IR remote control to my RPi and the day came with the discovery of a IR set with remote control sold by Kjell&Company for a symbolic price.

First step first. I have added the receiver part since it does not require soldering at all. I have followed this manual to set and test LIRC on RPi with one exception - I use GPIO 18 as input from the IR detector. The set does not include any manual, so some research was necessary. The example code is for Arduino without any references to the specific hardware. Anyway, here I found the most relevant information. One can find example lircd.conf for some similar remotes but they did not work with the one in the package with label KEYES and distinct key pattern.

26 December, 2013

ASUS Wireless Router RT-N56U

I got the router more than half an year ago, to replace my old D-Link DIR-655 which was really good router but had ridiculously weak signal (I had problems to connect my mobile devices in the other rooms. Later, I also found that the weak signal was the reason for my wireless printer to malfunction).
As usual, I am not going to write a complete review but only to add my personal opinion and experience that is not mentioned anywhere else on the net.

To begin with, the router is really good, fast and with plenty of features out of the box. I have to mention that the official web page was well behind the real specifications of the actual firmware at the time I bought it. I was very close to buy the better and more expensive router RT-N66U just because it said that it has VPN. For my surprise, when I upgraded the router to the latest firmware, right after I bought it, it had already VPN...

Just to mention my priority pros/cons features that are specific to this router (I assume that port-forwarding, virtual host, etc. as standard): Firmware version: 3.0.0.4.374_979 at the time of the review.

Pros:
  • Fast dual-band 2.4GHz/5GHz wireless router
  • Gigabit WAN/LAN
  • Strong signal
  • Support for 3G/4G modems (a bit limited but still quite functional)
  • Multi-Function Twin USB 2.0 Port + samba share
  • Advanced web interface
  • telnet - this is really perfect!
  • Traffic manager
  • Network tools: ping, traceroute, nslookup, netstat, Wake On Lan
  • System log

28 October, 2013

Home automation: second round

Some time ago I briefly mentioned here the main concepts behind the project. Nothing has changed dramatically, except that I realized that my SMSgate solution was outdated. The phone battery was seriously deteriorated and I also realized that it is not that easy to just replace the phone anymore.

Well, I had an old Android phone (HTC Wildfire) that was essentially lying unused for quite some time. There is not so much that one can do with this old phone... but it turned out it works just perfectly to send and receive SMS and much more.

If you are in the "business" of home automation and you have Android device, Tasker is a MUST HAVE! To send and receive SMS messages I use SMS Gateway (I could not find an easy way to send SMS from external device via Tasker).


Briefly: I have changed the original python code to send SMS via SMS Gateway via HTTP GET request from RPi and then I have slightly modified the example, so I can control stuff by SMS. It is very clean and simple solution.

Now, since I have web server on which I get the notifications from the SMS Gateway I can simply use the same code to handle events from Tasker! This is how I get notifications on call - piece of cake. I have added, at the end of the post, an example how to switch on/off device 2 via tdtool.

20 July, 2013

Renault Clio III: changing front light bulb

Alternative title: Removing Renault Clio III from the front light bulb

As I mentioned before this is worth writing about. Within a week period, the lights on both sides of my car needed to be replaced. I had no idea how to access them or what to expect once I remove the rubber cover. One can't see anything. The manual is useless and suggests:
"However, because parts need to be removed,
you are advised to have your bulbs replaced
by an approved dealer.
"
The best source of information I found was in this forum thread: Changing light bulb Clio III

Update: here I found instructions with pictures. Notice the slightly different bulb holder with clips.

Update 2015.12.02: Make sure to check Remy's neat trick in his post (+video) in the comments section below.

Some people suggest to remove the battery or the front mask of the car. I was on the road, so disassembling anything was not an option. I could not see anything and once my hand was in the engine area it just got worse. I remember, my brain stopped working overloaded by thoughts about design, designers and other messy stuff. I took pictures with my phone after removing the rubber cover to see what is going on THERE. Then, somehow I removed the electric connection and took a picture again. Here they are (I got more but they were not pointing at the relevant area...):


I need to just add that the original bulbs are OSRAM H7 - 12V - 55W - #64210 - UV Filter. According to the manual: "It is essential to use anti-U.V. 55W bulbs so as not to damage the plastic on the headlights."

Assuming that your hands are small enough to fit in the gaps, the easiest way to put the new bulb in place is by looking through the hole of the headlight (that was still almost blindly but honestly, this was the most I could see from what I was doing). Then again, blindly or not you ought to try to fit the electric connector. It took me about half an hour per bulb and both hands badly scratched... I think any further comments are redundant.

After the post became sort of popular (according to the site statistics), I thought that uploading a movie would be more useful, but after lifting the hood I had the same brain storm feelings, as before, and promised myself I'll do this next time... UPDATE: Failed.

24 June, 2013

Home automation: Raspberry Pi + Tellstick Duo ++

There are many sites that has this project in many flavors... I will just add mine.

Brief summary: Tellstick Duo is connected to Rasberry Pi (running Raspbian).  I have SE K700i GSM phone connected to RPi as well. The main features are:
  • control several radio controlled switches (Anslut)
  • monitor temperature and humidity from my wireless weather station
  • monitor for "door open event" (NEXA LMST-606)
  • monitor for commands send by SMS (gammu) Update: replaced by Android SMS Gateway. Read more...
  • report on selected events by sending SMS to predefined phone number (gammu)
  • simple web interface to control some of the features (apache + php)
  • events are logged locally in to a file and to a remote server (own twitter like)
To install telldus-core follow this guide. One can compile the GUI for RPi or use it on another computer to set the codes. I wanted to be able to repeat the original codes from the remote controls. Advanced users can use code from the examples to "learn" the codes.

Essentially, I am running a monitoring program written in python (took one of the provided examples and changed it severely). It catches signals from the remote controls and could trigger an action. In other words, I can use the remote controls to send signals to RPi. The same program monitors the GSM. It could trigger an action upon CALL or SMS. The signal from the door is logged by default but could also send an SMS - poor man's home security alarm.

I particularly like the CALL feature since you do not need to answer the call, so no cost attached. The downside is that there is only one action hooked to this event. SMS is easier but will cost you (or not - depends on the plan you have). When SMS is received from another phone (not mine) the SMS is logged and forwarded to my phone.