Skip to content

Need help #151

Open
Open
@jltnol

Description

So first off, I am not a code guy, and am using OSC with Indigo, my home automation system, to send out OSC commands to light controlling software. Indigo has been using Python 2.x, and the script below has worked perfectly for me.

But now Indigo is upgrading to Python 3.x, and, I keep getting error messages. Here is the short snippet of code I've been using with Python 2.x:

`import python-osc

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

send('indigo33',1.0)
send('indigo33',0.0)`

My first error message was "No module named OSC', but was able to change the Import command to "Import pythonosc" and that got me past the first error message.

Now I'm getting this error message: name 'OSC' is not defined. I've tried changing a few things from OSC to pythonosc, which of course doesn't solve my problem. And I'd be lying if I thought I could just bang away on this and stumble on the right code to make this work, so I'm hoping someone can maybe help with this.

I have at least looked at the info in "examples", but can't make heads or tails of what should be. I have no need to "receive" OSC messages, only send them out. ANY help will be greatly appreciated.......

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions