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

Looking for some troubleshooting help #3

Open
stevemesser opened this issue Apr 13, 2024 · 19 comments
Open

Looking for some troubleshooting help #3

stevemesser opened this issue Apr 13, 2024 · 19 comments

Comments

@stevemesser
Copy link

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

@alanb128
Copy link
Owner

Looks like the actual Python script may be commented out:

#CMD ["python3", "flask-api.py"]

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.

@stevemesser
Copy link
Author

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

@alanb128
Copy link
Owner

Is your unit fully working now @stevemesser ?

@stevemesser
Copy link
Author

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

@stevemesser
Copy link
Author

stevemesser commented Apr 17, 2024

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

@stevemesser
Copy link
Author

@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
Copy link
Author

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

Any ideas?

@alanb128
Copy link
Owner

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

@stevemesser
Copy link
Author

Closer, now import request fails.

No module named requests

@alanb128
Copy link
Owner

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!)

@stevemesser
Copy link
Author

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

@alanb128
Copy link
Owner

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

@stevemesser
Copy link
Author

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
Copy link
Author

stevemesser commented Apr 20, 2024

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
Copy link
Author

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 -

@alanb128
Copy link
Owner

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

@stevemesser
Copy link
Author

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
Copy link
Author

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

@stevemesser
Copy link
Author

stevemesser commented Apr 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants