SuperPlayer - The DSP_Engine (CamillaDSP) samplerate switching & ESP32 remote control

and the one I suggested (WEMOS D32) in a post some time ago, is probably not any better, from current consumption point of view, than the Adafruit version that Jesper started with.

I was surprised and disappointed by the findings in the link posted by TNT:
Reduce the ESP32 Power Consumption in 3 Simple Steps - DIYI0T
The Adafruit module drains almost 8 mA, no mater how deep it sleeps. That means you'll need a 2500 mAh battery, just to keep it deep sleep for 14 days... :(

I haven't dug all the way in to it, but it seems like it is the USB-uart chip that is the main reason for the current drainage. On both the Adafruit and the WEMOS modules that chip is powered by the 3.3V at all time. And there is no enable/disable feature in place.
In the FireBeetle ESP32 module, the USB-uart chip is powered from an extra 3.3V regulator, connected to the USB 5V power supply, separated from the battery and the main 3.3V regulator that supplies the ESP32 chip. A simple and cheap solution that ought to be standard on all battery powered ESP32 modules.

An alternative is to select a module that don't have an USB uart connection, and does most likely not suffer from this problem. But then you'll probably loose the battery charger too...


/ πr
 
Last edited:
Merry Xmas everybody :santa2:

SuperPlayer-v3.0/README.md at main * Lykkedk/SuperPlayer-v3.0 * GitHub

I've used +++hour's writing a new guide and besides that getting my Bluetooth remote working :)...

The Bluetooth section ain't done yet, but setting up SuperPlayer with Henrik's newest camilladsp & GUI is done by a script i created...
I need testers for this guide, as there are lot's of thing which can go wrong :D

But hey, things should work and good luck.

Jesper.
 
Happy festivities to all.

I tried to install SuperPlayer-v3.0 and the installation of py_cdsp_samplerate_control went smoothly. But I can't get the webinterface to work properly because after a reboot I get the following error message:

tc@piCorePlayer-william:~$ sudo /home/tc/StartServer.sh
tc@piCorePlayer-william:~$ Traceback (most recent call last):
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/main.py", line 1, in <module>
from aiohttp import web
ModuleNotFoundError: No module named 'aiohttp'


If I redo an installation it works again until the next reboot.
William
 
Error

Dear Community, I installed piCore from the start.


Unfortunately when I try to install python I have this error:


tc@pCP:~$ tce-load -w -i python3.6
Downloading: python3.6.tcz
Connecting to repo.picoreplayer.org (172.67.157.97:443)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: python3.6.tcz.md5.txt: No such file or directory
Error on python3.6.tcz
tc@pCP:~$


Do you have any idea of which one is the issue?



Thank you
 
Member
Joined 2002
Paid Member
I assume you have loaded piCorePlayer 7.0.0?

If so, python has been updated from python3.6.tcz to python3.8.tcz.

If you use the pCP web GUI, look at [Main Page] > [Extensions] > [Available] it will so you all the extensions available for the particular version of pCP you are using.
 
Thank you for the help.
Indeed you are completely right, I had installed pCP 7.0.0. So I decided to install pCP 6.1.0 and I was able to install python 3.6. But now I have another issue:


tc@piCorePlayer:~/SuperPlayer-Extensions-CDSP-install-v1.0$ {'camilla_host': '0.0.0.0', 'camilla_port': 1234, 'port': 5000, 'config_dir': '/home/tc/camilladsp/configs', 'coeff_dir': '/home/tc/camilladsp/coeffs'}
No plotting!
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 553, in __init__
raise ValueError("Not a directory")
ValueError: Not a directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/main.py", line 11, in <module>
setup_static_routes(app)
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/routes.py", line 56, in setup_static_routes
app.router.add_static("/config/", path=app["config_dir"])
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 1126, in add_static
append_version=append_version,
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_urldispatcher.py", line 555, in __init__
raise ValueError(f"No directory exists at '{directory}'") from error
ValueError: No directory exists at '/home/tc/camilladsp/configs'


I think I followed all the instruction, I do not know what I did wrong.
 
