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.
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
hueBerry: Setup instructions for Developers
"Bare-metal" install instructions for dev-kit

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:
- Optional: 3D Printable Case!!! Courtsey of Daniel Back
- Raspberry Pi (I used a Zero W)
- Adafruit_SSD1306 library
- pigpio library
- SSD1306 compatible display (128x64 resolution)
- Rotary encoder with momentary swtich
- Full BOM located here
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:
- Install the latest Raspbian distribution
- Wire up the I2C display and rotary encoder (wiring diagrams coming soon)
- Install the Adafruit_SSD1306 library
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 pigpiodto your startup file (I used /etc/rc.local) - Modify your
/boot/config.txtfile 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
- On first run, it should ask you to pair with your Philips hue Bridge.
- Follow the onscreen instructions
- Enjoy!
- If the above instructions do not work, please contact the maintainer to correct this accordingly
OR!
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.gitwith your own repository URL - Replace
sudo python hueberry.pywith your own main script name - Replace
https://github.com/fiveseven808/HueBerry_SmartSwitch/raw/dev/install_hueBerry.pywith 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
Dev Setup Install Instructions
Walks through setting up a conda environment, installing dependencies, and configuring MinKNOW for simulated Flongle replay and adaptive sampling.
canvas_dev_setup
Guides developers through setting up a local Canvas LMS instance with Apache and integrating it with the Wiki Education Dashboard via LTI 1.3.
My current setup (2026 edition)
Documents a developer's personal IDE, terminal, macOS, iOS, hardware, and tooling choices in 2026.
dev_setup
Explains how to install, run, test, profile, and contribute to the Vimflowy project locally.