3ll3d00d / ezbeq

MIT License
20 stars 4 forks source link

Allow control of output gains #54

Closed 3ll3d00d closed 2 years ago

tlnmp1 commented 2 years ago

I tried my minidsp DDRC88 but it is only recognized as a generic device and hence, not configurable. Any suggestions? Below is what the probe gave me: (ezbeq) pi@raspberrypi:~/python/ezbeq $ minidsp probe Found Generic with serial 965535 at ws://localhost/devices/0/ws [hw_id: 6, dsp_version: 95] (ezbeq) pi@raspberrypi:~/python/ezbeq $ minidsp MasterStatus { preset: 1, source: NotInstalled, volume: Gain(-11.5), mute: false, dirac: true } Input levels: Output levels:

tlnmp1 commented 2 years ago

I was missing the new minidsp-rs so it seems to be recognizing it now. It still doesn't load on the outputs though.

Attached is my yml file as well as the log.

accessLogging: false
debug: true
debugLogging: true
devices:
  master:
    cmdTimeout: 10
    exe: minidsp
    ignoreRetcode: false
    type: minidsp
device_type: DDRC88
sw_channels:
- 0
- 1
host: raspberrypi
iconPath: /home/pi
port: 8080
useTwisted: true
pi@raspberrypi:~ $ cd python/ezbeq
pi@raspberrypi:~/python/ezbeq $ . bin/activate
(ezbeq) pi@raspberrypi:~/python/ezbeq $ ./bin/ezbeq
Loading config from /home/pi/.ezbeq/ezbeq.yml
2022-01-10 22:07:07,457 - MainThread - twisted - INFO - __init__ - Serving ui from /home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/ui
[2022-01-10 22:07:18,830] INFO in ws: Client connecting: tcp4:192.168.0.81:44322
2022-01-10 22:07:18,830 - MainThread - ezbeq.ws - INFO - onConnect - Client connecting: tcp4:192.168.0.81:44322
[2022-01-10 22:07:18,833] INFO in ws: WebSocket connection open
2022-01-10 22:07:18,833 - MainThread - ezbeq.ws - INFO - onOpen - WebSocket connection open
[2022-01-10 22:07:18,844] INFO in ws: Registered client tcp4:192.168.0.81:44322
2022-01-10 22:07:18,844 - MainThread - ezbeq.ws - INFO - register - Registered client tcp4:192.168.0.81:44322
2022-01-10 22:07:20,293 - PoolThread-twisted.internet.reactor-0 - ezbeq.device - INFO - _hydrate - Loaded {'masterVolume': -11.5, 'mute': False, 'name': 'master', 'slots': [{'active': True, 'canActivate': True, 'gain1': 0.0, 'gain2': 0.0, 'gains': [0.0, 0.0], 'id': '1', 'inputs': 2, 'last': 'ERROR', 'mute1': False, 'mute2': False, 'mutes': [False, False], 'outputs': 4}, {'active': False, 'canActivate': True, 'gain1': 0.0, 'gain2': 0.0, 'gains': [0.0, 0.0], 'id': '2', 'inputs': 2, 'last': 'Empty', 'mute1': False, 'mute2': False, 'mutes': [False, False], 'outputs': 4}, {'active': False, 'canActivate': True, 'gain1': 0.0, 'gain2': 0.0, 'gains': [0.0, 0.0], 'id': '3', 'inputs': 2, 'last': 'Empty', 'mute1': False, 'mute2': False, 'mutes': [False, False], 'outputs': 4}, {'active': False, 'canActivate': True, 'gain1': 0.0, 'gain2': 0.0, 'gains': [0.0, 0.0], 'id': '4', 'inputs': 2, 'last': 'Empty', 'mute1': False, 'mute2': False, 'mutes': [False, False], 'outputs': 4}]} from /home/pi/.ezbeq/master.json
2022-01-10 22:08:53,098 - PoolThread-twisted.internet.reactor-1 - ezbeq.devices - INFO - patch - PATCHing master with {'slots': [{'id': '1', 'gains': [], 'mutes': [], 'entry': 'f10ddb4f110ba2b2d8ae0a81a0b436fb44fd17dc\n_1308'}]}
[2022-01-10 22:08:53,251] INFO in minidsp: 
input 0 peq 0 set -- 1.00047395877372 -1.9970896170178045 0.9966276588300693 1.9970922040265422 -0.9970990305950516
input 0 peq 0 bypass off
input 1 peq 0 set -- 1.00047395877372 -1.9970896170178045 0.9966276588300693 1.9970922040265422 -0.9970990305950516
input 1 peq 0 bypass off
input 0 peq 1 bypass on
input 1 peq 1 bypass on
input 0 peq 2 bypass on
input 1 peq 2 bypass on
input 0 peq 3 bypass on
input 1 peq 3 bypass on
input 0 peq 4 bypass on
input 1 peq 4 bypass on
input 0 peq 5 bypass on
input 1 peq 5 bypass on
input 0 peq 6 bypass on
input 1 peq 6 bypass on
input 0 peq 7 bypass on
input 1 peq 7 bypass on
input 0 peq 8 bypass on
input 1 peq 8 bypass on
input 0 peq 9 bypass on
input 1 peq 9 bypass on
2022-01-10 22:08:53,251 - ThreadPoolExecutor-1_0 - ezbeq.minidsp - INFO - __do_run - 
input 0 peq 0 set -- 1.00047395877372 -1.9970896170178045 0.9966276588300693 1.9970922040265422 -0.9970990305950516
input 0 peq 0 bypass off
input 1 peq 0 set -- 1.00047395877372 -1.9970896170178045 0.9966276588300693 1.9970922040265422 -0.9970990305950516
input 1 peq 0 bypass off
input 0 peq 1 bypass on
input 1 peq 1 bypass on
input 0 peq 2 bypass on
input 1 peq 2 bypass on
input 0 peq 3 bypass on
input 1 peq 3 bypass on
input 0 peq 4 bypass on
input 1 peq 4 bypass on
input 0 peq 5 bypass on
input 1 peq 5 bypass on
input 0 peq 6 bypass on
input 1 peq 6 bypass on
input 0 peq 7 bypass on
input 1 peq 7 bypass on
input 0 peq 8 bypass on
input 1 peq 8 bypass on
input 0 peq 9 bypass on
input 1 peq 9 bypass on
[2022-01-10 22:08:53,265] INFO in minidsp: Sending 22 commands to slot 0 via /tmp/tmpf1mo6qpq 
2022-01-10 22:08:53,265 - ThreadPoolExecutor-1_0 - ezbeq.minidsp - INFO - __do_run - Sending 22 commands to slot 0 via /tmp/tmpf1mo6qpq 
2022-01-10 22:08:53,415 - PoolThread-twisted.internet.reactor-1 - ezbeq - ERROR - log_exception - Exception on /api/2/devices/master [PATCH]
Traceback (most recent call last):
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/flask_restx/api.py", line 397, in wrapper
    resp = resource(*args, **kwargs)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/flask_restx/resource.py", line 44, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/apis/devices.py", line 303, in patch
    if not self.__bridge.update(device_name, payload):
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/device.py", line 161, in update
    return self.__get_device(device_name).update(params)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 552, in update
    return self._hydrate_cache_broadcast(__do_it)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/device.py", line 253, in _hydrate_cache_broadcast
    return func()
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 540, in __do_it
    any_update |= self.__update_slot(slot)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 592, in __update_slot
    self.load_filter(current_slot.slot_id, match)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 449, in load_filter
    self._hydrate_cache_broadcast(__do_it)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/device.py", line 253, in _hydrate_cache_broadcast
    return func()
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 447, in __do_it
    raise e
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 443, in __do_it
    self.__send_cmds(target_slot_idx, cmds)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 403, in __send_cmds
    return self.__executor.submit(self.__do_run, cmds, target_slot_idx).result(timeout=self.__cmd_timeout)
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/ezbeq/minidsp.py", line 517, in __do_run
    code, stdout, stderr = self.__runner['-f', file_name].run(timeout=self.__cmd_timeout, **kwargs)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/plumbum/commands/base.py", line 240, in run
    return p.run()
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/plumbum/commands/base.py", line 201, in runner
    return run_proc(p, retcode, timeout)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/plumbum/commands/processes.py", line 324, in run_proc
    return _check_process(proc, retcode, timeout, stdout, stderr)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/plumbum/commands/processes.py", line 26, in _check_process
    proc.verify(retcode, timeout, stdout, stderr)
  File "/home/pi/python/ezbeq/lib/python3.7/site-packages/plumbum/machines/base.py", line 29, in verify
    getattr(self, "argv", None), self.returncode, stdout, stderr