Morning there :)

It look's like that the py_cdsp_samplerate_control.tcz are not loaded?
Fiurst time this .tcz is loaded it creates the missing dir's you have!

Could this be the case perhaps?

Please follow the instructions after installing the webinterface

GitHub - Lykkedk/SuperPlayer-v3.0

The dir structure of the .tcz...

Code:
squashfs
   ├── home
   │   └── tc
   │       └── camilladsp
   │           ├── coeffs
   │           ├── configs
   │           └── example
   │               ├── 44100.yml
   │               ├── 48000.yml
   │               ├── 88200.yml
   │               └── 96000.yml
   │       
   └── usr
       └── local
           ├── bin
           │   ├── camilladsp-config.sh
           │   ├── samplerate-daemon.py
           │   ├── samplerate-select.py
           │   └── squeezelite-cdsp.sh
           └── tce.installed
               └── py_cdsp_samplerate_control

Jesper.
 
Last edited:
Hi Jesper,


Thank you. As you said the issues was sorted out by installing first py_cdsp_samplerate_control.tcz. But I have this error now. I had this error with the older installation and now with the newer:


Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/views.py", line 46, in get_param
result = cdsp.get_rate_adjust()
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 234, in get_rate_adjust
adj = self._query("GetRateAdjust")
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
bufferlevel
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/views.py", line 54, in get_param
result = cdsp.get_buffer_level()
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 241, in get_buffer_level
level = self._query("GetBufferLevel")
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
clippedsamples
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/views.py", line 56, in get_param
result = cdsp.get_clipped_samples()
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 248, in get_clipped_samples
clipped = self._query("GetClippedSamples")
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
state
offline
capturesignalrms
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/views.py", line 68, in get_list_param
result = cdsp.get_capture_signal_rms()
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 159, in get_capture_signal_rms
sigrms = self._query("GetCaptureSignalRms")
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
playbacksignalrms
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/mnt/mmcblk0p2/tce/Camilla_Extensions/camillagui/views.py", line 72, in get_list_param
result = cdsp.get_playback_signal_rms()
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 167, in get_playback_signal_rms
sigrms = self._query("GetPlaybackSignalRms")
File "/usr/local/lib/python3.6/site-packages/camilladsp/camilladsp.py", line 64, in _query
raise IOError("Not connected to CamillaDSP")
OSError: Not connected to CamillaDSP
capturerate
 
Hi Jesper,


Many thanks. I think I have done everything reported in the guide :confused:. I have repeated the steps many times to be sure I did not miss anything. But it possible I did not do something important.



So the output:


