Closed b1ane22 closed 2 years ago
The latest Raspberry Pi OS has redone the video driver (in a good way - making it more like garden variety linux systems). But it also deprecated the tvservice program that managed the old video driver and which is used extensively in photoframe.
However I think you can still get this to work...
You can try the following: Install manually, and make sure you install the "lite legacy" version of the OS - this should put in the legacy video driver. I've just finished up another commit to the V2 frame, and if @mrworf accepts it, then you can use the instructions for the "Python3" branch. If you can't wait, (and if you are willing to try something that may still have bugs) you can follow the instructions in the readme at my working branch: https://github.com/dadr/photoframe/tree/python3
The one difference is in the line that clones the repo to the Raspberry pi, to test use this line instead:
git clone --branch python3 --single-branch https://github.com/dadr/photoframe.git
it changes mrworf
to dadr
- and for fair warning, you will probably have to install manually again, once this is all ready for production. However, I'd love to hear your comments and inputs on the new version - especially about any bugs.
I'll try to install on Bullseye as well, and see how that works. But that will be more than a week from now, I have to go to my brother-in-law's funeral. (Covid)
By the way, I made a photoframe with a Pi 3A which has similar cores and memory, and from that system I think that the Zero 2W will be a great platform for this.
Thank you! I was trying to install all the packages with python3 using Bullseye build but was just getting stuck.
I just got done installing the branch version and it seems to be working with the web interface, however I can't upload any new display drivers. When I upload through the web portal it says "Upload complete, refreshing drivers" but they're not selectable via the dropdown. Now, on the pi I do see the zip files in /photoframe/display-drivers
but don't see them in /photoframe_config/display-drivers
.
Thanks b1ane22, that might be a bug. I don't have any systems that use the display drivers, so I have not tested those. Perhaps @mrworf can give it a try?
It's been a while since I tinkered with that. Can you share logs from this? There should be a bunch of logs to help us with this.
Absolutely! I am trying to complete another 7" and 5" LCD photoframe for myself and the fiancés' family. The first one I built, I did with just the Zero W and worked perfectly! I see it's trying to extract the zipfile but failing for some reason. I downloaded the sample ones from the \photoframe\display-drivers
and also tried re-making them manually using the readme file. All failed so far. Here are the log files.
photoframe log.txt
stacktrace.txt
sys log.txt
Hmm... could you be missing unzip
? See if /usr/bin/unzip
exists and works
sudo apt install unzip
should be the ticket to solve that if that's the case
/usr/bin/unzip
did exist. Once I was in /photoframe/display-drivers
I was able to unzip the files and they're now showing via dropdown on the webpage but once selected doesn't reboot like my working one.
Did not mean to close it. Here's the new logs photoframe log 1.txt .
what zip file did you upload to the photoframe? Seems like the manifest.json
file is missing?
I tried all of them from here https://github.com/mrworf/photoframe/tree/master/display-drivers
Looking at the code, this file is generated (sorry, it's been a while :)). We need to find out why it can't unzip since there's more to this flow than just unzipping.
If you feel comfortable editing the files, here's what I propose you do for the modules/drivers.py
On line 145, which says
result = subprocess.check_call(['/usr/bin/unzip', file, '-d', os.path.join(folder, extra)], stdout=self.void, stderr=self.void)
change this to
logging.info('path: "%s"', os.path.join(folder, extra))
result = subprocess.check_call(['/usr/bin/unzip', file, '-d', os.path.join(folder, extra)])
This should capture the output from the command in syslog and with logging.info we'll know what folder it was trying to unzip to.
Please note that this hasn't been tested, since I'm not at my desktop at the moment, but I believe this will give us the details we need to know what's going on here.
Okay, so I was able to change the code and I removed all files from /photoframe/display-drivers
and /photoframe_config/display-drivers
so we can start fresh. Then I tried uploading the waveshare7
driver and the waveshare35a
driver. Now, it actually shows in the dropdown but when I select it, nothing happens. Here are the logs:
photoframe log 2.txt
sys log 2.txt
I fixed it!
In the drivers.py
code, line 265 needs to be updated from with open('/boot/config.txt.new', 'wb') as f:
to with open('/boot/config.txt.new', 'w') as f:
I found it in the syslog:
Jan 17 23:46:18 raspberrypi photoframe[467]: File "/root/photoframe/modules/drivers.py", line 269, in activate
Jan 17 23:46:18 raspberrypi photoframe[467]: f.write('%s\n' % line)
Jan 17 23:46:18 raspberrypi photoframe[467]: TypeError: a bytes-like object is required, not 'str'
Found this link and was able to update and test! I have the 7" LCD finally working as it should!
https://stackoverflow.com/questions/33054527/typeerror-a-bytes-like-object-is-required-not-str-when-writing-to-a-file-in
Trying to boot the pre-built image on the Zero 2 W and does not work. Won’t even boot. I know that the 2W requires the latest OS release, which does work with a new Raspbian image. Will I have to install photoframe manually?