plumbum.commands.processes.ProcessExecutionError: Unexpected exit code: 1
Command line: | /usr/bin/minidsp -f /tmp/tmpf1mo6qpq
Stderr:       | Error: Specified channel or peq is out of range
[2022-01-10 22:11:44,855] INFO in ws: WebSocket connection closed: clean? True, code: 1001, reason: None
2022-01-10 22:11:44,855 - MainThread - ezbeq.ws - INFO - onClose - WebSocket connection closed: clean? True, code: 1001, reason: None
[2022-01-10 22:11:50,509] INFO in ws: Client connecting: tcp4:192.168.0.81:44342
2022-01-10 22:11:50,509 - MainThread - ezbeq.ws - INFO - onConnect - Client connecting: tcp4:192.168.0.81:44342
[2022-01-10 22:11:50,510] INFO in ws: WebSocket connection open
2022-01-10 22:11:50,510 - MainThread - ezbeq.ws - INFO - onOpen - WebSocket connection open
[2022-01-10 22:11:50,512] INFO in ws: Registered client tcp4:192.168.0.81:44342
2022-01-10 22:11:50,512 - MainThread - ezbeq.ws - INFO - register - Registered client tcp4:192.168.0.81:44342
3ll3d00d commented 2 years ago

it's easier to read logs/config if you put them in code blocks

