Home of the Squeezebox™ & Transporter® network music players.
Page 115 of 118 FirstFirst ... 1565105113114115116117 ... LastLast
Results 1,141 to 1,150 of 1175
  1. #1141
    Senior Member
    Join Date
    Jun 2012
    Posts
    380
    Quote Originally Posted by paul- View Post
    That's silly. The default minimum string length for "strings" is 4..... end is only 3. Surprised nobody has ever ran across that before


    Code:
    "end"  is only 3
    "end " is 4 and works fine.
    Using file is a better way to do it, but we don't have file.tcz loaded by default. I'll take a look at other options. using "strings -n 1" should fix it.
    I guess not many people use lirc without jivelite. I have 2 other pcp's with jivelite installed, but this one is in a DAC, so just want to use the remote with lirc, so came across it.

  2. #1142
    Senior Member
    Join Date
    Jun 2012
    Posts
    380

    Possible to build luma.core and luma.oled python modules?

    Hi Paul & pcpteam

    I'm trying get pcp working on the Audiophonics https://www.audiophonics.fr/en/netwo...4-p-14639.html. I've now got it all running, but the second screen uses luma.core and luma.oled with a python script. To get this working, I had to build my own python as the luma.core and luma.oled modules aren't available as tcz's. If I install the various python modules that are available (python38, python-pip, python-setuptools, python-rpi) and compiletc and then try and import the modules using pip install oled.core, it fails to build one of the dependencies - spidev.

    The python script also uses pylms, but I can import that OK with PIP, although a tcz for that would be nice :-)

    I'm going to post a thread on how to get this dac running pcp - i've replaced my Transporter with it, and it's a really nice device. But I wanted to see if we could make it easier for people so they don't have to run through the rather long process of building their own python.

    Thanks

    pete S
    Last edited by psketch; 2021-06-09 at 06:02.

  3. #1143
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,871
    Quote Originally Posted by ralphy View Post
    I'm currently chasing a problem trying to uploading the updated extension to the picoreplayer main repository. If you switch to the picoreplayer mirror repository and then upgrade the pcp-streamer.tcz extension v1.04 will be installed.
    The pcp-streamer extension had been updated to v1.04 in the picoreplayer 7 main repository now.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

  4. #1144
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    Quote Originally Posted by psketch View Post
    Hi Paul & pcpteam

    I'm trying get pcp working on the Audiophonics https://www.audiophonics.fr/en/netwo...4-p-14639.html. I've now got it all running, but the second screen uses luma.core and luma.oled with a python script. To get this working, I had to build my own python as the luma.core and luma.oled modules aren't available as tcz's. If I install the various python modules that are available (python38, python-pip, python-setuptools, python-rpi) and compiletc and then try and import the modules using pip install oled.core, it fails to build one of the dependencies - spidev.

    The python script also uses pylms, but I can import that OK with PIP, although a tcz for that would be nice :-)

    I'm going to post a thread on how to get this dac running pcp - i've replaced my Transporter with it, and it's a really nice device. But I wanted to see if we could make it easier for people so they don't have to run through the rather long process of building their own python.

    Thanks

    pete S
    Python modules can be tricky, sometimes downloading the source and using setup.py works better than pip. pip will sometimes pull in precompiled binaries that don't work well in our environment. I would be happy to take a look.

    Is this the list?
    https://pypi.org/project/spidev/
    https://pypi.org/project/luma.core/
    https://pypi.org/project/luma.oled/
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #1145
    Senior Member
    Join Date
    Jun 2012
    Posts
    380
    Quote Originally Posted by paul- View Post
    Python modules can be tricky, sometimes downloading the source and using setup.py works better than pip. pip will sometimes pull in precompiled binaries that don't work well in our environment. I would be happy to take a look.

    Is this the list?
    https://pypi.org/project/spidev/
    https://pypi.org/project/luma.core/
    https://pypi.org/project/luma.oled/
    Thanks Paul

    spidev isn't directly imported - it's a dependency in luma.core and the import breaks at that point. I've imported extensions python3.8, python-pip, python-setuptools, python-pillow and python-gpio already. Then I can pip import pylms ok, but luma.core fails - I didn't actually try luma.oled.

    When I built my own python, the reqs.pip was

    pillow --global-option="build_ext" --global-option="--disable-jpeg" --global-option="--disable-zlib" --global-option="--enable-freetype"
    luma.oled
    luma.core
    pyftdi
    smbus2
    spidev
    RPI.GPIO
    pyusb
    pyserial
    pylms

    pyusb, smbus2, and pyserial are dependencies of luma.core I think - but i think it seemed to pull them ok when I tried to import luma.core

    BTW - when I built my own, I had to do "CFLAGS="-fcommon" pip install -r reqs.pip " because otherwise rpi.gpio won't build, but I assume the python-gpio extension would bypass that...

    Happy to try anything....

    As I said, I managed to build it from scratch anyway, but the extension route will be much easier for others, and I'm trying to persuade Audiophonics to provide a pcp standard image instead of the very fat (non)dietpi image they push out at the moment.

    pete S
    Last edited by psketch; 2021-06-09 at 10:30.

  6. #1146
    Senior Member
    Join Date
    Jun 2012
    Posts
    380
    error output when trying to pip install luma.core is

    Code:
    Building wheels for collected packages: spidev
      Building wheel for spidev (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vcnpqe_4/spidev/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vcnpqe_4/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-d6tospu4
           cwd: /tmp/pip-install-vcnpqe_4/spidev/
      Complete output (12 lines):
      running bdist_wheel
      running build
      running build_ext
      building 'spidev' extension
      creating build
      creating build/temp.linux-armv7l-3.8
      gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O3 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -use-ld=gold -O3 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -use-ld=gold -fPIC -I/usr/local/include/python3.8 -c spidev_module.c -o build/temp.linux-armv7l-3.8/spidev_module.o
      spidev_module.c:28:10: fatal error: Python.h: No such file or directory
         28 | #include <Python.h>
            |          ^~~~~~~~~~
      compilation terminated.
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for spidev
      Running setup.py clean for spidev
    Failed to build spidev
    Installing collected packages: spidev, luma.core
        Running setup.py install for spidev ... error
        ERROR: Command errored out with exit status 1:
         command: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vcnpqe_4/spidev/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vcnpqe_4/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vebbc7i6/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/tc/.local/include/python3.8/spidev
             cwd: /tmp/pip-install-vcnpqe_4/spidev/
        Complete output (12 lines):
        running install
        running build
        running build_ext
        building 'spidev' extension
        creating build
        creating build/temp.linux-armv7l-3.8
        gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -O3 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -use-ld=gold -O3 -pipe -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -use-ld=gold -fPIC -I/usr/local/include/python3.8 -c spidev_module.c -o build/temp.linux-armv7l-3.8/spidev_module.o
        spidev_module.c:28:10: fatal error: Python.h: No such file or directory
           28 | #include <Python.h>
              |          ^~~~~~~~~~
        compilation terminated.
        error: command 'gcc' failed with exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vcnpqe_4/spidev/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vcnpqe_4/spidev/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vebbc7i6/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/tc/.local/include/python3.8/spidev Check the logs for full command output.
    So, it may be just spi that's the problem.

    Edit : OK, actually that's easy. was missing python.h, so was just needing python38-dev. I think I've figured out how to package all the deps into a tcz - will try it tomorrow and post it as an extension if it works ok.
    Last edited by psketch; 2021-06-09 at 15:42.

  7. #1147
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,110
    The dev extensions will get you, but the error message is normally pretty in your face. I have scripts to make extension from pip (And load the standard build extensions), you just have to load the pip dependencies first such that you only get one package in the extension. Since each has their own author, the info files need to be kept straight. Making the info file for the repo takes the most amount of time.

    Pillow and rpi.gpio are already posted extensions......

    You missed a few dependancies.
    cbor2
    wrapt
    depreciated
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  8. #1148
    Junior Member
    Join Date
    May 2010
    Posts
    16

    GPIO status on Soundcard on/off

    Hi,

    Maybe this is a subject already disscussed, but i didn't find it.

    I would like to turn on/off my amplifier on the status of the piCoreplayer..
    It would be great, to have an output on the GPIO, that maybe configurable as beeing Pulse or momentary switch ?
    Is there anyone who is doing this ?

    Thank you paul for your work

    best regards
    yves

  9. #1149
    Junior Member
    Join Date
    Jun 2021
    Posts
    2
    Quote Originally Posted by ralphy View Post
    The pcp-streamer extension had been updated to v1.04 in the picoreplayer 7 main repository now.
    Thanks Ralphy! Works like a charm!

  10. #1150
    Junior Member
    Join Date
    May 2021
    Posts
    3
    Quote Originally Posted by Paul Webster View Post
    Do you see the USB device listed on the Squeezelite page in pCP?

    (click on More in the "Output setting" field)
    Yes, I succed one time to have sound by unchecking audio output without rebooting but can't do it again, I bought a other raspberry and have the same problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •