RSS Feed

Smart TV with Raspberry Pi

Posted on

My Raspi has been stayed next to my TV for months and got stranded all over again. It used the first OS of Raspi in wich the omxplayer installed to play multimedia files. I just created the bash script to run all the multimedia files easily.

Unluckily, it could not detect my external hardisk anymore when I’d like to play the m4v file. My Samsung TV can’t play the file as well, apparently. So, I wiped all the Raspy OS and changed it into XBMC. In fact, I tried the XBMC back then but it did not perform well. It was horrific, honestly.

As the time going, the XBMC got the popularity. I checked Youtube to see how is its performance today. The video compares two XBMCs and concludes that the openelec XBMC outperformed another. So I go for it.

The installation is very easy. It only consumed no more than five minutes to set up. What you have to do is download the OS and burn it into an SD Card. Mine is only 2GB. Afterwards, install the SD Card firmly into the slot in your Raspi. Turn the power on to continue the process.

The Raspi will automatically set up the program then it will restart by itself to complete the setting. This is it! In no time, you already have a Smart TV. However, it is not the final form of the XBMC Raspi.

In order to build the real Smart TV, you need to plug the network or wireless network. I use wifi dongle. I tether my Android phone to broadcast the WiFi signal. I connect the Raspi as well as my iPad to the WiFi. iPad is used as a remote control. You have to install the free XBMC app from AppStore. Then set the IP address along with its access name and password to connect between iPad and Raspi. You can use other gadgets based on Android, iOS or Windows Phone system as a remote control.

Is it the final form? Not yet!

The XBMC has transformed in to the flawless OS. You can install add-ons to enrich the contents. I already installed Youtube, TED and many more add-ons to be watched streamingly.

That is the final form!

I just hope that my Raspi would not be stranded anymore. Amiin!

Raspi Buat Streaming TV

Posted on

Gara-gara weekend kemaren pengen nonton ATP tapi ga ada channels yang tersedia di apartemen yang nyiarin, saya live streaming pake laptop. Well, tennis jarang peminatnya sih di Indonesia. Tinggal colokin sih Thunderbolt di MangBook ke HDMI tipi. Terus di-full screen deh. Bagus streamingnya ga nginul dan patah-patah. Tapi ya resolusinya ga begitu gede. Secara, kalau HD, internet saya yang jebol.

Tapi setelah dipikir-pikir, saya punya satu “komputer” nganggur yang bisa dedicated buat nonton TV streaming dari internet. Dia adalah the stranded Raspberry Pi. Akhirnya, lu ada gunanya juga.

Semalem, coba googling dan install biar si Raspi bisa mainin youtube. Tapi sudah coba tiga “installers”, belum ada yang pas. Instalasi yang terakhir belum dicoba sih, karena harus masup kantor pagi ini.

Nanti ya kalau udah sukses, saya update tulisan ini. Stay tune!

Raspberry Pi as a Multimedia Player

Posted on

So, I ended this weekend by playing with my stranded Raspberry Pi.

As of today, I have three computers with three different operating systems. Raspberry Pi uses Linux based on Debian distro. Actually, I’d like to use a kind of multimedia OS. However I have to download the OS of more than one Gig size in the office😛. My second computer is Mangbook. Ya you know it, it uses OSX as an operating system. And, the last computer is the brand new i5 desktop computer uses Windows OS, of course, it’s for my lil’ brother to finish his thesis.

What have I done to my Raspberry Pi?

My objection is very simple. It is to play the full HD video clips and movies using the tiniest computer in the world, the Raspberry Pi.  I want to play movies or video clips in my full HD TV that has no feature of plug and play the video files via its USB port.  I forgot what the OS my Raspberry Pi uses. In this OS, there is a video player but it should be called in the Terminal. I can not simply click the movie file in the File Manager (it’s like Windows Explorer in Windows OS) and play it. It has no GUI yet. The video player is omxplayer. To play the video file, I have to type this line in the Terminal: Read the rest of this entry

Showing WordPress Posts in Your Own Website

Posted on

Sama seperti tulisan sebelumnya, namun kali ini ngambil posts di blog wordpress untuk ditampilkan. Bedanya, kalau ini formatnya XML kalau Twitter formatnya json. Tapi ga masalah. Mari kita saksikan bagaimana caranyo?

