You can control your Lightform device with other IoT devices. In this tutorial, we'll be using solutions that allow you to use Voice Assistant Commands to trigger OSC values to control playback and trigger effects in real-time.
This requires a bit of coding! But don't worry-- We've provided some sample code to help you get started.
|Minimum requirements to use Lightform as defined here|
|IoT device with an IFFT service - e.g Amazon Alexa or Google Assistant|
|Pushbullet Account - We use the API to send notifications|
|IFTT Account - to trigger pushbullet notifications from voice commands|
|SendOSC - Simple command-line tool for sending OSC commands|
|SendOSC.py||Send OSC messages to your device|
Define your commands and their OSC translations in CSV format. Commands must be in uppercase.
|push2OSC.sh||Master program to pull notification, transform the note content into OSC commands and send those commands to your Lightform devices|
Step 1Add relevant IFFT services
Log in to your IFTT account and add the services for:
- your voice-controlled device i.e Amazon Alexa or Google Home
- your Pushbullet account
Step 2 Create the IFFT Trigger
In the example below, we will create a Pushbullet note whenever we say "Google Next Effect"
- Under your profile picture in IFTT, select the Create option
- Click on +This and search for Google Assistant (or Amazon Alexa)
- Choose a trigger: "Say a Simple Phrase"
- Type in your trigger phrase e.g "Next Effect", all the other fields are optional.
- Click on "That" to choose your action service and search/select Pushbullet
- Choose Action: "Push a note"
- Type in the content of your message. This message will later be translated into an OSC command, so keep it short and unique to each action you want to trigger.
Step 3 Pull notifications and send OSC messages
In this step, you will need to edit the sample code to retrieve the notes from your Pushbulet account and translate them into OSC messages.
- Get your access token from your PushBulltet account under
Settings > Account > Access Tokens > Create Access Tokenand Paste it into the cURL command after
Access-Token:in the push2OSC.sh file
- Change IP Address and Port to your Lightform device's IP Address
To make sure that the OSC message is sent to your Lightform device, you need to configure the right IP address and port in the sendOSC.py file
myCmd = 'sendosc 192.168.1.79 8000 '+ argv1]
Reminder: You can locate the IP address of your Lightform device in the Control Page in Lightform Creator.
- Update the translations CSV file to translate your command into an OSC command supported by Lightform.
Reminder: You can see the list of OSC mappings for your device Under Control > Edit OSC Mappings.
- Run the Push2OSC file and send voice commands to your Google Assistant - e.g "Google Next Effect" - or Amazon Alexa.
This tutorial just scratches the surface of how you can control your Lightform device with your IOT device using IFTT and OSC. We'll be adding more examples of this (e.g., change scene depending on wether...). If you have feedback or suggestions, please feel free to suggest them in the comments!