Start a scen/show in a DMX Software from Indigo

Posted on
Thu Dec 14, 2017 6:18 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Start a scen/show in a DMX Software from Indigo

Hi

Here is a small tuturial on how to trigger/start a program/show/scene in Q Light Controller Plus

Q Light Controller Plus is a free Open Source software for DMX control, it can be run on Windows/MacOS/Linux and RasberryPi
http://www.qlcplus.org

I know there is a plugin to control a USB DMX dongel directly, but it didt fit my needs, so here is another way


You will need at least one DMX light and a DMX USB dongel or a Ethernet DMX device for this to work

1. Install Q Light Controller Plus and set up the system by adding your DMX lights and program your functions
(I used version 4.10.5b and installed it on the same mac as indigo, there is a newer version, but i got crash issues with that)
Now you can control your lights with Q Light and trigger the differnt scenes etc

2. In Q Light under Inputs/outputs check "input on OSC

3. Install pyOSC on the indigo machine
Code: Select all
pip install pyOSC


4. Save this script as a file on Indigo (You need to change the IP number if not using tha same machine as indigo)

Code: Select all
import OSC

def send(address, value=0):
   c = OSC.OSCClient()
   c.connect(('127.0.0.1', 7700))
   oscmsg = OSC.OSCMessage()
   oscmsg.setAddress(address)
   oscmsg.append(value)
   c.send(oscmsg)

send('indigo01',1.0)
send('indigo01',0.0)


5. Make a trigger or actiongroup in indigo to trigger the script as a file

6. If you like to make more then one trigger in Q light, make several of the script but change both indigo01 to indigo02. Or what ever you like, the important thing is that it sends a differnt datastring

7. In Q Light under Inputs/outputs, click on Profile, and make a new profile, name it and chose Type OSC. Then under channels, press the "wizard wand"
This means that Q Light is listening on incomming packets

8. Trigger all of the indigo scripts you made

9. In Q-Light Press the "wizard wand" again and save the Profile

10. In Q-Light open Virtual Console and make a button. Double click on the button and connect the button to the function you want in Q Light, then under "External Input" click Chose, then pick the indigo input you like to trigger this button for example indigo01

11. Now change Q Light from Design Mode to Operate Mode

Done

This means if you trigger the script, you will "Press" the button in Q Light and this will start any cool lightshow or scene you like.

I have just started testing this, and i am sure there are many other cool functions this setup can do, but i just tested this as a proof of concept, and i only have one DMX light right now,

I know that in Q Light you can make a "Show" and run it with music as well, so i think with this you can do realy cool Haloween pranks :-)

Posted on
Thu Dec 14, 2017 8:05 am
Different Computers offline
User avatar
Posts: 2531
Joined: Jan 02, 2016
Location: East Coast

Re: Start a scen/show in a DMX Software from Indigo

Very cool! Time for DJ Indigo to hold a dance party!

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Dec 14, 2017 5:43 pm
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Start a scen/show in a DMX Software from Indigo

