Basic DMX settings printout on start
This commit is contained in:
parent
1025d57c6a
commit
a7d3a0fa7e
12
aquadmx.py
12
aquadmx.py
@ -91,6 +91,10 @@ class DMXDevice(object):
|
||||
def getDeviceID(self):
|
||||
return self.deviceID
|
||||
|
||||
# Print settings of the device.
|
||||
def print(self):
|
||||
print('{}: {}-{}'.format(self.deviceID, self.getStartChannel(), self.getEndChannel()))
|
||||
|
||||
# Data structure for a DMX Universe.
|
||||
class DMXUniverse(object):
|
||||
|
||||
@ -125,6 +129,11 @@ class DMXUniverse(object):
|
||||
l.append(d)
|
||||
return set(l)
|
||||
|
||||
# Print DMX Universe settings.
|
||||
def print(self):
|
||||
for d in self.devices:
|
||||
d.print()
|
||||
|
||||
# Configs
|
||||
config = configparser.ConfigParser()
|
||||
config.sections()
|
||||
@ -154,6 +163,9 @@ u1_listener = server.register_listener(universe,
|
||||
|
||||
# Start server
|
||||
print('AquaDMX is listening')
|
||||
print()
|
||||
print('Home Assistant ID: DMX Channel Start-DMX Channel End')
|
||||
u1.print()
|
||||
while True:
|
||||
time.sleep(1)
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user