Open thilojaeggi opened 5 years ago
It’s saying that /etc/ts.conf does not exist on your pi. It should have been created when you ran the Adafruit installer.
If you run cat /etc/ts.conf
on your pi do you get any output?
Im using a Raspberry Foundation 7" Touch Display thats why I didnt install the adafruit thingy but I installed tslib and ts.conf exists.
cat: /etc/ts.conf: Is a directory
Okay, I see. ts.conf
should be a file, not a directory. What do you get when you run ls /etc/ts.conf
? When I run cat /etc/ts.conf
this is what I get:
# Uncomment if you wish to use the linux input layer event interface
module_raw input
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00
# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600
# Uncomment if you're using a Hitachi Webpad
# module_raw mk712
# Uncomment if you're using an IBM Arctic II
# module_raw arctic2
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
Should it even work with the "Original" 7" Display
I haven’t tested it, but I think it would. It’s certainly not designed for it though. The graphics are set for a 320x480 display.
The question is do I need to change anything in the config.txt of boot?
Yes you will have to, for example, I have:
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft35-resistive,rotate=0,speed=32000000,fps=60
You will need to replace the dtoverlay line with what is appropriate for you screen. You can find a list of all the available device tree overlays here: https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/overlays/README
So like this? dtparam=audio=on dtparam=i2c1=on dtparam=i2c_arm=on dtoverlay=vc4-kms-v3d,cma-256 dtoverlay=i2c-rtc,ds3231 dtoverlay=rpi-backlight dtoverlay=rpi-ft5406
So I tried again. Set it up all again and the same error ocurrs.
So now I have this output:
docker-compose up -d Recreating sonos-pi-controller ... done
But nothing shows on the display.
Sorry for posting so much here and thank you for replies. I now tried dropping the -d from docker-compose up but no luck. I think it has something to do with the backlight heres the new output.
sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 13, in <module> sonos-pi-controller | import ui as ui sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 5, in <module> sonos-pi-controller | from device.backlight import Backlight sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 5, in <module> sonos-pi-controller | class Backlight: sonos-pi-controller | File "/usr/src/app/device/backlight.py", line 8, in Backlight sonos-pi-controller | with open(BACKLIGHT_CONTROL) as file: sonos-pi-controller | IOError: [Errno 2] No such file or directory: '/sys/class/backlight/soc:backlight/brightness' sonos-pi-controller exited with code 1
No worries, glad you are making some progress.
Okay, so the backlight control is device specific, so the way the code is now won't work for your setup.
It does look like you can control it: https://raspberrypi.stackexchange.com/questions/36774/backlight-control-for-official-raspberry-pi-7-inch-touchscreen
From what I gathered you could try running this on your pi to test if it changes your backlight, replacing 80
with a number from 0-255 for brightness.sudo sh -c "echo 80 > /sys/class/backlight/rpi_backlight/brightness"
If that does work for you, then you will need to modify docker-compose.yml and replace the backlight mounting line with
- '/sys/class/backlight/rpi_backlight/brightness:/sys/class/backlight/rpi_backlight/brightness'
# Remove this line below
# - '/sys/class/backlight:/sys/class/backlight'
And also edit your .env file
BACKLIGHT_CONTROL=/sys/class/backlight/rpi_backlight/brightness
You will also have to modify backlight.py
to write 255
instead of 1
since your backlight ranges from 0 to 255 whereas the one I used in this project is either off or on, 0 or 1.
If you can't get the backlight thing to work, you could also just eliminate mounting the backlight file from docker-compose.yml and edit the Backlight class init, on and off methods to do nothing.
So now when I run it it just outputs:
Creating sonos-pi-controller ... done
but nothing displays. Still only terminal showing on screen
And again If i try to run it without the -d it outputs this. Backlight seems good now but I think now it has something to do with pygame
pi@raspberrypi:~ $ docker-compose up sonos-pi-controller is up-to-date Attaching to sonos-pi-controller sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1 sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "main.py", line 37, in <module> sonos-pi-controller | ui.init() sonos-pi-controller | File "/usr/src/app/ui/__init__.py", line 26, in init sonos-pi-controller | Window.surface = pygame.display.set_mode(Window.frame.size,pygame.FULLSCREEN) sonos-pi-controller | pygame.error: Unable to open /dev/fb1
It can't access the screen's frame buffer. What do you get when you run ls /dev/fb*
?
pi@raspberrypi:~ $ ls /dev/fb*
/dev/fb0
That is the output. Seems like I somehow need to change the fb but I dont know where
Try changing the line in docker-compose.yml from fb1 to fb0.
Did that now this:
sonos-pi-controller | Traceback (most recent call last):
sonos-pi-controller | File "main.py", line 37, in
Oops, you'll also need to change the .env file to
SDL_FBDEV=/dev/fb0
Great news it now shows up. But its cut off at the top and also touch doesnt work. Tried to touch everywhere on screen. It shows the current title and everything. So probably edit config.txt right? Thank you so much btw.
And again when I leave out the -d it shows me the error code and whats probably causing this sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34130) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34131) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | ---------------------------------------- sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | Exception happened during processing of request from (----------------------------------------'192.168.1.130' sonos-pi-controller | , 34132) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34176) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34228) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34292) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | ---------------------------------------- sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34307) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34325) sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34367) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34710) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34741) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34795) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34823) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | ---------------------------------------- sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 34866) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ----------------------------------------
Were almost there
Awesome, you're welcome! Glad you've got something on the display now.
Touchscreen not working is likely due to pygame not having the right input device.
Try running ls /dev/input
and see what you get. For me, event0 is my touchscreen, but it might be different for you. You will need to edit docker-compose.yml and .env to match what you need.
If that's not the issue you might also need to tweak the settings in your /boot/config.txt
Looks like these are the options:
Name: rpi-ft5406
Info: Official Raspberry Pi display touchscreen
Load: dtoverlay=rpi-ft5406,<param>=<val>
Params: touchscreen-size-x Touchscreen X resolution (default 800)
touchscreen-size-y Touchscreen Y resolution (default 600);
touchscreen-inverted-x Invert touchscreen X coordinates (default 0);
touchscreen-inverted-y Invert touchscreen Y coordinates (default 0);
touchscreen-swapped-x-y Swap X and Y cordinates (default 0);
Also, make sure your touchscreen is calibrated properly. I'm assuming you already did this when you installed tslib.
Also, the screen being cut off is likely due to the different resolutions. You could probably fix it by adjusting ui/__init__.py
# Try increasing the x & y values to see if it helps with the issue of it being cut off
Window.frame = pygame.Rect(0,0,320,480) # (x, y, width, height)
event0 mice mouse0
is output from /dev/input/ so I need to change nothing there I think.
Name: rpi-ft5406 Info: Official Raspberry Pi display touchscreen Load: dtoverlay=rpi-ft5406,<param>=<val> Params: touchscreen-size-x Touchscreen X resolution (default 800) touchscreen-size-y Touchscreen Y resolution (default 600); touchscreen-inverted-x Invert touchscreen X coordinates (default 0); touchscreen-inverted-y Invert touchscreen Y coordinates (default 0); touchscreen-swapped-x-y Swap X and Y cordinates (default 0);
Where do i need to put that? Sorry im not that experienced.
No worries, don't worry about those options for now, I think we might have an issue with no drivers being installed for your touchscreen first.
Were you able to calibrate your touchscreen when you installed tslib? Did you run ts_calibrate and did your touchscreen respond?
Also, try running cat /dev/input/event0
and touch your touchscreen. You should get some sort of output in your console. If not, then that means the device isn't mapped there, and we will have to fix that first. CTRL + C
to exit the cat
process when you're done.
I ran ts calibrate during setup and yes the touchscreen respondes even during ts_test I get an output on cat /dev/input/event0
Ok that's good news. What does cat /boot/config.txt
show?
Whats also weird is the screen turns black after some time. Is that the automatic turn off? Probably cant enable it anymore because of the touch not working yet there? Anyway heres a pic of it. I kinda managed to fit it to the screen (just entered the reslution of my screen) https://imgur.com/a/1UeS2Bw
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=0
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# --- added by adafruit-pitft-helper Wed 2 Jan 21:30:32 GMT 2019 ---
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=rpi-ft5406
Nice! Yeah, the backlight turns off after 30 seconds by default and is only enabled by touch, you can edit the amount of time it will take to turn off in .env by changing it to a greater value.
Okay, how about your docker-compose.yml and .env? What are their contents?
docker compose
version: "3.2"
services:
app:
container_name: sonos-pi-controller
restart: always
privileged: true
network_mode: 'host'
build: .
image: bytegenesis/sonos-pi-controller
env_file: .env
volumes:
- ./:/usr/src/app
- '/sys/class/backlight/rpi_backlight/brightness:/sys/class/backlight/rpi_backlight/brightness'
# Remove this line below
- '/etc/pointercal:/etc/pointercal'
- '/etc/ts.conf:/etc/ts.conf'
devices:
- "/dev/fb0:/dev/fb0"
- "/dev/input/event0:/dev/input/event0"
.env
PYTHONUNBUFFERED=0
COMPOSE_PROJECT_NAME=sonos-pi-controller
SDL_VIDEODRIVER=fbcon
SDL_FBDEV=/dev/fb0
SDL_MOUSEDEV=/dev/input/event0
SDL_MOUSEDRV=TSLIB
BACKLIGHT_CONTROL=/sys/class/backlight/rpi_backlight/brightness
BACKLIGHT_TIMEOUT=30
IMAGE_FOLDER_PATH=resources/images/
# The file that will read from and written to
# for keeping track of which zone to load on startup
# If the file does not exist, it will be created automatically
CURRENT_ZONE_FILE=/usr/src/app/current_zone.sonos
Hmm, it should be getting your touchscreen input. Maybe try restarting your pi?
Also, if you run cat /dev/input/mouse0
and touch your touchscreen, do you get any output?
With mouse0 i get an output too
Ok, try changing event0 to mouse0 in docker-compose.yml and .env and see if that changes anything.
Sadly still doesnt work
Hmmm...that stinks. I'm not sure what the issue is unfortunately. There's a couple other things you could try, but I'll have to get back to you later.
Ok. Thank you anyways
Sooo any idea? I know i seem really impatient and im sorry for that. Im really grateful for your support and what you do.
It's tough because I don't have the same touchscreen, so it's hard to diagnose.
Take a look at this thread for some ideas: https://www.raspberrypi.org/forums/viewtopic.php?t=136411
So just to confirm, when you run docker-compose up and touch your screen (i'm assuming you have tried touching everywhere) you get no feedback whatsoever?
You can try editing ui/__init__.py
and commenting out the following line. This will show the mouse cursor so that when you touch the screen, hopefully you can more easily tell if the mouse is moving at all.
# pygame.mouse.set_visible(False)
sonos-pi-controller | selected device is not a touchscreen I understand sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 36551) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 36552) sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 36857) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | ---------------------------------------- sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 37103) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 37118) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | ---------------------------------------- sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | ---------------------------------------- sonos-pi-controller | Exception happened during processing of request from ('192.168.1.130', 41317) sonos-pi-controller | Traceback (most recent call last): sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread sonos-pi-controller | self.finish_request(request, client_address) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request sonos-pi-controller | self.RequestHandlerClass(request, client_address, self) sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 654, in init sonos-pi-controller | self.finish() sonos-pi-controller | File "/usr/lib/python2.7/SocketServer.py", line 713, in finish sonos-pi-controller | self.wfile.close() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 283, in close sonos-pi-controller | self.flush() sonos-pi-controller | File "/usr/lib/python2.7/socket.py", line 307, in flush sonos-pi-controller | self._sock.sendall(view[write_offset:write_offset+buffer_size]) sonos-pi-controller | ---------------------------------------- sonos-pi-controller | error: [Errno 32] Broken pipe sonos-pi-controller | selected device is not a touchscreen I understand
Especially the last line seems interesting
You probably need to change your docker-compose and .env back to using event0 instead of mouse0
And just to be sure, you can run this and get perfect results?
sudo TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate
Also, try adding the following to your .env file:
TSLIB_CALIBFILE=/etc/pointercal
TSLIB_CONFFILE=/etc/ts.conf
Sadly still not working. Do i need to build it again or nah?
Oh and the mouse stays up in the top left corner
You can run docker-compose down
to stop the container.
Thank you. So calibration works. And what do you mean with perfect results? I get this: xres = 800, yres = 480 Took 1 samples... Top left : X = 54 Y = 62 Took 1 samples... Top right : X = 756 Y = 57 Took 1 samples... Bot right : X = 750 Y = 431 Took 1 samples... Bot left : X = 53 Y = 431 Took 1 samples... Center : X = 412 Y = 244 -7.583069 1.000611 0.009533 -12.093567 0.003686 1.022860 Calibration constants: -496964 65576 624 -792564 241 67034 65536
seems good to me
Yeah looks good.
For some reason either docker is not able to receive the touchscreen input or it is and pygame is not recognizing the input.
I’m out of ideas at the moment.
ok
Nothing with the config.txt though?
I get this error when running docker-compose up -d
`pi@raspberrypi:~ $ docker-compose up -d Starting sonos-pi-controller ... error
ERROR: for sonos-pi-controller Cannot start service app: OCI runtime create fai led: container_linux.go:348: starting container process caused "process_linux.go :402: container init caused \"rootfs_linux.go:58: mounting \\"/etc/ts.conf\\" to rootfs \\"/var/lib/docker/overlay2/1c6b8b948ca2300c9d575e17588ffa968b668911b 7d4a0f1d5ab5ece5dafb1b1/merged\\" at \\"/var/lib/docker/overlay2/1c6b8b948ca23 00c9d575e17588ffa968b668911b7d4a0f1d5ab5ece5dafb1b1/merged/etc/ts.conf\\" cause d \\"not a directory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expec ted type
ERROR: for app Cannot start service app: OCI runtime create failed: container_l inux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\"/etc/ts.conf\\" to rootfs \\"/v ar/lib/docker/overlay2/1c6b8b948ca2300c9d575e17588ffa968b668911b7d4a0f1d5ab5ece5 dafb1b1/merged\\" at \\"/var/lib/docker/overlay2/1c6b8b948ca2300c9d575e17588ff a968b668911b7d4a0f1d5ab5ece5dafb1b1/merged/etc/ts.conf\\" caused \\"not a dire ctory\\"\"": unknown: Are you trying to mount a directory onto a file (or vice- versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.`