Talking to Jasper using Siri

I am sure many of you have Jasper running on your Raspberry Pi – in this post, I will show you how to talk to Jasper, through Siri.

For those of you who don’t know, it is an open-source, always on, voice assistant which you can use and extend to suit your own commands and operations. Here is the link to the Jasper Voice Assistant.

img_1680

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, this stopped working. Although my way is not exactly the same, its cool. So lets get started!

First of all, you will need a new gmail account and set it up as well as your iOS device, as stated in the previous post. 

After carefully following the steps, you will need to navigate to

jasper  -> client 

folder in the file manager. Then, you will just need to replace the brain.py and conversation.py with my scripts, which can be found here. Then, edit the conversation.py and enter your username and password of your new gmail account. This should be self-explanatory.

Now, just run Jasper, as you normally would, and speak to Siri:

“Note what is the time”

Hopefully, Jasper should respond back, with the time as this is a built in module. If not, double-check you have followed the steps correctly. Also, I suggest running the script from the previous post, which will be easier to debug.

This works similar to the script in my last post. A new thread is started which fetches new Notes and inputs them into the ‘brain’ of Jasper – this works in the same way as when you directly say something to Jasper . As your Siri notes sync with the new gmail account, you will basically be able to talk to Jasper, through Siri.

So you will be able write your own modules in the same way you would for Jasper. Now, you may ask, what is the point? Well,

  • First of all you will be able to talk to Jasper from anywhere in the world, through Siri, as long as you have an internet connection, which most people do nowadays
  • This will be completely secure – the link is just your gmail account with the security provided by the Google mail servers
  • This opens up a lot of possibilities, such as controlling and monitoring IoT devices for home automation, using your Raspberry Pi, away from home

The only disadvantage is that this is one way connection – Jasper cannot talk back to you through Siri, however, one workaround might be  for Jasper to send an email back to you.

I hope you enjoy talking to Jasper via Siri with this simple hack. Please add comments and ask questions below.

Advertisements

3 thoughts on “Talking to Jasper using Siri

  1. Thank you Sanjeet for your post!!! could this work with Pi AUISuite as well as with Jasper? Could you please explain the way to expand to IoT? Meaning executing terminal lines thru Siri that activate GPIO’s? All this away from Homekit? As you could see, I am a little confused… Thank you for your answer!!!

    Like

    1. I am glad you are interested in this. Here are some answers to your questions:

      1) I haven’t tried Pi AUISuite but as it is written in C++, you could try to write some code, once you understand the concept. I won’t be able to help you as I am not experienced in C++.

      2) Well, there are many home automation tutorials out there, with different brands. However, you could try controlling some 433mhz power outlets with a transmitter and receiver, which is quite cheap but also fun as you learn. After setting this up, you can link this to my siricontrol script to enable the devices to be controlled by Siri.

      3) This is written in python so you can do anything with it such as controlling the GPIO pins using the RPi.GPIO module, controlling servos and motors etc. And all this is not using Homekit.

      Please follow the blog for more updates. Good luck.

      Like

      1. Thanks again Sanjeet for your answer!!!!
        I am very excited to work on this and I will let you know once I have some progress!!!

        Like

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s