tc@piCorePlayer:~$ ls -all /usr/local/lib/python3.6/site-packages
total 132
drwxr-xr-x 36 root root 860 Jan 1 1970 ./
drwxr-xr-x 34 root root 4100 Jan 1 1970 ../
drwxr-xr-x 2 root root 140 Jan 1 1970 PyYAML-5.4-py3.6.egg-info/
lrwxrwxrwx 1 root root 70 Jan 1 1970 README.txt -> /tmp/tcloop/python3.6/usr/local/lib/python3.6/site-packages/README.txt
drwxr-xr-x 2 root root 120 Jan 1 1970 __pycache__/
drwxr-xr-x 3 root root 100 Jan 1 1970 _distutils_hack/
drwxr-xr-x 3 root root 80 Jan 1 1970 _yaml/
drwxr-xr-x 4 root root 1500 Jan 1 1970 aiohttp/
drwxr-xr-x 2 root root 160 Jan 1 1970 aiohttp-3.7.3-py3.6.egg-info/
drwxr-xr-x 3 root root 100 Jan 1 1970 async_timeout/
drwxr-xr-x 2 root root 160 Jan 1 1970 async_timeout-3.0.1.dist-info/
drwxr-xr-x 3 root root 460 Jan 1 1970 attr/
drwxr-xr-x 2 root root 180 Jan 1 1970 attrs-20.3.0.dist-info/
drwxr-xr-x 3 root root 100 Jan 1 1970 camilladsp/
drwxr-xr-x 2 root root 160 Jan 1 1970 camilladsp-0.5.0-py3.6.egg-info/
drwxr-xr-x 3 root root 200 Jan 1 1970 camilladsp_plot/
drwxr-xr-x 2 root root 180 Jan 1 1970 camilladsp_plot-0.4.3-py3.6.egg-info/
drwxr-xr-x 4 root root 860 Jan 1 1970 chardet/
drwxr-xr-x 2 root root 200 Jan 1 1970 chardet-3.0.4.dist-info/
-rw-r--r-- 1 root root 152 Jan 20 20:41 distutils-precedence.pth
-rw-r--r-- 1 root root 126 Jan 20 20:41 easy_install.py
drwxr-xr-x 3 root root 220 Jan 1 1970 idna/
drwxr-xr-x 2 root root 160 Jan 1 1970 idna-3.1.dist-info/
drwxr-xr-x 2 root root 180 Jan 1 1970 idna_ssl-1.1.0-py3.6.egg-info/
-rw-r--r-- 1 root root 779 Jul 5 2018 idna_ssl.py
drwxr-xr-x 4 root root 260 Jan 1 1970 multidict/
drwxr-xr-x 2 root root 140 Jan 1 1970 multidict-5.1.0-py3.6.egg-info/
drwxr-xr-x 5 root root 140 Jan 1 1970 pip/
drwxr-xr-x 2 root root 180 Jan 1 1970 pip-10.0.1.dist-info/
drwxr-xr-x 6 root root 140 Jan 1 1970 pkg_resources/
drwxr-xr-x 7 root root 820 Jan 1 1970 setuptools/
drwxr-xr-x 2 root root 200 Jan 1 1970 setuptools-51.3.3.dist-info/
lrwxrwxrwx 1 root root 82 Jan 1 1970 six-1.14.0-py3.6.egg-info -> /tmp/tcloop/py_six/usr/local/lib/python3.6/site-packages/six-1.14.0-py3.6.egg-info
drwxr-xr-x 2 root root 160 Jan 1 1970 six-1.15.0.dist-info/
-rw-r--r-- 1 root root 34159 Jan 20 20:43 six.py
drwxr-xr-x 2 root root 160 Jan 1 1970 typing_extensions-3.7.4.3.dist-info/
-rw-r--r-- 1 root root 83727 Jan 20 20:41 typing_extensions.py
drwxr-xr-x 4 root root 360 Jan 1 1970 websocket/
drwxr-xr-x 2 root root 140 Jan 1 1970 websocket_client-0.57.0-py3.6.egg-info/
drwxr-xr-x 2 root root 160 Jan 1 1970 websocket_client-0.57.0.dist-info/
drwxr-xr-x 3 root root 400 Jan 1 1970 yaml/
drwxr-xr-x 3 root root 260 Jan 1 1970 yarl/
drwxr-xr-x 2 root root 160 Jan 1 1970 yarl-1.6.3-py3.6.egg-info/


---------------------------------------------------------------------------------------------


tc@piCorePlayer:~$ cat /opt/.filetool.lst
opt
home
etc/asound.conf
etc/group
etc/gshadow
etc/httpd.conf
etc/passwd
etc/shadow
usr/local/etc/pointercal
usr/local/etc/ssh/ssh_host_dsa_key
usr/local/etc/ssh/ssh_host_dsa_key.pub
usr/local/etc/ssh/ssh_host_ecdsa_key
usr/local/etc/ssh/ssh_host_ecdsa_key.pub
usr/local/etc/ssh/ssh_host_ed25519_key
usr/local/etc/ssh/ssh_host_ed25519_key.pub
usr/local/etc/ssh/ssh_host_rsa_key
usr/local/etc/ssh/ssh_host_rsa_key.pub
usr/local/etc/init.d/pcp_startup.sh
usr/local/etc/pcp
var/lib/alsa/asound.state
var/spool/cron/crontabs
usr/local/lib/python3.6/site-packages


------------------------------------------------------------------------------------------


tc@piCorePlayer:~$ cat /mnt/mmcblk0p2/tce/onboot.lst
pcp.tcz
pcp-6.1.0-www.tcz
slimserver.tcz
ntfs-3g.tcz
python3.6.tcz
nano.tcz
py_websocket.tcz
camilladsp.tcz
py_cdsp_samplerate_control.tcz


Hopefully this can be useful.


Cheers,
Francesco
 
Hmm... :scratch2:

I can't figure out what is wrong with youre install?

Did you read pi r's "instructions" also, especially this ::
Both squeezelite and CamillaDSP must be started by my script: /opt/camilladsp/cdsp-squeezelite.sh
And: pCP must be configured NOT to start squeezelite on boot.

Also please try to execute
Code:
ps aux | grep camilladsp
Mine looks like ::
tc@TestRig:~$ ps aux | grep camilladsp
8543 root 0:18 /usr/local/bin/camilladsp /home/tc/camilladsp/44100.yml -p 1234 -g-3 -l off
9844 tc 0:00 grep camilladsp

We can see, that camilla is running with websocket at -p 1234

Then
Code:
ps aux | grep squeezelite
Mine looks like this ::
tc@TestRig:~$ ps aux | grep squeezelite
8542 root 0:25 /usr/local/bin/squeezelite -n SuperPlayer_TestRig -o - -a 160:4::1: -b 10000 20000 -s 192.168.1.29 -U -U -d output info -f /var/run/squeezelite-log.fifo
9966 tc 0:00 grep squeezelite

The "-" between -o and -a tells that squeezelite is running piped :)

We will eventually figure it out... let's keep going ;)

Jesper.
 
Hi Jesper,


Please find below the outputs required. But please keep in mind that the WebUI "works" just if I rerun the commands:
cd /home/tc/SuperPlayer-Extensions-CDSP-install-v1.0

chmod +x install_rpi_tinycore.sh

sudo ./install_rpi_tinycore.sh


After the reboot it does not "work" anymore. When it works the status is in offline.


Furthermore I do not think I followed the pi r's instructions. I just followed the instructions in your guide (copied and pasted the commands in the same order you wrote them). I do not I know how to do that. The problem can be easily this.



Outputs below. I run the outputs after the reboot (without run cd /home/tc/SuperPlayer-Extensions-CDSP-install-v1.0; chmod +x install_rpi_tinycore.sh; sudo ./install_rpi_tinycore.sh):


tc@piCorePlayer:~$ ps aux | grep camilladsp
8737 tc 0:00 grep camilladsp

---------------------------------------------------------------------------------



tc@piCorePlayer:~$ ps aux | grep squeezelite
8742 tc 0:00 grep squeezelite


Thank you so much for the help.


Francesco
 
Hi Jesper,


Please find below the outputs required. But please keep in mind that the WebUI "works" just if I rerun the commands:
cd /home/tc/SuperPlayer-Extensions-CDSP-install-v1.0

chmod +x install_rpi_tinycore.sh

sudo ./install_rpi_tinycore.sh


After the reboot it does not "work" anymore. When it works the status is in offline.


Furthermore I do not think I followed the pi r's instructions. I just followed the instructions in your guide (copied and pasted the commands in the same order you wrote them). I do not I know how to do that. The problem can be easily this.



Outputs below. I run the outputs after the reboot (without run cd /home/tc/SuperPlayer-Extensions-CDSP-install-v1.0; chmod +x install_rpi_tinycore.sh; sudo ./install_rpi_tinycore.sh):


tc@piCorePlayer:~$ ps aux | grep camilladsp
8737 tc 0:00 grep camilladsp

---------------------------------------------------------------------------------



tc@piCorePlayer:~$ ps aux | grep squeezelite
8742 tc 0:00 grep squeezelite


Thank you so much for the help.


Francesco

Hey...

The files look's okay to me, BUT ::
I see that neither camilladsp & squeezelite is running?

To make things simple ::
Can you perhaps try to make just squeezelite run with normal piCorePlayer instructions for a start, so that we can confirm that the hardware is working proberly on the setup?

Jesper.