Back to .md Directory

Uncomment some or all of these to enable the optional hardware interfaces

Guides you through bare-metal setup of a Raspberry Pi to run the hueBerry smart switch, including wiring, libraries, and configuration.

May 2, 2026
0 downloads
0 views
ai
View source

What this file does

Guides you through bare-metal setup of a Raspberry Pi to run the hueBerry smart switch, including wiring, libraries, and configuration.

When to use it

  • Setting up a Raspberry Pi from scratch for a custom IoT project
  • Configuring I2C display and rotary encoder on a Pi
  • Enabling I2C and tuning bus speed on a Pi
  • Running a Python-based hardware controller on boot

Assumes this stack

Raspberry PiPythonAdafruit_SSD1306pigpioRPi.GPIOI2C

hueBerry: Setup instructions for Developers

"Bare-metal" install instructions for dev-kit

hueBerry Mess!

Getting Started: Updated 1/29/2017

Getting started with the hueBerry from a bare-metal pi is fairly simple. Here, I will attempt to guide you from start to finish!

Requirements:

Do you meet the dev-kit minimum requirements? Do you have a display, encoder, pi, and network connection? If so, you may continue! Otherwise, go back and get those components OR you can now run hueBerry in an emulated console session!

Bare-Metal Instructions:

sudo apt-get update
sudo apt-get install build-essential python-dev python-pip
sudo pip install RPi.GPIO
sudo apt-get install python-imaging python-smbus
sudo apt-get install git
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
cd Adafruit_Python_SSD1306
sudo python setup.py install
rm master.zip
sudo rm -rf pigpio-master
wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
make -j4
sudo make install
sudo pigpiod
  • You may want to add sudo pigpiod to your startup file (I used /etc/rc.local)
  • Modify your /boot/config.txt file to enable I2c and speed up the bus
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2c_baudrate=1600000
#dtparam=i2s=on
dtparam=spi=off
  • Optional Disable GUI (to speed up boot?) and lower GPU mem to 8mb
gpu_mem=8
start_x=0
  • Optional Overclock your SD card bus to get faster boot speeds
dtparam=sd_overclock=100
  • Clone hueBerry git dev branch then run the main program
cd ~
git clone -b dev https://github.com/fiveseven808/HueBerry_SmartSwitch.git
cd HueBerry_SmartSwitch

sudo python hueberry.py
  • Follow instructions on the screen to pair your hueBerry and bridge
  1. On first run, it should ask you to pair with your Philips hue Bridge.
  2. Follow the onscreen instructions
  • Enjoy!
  • If the above instructions do not work, please contact the maintainer to correct this accordingly

OR!

Installer Beta If you understand all of the instructions above then a new option is now available for you. Just download the installer and run sudo python install_hueBerry.py. You should understand of the instructions above first is because this installer is not fully tested and is in a beta state of usability. But for all tests done so far it works, so I'll leave it here for now.

License:

Creative Commons Attribution-NonCommercial 4.0 International
This is an open source beta program supplied with no guarantee.

What's inside

1 setup overview, 2 install paths (manual and installer), 6 code blocks, 1 config snippet, 1 wiring note

Change this for your project

  • Replace https://github.com/fiveseven808/HueBerry_SmartSwitch.git with your own repository URL
  • Replace sudo python hueberry.py with your own main script name
  • Replace https://github.com/fiveseven808/HueBerry_SmartSwitch/raw/dev/install_hueBerry.py with your installer URL

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Worth borrowing

  • Offering a beta installer alongside manual steps for advanced users
  • Including optional performance tweaks (GPU mem, SD overclock) in config notes

Related Documents