Looking for some troubleshooting help
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
- In Moode I have enabled LCD Updater
- In raspi-config I have enables SPI
- I have verified that currentsong.txt is being populated
- . 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
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.
Thanks I saw that but wasn't sure. Turns out I had my latch connected to the wrong gpio pin.
Is your unit fully working now @stevemesser ?
Sorry, I got side tracked with a work project. I hope to work on it again in the next day or so.
The contrast pot on the backpack is extremely fickle. I ordered another one
@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?
Running the docker log
Any ideas?
Looks like Flask was not being installed. I updated the Dockerfile, so try pulling it again and rebuilding.
Closer, now import request fails.
No module named requests
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!)
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
It should be requests in the Dockerfile, not request - I thought it was spelled correctly in the last update...
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 ...
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
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 -
How many playlists have you created in this instance of MoOde?
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
That's why I ask how you wired your pcb to gpio pins
Your code does print statements on key presses but I don't know where it's printing to