Page 2 of 2

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

PostPosted: Fri Nov 08, 2019 1:32 pm
by jltnol
Hey Folks

Before I dive to deeply here... ( I had tried this before and had some success), but now I've got a project. I'm looking into using DMX to control some lights in the yard. One thing I'm also considering using my RasberryPI to run the Q-Light software, and having Indigo control Q-light via OSC.

I realize there are a bunch of really big Maybe's out there.. but might this even be possible?

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

PostPosted: Fri Nov 08, 2019 1:46 pm
by colinpartridge
I don't use Q lights but if it you are to control it via OSC then you "should" be able to control it using the Py OSC library.
Colin

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

PostPosted: Sat Nov 09, 2019 1:50 pm
by jltnol
Alright.. so I got the DMX program installed on the Pi, but am stuck here:

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


I'm assuming this is a terminal command, but looks like it might should be
Code: Select all
pip install python-osc
. ???? but.. regardless, I'm doing this part wrong, because I can't get it to work. I've looked thur/at the rest of the steps and have a good understanding of how this should work.. but can't get this module installed on my Indigo Mac....

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

PostPosted: Mon Nov 11, 2019 2:01 am
by colinpartridge
Have you tried
Code: Select all
sudo pip install python-osc
?

Colin

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

PostPosted: Tue Nov 12, 2019 2:45 pm
by jltnol
Yes

Code: Select all
pip:  command not found

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

PostPosted: Tue Nov 12, 2019 2:55 pm
by colinpartridge
That probably accounts for you not being able to install pyOSc. You will need to install pip first. I'm no expert but sudo easy_install pip might work.

Colin

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

PostPosted: Wed Nov 13, 2019 10:15 pm
by jltnol
Installing pip helped... but OSC still won't install.. I think the pip command is trying to install the module from a soon to be outdated version of Python, so I get that error messages, and a host of others.... and still don't have OSC installed.. I'll look around on the web for another solution..

Thanks

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

PostPosted: Thu Nov 14, 2019 2:20 am
by colinpartridge
It might help if you can post the errors shown in terminal, it might help someone to try to help debug why its not installing..

Colin

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

PostPosted: Thu Nov 14, 2019 4:26 pm
by jltnol
Hey everyone

I was finally able to get the OSC installed... turns out it was installed already.

I had put the script into an Action, and when fired, gave me a missing OSC error. As I've re-read this post, I went back to the OP's original script, and put the script in a stand alone file, with a .py suffix. Now, when Indigo triggers the script this is the error that I get


Code: Select all
Nov 14, 2019 at 4:18:40 PM
   Action Group                        QQQQQlight Test
   Script Error                    Qlighrt222.py: invalid syntax
   Script Error                    around line 4 - "   c = OSC.OSCClient()"





Later---

so turns out the script as copied has spaces as opposed to tabs... So I changed all of those lines to tabs, and now I'm back at my original error message concerning OSC

Code: Select all
Nov 14, 2019 at 4:32:24 PM
   Action Group                        QQQQQlight Test
   Script Error                    Qlighrt222.py: No module named OSC
   Script Error                    Exception Traceback (most recent call shown last):

     Qlighrt222.py, line 1, at top level
ImportError: No module named OSC

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

PostPosted: Fri Nov 15, 2019 4:18 am
by colinpartridge
Its been a while since I installed this module but looking on my indigo machine, the path to the osc.py module is MacintoshHD/Library/Python/2.7/site-packages and it is working just fine. Can you post the script you are testing?

Colin

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

PostPosted: Fri Nov 15, 2019 5:04 am
by jltnol
Hey Colin

Here is the script. As I mentioned, I was getting an error on the line after the "def send...." line, but changed the spaces to a tab, and then the next line was an error, so did the same for all of the indented lines, and then was right back were I started with the OSC error listed above. I did copy the script from the original post, and have read the thread a few times, but may have missed something...

Thanks for taking the time to look into this for me.

Code: Select all
import OSC

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

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

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

PostPosted: Fri Nov 15, 2019 7:12 am
by colinpartridge
So I tested your code with my indigo install and I don't get any missing module errors ( I replaced your ip settings and indigo01 with localhost), so I would say you need to check to see where Pip has installed the OSC module and make sure that python is configured to see that path. Thats all I can think of for the moment.
Colin

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

PostPosted: Fri Nov 15, 2019 8:55 am
by jltnol
Thanks

I'll take a look....

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

PostPosted: Sat Nov 16, 2019 10:42 am
by jltnol
Colin

I tried installing the OSC module using the Terminal, but got a very long string of error messages, mainly concerning the pending end of support for Python 2.7. Today, I tried again, and noted that the last error message involved permissions...

Then I remembered to run the command with sudo. Module installed, stand alone script now runs with no error messages.


For the moment, all is good.

Thanks again for your help.

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

PostPosted: Sat Nov 16, 2019 10:47 am
by colinpartridge
Excellent, glad you got it working, worth persevering and happy to help.

Colin