Integrate Smart Shades Into Apple HomeKit Using Raspberry Pi 3

Introduction: Integrate Smart Shades Into Apple HomeKit Using Raspberry Pi 3

Simple step by step guide to controlling Smart Shades ( with Apple HomeKit/Siri.

Will need:

1x Smart Shade (to get started - can buy them from

1x Raspberry Pi 3 (integrated Bluetooth)

Step 1: Mount Your Smart Shade

Install and setup your Smart Shade into your desired location - steps for doing this can be found here -

Step 2: Setup Your Raspberry Pi & Install Homebridge

Follow this great step by step guide to installing your Raspberry Pi and also installing the HomeBridge service which is used to connect/bridge your non-HomeKit accessories and make them HomeKit enabled

Step 3: Install the Smart Shades Python Script

1. Download the python script file from this website -

2. Extract the file from the downloaded zip file and place it in your /home/pi directory (I changed the name of the file and just called it "" to make things easier)

3. Enable your Bluetooth adaptor - sudo hciconfig hci0 up

4. Now scan for your Smart Shades which are normally named RISExxx using this command - sudo hcitool lescan

5. Make note of the Smart Shade MAC address

Step 4: Install Command Prompt Package

This step is needed so that you can setup a switch button for HomeKit and have commands running to open and close shades.

To install this package for HomeBridge bring up the terminal on your Raspberry Pi and run this command at the prompt

sudo npm install -g homebridge-cmdswitch2

Or alternatively follow the guide from this link -

Step 5: Create Switches for HomeKit

Next is to create a switch for HomeKit integration and add commands to move the shades up or down.

The following commands that work with the script are below, followed by my script setup:

sudo python -t 00:00:00:00:00:00 -c get_battery [prints out the device's current battery level]

sudo python -t 00:00:00:00:00:00 -c get_position [prints out the device's current position]

sudo python -t 00:00:00:00:00:00 -c move_up [moves the device to its highest position]

sudo python -t 00:00:00:00:00:00 -c move_down [moves the device to its lowest position]

sudo python -t 00:00:00:00:00:00 -c move_target -a 75 [moves the device to the specified position with 0 being the highest and 100 the lowest position]

I created 2 switches 1 for each task so it didn't matter whether the switch was switched on or off but you can create just the 1 switch if you want.

To create the 2 separate switches, on your Raspberry Pi go to your /home/pi/.homebridge folder and edit the "config.json" file

Add in the following code under the platforms, you'll also notice on my "Close Shades" I have set a move_target so that it doesn't close all the way to allow the dogs to get in and out of the house without being blocked by the shades. Also insert your own Smart Shades MAC Address where replacing the 0's below.


"platform": "cmdSwitch2",
"switches": [{
"name": "Open Shades",
"on_cmd": "sudo python -t 00:00:00:00:00:00 -c move_up",
"off_cmd": "sudo python -t 00:00:00:00:00:00 -c move_up",
"state_cmd": "sudo python -t 00:00:00:00:00:00 -c get_position"
"name": "Close Shades",
"on_cmd": "sudo python -t 00:00:00:00:00:00 -c move_target -a 65",
"off_cmd": "sudo python -t 00:00:00:00:00:00 -c move_target -a 65",
"state_cmd": "sudo python -t 00:00:00:00:00:00 -c get_position"

Step 6: Download HomeKit Compatible APP on Phone

Now that the setup is complete you will need to download an app if you want to manually control the shades via HomeKit or by using Siri. You can also set scenes and events with time triggers to make them completely Smart Home Automated.

Just search for "HomeKit" on the App Store. There's quite a few free or paid ones. I personally use the "Home" APP that has the same logo as HomeKit. It's a paid APP so it's entirely up to you what you want to use.

Then your done!

Be the First to Share


    • Digital Fabrication Student Design Challenge

      Digital Fabrication Student Design Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Frozen Treats Speed Challenge

      Frozen Treats Speed Challenge



    Question 1 year ago

    Hi is there an easy way to update this for use on the soma smart shades 2


    3 years ago

    Hey Guys , not working form me , code added to homebridge connfig file but nothing show up at appl home app any ideas?


    4 years ago


    Can't you add a stop action like in this link:

    You could modify the PY to add an action that reads current position and calls function to move to that position. This action would stop the blinds where they are.

    Great work by the way!