It would be nice to get OSC support built into ID natively. I use indigo to trigger Qlab( for some audio playback and video playback. Its always good to read about someone else utilising OSC for Home Automation.
Colin

Posted on
Fri May 17, 2019 2:53 pm
mwoodage offline
User avatar
Posts: 174
Joined: Dec 19, 2014
Location: Devon UK

Re: Start a scen/show in a DMX Software from Indigo

Hi Gusten,
I know you posted this a couple of years ago, but i've been trying to get it working this evening and running into problems.
i've followed your suggestions for setting up Q-light but can't get the script file below to work - are you able to help?

Code: Select all
import OSC

def send(address, value=0):
   c = OSC.OSCClient()
   c.connect(('127.0.0.1', 7700))
   oscmsg = OSC.OSCMessage()
   oscmsg.setAddress(address)
   oscmsg.append(value)
   c.send(oscmsg)

send('indigo01',1.0)
send('indigo01',0.0)



I've currently set up Q-light and have DMX lights working via the software - I've also managed to set up a trigger in Indigo and can execute that, but i'm not getting any communication in Q-Light.
I have the file saved as a .scpt file, is that correct?

Any help would be appreciated,

Thanks
Martin
Last edited by mwoodage on Sat May 18, 2019 2:27 am, edited 2 times in total.

Posted on
Fri May 17, 2019 3:39 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Start a scen/show in a DMX Software from Indigo

Martin

Just an aside before Gustin gets here.

Can you edit your post and put the code snippet inside a set of [ code ] [/ code ] blocks (without spaces) so it formats correctly.

Peter


Sent from my iPad using Tapatalk Pro

Posted on
Sat May 18, 2019 12:10 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Start a scen/show in a DMX Software from Indigo

mwoodage wrote:
I've currently set up Q-light and have DMX lights working via the software - I've also managed to set up a trigger in Indigo and can execute that, but i'm not getting any communication in Q-Light.
I have the file saved as a .scpt file, is that correct?


I'm also not Gusten but I think the file should be saved as .py not .scpt

Colin

Posted on
Sat May 18, 2019 12:33 am
Gusten offline
Posts: 171
Joined: Dec 30, 2015
Location: Sweden, Gothenburg

Re: Start a scen/show in a DMX Software from Indigo

Hi
Colin is correct, it should be .py file

I ended up never using this, but it worked when I tried it, I know I had issues with q light version when testing

/Gusten

Posted on
Sat May 18, 2019 2:26 am
mwoodage offline
User avatar
Posts: 174
Joined: Dec 19, 2014
Location: Devon UK

Re: Start a scen/show in a DMX Software from Indigo

Hi Guys, thanks for your reply this morning :D

I've now changed the file to a .PY and run the trigger again, however in the log i get the following error

Script Error Indigo DMX.py: invalid syntax
Script Error around line 5 - "   c = OSC.OSCClient()"

Any ideas?

Thanks
Martin

Peter - changing the snippet now :wink:

Posted on
Sat May 18, 2019 5:17 am
DaveL17 offline
User avatar
Posts: 6739
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Start a scen/show in a DMX Software from Indigo

If your script is identical to the one above, make sure that each line is indented with the same thing (either spaces or tabs but not both). If that doesn't fix it, please post your entire script as the problem is likely on the line above the one cited in the error message.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 19, 2019 3:46 am
mwoodage offline
User avatar
Posts: 174
Joined: Dec 19, 2014
Location: Devon UK

Re: Start a scen/show in a DMX Software from Indigo

Hi Dave, thanks for the help
I've checked the file this morning and taken out any spaces - it now looks like the screen shot below,

But when i run the trigger i get this error in my error log:-

Any other suggestions - i'm sure its just something i'm doing wrong somewhere,

Cheers
Martin
Attachments
IMG_CA1A02614539-1.jpeg
IMG_CA1A02614539-1.jpeg (334.94 KiB) Viewed 4934 times
Screenshot 2019-05-19 at 10.40.00.png
Screenshot 2019-05-19 at 10.40.00.png (190.65 KiB) Viewed 4934 times

Posted on
Sun May 19, 2019 3:57 am
DaveL17 offline
User avatar
Posts: 6739
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Start a scen/show in a DMX Software from Indigo

mwoodage wrote:
Hi Dave, thanks for the help
I've checked the file this morning and taken out any spaces - it now looks like the screen shot below,

But when i run the trigger i get this error in my error log:-

Any other suggestions - i'm sure its just something i'm doing wrong somewhere,

Cheers
Martin

Removing all the tabs and spaces isn't going to work as indentation in Python files is super important. It should look like the version from earlier in this thread. This is indented with four spaces:

Code: Select all
import OSC

def send(address, value=0):
    c = OSC.OSCClient()
    c.connect(('127.0.0.1', 7700))
    oscmsg = OSC.OSCMessage()
    oscmsg.setAddress(address)
    oscmsg.append(value)
    c.send(oscmsg)

send('indigo01',1.0)
send('indigo01',0.0)

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 19, 2019 6:13 am
mwoodage offline
User avatar
Posts: 174
Joined: Dec 19, 2014
Location: Devon UK

Re: Start a scen/show in a DMX Software from Indigo

Thanks Dave,
I've now saved the file as shown below and run it again but still get the error, please see the attachments.


Thanks
Martin
Attachments
Screenshot 2019-05-19 at 13.08.53.png
Screenshot 2019-05-19 at 13.08.53.png (142.72 KiB) Viewed 4930 times
Screenshot 2019-05-19 at 13.10.29.png
Screenshot 2019-05-19 at 13.10.29.png (105.98 KiB) Viewed 4930 times

Posted on
Sun May 19, 2019 6:24 am
DaveL17 offline
User avatar
Posts: 6739
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Start a scen/show in a DMX Software from Indigo

Make sure that you're saving the file as a plain text file. If there's any other encoding it the file, you'll run into trouble.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun May 19, 2019 6:27 am
colinpartridge offline
Posts: 373
Joined: Jan 13, 2014
Location: London, UK

Re: Start a scen/show in a DMX Software from Indigo

Is that Textedit you are writing your code in? you need to have your python files as plain text. I don't think Textedit can save to plaintext. If you write your code in something like Textwrangler or similar then save as plain text then those errors should go away.

Colin

Posted on
Wed May 22, 2019 10:51 am
mwoodage offline
User avatar
Posts: 174
Joined: Dec 19, 2014
Location: Devon UK

Re: Start a scen/show in a DMX Software from Indigo

Hello, just thought I'd try this again as I had no joy last week!

I've tried all the suggestions, I even thought there was something wrong with my Python install so I've tried it on a back up machine but its still doing the same thing.

I just get the error below........
It seams to be saying that I've not got the OSC module installed, but I've checked this and it's installed (see below)

    Last login: Wed May 22 17:32:13 on ttys000
    Martins-Mini:~ martin$ pip install pyOSC
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
    Requirement already satisfied: pyOSC in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (0.3.5b5294)
    Martins-Mini:~ martin$


Don't worry to much about it, but if someones got the time to figure it out that would be great.

Thanks
Martin
Attachments
IMG_D3E57D7ED316-1 2.jpeg
IMG_D3E57D7ED316-1 2.jpeg (437.86 KiB) Viewed 4864 times

Who is online

Users browsing this forum: No registered users and 2 guests