Replies: 2 comments 1 reply
-
Any suggestions on how to debug this issue? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. The log or the lack of log entries is what makes it so hard for me to narrow down the bug. Let me walk you through the sequence of steps in detail - maybe I overlook something quite obvious. First I want to ensure that my hardware is working. I am using this script:
All the three GPIO pins show the signal. Only pin 17 seems to sometimes fluctuate between 0 and 1. Then I start the phoniebox with the gpio.yaml file from above:
I then press the button and switch the switch. The error.log is still empty and the app.log shows nothing after the play folder info:
Without changing the hardware setup I now remove the two buttons from the gpio.yaml, restart the phoniebox and the switch is working. While it clearly stops and plays the music there is still not entry in any of the two log files. If I remove the switch and keep the buttons they don't work (neither with active state true or false). I then replaced input_devices.py with the original version from the future3/dev branch - to check if the bug has something to do with my changes in the code to create a switch (see attached version). The behavior is exactly the same. I really don't have a good way to trace down the problem and would appreciate any help on how to increase the verbosity of the log files or any other way to figure out where the signal is lost. Thanks a lot in advance! |
Beta Was this translation helpful? Give feedback.
-
I have 1 Switch (that toggles between on and off) and two buttons connected to my phoniebox (RPI HiFi AMP HAT TAS5713 Amplifier Audio Module and a USB RFID reader). The elements are connected to 3.3V and via a 1k pullup to GPIO 17,27 and 22.
The gpio.yaml looks as follow:
The switch implementation is the one I described here.
I checked with a separate Python program that all the elements switch from 0 to 1 and the state change is detected by the raspberry.
When I only have the switch configuration in the file it works but as soon as I add the buttons the setup stops working.
The three devices are logged in the logfile:
I have experimented quite a bit but it seems that I am missing a point here. Any help appreciated!
Best regards
Oliver
Beta Was this translation helpful? Give feedback.
All reactions