Below is an example client in Python - run this with your own token and app name substituted in.
Test it out by saying "Note turn on the lights" to Siri.
client.py
import socketio
sio = socketio.Client()
# Replace with your generated token
token = "a598fbce-7cc7-4240-ad35-0b86b2651c59"
# Replace siricontrol-server with the name of your app.
sio.connect('https://siricontrol-server.herokuapp.com/?token=' + token)
@sio.on
def connect():
print('Connected.')
@sio.on('spoken')
def onSpeech(spokenText):
print(spokenText)
@sio.on('commands')
def command(data):
print(data)
print("Command: ", data["command"])
print("Option: ", data["option"])
print("Spoken Text: ", data["spoken"])
@sio.on('lights')
def lights(data):
print(data)
Fork the Repository
Custom Commands
Here is the basic commands configuration - this should be self-explanatory. Add your own commands in the following manner and push your forked repository. That's it!