Skip to content

Instantly share code, notes, and snippets.

@othmar52
Created June 30, 2021 07:38
Show Gist options
  • Save othmar52/53401e21b91051d194b7dc451779f5a4 to your computer and use it in GitHub Desktop.
Save othmar52/53401e21b91051d194b7dc451779f5a4 to your computer and use it in GitHub Desktop.
dump all symetrix audio device controller values
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
script to retrieve all controller values of symetrix audio devices
may be useful to determine the controller number you are looking for
tested with Symetrix Jupiter 8 (https://www.symetrix.co/products/jupiter/)
USAGE:
1) dump all values to a text file
`./symetrix-dump-all-controller-values.py > symetrix-vanilla.txt`
2) change any controller via symetrix control software
3) dump all values to another text file
`./symetrix-dump-all-controller-values.py > symetrix-modified.txt`
4) create a diff of the 2 txt files
`diff symetrix-vanilla.txt symetrix-modified.txt`
@see control symetrix audio device via mqtt
https://gist.github.com/othmar52/eeea6f81526df07ab4cb576736d1c5c8
'''
import socket
SYMETRIX_IP = "insert symetrix ip/domain here"
SYMETRIX_PORT = 48630
sock = socket.socket(
socket.AF_INET,
socket.SOCK_DGRAM
)
# get value of controller numers 1 - 10000
for i in range(1, 10000):
sock.sendto(
bytes("GS %d\r\n" % i, "utf-8"),
(SYMETRIX_IP, SYMETRIX_PORT)
)
data = sock.recv(1024).decode('utf-8')
if data == 'NAK\r':
# ignore not acknowledged response
continue
print (i, '<- controller number | value ->', data.rstrip())
sock.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment