mikegawi / epiframe Goto Github PK
View Code? Open in Web Editor NEWePiframe is an e-Paper (or HDMI, Composite display) Raspberry Pi Photo Frame with Google Photos and more
License: GNU General Public License v3.0
ePiframe is an e-Paper (or HDMI, Composite display) Raspberry Pi Photo Frame with Google Photos and more
License: GNU General Public License v3.0
White, empty space at the bottom of WebUI logs visible on big screens.
Is it possible to configure ePiframe for use with an HDMI ePaper screen? I am specifically interested in the 13.3" waveshare screen. I have two pi zero w boards without headers and the hdmi interface would make a very thin and clean setup.
Gray WebUI frame size over displayed and original photo is too big and should fit photo size
Add web interface based on Flask for configuration, control and photos upload.
Show next update time, status, service status, machine state, upload/change photos, show current original and converted photo, check logs, control system and change configuration. Port specified, dynamically changing content, mobile friendly, etc.
It is possible to manually convert photo to the version accepted by ePiframe. This function is also used when uploading photo from Telegram Bot. In every case the weather stamp is not added to the final photo even if it's enabled in the configuration.
As ePiframe has weatherstamp displayed taken from OpenWeather API, it would be great to have a small tool to troubleshoot API key features and communication.
Add configuration file backward compatibility so that old config.cfg file can be used in the newer ePiframe version and all non-existing values are set to defaults during configuration load.
When the photo height is a lot smaller than its width then the conversion with photo background crops the image.
User koeljong informed me on MakerBot Thingiverse that ePiframe is not working with Google Python API version > 2. Thanks for the hint, koeljong. For now the only solution is to downgrade to 1.12.5 (sometimes it's better to uninstall first with sudo -H pip3 uninstall google-api-python-client
) by:
sudo -H pip3 install -I --upgrade google-api-python-client==1.12.5 google-auth-httplib2==0.0.4 google-auth-oauthlib==0.4.2
Instructions and scripts will be updated in the next release. You can check the current version of the PIP packages with: pip3 show google-api-python-client
In the future I will do a more proper solution and adapt the code to the newest API version.
Add Telegram bot service to perform some basic activities:
Best choice is to use pyTelegramBotAPI to achieve that.
Telegram bot should be optional and inside ePiframe Service, running as a separate thread independently from ePiframe main functionalities.
Statisctics stopped updating after 1.0.0 rc ePiframe update
Right now the datetimes in config, WebUI and logs are in different formats. Format should be configured, get from locale or unified.
As I'm basing frame update on the photo update interval, frame is not refreshing exactly on configured wake time. It would be better to check time every minute during the sleep period and do not show this information every time in logs to not pollute its content, i.e. show the sleep information every 10 minutes.
I have just completed 3 separate installations of ePiframe. Each system is identical and includes a raspberry pi zero w rev 1.1 with the 7.5" waveshare epaper screen. The automatic installation script operated normally, however each one had an error at a different steps - all with installing python modules via pip3. In each case, the module was installed manually, then the automatic script rerun. All completed without errors on the rerun of the install script.
Once the installation was completed, an addition error occurred and is the same on all three systems. When attempting to run ./ePiframe.py with any argument returns "Illegal instruction"
I wrote a script with only the imports from ePiframe.py and commented each out one by one to determine the issue. The modules that create this error are: configmanager, albummanager, randommanager, photomanager and filteringmanager
I believe that this is likely an architecture mismatch with one of the modules that is being installed via pip. Can you provide a list of versions of each module from a working system?
A similar issue occurred during an initial installation - the current version of raspbian was installed, but the automatic installation script and the manual method failed because several of the required packages are not available for the latest version of raspbian. I installed the legacy version of raspbian and the installations completed successfully.
Hi, first I want to thank you for this great project :) I modified it a bit and now use it with a waveshare 5.65 inch 7 color eink display.
What I miss is the possibility to use local files. This would be a great addition, because with a local mode and rclone (https://rclone.org/), nearly every cloud storage could be used with ePiframe ๐ฏ
What do you think? Would it be possible for you to implement this?
ePiframe should be able to convert GIF files (only the 1st frame) with --test-convert option but it returns an exception.
./ePiframe.py --test-convert file.gif
Add option Dark Mode to WebUI.
All Numerical Settings in WebUI accept strings and don't have limit values (i.e. min and max). The limits are shown when trying to save the value. As Flask and Bootstrap are under the hood - that should be improved.
I was always jealous about the graphs in RPi-Monitor by @XavierBerger - a brilliant tool for monitoring RasPi, very popular and nicely performing on one of my RPi Zero.
Imitation is, of course, the highest form of flattery so I've looked in the code (yay for the Open Source!) and noticed that RRDtool, javascriptRRD and Flot are used. Maybe it would be good to embed this in ePiframe to have it under one tool?
RRD (Round Robin Table) for time series is a genius creation of Tobias Oetiker: easy, embedded (DB in a file), fixed size, etc. Of course I could use InfluxDB but I was terryfied with the client-server architecture on RPi Zero, maintaing external services, etc. There are other good embedded time series databases but I want to give RRD a try.
The goal:
Add ePiframe device statistics to WebUI: gather information, display it as a graph, pick a time window, check values, zoom, etc. I'm thinking of loads, memory and temperature.
Backend module should always keep an eye on the config.cfg file (timestamp) and reload it if changed (e.g. manually in the OS) so the rest of the components and modules will have the newest version).
It would be great to have a possibility to secure WebUI with username + password. Multiple usernames possible, added to a DB (SQLite) from the command line with possibility to add, delete users, change password, etc. If no users are in DB (default) then no authentication to WebUI is needed. Log out function added to WebUI should be visible only if user has been authenticated and nice Log In window that blocks entering to any site. NO PASSWORDS STORED IN THE DATABASE!
There is a small bug when using 'photo background', that some square format photos have white borders on sides. This is because the background photo size is not hardcoded and is calculated - some values can produce errors in this part.
In one of the conversion patterns there is a small contrast enhancement hardcoded. Why not have this set up as a setting that everyone can control? And other enhancements as well - brightness, level control, etc. to improve and control how photos are displayed on ePiframe.
I think I'm getting better how the ImageMagick conversion works after all these months watching it refreshing my frames and I've noticed that this knowledge can help significantly speed up the photo conversion which is currently the most resources demanding process of whole ePiframe refresh mechanism. My findings:
With these observations I can find some optimizations for the conversion code.
As ePiframe has Telegram bot functionality to control the frame from Telegram, it would be great to have a small tool to troubleshoot bot token, check messages, get chat ids for the configuration, etc.
Allow controlling ePiframe from a simple API attached to WebUI module in Flask. Authentication with API key (from users DB) possible or with authentication header (basic encoding). Old users will get API key automatically. Database needs to be reorganized and backward compatible.
The WebUI settings combo selection size on mobile devices is too small, cuts options text and makes options unreadable.
During install/update installation script is overwritten and may fail when changed. Wow, stupid me...
ePiframe --test-convert option can't handle space in the converted file filename, ie. ./ePiframe.py --test-convert 'name with spaces.jpg'
- gives an error
Add possibility to export and import all ePiframe settings in WebUI with validation, error handling etc.
The GetToken tool that is used for getting the token pickle file here and is helping with Google Account authentication ignores data input. Anything written in the input dialogs has no impact on the script run as values are always defaults.
You can specify temperature units for weather but core temperature is shown in WebUI, Telegram Bot and Statistics gather it for graphs and always in Celcius. The setting is affecting only weather units and should do that globally.
When Wifi goes down sometimes Telegram Bot or Web UI is not reconnecting and ePiframe needs to be restarted. That is probably because of not handled or not properly handled exception.
Add possibility to update ePiframe version automatically with the installation script. Configuration backward compatibility needed (#8)
When running install/upgrade script it happens that during PIPs installation the connection timeout error shows up even though there's nothing wrong wite the connection. Probably due to too many calls at once.
Service deamon is surpressing all output and errors by default, even configuration/access errors, etc. There should be a disable option for troubleshooting.
I've heard some rumours that ePiframe activation for Google Photos is hard, problematic and not up-to-date. The problem is that due to security requirements activation can be done only on localhost (or public domain) also that steps needed on Google Cloud Console are poorly described and why ePiframe can't be the activation platform?! (Not that I'm saying that there were some changes on API too)
Well, it can.
After hours of research I've found a very nice workaround to localhost and public domain security requirements. You can receive an access code that can be displayed anywhere and used to get the access token.
I'm thinking about a script that will have two functionalities:
Weather stamp (optional) - subtly showing current weather icon and temperature in defined display corner, size and color. Taken from free API of OpenWeather according to Maps.ie coordinates.
According to OpenWeather up to 60 API calls/minute is free.
ePiframe installer should install specific PIP versions as for older packages ePiframe can fail (e.g. wtforms have different modules structure starting version 3.0). Minimal and optimal values should be added.
I've noticed that WebUI log refresh rate is too small and causes freezing during high loads. It is set on 1 sec and when log is huge that can cause a lot of IO operations and freeze OS a bit.
Weather stamp positions that are set in configuration 2 (right bottom) and 3 (left bottom) give switched results.
As Waveshare libraries change a lot, the ePiframe code is no longer compatible with them. Some methods have been removed ( Dev_exit
) other changed their name. Need to fix this integrity.
As ePiframe has WebUI functionality to control the frame from web interface, it would be great to have a small tool to troubleshoot port issues, IP, access firewall troubleshooting, etc.
On three RPi Zeros (model W, version 1.1) I've tested, one was rebooting automatically after sleep hours of ePiframe. It happened only on Zero version and all were bought in the same shop, same model, used same SD card with the same OS, used same PSU, cable and display. I've spent month on this trying everything (check below) and almost went nuts as nothing helped.
Luckily ePiframe doesn't care about reboots as it is controlled by system-level service that will run frame whenever it is needed and will start just after boot - that device works great as ePiframe and user is not complaing, but yet that problem haunted me.
Unfortunately I had to give the device away and can't test the reason anymore but I thought it would be fair to mention this here.
Usually when Pi keeps rebooting this is A HARDWARE PROBLEM:
vgencmd get_throttled
;The things I checked:
not mentioning hardware and system configuration changes (ZRAM, less RAM for GPU, unistalling everything what was not needed, different SD cards and power units and cables and more and MORE AND MORE), ... that issue was a true pain in the back for me.
I'm open for new hints to fix this permanently so if someone has issue like that (and none of my ideas work) please describe it here, give OS details and let me know how I can help. Or maybe someone had symptoms like that and know how to fix them?
ePiframe can sort photos by creation date in an descending order but it doesn't do anything with the photo list when descending sort is disabled. It just rely on the sorting provided by Google Photos but what if it's wrong?
As I am currently in the middle of a huge code refactorization, I've noticed that WebUI manager shares some global variables (__form
and __current
) that are not thread safe. I've never noticed anything wrong with the Website concurrency but still that needs to be fixed. Problem is probably a leftover from the design phase or just my stupidity...
As pyTelegramBotAPI documentation says:
While the API is production-ready, it is still under development and it has regular updates, do not forget to update it regularly by calling pip install pytelegrambotapi --upgrade
ePiframe should upgrade pyTelegramBotAPI during the update.
Sometimes the wrong original photo (not the thumbnail) is shown in WebUI or sent from Telegram Bot. The last one is taken by the file timestamp.
Weather information module (weather stamp manager) during his work is converting the photo to black and white even if the HDMI display is used. The conversion should be removed and text should be added according to the photo color mode.
As Bootstrap package had some small modifications its integrity is broken thus the style is not properly loaded into Login window. Integrity should be removed and that should fix the style.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.