cd aes70py
cat flipmute.py
aes70 = require("aes70")
conn = aes70.TCPConnection.connect({"host": "192.168.88.248",
"port": 65000})
device = aes70.RemoteDevice(conn)
device.set_keepalive_interval(1)
tree = device.discover_all()
def printtree(n):
for a in n:
if a.GetRole is not None:
if a.GetRole() == "Mute":
print("Current Mute Setting: " +
str(a.GetSetting()))
a.SetSetting(not a.GetSetting())
print("New Mute Setting: " + str(a.GetSetting()))
if a.GetMembers is not None:
printtree(a.GetMembers())
printtree(tree)
clear
python3 flipmute.py
Connected to device.
Current Mute Setting: False
New Mute Setting: True