• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Contributors welcome! Open Source Python Client for Sennheiser Sound Control Protocol (SSC)

I also programmed in Assempler, Cobol, Fortran, C, Pascal, Java, C#, SQL, PLSQL, and some exotic ones for last 40 years, also object oriented versions.
But Python is a bit crazy language, theoretically powerful and simple, but very different philosophy with crazy rules for somebody used to strictly defined syntax. Very similar to old Basic but even more strange. Not only my opinion.

Any help with the error? Sources are in the GitHub link above.
 
Exactly what is written here https://github.com/jj-wohlgemuth/pyssc

First setup.json created correctly in Python home folder:


setup.json content, IPs are changed by me:


Here is the error:
Looks like that the file you're trying to import is actually not imported. Hence the "None" type value of the variable. Most likely the file in not the same folder as the python project. Something similar to this : https://gis.stackexchange.com/questions/25781/nonetype-object-has-no-attribute

Btw: ime a good and free IDE to use is Pycharm. (Community Edition is free)
 
Last edited:
Pycharm is not free.

Yes, problem was the file was not read correctly even with fully qualified path.. There is no error handling in source code so there was no message.

As workaround I fetched list of monitors. I selected 1st one, next command again error.
I thought that what is example in GitHub is working, that some interface to monitors is already done.
But no - it is buggy and not working currently.

Too much time spent on such simple thing. I stop continuing for now.

import pyssc as ssc
found_setup = ssc.scan()
device_1 = found_setup.ssc_devices[0]
ssc_transaction = device_1.send_ssc('{"audio":{"out":{"mute":false}}}')
WARNING:root:socket connection closed. Reopening. 'NoneType' object has no attribute 'sendto'
Traceback (most recent call last):
File "C:\Python\P311\Lib\site-packages\pyssc\ssc_device.py", line 43, in send_ssc
self.socket.sendto(request_raw, (self.ip + interface, self.port))
AttributeError: 'NoneType' object has no attribute 'sendto'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
ssc_transaction = device_1.send_ssc('{"audio":{"out":{"mute":false}}}')
File "C:\Python\P311\Lib\site-packages\pyssc\ssc_device.py", line 46, in send_ssc
self.connect()
File "C:\Python\P311\Lib\site-packages\pyssc\ssc_device.py", line 28, in connect
self.socket = socket.create_connection((self.ip + interface, port))
File "C:\Python\P311\Lib\socket.py", line 826, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "C:\Python\P311\Lib\socket.py", line 961, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
 
@audafreak if you create an issue describing your problem (reproduction steps, expected behavior, actual behavior) on Github I'm happy to look into it when I have time. I don't come to ASR very often.
 
I built a little volume controller for my KH750 & KH150 setup based on pyssc and a Raspberry Pi. Here is the code:


Here are some ways you can contribute to this Open Source Project:
  • Perform tests and log bugs and other outcomes in Github (no prior experience needed)
  • Extend documentation/tutorials (no prior experience needed)
  • Fix Bugs and Extend the functionality (Requires (Python) programming skills)
 
Hello, I'm buying a kh80 DSP pair. I will use it with a subwoofer from a different brand. Would you know if it is possible, using pyssc to configure the kh80 on high pass mode (low cut at 80hz)?

From the khtool examples I see the parametric EQ possibilities. Bit the expert mode seems to give access to other parameters.

From a quick browse of the SSC documentation, I see a lot of possibilities, but I imagine that the kh80 don't implement all of them.

Best regards,
 
I also programmed in Assempler, Cobol, Fortran, C, Pascal, Java, C#, SQL, PLSQL, and some exotic ones for last 40 years, also object oriented versions.
But Python is a bit crazy language, theoretically powerful and simple, but very different philosophy with crazy rules for somebody used to strictly defined syntax. Very similar to old Basic but even more strange. Not only my opinion.
Yeah, I like quite a few languages, but I never got over the mandatory tabbing shit in Python.

On topic: I wonder if my Ambeo Max support this, I may give it a try. Would be nice as a Home Assistant plugin.
 
I looked deeper on the SSC spec, and I wonder if the KH80 has audio/equaliser/preset (with one corresponding to a low cut), or audio/low_cut.

JMF
 
I just came across this...
Looks like no commits in the past 2yrs.

Is the project still alive or dead?
 
This project is alive and it uses a fork of the pyssc library.

https://github.com/schwinn/khtool
I don't know how hard it is to make a little GUI for Windows that shows current parameters and allows editing and saving them. I would contribute a donation of maybe 50 EUR or so. Maybe some more people can contribute if that helps motivating someone for doing this?
 
Back
Top Bottom