from multiprocessing import Process, Array, Value
import subprocess
import requests
+import socket
+import struct
+import fcntl
import time
import sacn
import sys
import os
-import socket
-import struct
-import fcntl
# fake GPIO dummy class for debuging
class dummy():
--- /dev/null
+#!./.venv/bin/python
+
+import sacn
+import sys
+import os
+
+receiver = sacn.sACNreceiver(bind_address="192.168.8.103")
+receiver.start()
+
+@receiver.listen_on('universe', universe=2)
+def callback(packet):
+ if packet.dmxStartCode == 0x00:
+ print(packet.dmxData)
+
+receiver.join_multicast(2)
+
+try:
+ while True:
+ pass
+
+except KeyboardInterrupt:
+ receiver.leave_multicast(2)
+ receiver.stop()
+ try:
+ sys.exit()
+ except SystemExit:
+ os._exit(130)