audio-streaming-box icon indicating copy to clipboard operation
audio-streaming-box copied to clipboard

Looking for some troubleshooting help

Open stevemesser opened this issue 1 year ago • 19 comments

I have the project completely built. I tested button presses in a test script so that part is known to work. My configuration is the same as yours.

I have verified the following

  1. In Moode I have enabled LCD Updater
  2. In raspi-config I have enables SPI
  3. I have verified that currentsong.txt is being populated
  4. . I have verified that the docker image is running via docker ps

The issue is that the LCD nor key presses are working. Not sure what I missed. Not even the momentary push button to GPIO 3 works.

I haven't been able to figure out where the docker container would log errors.

Any thoughts for troubleshooting?

Thanks

stevemesser avatar Apr 13 '24 21:04 stevemesser

Looks like the actual Python script may be commented out: https://github.com/alanb128/audio-streaming-box/blob/e4b1963791e3b94d0bdc0316399793957368005a/controller/Dockerfile#L10 I must have been troubleshooting at some point and left that in. Comment out the "sleep" line and uncomment the line above, then try again.

alanb128 avatar Apr 14 '24 19:04 alanb128

Thanks I saw that but wasn't sure. Turns out I had my latch connected to the wrong gpio pin.

stevemesser avatar Apr 14 '24 23:04 stevemesser

Is your unit fully working now @stevemesser ?

alanb128 avatar Apr 17 '24 16:04 alanb128

Sorry, I got side tracked with a work project. I hope to work on it again in the next day or so.

stevemesser avatar Apr 17 '24 21:04 stevemesser

The contrast pot on the backpack is extremely fickle. I ordered another one

stevemesser avatar Apr 17 '24 21:04 stevemesser

@alanb128 I figured out all my LCD issues. I mentioned above I had tested keypresses. I did however without pad4pi. I figured out how to create a virtual environment in Thonny and was finally able to install pad4pi and write a test script. However, I am getting the following runtime error. Failed to add edge detection. Did I miss some configuration somewhere?

stevemesser avatar Apr 19 '24 03:04 stevemesser

Running the docker log command the logs are saying that flask import is failing with No module named flask.

Any ideas?

stevemesser avatar Apr 20 '24 01:04 stevemesser

Looks like Flask was not being installed. I updated the Dockerfile, so try pulling it again and rebuilding.

alanb128 avatar Apr 20 '24 02:04 alanb128

Closer, now import request fails.

No module named requests

stevemesser avatar Apr 20 '24 03:04 stevemesser

Ok, added that in so you can try again.

(Sometimes I install these modules manually during development and forget to update the repo or push the changes!)

alanb128 avatar Apr 20 '24 03:04 alanb128

No worries. thanks for helping. => ERROR [controller 3/4] RUN pip3 install flask request adafruit-circuitpython-charlcd pad4pi adafruit-circuitpython-seesaw

.059 Collecting flask 3.245 Downloading flask-3.0.3-py3-none-any.whl (101 kB) 3.318 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.7/101.7 kB 1.6 MB/s eta 0:00:00 3.415 ERROR: Could not find a version that satisfies the requirement request (from versions: none) 3.417 ERROR: No matching distribution found for request 3.928 3.928 [notice] A new release of pip is available: 23.0 -> 24.0 3.928 [notice] To update, run: pip install --upgrade pip

failed to solve: process "/bin/sh -c pip3 install flask request adafruit-circuitpython-charlcd pad4pi adafruit-circuitpython-seesaw" did not complete successfully: exit code: 1

stevemesser avatar Apr 20 '24 04:04 stevemesser

It should be requests in the Dockerfile, not request - I thought it was spelled correctly in the last update...

alanb128 avatar Apr 20 '24 05:04 alanb128

LCD is now working and it stays in sync. I don't see any errors in docker logs. However, every keypress results in the same response No Play list defined ...

stevemesser avatar Apr 20 '24 16:04 stevemesser

Button circuIt board : gpio

ROWS PCB-35 GPIO-14 PCB-34 GPIO-15 PCB-33 GPIO-13 PCB-31 GPIO-23 PCB-30 GPIO-26

COLS PCB-24 GPIO-16 PCB-25 GPIO-12 PCB-15 GPIO-25 PCB-16 GPIO-24

stevemesser avatar Apr 20 '24 16:04 stevemesser

I am seeing this in the log 172.18.0.1 - - [20/Apr/2024 16:34:46] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:35:26] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:38:49] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:39:19] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:42:23] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:46:13] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:50:46] "POST / HTTP/1.1" 204 - 172.18.0.1 - - [20/Apr/2024 16:56:02] "POST / HTTP/1.1" 204 -

stevemesser avatar Apr 20 '24 16:04 stevemesser

How many playlists have you created in this instance of MoOde?

alanb128 avatar Apr 23 '24 05:04 alanb128

I have several including favorites and default. None of the buttons do the right thing. Button 8 does next track. No idea which one is select

stevemesser avatar Apr 23 '24 14:04 stevemesser

That's why I ask how you wired your pcb to gpio pins

stevemesser avatar Apr 23 '24 14:04 stevemesser

Your code does print statements on key presses but I don't know where it's printing to

stevemesser avatar Apr 23 '24 14:04 stevemesser