How to configure a Raspberry 3 with a MagicBulb

First, we need to download the official rapsberry image (raspbian Pixel version):


Now, we need mount the image in a microSD. You can use etcher to automatize the entire proccess:

unzip -e

Before placing the microSD in the raspberry, you need enable ssh service. To do this, just create a file called ssh in the boot partition.

cd /media/PI_BOOT
touch ssh

where PI_BOOT is the boot raspberry partition.
Use pi as user and raspberry as password to access it throught ssh.
Now, we need to install dependencies for magicblue:

sudo apt-get install libglib2.0-dev libbluetooth-dev
git clone
cd bluepy
sudo python install 
cd ..
sudo pip3 install setuptools bluepy webcolors
git clone
cd magicblue
sudo python3 install 
Traceback (most recent call last):
  File "", line 7, in <module>
AttributeError: 'module' object has no attribute 'setdefaultencoding'

if you try with the previous magicblue version you will get the following error:

tar xvf 0.2.tar.gz
cd magicblue-0.2
python3 install
Traceback (most recent call last):
  File "", line 6, in <module>
  File "/usr/lib/python3.4/encodings/", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 207: ordinal not in range(128)

To fix it, as you see, the problem is the file. Just remove it or backup it and create an empy


Now, you can install magicblue without problems and control 

Enjoy it!


Popular posts from this blog

How to fix Android when developer options are not available for this user

from: can't read /var/mail/ in Python scripts

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04