Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket failure on future3 #2050

Closed
Shaka-Agina opened this issue Jul 26, 2023 · 13 comments · Fixed by #2100
Closed

Websocket failure on future3 #2050

Shaka-Agina opened this issue Jul 26, 2023 · 13 comments · Fixed by #2100
Labels
bug future3 Relates to future3 development

Comments

@Shaka-Agina
Copy link

Hey Just fount out there's a websocket failure after installing future 3. Any Idea of what could be causing this?

This is the error found on the dev console on Chrome:

"webSocketEndpoint.ts:56 WebSocket connection to 'ws://raspberrypi.local:5557/' failed: "

Hardware Raspberry Pi4 8GB

@Shaka-Agina Shaka-Agina added bug future3 Relates to future3 development needs triage labels Jul 26, 2023
@Dabylpmis
Copy link

I got the same issue. First at all the Jukebox daemon won't start because it found no pyzmq. After installing it via
pip3 install pyzmq the daemon tries to start and the boot up sound starts to play but stops after 1 sec.

Here is the output from:
systemctl --user status jukebox-daemon

592:plugs.py           - jb.plugin            - MainThread      - ERROR    - Ignoring failed package load for 'publishing'
593:plugs.py           - jb.plugin            - MainThread      - ERROR    - Reason: ZMQError: Protocol not supported (addr='ws://*:5557')
jb.plugin            - MainThread      - ERROR    - Detailed reason:
python3[1865]: Traceback (most recent call last):
python3[1865]:   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 589, in load_all_named
python3[1865]:     load(package, load_as, prefix)
python3[1865]:   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 579, in load
python3[1865]:     raise e
python3[1865]:   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/plugs.py", line 576, in load
python3[1865]:     func()
python3[1865]:   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/components/publishing/__init__.py", line 36, in initialize
python3[1865]:     _PUBLISH_SERVER_THREAD = pub.server.PublishServer(tcp_port=tcp_port, websocket_port=ws_port)
python3[1865]:   File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/publishing/server.py", line 211, in __init__
python3[1865]:     self.backend.bind(f'ws://*:{websocket_port}')
python3[1865]:   File "/home/pi/.local/lib/python3.9/site-packages/zmq/sugar/socket.py", line 302, in bind
python3[1865]:     super().bind(addr)
python3[1865]:   File "zmq/backend/cython/socket.pyx", line 564, in zmq.backend.cython.socket.Socket.bind
python3[1865]:   File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
python3[1865]: zmq.error.ZMQError: Protocol not supported (addr='ws://*:5557')

@votti
Copy link

votti commented Aug 14, 2023

I had the same issue, re-installing jukebox on a brand new Rasbian.
The solution for me was to force the re-compilation of pyzmq as also reported here:
#1838 (comment)

pip uninstall pyzmq
apt-get install libzmq3-dev
pip install --no-binary=:all: pyzmq

I think somehow the installation of the pre-compiled zmq does currently not work anymore on future3/develop.

(Raspberry Pi 3 Model B Rev 1.2
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
Linux phnonie 6.1.21-v7+)

@pabera
Copy link
Collaborator

pabera commented Aug 14, 2023

@votti is correct. We need to look into the install script again and make sure we update all dependencies. pyzmq has seen some updates and they need to be incorporated.

@Chilipp
Copy link

Chilipp commented Sep 21, 2023

hey! just a quick comment on the solution by @votti in #2050 (comment). you should rather use ZMQ_DRAFT_API=1 ZMQPREFIX="/usr/local" pip3 install --no-binary=pyzmq pyzmq. Otherwise I ran into pypa/setuptools-scm#918 (that is actually already closed, but apparently not for pyzmq).

@DonPavlov
Copy link

I tried following the steps. But my pi failed to install pip packages. I had to do the following before I could install something via pip.

Create and add the following lines to ~/.config/pip/pip.conf:

[global]
break-system-packages = true