from what you've pasted, your config file is wrong

it is written as

accessLogging: false
debug: true
debugLogging: true
devices:
  master:
    cmdTimeout: 10
    exe: minidsp
    ignoreRetcode: false
    type: minidsp
device_type: DDRC88
sw_channels:
- 0
- 1
host: raspberrypi
iconPath: /home/pi
port: 8080
useTwisted: true

but should be

accessLogging: false
debug: true
debugLogging: true
devices:
  master:
    cmdTimeout: 10
    exe: minidsp
    ignoreRetcode: false
    type: minidsp
    device_type: DDRC88
    sw_channels:
    - 0
    - 1
host: raspberrypi
iconPath: /home/pi
port: 8080
useTwisted: true

correct indentation is critically important for this data

tlnmp1 commented 2 years ago

Thanks Matt,

It’s working. Now where do I donate?

Appreciate your help, Truong

On Tue, Jan 11, 2022 at 12:19 AM Matt Khan @.***> wrote:

it's easier to read logs/config if you put them in code blocks

from what you've pasted, your config file is wrong

it is written as

accessLogging: false debug: true debugLogging: true devices: master: cmdTimeout: 10 exe: minidsp ignoreRetcode: false type: minidsp device_type: DDRC88 sw_channels:

  • 0
  • 1 host: raspberrypi iconPath: /home/pi port: 8080 useTwisted: true

but should be

accessLogging: false debug: true debugLogging: true devices: master: cmdTimeout: 10 exe: minidsp ignoreRetcode: false type: minidsp device_type: DDRC88 sw_channels:

  • 0
  • 1 host: raspberrypi iconPath: /home/pi port: 8080 useTwisted: true

correct indentation is critically important for this data

— Reply to this email directly, view it on GitHub https://github.com/3ll3d00d/ezbeq/issues/54#issuecomment-1009700364, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASWTUEO45DTDXMYPO2OCG3LUVPR2NANCNFSM47PZNDJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>