SiriControl: A Voice Control System

SiriControl is an open source framework designed with developers in mind. It provides a simple way of using Siri commands, stated in my previous post, by dynamically loading modules created by the user. This means that you can add voice controlled capability to any project, with Siri.

Please see my updated post here on Medium.


The idea of using Siri to control my Raspberry Pi sounded very cool to me so I searched on the internet to find SiriProxy, which redirects the Siri commands through the Raspberry Pi, which is then intercepted. However, this was too much of a hassle and with the update of iOS 7, it stopped working. So SiriControl was born…


So why use SiriControl?

  • No extra hardware required as the commands are being sent through the iOS device
  • Runs on any computer with python installed – the Raspberry Pi is especially good as you can make it control anything around you. The possibilities are endless with your imagination being the limit.
  • It is beginner friendly with minimal setup required – I have provided step by step instructions on how to set it up. It is written in python which is quite an easy language to pick up.
  • You will get the power of Siri’s fantastic speech recognition capabilities, and will be able to use it from anywhere in the world, as long as your device has an internet connection.

Overall, you will be able to add accurate voice controlled capabilities to any project for free.

Convinced that SiriControl is awesome?

Well, lets get started!



With Siri, you can create Notes by using the command word ‘Note’, which can be synced to a Gmail account. SiriControl works by fetching Notes from this account. It dynamically loads modules, created by the user, meaning that you can set it up to control anything you want, when the specific command words are heard.

This ingenious hack helps you to easily add Siri controlled capability to any project.


Gmail Account

1) A Gmail account is required for SiriControl. For security reasons, I suggest creating a new Gmail account as you will have to enter your username and password in a python script. This won’t matter as you won’t be using this for personal everyday use – just for speaking commands.

2) Then, access for less secure apps needs to be turned on, which can be done here. This is because Google identifies the connection between the python script and mail servers as less secure.


3)  As the script uses the IMAP protocol to fetch new Notes, IMAP  needs to be enabled, under the Gmail settings.


iOS Device

1) Now, navigate to the following, in your Settings and add your newly created Gmail account:

Settings  –>  Notes –> Accounts –> Add Account

2) Turn on Notes for that account.


3) Ensure that the default account for creating Notes with Siri is your new Gmail account.

That’s it! Now, just tell Siri to create a Note like this:

“Note this is awesome”

The new note should appear under the Notes label in your Gmail account. If not, please follow the above steps again.

SiriControl Setup


1) Firstly, download the scripts from here.

2) Then, open up and add your username and password of your new Gmail account. This should be self-explanatory.

3) Now, run the script and say to Siri:

“Note the meaning of life”

The answer should be printed out,  because of the ‘life’ module in the modules folder. The setup is now complete.

Creating your own modules

Here is the default module that comes with SiriControl:

#You can import any modules required here

moduleName = "life"
commandWords = ["meaning","life"]

def execute(command):
    print("The meaning of life is 42")

moduleName – This is the name of the module which can be anything you want.

commandWords –  This array will have the words which need to be said in order to call the execute() function.

execute(command) – This function is called when all the words in the commandWords array are said. The ‘command’ parameter is the command said by the user, to Siri.

That’s all there is, to add Siri control to any project you want, whether it is as simple as turning on a LED to controlling your TV with infrared – the possibilities are endless, with the power of Siri behind it!

Hope you enjoy SiriControl! Please share your ideas and opinions below.


23 thoughts on “SiriControl: A Voice Control System

  1. HI, I want to explore this method but I am having a problem. I followed twice the instructions until “Creating your own modules”. Siri does create the notes but I do not see them in mi Notes label in gmail. I am using my current gmail account for the moment. Could this be the problem ? I followed very carefully ever step but, until I manage to vahe the notes in gmail, no use to go further. Thanks for your help.


  2. Hi, Really excite by this however my skill are still basic. Please see error message

    pi@raspberrypi:~ $ git clone
    Cloning into ‘’…
    remote: Not Found
    fatal: repository ‘’ not found

    Any ideas


  3. Hi, I had this working just great for a while. My RPi was gleefully telling me the meaning of life. Then for no apparent reason it stopped working. It was like Siri got tired of hearing me say Note every few minutes! The problem seems to be between Siri, Notes, and Gmail, as my dictated notes don’t appear in my Gmail Notes label. I’ve tried everything to fix it, even deleting my Gmail account which I created just for receiving the notes, and creating a new account. Same result. Does anyone have a suggested fix?


    1. Hi hat is odd as mine worked no problem and has been for a few weeks. I need to write some code to operate a relay and lacking time. Hope you get it sorted soon. Just checked and mine is still working. In case Gamil had changed something


    1. The Pi is listening to the note from google. Siri takes the note, but the pi does not answer, although he is working fine and there is no error message. What could be the problem?


  4. HI!
    i’m loving this and got it to work just perfectly but i have very limited programming skills so I was just wondering if you could give like some example of what to do. Like how to use this to start a web-aplication that i have on my raspberry. 🙂


  5. It works fine when I enter the note directly in Note App, my note is visible in gmail and received by SiriControl like expected. But when use Siri the note is only visible on my iPhone Note App, the note is created in the good account gmail of Note but not sync with gmail so not receive in SiriControl. If I use the Note App to change manually something in the note (one letter is enough) the note appear in Gmail and in SiriControl.
    Perhaps link with my version of IOS 9.3.5 or something in the configuration I don’t know !!!


    1. Unfortunately, I am not clear as to why your problem is occurring – maybe it is the new iOS version or you could double check the folder for syncing notes is the one which Siri creates them in.


  6. Trying to use this to use Siri to run a motor for a baby gate to open it with voice control. Below is my python code, it will execute properly if I run from terminal on the raspberry pi and the SiriControl-System works great with the pre-loaded example “life”; yet whenever I try to run my motor script with SiriControl-System it errors. Any suggestions how to make it work with Siri-Control System would be greatly appreciated.

    #You can import any required modules here
    #import Adafruit_MotorHAT, Adafruit_DCMotor
    from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor
    import time
    import atexit
    # create a default object, no changes to I2C address or frequency
    mh = Adafruit_MotorHAT(addr=0x60)
    #This can be anything you want
    moduleName = "opengate"
    #All of the words must be heard in order for this module to be executed
    commandWords = ["open"]
    def execute(command):
    ################################# DC motor test!
    myMotor = mh.getMotor(1)
    # set the speed to start, from 0 (off) to 255 (max speed)
    # turn on motor;
    while (True):
        print("Forward! ")
        print("Forward! ")
        for i in range(255):
        print("\tSlow down...")
        for i in reversed(range(255)):


    1. That’s great! Only the execute() function is executed so the motor object (mh = Adafruit_MotorHAT(addr=0x60)) should be initialised under the execute function. Hopefully, this should work.


  7. I moved the motor object line under the execute () function and am still getting the same effect. This is what it gives me:

    Loading modules…
    The module ‘life’ has been loaded, successfully.
    Slow down…
    The module ‘opengate’ has been loaded, successfully.
    The module ‘templateModule’ has been loaded, successfully.

    Fetching commands…

    The word(s) ‘open’ have been said

    [ERROR] There has been an error when running the opengate module

    It loads the module fine and runs during the loading, but will not execute upon word command. Any other suggestions? Code is same as above, just moved the object motor line as seen below. I’m really new to this, did I put it in the right spot?

    def execute(command):

    # create a default object, no changes to I2C address or frequency
    mh = Adafruit_MotorHAT(addr=0x60)


    Thanks for your help.


  8. Hey Sanjeet,

    Awesome post thanks a lot for sharing this! I’ve been having fun tinkering around with different kinds of modules. But I gotta ask, cuz this took me a minute… what module did you import when you created your ‘Restart Pi’ module? At first, I tried using plumbum and then but I couldn’t get either of those to work for me. Finally, I gave up and just used os.system() which worked no problem. Anyways, I’m just curious. But seriously tho, thanks again man and keep up the great work!




  9. Hey Sanjeet. Can you comment on the security of this? The python script is stored on my pc within my internal Wifi. What specific vulnerabilities do you see in this approach?


  10. I’m new to this. Can I get a code, to put in template module to turn on and turn off led with Siri. Led is connected to pin11(17GPIO). Im very thankfull.


  11. Hey Sanjeet,

    I do really enjoy that project.
    I was wondering if there is a way to capture the inbox of that linked google account instead of using the Notes ? Using the inbox would make much things even more versatile, as sending new mails can be triggered from like everywhere using anything.

    Keep up the good work.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s