Showing posts with label raspberry pi. Show all posts
Showing posts with label raspberry pi. Show all posts

Wednesday, 18 June 2014

Switching your HDMI inputs on a Samsung TV

Hi all, let's assume that you have a Samsung TV and a Raspberry Pi connected on an HDMI input.

Using CEC you could send:
 echo "as" | cec-client -s
to switch to the next input,. However this is inconvenient since it does not switch "back" to your previous input. So what can you do?

Get this lovely utility from here. (Disclaimer: I did not write this, I got it on GitHub). It is a lovely python script which you can use to send commands to your samsung TV AFTER you have turned it on. In my case I use the commands KEY_HDMI2 or KEY_HDMI3 but there is a great variety of commands that you can send.

Keep in mind, your device (where the script will run needs to be paired with your TV in order for this to work. This can be a simple procedure, the first time you fire a command the TV asks if you would like to pair with the device, you say yes and that's all.

Python is already installed on the xBian Linux for R-Pi. So, in the same manner that I have described here, you can set up an ssh command that executes this script with python on your raspberry Pi.

Usage:
$ python samsung.py KEY_HDMI.

A more comprehensive list of commands can be found online, search google for samsung and KEY_HDMI or look for example here.

Thursday, 8 August 2013

Control your wall lights with raspberry Pi

Hello again, it´s been a while. I have decided to move on from Openelec and installed xBian on my Raspberry Pi. It all went smoothly and super fast and I am pretty happy with how it works. The reason for this decision was that Openelec has a read only file system… and I love tampering. I found a nice german guy that described a way to create a very cheap electronic expansion board and bundle it with a raspberry pi to effectively manage to control equipment such as this or this or even this. Wanna see how it`s done? Read on!

Friday, 31 May 2013

Tasker and XBMC, part 2: Create smart playlists and play them by using voice commands (UPDATED!)

Hello again everyone. I assume that you have read the previous post and will try to set up another magic trick with this one here. I will show you how to use your voice, talk to your phone and make XBMC create a playlist based on your command and actually start playing it.

Possible voice commands are for example: "Play music where album is Hairspray" or "Play music where genre is rock" or even "Play music where artist like Jason"
(Of course you need to have those in your music library, right?)

A prerequisite for all these to work is that your android phone and XBMC are connected to the same wireless network.

Friday, 24 May 2013

Tasker for android and XBMC on a Raspberry Pi: Home Automation madness

Hello back, it´s been a while. But I have been playing with interesting toys lately. And this post is here to describe some of it.

Let us introduce the toys first:
1. Tasker for android : On Android market and project website. This is an automation app for android platform. It is very easy to use, there are tutos everywhere online, I won´t cover this part.
2. XBMC on a raspberry Pi computer. If you don´t know what this is, learn. It is worth it.
3. A Samsung Smart TV (model 40UE6300).
4. Json - RPC framework. This is the way to communicate with the XBMC on the raspberry Pi and create all the magic tricks. This is just for reference, I will create another post to describe more magic tricks.
5. Autovoice plugin for Tasker. This will help you be the master of your own android device, namely by allowing you to command it. Directly.
6. Tasker SSH Command launcher.

How? Read on!