The PCP page is useful for configuring the basics (you’ll see that confit.txt gets a line specifying the remote PIN number). It other than that I think it’ll really be easier just to write your own handler for the code.
I would really like to stay on a package like pCP (or other alike) because if I don't, I add the burden to understand everything... which I will never do 🙂
//
//
If there is a handler skeleton / working one, I suppose I might be able to grasp the structure and modify it for my needs. I'm known to have once written someting like program code that actually executed android something I expected :-D - but it was a vary long time ago... so I see myself as a beginner...
//
//
The problem is that the remote handlers baked into PCP are only written to send commands to squeezelite. It’s a really stripped-down system to cut out the overhead. A remote handler is just going to be a list of
and working out the right commands to send.
Code:
if command == "volume-up":
<send vol up command>
elif command == "volume-down":
<send volume down command>
... etc
Thanks for the link. Overlooking that I feel ignorant. I could never make anything out of that ;-)
But thanks for trying to help out. Really!
//
But thanks for trying to help out. Really!
//
Well I thought that maybe if I start to use the pCP page to get the IR remote system with the commands that need to go to the player working.... - couldn't one then extend the existing handler to call CDSP för certain other received IR codes?and working out the right commands to send.
//
Yeah, using evdev as the device handler lets you handle keyboard input events in a flexible manner. There is a libevdev package in the tinycore repository, so it might be possible to shoehorn this onto PCP, though you’d need to install the right python libraries too. But it’s a good example of the stuff available in standard Linux that has been removed from PCP.
The main core of the script is a good example of what I was talking about - just a long ‘if … elif… ‘ chunk where you just need to work out the correct code to send the commands you want.
The existing handler is squeezelite itself, I don’t see any way of ‘extending’ that without going into the squeezelite code and recompiling it. I suppose you could try modifying the Jivelite wrappper, but that looks really complex.
Aha - I thought that was a separate entity external to the "player"... well.... as lost as ever... 🙂 as I assumed, I would need serious help to pull this one off..
I wonder if one could persuade the pCP owner or maybe the player owner to do some kind of support / interface to make this easier...?
//
I wonder if one could persuade the pCP owner or maybe the player owner to do some kind of support / interface to make this easier...?
//
Yeah, using evdev as the device handler lets you handle keyboard input events in a flexible manner. There is a libevdev package in the tinycore repository, so it might be possible to shoehorn this onto PCP, though you’d need to install the right python libraries too.
yes, this was the problem when I tried.
Simple things in Linux become very complicated in Picore, because I don't know how it works...
especially installing python library like raspberrypi-tm1637 or glob2
OK... so what do you say... If I where to take an other platform... say moode... :
https://github.com/moode-player/docs/blob/main/setup_guide.md#6-advanced
?
And then there is Volumio...
But Im not sure about stability of these systems... pCP seem very stable...
//
https://github.com/moode-player/docs/blob/main/setup_guide.md#6-advanced
?
And then there is Volumio...
But Im not sure about stability of these systems... pCP seem very stable...
//
Do the GOIP pins generate interrupts when a button is pushed on the remote? I suppose so. I also suppose these interrupts are handled by the OS. And if so, there is should be some sort of a subscription function for the application to be informed when such events has occurred and get to now what happened. Right?
Is there limitation that only one application instance may subscribe to know of these events? If not, it must be possible to introduce yet a subscriber to act on certain events - no?
So even if squeezelite is informed of these events, could an other program do the same? I.e. be an event handler of remote keystrokes and just ignore the ones about play/stop etc and act on others that squeezelite don't understand.
Trying to grasp the SW architecture....
//
Is there limitation that only one application instance may subscribe to know of these events? If not, it must be possible to introduce yet a subscriber to act on certain events - no?
So even if squeezelite is informed of these events, could an other program do the same? I.e. be an event handler of remote keystrokes and just ignore the ones about play/stop etc and act on others that squeezelite don't understand.
Trying to grasp the SW architecture....
//
You can create an extension with the python libraries you need in this way:yes, this was the problem when I tried.
Simple things in Linux become very complicated in Picore, because I don't know how it works...
especially installing python library like raspberrypi-tm1637 or glob2
1) Ensure the following extensions are loaded (available in the repository): compiletc.tcz, squashfs-tools.tcz, python3.11-dev.tcz and python3.11-pip.tcz
2) Use the following commands:
Code:
pip install --upgrade pip
mkdir -p ~/tmp/usr/local/lib/python3.11/site-packages
cd ~/tmp/usr/local/lib/python3.11/site-packages
pip install --target . raspberrypi-tm1637
cd
mksquashfs tmp py3.11-rapsberrypi-tm1637-1.3.7.tcz
Then load the tcz file into /etc/sysconfig/tcedir/optional and include it in onboot.lst as usual.
You can do the same for glob2.
I've just upgraded to PCP 10.0.0 and notice the repository now carries a pre-made extension for the python evdev libraries, so it shouldn't be too hard to get your code working on PCP.
Last edited:
@charlesky ,
I was able to create and install the tm1637 and glob2 python modules. Your instructions were precise and sufficient. evdev is already installed when Bluetooth is enabled in picoreplayer.
But there is a problem...
I was able to pair the remote with bluetoothctl (with the web interface no pairable inputs) but it does not appear in /dev/input and therefore no longer detected by evdev.
So I'm stuck, any ideas?
I was able to create and install the tm1637 and glob2 python modules. Your instructions were precise and sufficient. evdev is already installed when Bluetooth is enabled in picoreplayer.
But there is a problem...
I was able to pair the remote with bluetoothctl (with the web interface no pairable inputs) but it does not appear in /dev/input and therefore no longer detected by evdev.
So I'm stuck, any ideas?
I suspect that the problem is related to bluez-hid2hci perhaps missing or then hcid.conf set to HID2HCI_ENABLED=0 .
in debian it is in /etc/default/bluetooth but where is in pcp?
in debian it is in /etc/default/bluetooth but where is in pcp?
That looks reasonable, but I have very limited knowledge of programming Bluetooth stacks. It might be an idea to post a question in the pCP Bluetooth discussion here:I suspect that the problem is related to bluez-hid2hci perhaps missing or then hcid.conf set to HID2HCI_ENABLED=0 .
in debian it is in /etc/default/bluetooth but where is in pcp?
https://forums.lyrion.org/forum/use...icoreplayer-8-0-0-bluetooth-discussion/page38
This story is starting to become complicated, especially because I don't use PCP and I have a script which automatically installs everything necessary in raspberrypiOs in 3 minuts...
I will share it soon in another thread, after a friend test in rpi5 (I have rpi4 only).
I will share it soon in another thread, after a friend test in rpi5 (I have rpi4 only).
- Home
- Source & Line
- Digital Line Level
- CamillaDSP on Pi remote control