project-owner / Peppy

Peppy Player Repository
GNU General Public License v3.0
72 stars 14 forks source link

Changing clock text size results in no clock being displayed #15

Closed ftarz closed 2 years ago

ftarz commented 2 years ago

I'm using the latest renoir-official.7.0.zip release for a RPI 4 with the official 7inch touch screen.

By default the clock text size is set to 35%. If I try to change the size to something larger like 50% or 75%, the screen just goes blank (just black) when the screensaver starts or I select on the clock display. If I wake it from the screesaver the screen shows-up fine.

If I change the clock text size back to 35%, the screen still stays blank when the screensvaer starts or I display the clock. Interestingly the time will show on the webUI at port 8000 but not on the physical screen.

The only way I can get the clock to show-up for the screenwaver is a fresh install.

I'd like to help resolve this issue if possible. How can I help?

ftarz

project-owner commented 2 years ago

Hi ftarz,

I couldn't reproduce the Clock screensaver issue with renoir-official.7.0.zip, RPI 4 and Official Touchscreen. I tried size 50%, 75% and it worked as expected. Did you change any other setting after the disk image installation? Did you observe any other issue?

Best regards

ftarz commented 2 years ago

Sorry for the late reply, I finally got back to my Pi.

I wiped the SD card and installed the latest version of renoir-official.7.0.zip that I could find. I made sure not to do anything like sudo apt update or upgrade. And everything worked fine. Installed an Adafruit I2S Audio Bonnet into the Pi and used the manual instructions from here: https://learn.adafruit.com/adafruit-i2s-audio-bonnet-for-raspberry-pi/raspberry-pi-usage and everything is working fine.

I've got one question. If I select the weather screens for the screensaver they don't appear to update over time. The weather information is grabbed once when first displayed and doesn't change over time. Also the time displayed on the weather screensaver isn't updated.

Is there a way to fix this?

Frank

On Tue, Nov 16, 2021 at 2:55 AM project-owner @.***> wrote:

Hi ftarz,

I couldn't reproduce the Clock screensaver issue with renoir-official.7.0.zip, RPI 4 and Official Touchscreen. I tried size 50%, 75% and it worked as expected. Did you change any other setting after the disk image installation? Did you observe any other issue?

Best regards

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/project-owner/Peppy/issues/15#issuecomment-969973538, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWQMKVVGTW7ZMACX4MY63FLUMIFANANCNFSM5IDF7FOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

project-owner commented 2 years ago

Hi Frank,

Good to know that it works now. Regarding the Weather Screensaver updates, it's updated at 10 minutes intervals. The reason is that the weather service used by the screensaver (OpenWeatherMap) allows only limited number of requests per day. To avoid blocking the player account in that service the number of requests should be reduced.

Also a weather actually doesn't change that often. Even if the player would update it every minute you would see the same data at least for one hour. That's how often the weather service itself updates the weather. The time when player fetched the weather is displayed at the top right corner. So this is not the current time but the time when the player updated the weather data. It's explained here: https://github.com/project-owner/Peppy.doc/wiki/Weather

Best regards

ftarz commented 2 years ago

Ok, thanks for the information. But I noticed that the weather information or the time displayed on the weather screensaver never updated over more than 2 days. Interestingly, the displayed screensaver information seems to survive a reboot, it's in a cache and never updated.

I signed up for a OWM API key. Can you point me towards the location where it's stored? I'm looking but haven't found it yet.

Frank

On Fri, Nov 19, 2021, 20:19 project-owner @.***> wrote:

Hi Frank,

Good to know that it works now. Regarding the Weather Screensaver updates, it's updated at 10 minutes intervals. The reason is that the weather service used by the screensaver (OpenWeatherMap) allows only limited number of requests per day. To avoid blocking the player account in that service the number of requests should be reduced.

Also a weather actually doesn't change that often. Even if the player would update it every minute you would see the same data at least for one hour. That's how often the weather service itself updates the weather. And the time when it does that is diplayed at the top right corner. So this is not the current time but the time when the weather service updated the weather data. It's explained here: https://github.com/project-owner/Peppy.doc/wiki/Weather

Best regards

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/project-owner/Peppy/issues/15#issuecomment-974566986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWQMKVWPYG4Y72LHJR63RM3UM3ZTXANCNFSM5IDF7FOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

project-owner commented 2 years ago

The player doesn't cache the weather data. Are you sure that weather changed during those 2 days? You can get the data from OWM and compare with the data in player. The weather data will be changed only when you exit/enter the screensaver.

It's not recommended to distribute the keys in a plain text format. So they are minimally encoded in the player. You can define your key on this line: https://github.com/project-owner/Peppy/blob/5a78420ffbb0d0fe03353f88830b2baa8b54254b/util/util.py#L1346 like this (put your key instead of YOUR_KEY):

self.k3 = "YOUR_KEY"

Best regards

ftarz commented 2 years ago

Thanks for your help. I've got everything working except for the weather updating while the screensaver is showing. In the log I can see a call to OWM when the screensaver first starts, but there's never another call unless I stop and restart the screensaver. I let the player run all weekend long and greped openweathermap in the peppy.log file. It only shows-up when the screensaver starts. The displayed time value in the weather screensaver never changes either.

Any ideas?

Frank

On Sat, Nov 20, 2021 at 4:54 PM project-owner @.***> wrote:

The player doesn't cache the weather data. Are you sure that weather changed during those 2 days? You can get the data from OWM and compare with the data in player.

It's not recommended to distribute the keys in a plain text format. So they are minimally encoded in the player. You can define your key on this line:

https://github.com/project-owner/Peppy/blob/5a78420ffbb0d0fe03353f88830b2baa8b54254b/util/util.py#L1346 like this (put your key instead of YOUR_KEY):

self.k3 = "YOUR_KEY"

Best regards

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/project-owner/Peppy/issues/15#issuecomment-974716824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWQMKVXITN6PDPGDS4LSYNDUNAKI5ANCNFSM5IDF7FOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

project-owner commented 2 years ago

Frank, it was implemented this way to eliminate the number of requests. If I would do that every minute and there are 1000 users running screensaver at the same time that would cause the issue with player's account in OWM. You are the first one who created your own OWM account for API key. I can try to handle user API key and refresh in the next release which hopefully will happen around Christmas time.

Best regards

project-owner commented 2 years ago

The user-defined API key can be provided in the new version of the player: https://github.com/project-owner/Peppy.doc/wiki/Weather