Ambil dan Parsing Posts Pake Feed RSS versi 2 dari WordPress

Ini adalah skrip untuk ngambil rss dengan item lima post ($i). Lalu kelima post ini dimasukin ke dalam array $data_ary. Nanti $data_ary ini bisa di foreach untuk ditampilkan di html, atau bisa juga ditampilkan dalam bentuk json buat webservice seperti yang saya lakukan (tapi di contoh ini hanya sampai array aja). Baiklah, inilah skrip yang saya modif dari mari. Read the rest of this entry

Showing Tweets in Your Own Website

Posted on

Sebelumnya, ga perlu pake oAuth buat ngambil json Tweets di twitter. Dengan API 1.1, semua harus melalui otorisasi untuk mengakses webservice Twitter. Langsung aja, gimana caranya nampilin tweets di website sendiri?

Bikin Twitter App

Creating Twitter App

Creating Twitter App

  1. Bikin apps dulu dengan pergi ke mari https://dev.twitter.com/apps/new, kalau belum login, ya login dulu pake akun Twitter Anda!
  2. Masupin datanya lalu klik Submit. Anda bakalan dapetin Consumer key dan Consumer secret.
  3. Nah di halaman ini, klik tombol Create my access token buat dapetin Access token dan Access token secret.
  4. Twitter App sudah sukses terbikin

Selanjutnya ialah tarik data tweets ini ke website pake PHP. Read the rest of this entry

Session Values Null But Session Keys Remain

Posted on

Ini berjam-jam saya habisin waktu di warkop buat menghandle masalah Session Values jadi NULL padahal Session Keys-nya masih ada di situ. Bingung kenapa….? Udah di dump dari atas page, bawah dan di tempat-tempat yang mencurigakan, ga ada masalah, Session Values masih bener. Tapi pas pindah halaman, jadi NULL lah mereka tapi Session Keys nya masih nangkring di situ. Bingung bukan alang kepalang. Mana script saya panjang, pake object dan RESTful API, ga nemu-nemu. Kalau buntu gini, saya putuskan untuk pulang dan tidur… Zzz…

Benar saja, tadi pagi, terlintas di otak saya, bahwa saya set Session menggunakan object seperti ini:

$_SESSION[‘data’]->username = $theuser->username;

Note that, bukan masalah object di Session tapi masalahnya di object $theuser yang value usernamenya dikasih ke si $_SESSION[‘data’]->username.

Berdasarkan pengalaman pas bikin formula YIELD obligasi di PHP, kalau dengan cara ini, ketika kita mengubah value $theuser->username, maka value $_SESSION[‘data’]->username juga akan ikut berubah. Damn it eh?! Pas ganti halaman kan object $theuser meninggal, artinya values-nya jadi NULL. Si session ngambil values dari yang udah jadi NULL tadi, ya NULL juga lah Session Values-nya.

Solusinya!

Jangan pake = tapi pake = clone, seperti ini:

$_SESSION[‘data’] = clone $theuser;

Sehingga, tidak ada hubungan lagi antara object $theuser dan $_SESSION[‘data’].

Demikian sharing dari otak kanan saya yang semalem baru diistirahatkan jam 4. Salam Session!

Less is More

Posted on

Less dibutuhkan di segala bidang. Statistika, itu biangnya less. Data yang banyak bisa jadi dua atau tiga angka saja yang lebih bisa dicerna daripada data banyak. Design, tentu saja, Apple dan sekarang Microsoft menggunakan less dalam design-nya. Hasilnya sukses besar. Programming, less dalam bikin baris program dan algoritma serta less dalam konsumsi hardware, itulah yang juara. Less dalam menyampaikan ide saat presentasi juga akan membantu bisnis.

Ngomong sih gampang, tapi coba, bikin deh itu less di Statistika, harus belajar cacing dan huruf-huruf Yunani. Coba deh bikin design yang less kayak Apple dan Microsoft, sakit kepala. Coba deh bikin baris program yang less! Emang gampang? Coba deh bikin presentasi dengan less ide, perlu diomelin boss berkali-kali dulu, baru deh bisa.

Itulah yang dimaksud less is more. Demikian!