@s-martin
Copy link
Collaborator

I assume you use new Raspbian bookworm?

That's because bookworm now enforces PEP668, see also here: https://stackoverflow.com/a/75696359

Not sure yet, what's the best option...

@DivineDominion
Copy link

I believe that current future3/develop contains all the fixes needed to close this issue. @Shaka-Agina could you try to install the latest dev version? Command from the docs for your convenience:

cd; GIT_USER='MiczFlor' GIT_BRANCH='future3/develop' bash <(wget -qO- https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/future3/develop/installation/install-jukebox.sh)

Chilipp added a commit to Chilipp/RPi-Jukebox-RFID that referenced this issue Nov 9, 2023
@Chilipp
Copy link

Chilipp commented Nov 9, 2023

I just tried it @DivineDominion on a fresh 32bit bookworm os lite (6.1.0-rpi4-rpi-v7l #1 SMP Raspbian 1:6.1.54-1+rpt2 (2023-10-05) armv7l) and RPI4 and the problem still persists. The only solution was to run

ZMQ_DRAFT_API=1 ZMQPREFIX="/usr/local" pip3 install --no-binary=pyzmq --break-system-packages pyzmq

i.e. adding the --break-system-packages option to the pip3 install command as mentioned in #2050 (comment) above by @DivineDominion and @s-martin (I'd prefer setting this option instead of modifying the pip.conf file as in #2050 (comment) by @DivineDominion). The same option had to be added in _jukebox_core_install_python_requirements, see

sudo pip3 install --no-cache-dir -r "${INSTALLATION_PATH}/requirements.txt"

I also added a fix for the installation of npm as the current installation method has been deprecated (and does not install npm anymore) and there has been an issue with the installation of pyalsaaudio during the installation of the requirements.txt which is why I had to install libasound2-dev via apt-get

Here is the traceback during the invocation of pip3 install ... -r .../requirements.txt

Installing collected packages: snowballstemmer, pyalsaaudio, pulsectl, evdev, tornado, sphinxcontrib-jsmath, ruamel.yaml.clib, python_mpd2, Pygments, pyflakes, pycodestyle, pluggy, packaging, mock, mccabe, MarkupSafe, iniconfig, imagesize, docutils, babel, alabaster, ruamel.yaml, pytest, Jinja2, flake8, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, sphinx, sphinxcontrib-jquery, sphinx_rtd_theme
  Running setup.py install for pyalsaaudio ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pyalsaaudio did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      building 'alsaaudio' extension
      creating build
      creating build/temp.linux-armv7l-cpython-311
      arm-linux-gnueabihf-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c alsaaudio.c -o build/temp.linux-armv7l-cpython-311/alsaaudio.o
      alsaaudio.c:28:10: fatal error: alsa/asoundlib.h: No such file or directory
         28 | #include <alsa/asoundlib.h>
            |          ^~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyalsaaudio

If you like, I can open a PR with these changes, see https://github.com/MiczFlor/RPi-Jukebox-RFID/compare/future3/develop...Chilipp:RPi-Jukebox-RFID:fix-python-install?expand=1

the installation (after implement the fix for the arm64 OS in #2041) was successful via

cd; GIT_USER='Chilipp' GIT_BRANCH='fix-python-install' bash <(wget -qO- https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/future3/develop/installation/install-jukebox.sh)

and the jukebox-daemon.service was running successfully and the webapp has been built

@pabera
Copy link
Collaborator

pabera commented Nov 10, 2023

If you like, I can open a PR with these changes

That would be great. Bookworm has not been tested with future3. Maybe we should use your PR also to align to future3/main.

@Chilipp
Copy link

Chilipp commented Nov 10, 2023

alright, PR is open in #2100

@s-martin s-martin linked a pull request Nov 11, 2023 that will close this issue
@fellek
Copy link

fellek commented Nov 11, 2023

Maybe related Errors for Jukebox in Docker-Compose
Running Bookworm on Raspberry Pi 4B

server.py - jb.rpc.server - MainThread - DEBUG - Connected to address 'tcp://*:5555'
Traceback (most recent call last):
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/run_jukebox.py", line 67, in <module>
    main()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/run_jukebox.py", line 63, in main
    myjukebox.run()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/daemon.py", line 227, in run
    self.rpc_server = RpcServer()
  File "/home/pi/RPi-Jukebox-RFID/src/jukebox/jukebox/rpc/server.py", line 86, in __init__
    self.socket.bind(websocket_address)
  File "/home/pi/.local/lib/python3.9/site-packages/zmq/sugar/socket.py", line 302, in bind
    super().bind(addr)
  File "zmq/backend/cython/socket.pyx", line 564, in zmq.backend.cython.socket.Socket.bind
  File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Protocol not supported (addr='ws://*:5556')

container Jukebox is creashing and is beeing recreated after a minute in enless loop.

pabera pushed a commit that referenced this issue Nov 11, 2023
* add --break-system-packages option to pip3 install

as required for bookworm, see #2050 (comment)

* install libasound2-dev

to fix installation of pyalsaaudio via pip3

* install NodeJS and npm via official recommendation

see https://github.com/nodesource/distributions

* configure break-system-packages option globally

see discussion in #2100 (review)

* allow nginx (and others) to access /home/pi
@s-martin
Copy link
Collaborator

Should be now fixed on future3/develop

#2108 (comment)

can you check this?

pabera added a commit that referenced this issue Nov 25, 2023
- Bookworm Support
- Documentation in Github (removed Sphinx and Readthedocs)
- Webapp Dependency updates
- Python Dependency updates
- Python venv
- Better Dockerfiles
- Installation fixes

Squashed commit of the following:

commit c0d5a20
Author: pabera <[email protected]>
Date:   Sat Nov 25 23:48:28 2023 +0100

    future3 V3.3 - reference webapp build (#2126)

commit 12f4f92
Author: Alvin Schiller <[email protected]>
Date:   Sat Nov 25 23:36:44 2023 +0100

    Future3/documentation (#2127)

    * fixed typo

    * restored "rpc-commands"

    * fixed broken links

    * switched placed for leading documentation

    * added docu for changing swap size

    * unified links to source

commit 924c7f3
Author: pabera <[email protected]>
Date:   Sat Nov 25 19:46:42 2023 +0100

    Remove content folder from docs (#2124)

commit 94aa9dc
Author: pabera <[email protected]>
Date:   Sat Nov 25 00:14:29 2023 +0100

    Future3/update docs (#2123)

    * Update pulseaudio link for docker mac setup

    * Update Docker docs

commit 2a0bb20
Author: pabera <[email protected]>
Date:   Fri Nov 24 23:24:29 2023 +0100

    Update some links in the documentation (#2122)

    * Update some links in the documentation

    * Rename docs folder userguide to builders

    * Update some headlines

commit dfb9e93
Author: Alvin Schiller <[email protected]>
Date:   Sat Nov 18 14:40:10 2023 +0100

    Cleanup installation messages (#2109)

    * cleanup installation messages

    use clear for each new option
    added headers
    use correct urls in finish message
    fixed some typos and wording

    * fix usage with multiple ip addresses (ipv4/ipv6)

    use single call to get all information during installation
    show and read out only first ip in webui

    * fix typo in translation

    * fix order for gateway / interface

    * harmonize read answer option

    * fix FIN_MESSAGE

    * fix line break on OS check

commit babb237
Author: s-martin <[email protected]>
Date:   Thu Nov 16 23:57:28 2023 +0100

    fix docker description for windows (#2114)

commit acf6ec0
Author: Alvin Schiller <[email protected]>
Date:   Thu Nov 16 22:49:57 2023 +0100

    Future3 fix venv usage (#2111)

    * fix node setup

    nodejs includes npm. fails on extra installation
    folder keyrings might not be created yet

    * install python packages via pip in venv

    * move venv to project root

    * remove outdated comments / messages about venv

    * remove hardwired path. replace during installation

    * fix dead variable

    * #2112 fix 'not tagged as plugin callable'

commit d62de5f
Merge: b7480b8 26ca404
Author: Simon <[email protected]>
Date:   Thu Nov 16 22:10:44 2023 +0100

    Merge branch 'future3/develop' of https://github.com/MiczFlor/RPi-Jukebox-RFID into future3/develop

commit b7480b8
Author: Simon <[email protected]>
Date:   Thu Nov 16 22:10:07 2023 +0100

    fix rename

commit 26ca404
Author: s-martin <[email protected]>
Date:   Thu Nov 16 22:06:23 2023 +0100

    * keep docs for template reader at src (#2113)

    * fix markdown warnings

commit e3bc59f
Author: s-martin <[email protected]>
Date:   Thu Nov 16 21:35:53 2023 +0100

    More links fixed (#2106)

    * fix link

    * fix links

    * fix indentation

    * fix link

    * fix links

    * fix links

    * fix link

    * Update template_reader.md

    * Make only link to docs

    * Fix link

    * Update and rename README.rst to README.md

    * Update and rename README.rst to README.md

    * Update and rename README.rst to README.md

    * Update and rename README.rst to README.md

commit b12c941
Author: s-martin <[email protected]>
Date:   Tue Nov 14 10:15:18 2023 +0100

    markdown file

commit 13bf5e5
Author: pabera <[email protected]>
Date:   Mon Nov 13 23:27:35 2023 +0100

    Future3/update dependencies (#2103)

    Update python venv
    Update Bookworm
    Update node to v20 (lts) and npm minor dependencies
    Update docker to all of the above

commit 1ca31dd
Author: s-martin <[email protected]>
Date:   Sun Nov 12 20:49:45 2023 +0100

    fix #2101 (#2107)

    * fix #2101

    * fix #2101 for de

commit 86d608c
Author: s-martin <[email protected]>
Date:   Sun Nov 12 12:31:13 2023 +0100

    fix some more doc links (#2105)

    * fix doc links

    * add a readme to user guide

    * add readme to developers section

    * fix links

    * fix some links

    * fix links

    * fix some links

    * fix links

    * fix links

    * fix links

    * fix links

    * fix links

    * add new line

commit b7743da
Author: Philipp S. Sommer <[email protected]>
Date:   Sun Nov 12 00:04:23 2023 +0100

    Fix future3 installation for bookworm (#2100)

    * add --break-system-packages option to pip3 install

    as required for bookworm, see #2050 (comment)

    * install libasound2-dev

    to fix installation of pyalsaaudio via pip3

    * install NodeJS and npm via official recommendation

    see https://github.com/nodesource/distributions

    * configure break-system-packages option globally

    see discussion in #2100 (review)

    * allow nginx (and others) to access /home/pi

commit 4667fc1
Author: s-martin <[email protected]>
Date:   Sat Nov 11 21:47:04 2023 +0100

    Fix link

commit 7406085
Author: s-martin <[email protected]>
Date:   Sat Nov 11 21:43:55 2023 +0100

    Fix link to feature status (#2102)

    * Fix link to feature status

    * Rename to-be-deleted-status.md to status.md

commit 1ca5a81
Author: pabera <[email protected]>
Date:   Sat Nov 11 21:26:19 2023 +0100

    future3 - Move docs back to Github & markdown (#2085)

    * Start moving docs to markdown

    * update userguide

    * add more pages

    * Rename index.md

    * Undo last commit

    * Add autohotspot

    * Finish userguide without references

    * Rename bt audio btns

    * Adding developers and rfid

    * docker: optimizations (#2074)

    - linux host: use pulse unix socket
    - mpd: run as user (pi / root)
    - mpd: remove port exposure to host, connections to mpd only come from other docker containers
    - less config adjustments for docker environment

    Co-authored-by: Christoph Lauer <[email protected]>

    * Start moving docs to markdown

    * update userguide

    * add more pages

    * Rename index.md

    * Undo last commit

    * Add autohotspot

    * Finish userguide without references

    * Rename bt audio btns

    * Adding developers and rfid

    * Rename docs to documentation

    * Update document structure

    * Move rfid to developers

    * Remove sphinx

    * Remove even more sphinx

    * Test pydoc

    * Revert "Test pydoc"

    This reverts commit e1c6aeb.

    Revert "Remove even more sphinx"

    This reverts commit 6f55597.

    Revert "Remove sphinx"

    This reverts commit 23abee3.

    * Moving sphinx for api and command reference

    * Remove Sphinx for good

    * update paths to developers

    ---------

    Co-authored-by: notapirate <[email protected]>
    Co-authored-by: Christoph Lauer <[email protected]>

commit 0660586
Author: Christian Tietze <[email protected]>
Date:   Wed Nov 8 17:01:23 2023 +0100

    Remove unused _jukebox_core_download_prebuilt_pyzmq (#2097)

    See report #2094

commit 373fd38
Author: Christian Tietze <[email protected]>
Date:   Wed Nov 8 17:00:48 2023 +0100

    Fix pyzmq installation from source with drafts support (#2096)

    * Fix pyzmq installation from source with drafts support

    * Update pyzmq docs link

commit 5e35ce8
Author: notapirate <[email protected]>
Date:   Fri Nov 3 14:33:56 2023 +0100

    docker: optimizations (#2074)

    - linux host: use pulse unix socket
    - mpd: run as user (pi / root)
    - mpd: remove port exposure to host, connections to mpd only come from other docker containers
    - less config adjustments for docker environment

    Co-authored-by: Christoph Lauer <[email protected]>

commit 6f1efb8
Author: Alvin Schiller <[email protected]>
Date:   Tue Oct 10 21:21:59 2023 +0200

    fix unavailable repo for pi-rc522 (#2075)

    * fix unavailable repo for pi-rc522. Use fix version to ensure compatibility

    * build trigger

    * REVERT build trigger

    * fixed sphinx gpiozero version for pyton < 3.8

    * fixed sphinx gpiozero version for pyton >= 3.8

commit f803185
Author: Alvin Schiller <[email protected]>
Date:   Tue Oct 10 21:15:54 2023 +0200

    future3: Abort installation if user is not "pi" (#2077)

    * check for user 'pi' and home '/home/pi'

    retrieve correct information even if called with sudo

    * removed obsolete v2.x workflow files

commit b11606a
Author: s-martin <[email protected]>
Date:   Sat Sep 2 12:51:56 2023 +0200

    Create dependabot.yml (#2022)

commit 99a5536
Author: pabera <[email protected]>
Date:   Tue Aug 15 00:25:41 2023 +0200

    Add info to install script and documentation about 64bit systems #2041 (#2057)

    * Add info to install script and documentation about 64bit systems #2041

    * Fix flake8 error

commit 37a7938
Author: Alvin Schiller <[email protected]>
Date:   Fri May 5 09:02:36 2023 +0200

    set indent_size of 2 for js and yaml files (#2026)

commit 99bad28
Author: Alvin Schiller <[email protected]>
Date:   Wed May 3 23:30:01 2023 +0200

    future3 - Feature "sync shared" (#2009)

    * first callback test

    * default sync_shared settings added

    * moved test callback methods

    * fixed logger call

    * changed logger name

    * test rpc call sync_folder

    * settings added

    * added test rsync call (subprocess)

    * fixed path

    * fixed paths

    * fixed errorlogging

    * changed subprocess shell=false

    * added player update

    * fixed subprocess args

    * fixed rsync parameter

    * update database on caller. added return value

    * added "wait for database update"

    * added server and directory checks
    loglevels adjusted

    * fixed sync for subfolder shortcuts

    * fixed ignored files

    * refactored path handling
    use os.path instead of string concatenation
    fixed handling for abs path folder name

    * refactored logic in control class

    * added check for "on_rfid_scan_enabled"

    * sync_full added

    * added check for feature activation

    * correction of bool value handling
    evaluate to false if settings not correctly set (e.g. as string)

    * fix flake8 errors

    * update log message and fix result code

    * added ssh support

    * refactored paths for run_params

    * speed up ssh mode
    perform less checks for folder existence

    * added sync_change_on_rfid_scan

    * updated default settings
    format like ConfigHandler would save it

    * added command binding for Ui

    * fixed binding of command options
    and made them lowercase

    * changed invalid parameter handling

    * added sync_card_database

    update card id only on rfid scan sync
    overwrite on full sync

    * refactorings

    added locking on cfg access
    updated methodnames
    updated logging
    methods reordered
    flake8 corrections

    * exclude folder.conf if existing from V2.x

    * changed call on rfid scan to callback

    * fix flake8 errors

    * fix indendation for JS

    * combine settings of credentials for modes

    * naming convention

    * refactored function names to be more clear

    * changed options of sync_change_on_rfid_scan

    options changed from  "true"/"false" to "enable"/"disable"

    * moved identical prechecks to functions

    * renamed "sync_full" to "sync_all"

    * Fix function calls

    fix for: moved identical prechecks to functions

    * renamed "sync_full" to "sync_all"

    correction for logging

    * added "update_wait" and fixed to much locking

    * changed call on play_card to callback

    * changed precheck names to "is sync enabled"

    * updated function names "is_file" and "is_dir"

    * reduced nesting complexity

    * Changed rfid callback state to Enum

    renamed callback class
    add state as enum

    * Changed playcontent callback state to Enum

    added state as num
    moved callback and enum to seperate class
    callback class with generic to be able to use in more play functions

    * fix import

    * fixed generic type definition

    * harmonised precheck for sync_change_on_rfid_scan

    * refactored methods to util class

    * renamed syncutil to syncutils. fixed import

    * fixed flake8

    * Moved syncutils up

    * renamed module sync_shared to rfidcards

    * renamed sync_shared to sync_rfidcards

    * fix flake8

    * updated documentation

    * Updated translation for en

    * Updated language

    * Updated language

    * Update docs

    ---------

    Co-authored-by: pabera <[email protected]>

commit 8eee27b
Author: Michael Weinrich <[email protected]>
Date:   Sun Apr 16 17:13:25 2023 +0200

    Fix typo in System Setup chapter (#2012)

commit 68138d1
Author: pabera <[email protected]>
Date:   Wed Apr 12 23:41:31 2023 +0200

    update webapp dependencies (#2010)

commit 0250733
Author: Alvin Schiller <[email protected]>
Date:   Wed Apr 12 07:12:57 2023 +0200

    Fix Workflow Actions flake8 (future3) (#1989)

    * flake8 Version pin >= 4.0.0

    * flake8 corrections

    * update action versions

    * Updated pyton version matrix

    Pythen versions 3.7 - 3.11 added
    add quotation for correct intpretation

commit a8c56b0
Author: notapirate <[email protected]>
Date:   Fri Apr 7 23:43:28 2023 +0200

    setup_jukebox_core.sh: fix pyzmq installation for current pip versions (#1928)

    - using --install-options is deprecated, building pyzmq throws an error
    - use environment variables instead to activate draft support

    Co-authored-by: Christoph <Christoph Lauer>

commit 6fce216
Author: kugelzucker <[email protected]>
Date:   Fri Apr 7 23:37:35 2023 +0200

    a few more typos and wordings (#1952)

    * typos

    * GPIOs listed as unsupported

    is this still true? i used gpio on future3 and it seems fine. if its obsolete then merge.

    * typos and wording

    * typos, wording

    * info about tail -f on installlog

    * added info about monitoring install log

    * tail -f INSTALL-log,with proper formating

    * wording

    * wording

commit 0326c9a
Author: s-martin <[email protected]>
Date:   Tue Jan 3 14:26:31 2023 +0100

    Fix count in flake8 config (#1954)

commit 5734440
Author: kugelzucker <[email protected]>
Date:   Mon Jan 2 10:11:41 2023 +0100

    typos in docs (#1950)

    typo and broken link to phoniebox.de, site seems down right now.
@s-martin
Copy link
Collaborator

s-martin commented Dec 8, 2023

Fixed

@s-martin s-martin closed this as completed Dec 8, 2023
votti pushed a commit to votti/RPi-Jukebox-RFID that referenced this issue Jan 19, 2024
This is required for some tests.

Following the instructions from issue MiczFlor#2050
Specifically: MiczFlor#2050 (comment)
votti pushed a commit to votti/RPi-Jukebox-RFID that referenced this issue Jan 19, 2024
Currently it is hard to install zmq (MiczFlor#2050) and for
CI pytest `zmq` is not available.
As the test do not really require `jukebox.publishing`
running, mocking it in the test avoids it being imported.

Thus the tests do not require `zmq` to be installed.
s-martin added a commit that referenced this issue Feb 20, 2024
* Add event device plugin

This implements an "event device" listener plugin,
that enables the user to configure the phoniebox to
respond to events from an "event device" (device under /dev/input).
This incluces eg button presses from an USB controller or keyboard.

* Adds documentation for the event device plugin

Includes a detailed how-to as well as example config

* Allow empty button config

This is an actual usecase in case someone wants to setup a device
and figure out the button ids by looking at the logs

* Update README.rst

* Improve README

- Remove duplicated section as suggested
- Add Zero Delay Arcade USB Encoder usecase

* Give more meaningfull name to listener thread variable

* Link to old documentation

* Remove README and fix typo

The documentation is now part of the markdown documentation

* Remove unecessary plain=1

* Remove indents in example code

There was some left over indentation from the old rtf format in the python code examples.

* Add example how to access evdev in docker

* Example for new Evdev config structure

This is tighly modeled after gpio.
In contrast to GPIO, this is a list of devices containing
each one or more input/output devices.
Eg a Joystick has keys but potentially also rumble or leds.

Currently only very simply input devices (buttons) are supported.
This structer should enable to extend this easily.

* Move evdev config to separate file

As suggested this should be a separate file, similar to the gpioz config

* Adapt evdev code to new config

Now the config for evdev is akin to GPIO.
The big difference is that multiple devices with each
multiple input/output devices are supported.

Note that the backend is still the old event device listener backend.
Thus to support more features, the backend would need to be
quite drastically overhauled.

* Update documentation for new evdev config format

* Fix wrong reference

* Fix bug to correctly check supported input device type

* Add more tests for evdev init

* Fix wrong attribute name

The attribute 'device_request' of EvDevKeyListener is now called 'device_name_request'

* Validate input config better

Fails if there is no device_name and setts proper default for 'exact'

* Add pyzmq installation for github action

This is required for some tests.

Following the instructions from issue #2050
Specifically: #2050 (comment)

* Revert "Add pyzmq installation for github action"

This reverts commit 75161b5.

As this was not working

* Mock `jukebox.publishing` in tests to avoid zmq

Currently it is hard to install zmq (#2050) and for
CI pytest `zmq` is not available.
As the test do not really require `jukebox.publishing`
running, mocking it in the test avoids it being imported.

Thus the tests do not require `zmq` to be installed.

---------

Co-authored-by: pabera <[email protected]>
Co-authored-by: Vito Zanotelli <[email protected]>
Co-authored-by: s-martin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug future3 Relates to future3 development
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants