These adverts are supporting the forum's costs and the products/services are not endorsed by the forum owners.
First have you tried?
Log in to Search the Forum for help!
Learn more about using FreeStyler at the FreeStyler WIKI HERE
Learn more about DMX in General at The DMX Wiki HERE

if all else fails and you need a fixture consider the fixture building service HERE

TCP/IP server with Python3 Example

Discuss the latest developments or get support for them HERE.
Post Reply
fester
Knows how to turn Lights ON
Posts: 1
Joined: July 31st, 2013, 5:33 pm
FreeStyler Version: 3.5.4
I Use FreeStyler for: Just for the Fun of it.

TCP/IP server with Python3 Example

Post by fester »

Couldn't find it anywhere else so pasting this here.. Hopefully this will help with people googling!

This will hit the blackout button on freestyler

import socket
TCP_IP = '127.0.0.1'
TCP_PORT = 3332
BUFFER_SIZE = 1024

FREESTYLERCOMMAND = bytes("FSOC002255", "ASCII")

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))
s.send(FREESTYLERCOMMAND)
s.close()


User avatar
lindsayward
Can now teach FS to others (Hopefully!)
Posts: 89
Joined: April 5th, 2013, 12:54 am
FreeStyler Version: 3.5.5
I Use FreeStyler for: Church

Re: TCP/IP server with Python 3 Example

Post by lindsayward »

Thanks. I was googling (search box at top of forum) "Python" and not finding anything, so I'm posting this with a space between Python and 3 so people will be able to find it.

Are you the fester from the Line 6 forums?
jg5985
Knows how to turn Lights ON
Posts: 8
Joined: February 6th, 2008, 4:09 am
FreeStyler Version: 3.0.1
I Use FreeStyler for: Stage Show

Re: TCP/IP server with Python3 Example

Post by jg5985 »

have you used this???
I tried running it, then ran it again.
It didn't work the second time and looking at freestyler it seems the connection was not gracefully terminated on the freestyler side and the socket is still open preventing a new connection.

I just copied and pasted your code into a .py file
Post Reply

Return to “FreeStyler 3rd Party Addons and utilities”