Exemple #1
0
 def __init__(self, serial):
     super(DEOutput, self).__init__()
     self.device = filter(lambda d : d.serial == serial, usbdmx.scan())[0]
     self.device.open()
     self.device.mode(6)
Exemple #2
0
#!/usr/bin/env python

import sys
import gtk
import usbdmx
import threading
import time

gtk.gdk.threads_init()

interfaces = usbdmx.scan()

if not interfaces:
    print "No interfaces found"
    sys.exit()

dmx = interfaces[0]
dmx.open()
dmx.mode(6)

main_win = gtk.Window()


table = gtk.Table()
main_win.add(table)


class DMXButton(gtk.SpinButton):

    def __init__(self, number):
        gtk.SpinButton.__init__(self, climb_rate=1, digits=0)
Exemple #3
0
import sys
import time
import usbdmx
import fhem
import time
from config import *

interfaces = usbdmx.scan()

if not interfaces:
    print "No interfaces found"
    sys.exit()

dmx = interfaces[0]
dmx.open()
dmx.mode(4)

suf = suffix_value


def suffix(val):
    if val < 128:
        return suffix_value
    else:
        return suffix_switch


def dmx_changed(channel, val):
    print "New value for channel %d: %d" % (channel + 1, val)
    if last_change[channel] + min_pause > time.time():
        print "Not changing value"