logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
jabal  
#1 Posted : Sunday, February 28, 2021 3:11:02 PM(UTC)
jabal

Rank: Newbie

Groups: Registered
Joined: 2/28/2021(UTC)
Posts: 3
United States
Location: VA

Hi,

Please find the below python script to run a blynclight as a status indictor. Much cheaper (and nicer looking) than some of the other equipment available. Uses vMix TCP connection.




# -*- coding: utf-8 -*-
"""
Created on Sat Feb 27 22:35:03 2021

@author: jabal
"""

import socket
import time
import blynclight
sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM)

server_address = ('localhost', 8099)

try:
b=blynclight.BlyncLight.get_light()
b.color=(0,0,200)
light=True
except:
light=False
print('no light')




while 1:
time.sleep(.5)
try:
sock.connect(server_address)
except:
print('vmix not open')
vmix=0
while vmix==0:
try:
time.sleep(.5)
test=sock.sendall(b'ACTS Streaming\r\n')
data = sock.recv(100)
if str(data)[-6]=='1':
if light:
b.on=True
print('streaming')
else:
if light:
b.on=False
print('not streaming')
except:
vmix=1

jabal  
#2 Posted : Sunday, February 28, 2021 3:12:07 PM(UTC)
jabal

Rank: Newbie

Groups: Registered
Joined: 2/28/2021(UTC)
Posts: 3
United States
Location: VA

also - note that you can change the color of the light, make it blinking, etc.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.