Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide LCD/OLED display using pydPiper
First post but before I get to the point I would just like to thank Tim and the team for all their work on Moode. I also think its worth me saying thanks to everyone on the forum for asking and answering the many questions us noobs ask, if it wasn't for the likes of members such as TheOldPresbyope, Drone7, TookaFace, adrii, Remy1961 and vinnn I wouldn't have made any progress on this journey. Although I havn't asked anything on the forums I can assure you that you have already answered and helped me indirectly by helping all the previous users with their issues (which I have poored over and learned so much from) and I think it was worth me writing these words just to remind you all, those mentioned and others not, that its appreciated.

Now a small contribution from me that hopefully might help someone else in the future. This is for the people using OLED's who are worried about long term screen burn. Please bear in mind that I am totally new to the raspberry pi, python and coding so I am pretty sure there may be other (possibly better) ways to achieve this, however it works so...


After playing around I realised that I like having the large clock display when Moode is stopped/paused but also in the long term that it will give screen burn, so I needed the clock to show for say 10mins then if no activity have the screen clear. After playing with the code I could get it functioning as I wished apart from pydPiper doesn't reset the timer after each state change, so after the clock being shown it would just blank the screen every subsequent time moode was paused without showing the clock first. Solving that was beyound me so I reached out to pydPiper's creator Dhrone and he kindly supplied a very simple code addition.

In displays/display.py add at line 1253
Code:
        self.end = 0

You'll also have to make a couple of additions/changes in the pages.py file that you use for the display.One is to create the blank canvas and the other is to call it in the correct sequence. In my case because I am using a SH1106 2.42' oled I edited 'pages_ssd1306.py'

First I created a new canvas
Code:
        'display_off': { 'widgets': [  ], 'size':(128,64) },

Then I called it during the 'seqStop' sequence.
Code:
        {
                'name': 'seqStop',
                'canvases': [
                        { 'name':'stoptimetemp_popup', 'duration':9999, 'conditional':"not db['outside_conditions']=='No data'" },
                        { 'name':'stoptime', 'duration':600, 'conditional':"db['outside_conditions']=='No data'" },
                        { 'name':'display_off', 'duration':9999, 'conditional':"db['outside_conditions']=='No data'" },
                ],
                'conditional': "db['state']=='stop' or db['state']=='pause'"
        },

The 'stoptime' 'duration' figure of 600 is what displays the clock, in my case for 600secs (10mins) then if there is no state change from moode the screen is blanked for 9999 secs (set in the display off call) or until a state change is detected. Obviously both these figures can be edited to suit your needs. Note, if you are using the weather screen instead of the clock then you would edit the 'stoptimetemp_popup' duration figure. Everything else would be the same.

As I said this is nothing exciting but it has solved an issue for me me and if I can manage as a complete noob to do these edits then I am hopefull it might help someone else.
Reply


Messages In This Thread
LCD/OLED display using pydPiper - by remy1961 - 09-06-2018, 07:17 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 09-06-2018, 07:32 PM
RE: LCD/OLED display using pydPiper - by spiza - 12-19-2018, 11:22 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-07-2018, 03:04 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 09-10-2018, 08:12 AM
RE: LCD/OLED display using pydPiper - by spiza - 12-19-2018, 11:23 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-10-2018, 08:52 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 09-11-2018, 12:57 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-11-2018, 02:16 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 09-11-2018, 02:49 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-11-2018, 02:58 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 09-11-2018, 07:41 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-11-2018, 08:37 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-07-2018, 04:07 AM
RE: LCD/OLED display using pydPiper - by superpat - 11-09-2018, 10:25 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-09-2018, 11:25 AM
RE: LCD/OLED display using pydPiper - by superpat - 11-09-2018, 11:59 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-09-2018, 12:04 PM
RE: LCD/OLED display using pydPiper - by JST1963 - 11-10-2018, 02:11 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-10-2018, 07:02 PM
RE: LCD/OLED display using pydPiper - by JST1963 - 11-10-2018, 09:25 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-13-2018, 09:09 AM
RE: LCD/OLED display using pydPiper - by JST1963 - 11-13-2018, 06:56 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-19-2018, 03:32 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-17-2018, 11:57 AM
RE: LCD/OLED display using pydPiper - by muchacho - 11-27-2018, 08:07 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 11-28-2018, 04:51 AM
RE: LCD/OLED display using pydPiper - by maTzGP - 11-30-2018, 11:14 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-01-2018, 05:56 PM
RE: LCD/OLED display using pydPiper - by muchacho - 12-17-2018, 06:10 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 12-01-2018, 01:31 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-01-2018, 05:42 PM
RE: LCD/OLED display using pydPiper - by rh2018 - 12-01-2018, 09:31 PM
RE: LCD/OLED display using pydPiper - by maTzGP - 12-01-2018, 07:20 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-01-2018, 10:34 PM
RE: LCD/OLED display using pydPiper - by maTzGP - 12-05-2018, 08:20 PM
RE: LCD/OLED display using pydPiper - by maTzGP - 12-06-2018, 06:43 AM
RE: LCD/OLED display using pydPiper - by gropas - 06-07-2021, 06:27 PM
RE: LCD/OLED display using pydPiper - by dwhacks - 12-08-2018, 03:49 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-08-2018, 08:36 PM
RE: LCD/OLED display using pydPiper - by flega - 12-12-2018, 10:09 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-13-2018, 04:34 PM
RE: LCD/OLED display using pydPiper - by flega - 12-12-2018, 11:21 PM
RE: LCD/OLED display using pydPiper - by flega - 12-13-2018, 06:19 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-15-2018, 09:06 PM
RE: LCD/OLED display using pydPiper - by nassost - 12-15-2018, 12:05 PM
RE: LCD/OLED display using pydPiper - by Cardone - 12-15-2018, 01:54 PM
RE: LCD/OLED display using pydPiper - by flega - 12-16-2018, 04:19 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-16-2018, 09:14 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-20-2018, 04:32 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 12-26-2018, 03:42 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 12-26-2018, 06:40 PM
RE: LCD/OLED display using pydPiper - by nassost - 12-26-2018, 01:09 PM
RE: LCD/OLED display using pydPiper - by flega - 02-12-2019, 06:55 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 02-12-2019, 09:40 PM
RE: LCD/OLED display using pydPiper - by flega - 02-16-2019, 07:35 PM
RE: LCD/OLED display using pydPiper - by nowy1 - 03-06-2019, 06:01 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 03-06-2019, 07:30 AM
RE: LCD/OLED display using pydPiper - by nowy1 - 03-06-2019, 11:51 AM
RE: LCD/OLED display using pydPiper - by remy1961 - 03-06-2019, 08:48 PM
RE: LCD/OLED display using pydPiper - by nowy1 - 03-07-2019, 05:53 AM
RE: LCD/OLED display using pydPiper - by cyoops - 03-27-2019, 04:05 PM
RE: LCD/OLED display using pydPiper - by Titi2507 - 04-13-2019, 04:17 PM
RE: LCD/OLED display using pydPiper - by Titi2507 - 04-14-2019, 04:26 PM
RE: LCD/OLED display using pydPiper - by JST1963 - 05-08-2019, 07:52 PM
RE: LCD/OLED display using pydPiper - by Titi2507 - 05-17-2019, 03:16 PM
RE: LCD/OLED display using pydPiper - by Jempie - 05-21-2019, 05:21 PM
RE: LCD/OLED display using pydPiper - by brunal - 05-21-2019, 09:55 PM
RE: LCD/OLED display using pydPiper - by brunal - 05-24-2019, 09:48 AM
RE: LCD/OLED display using pydPiper - by Jempie - 05-30-2019, 06:10 PM
RE: LCD/OLED display using pydPiper - by remy1961 - 05-31-2019, 02:08 AM
RE: LCD/OLED display using pydPiper - by bertron - 08-27-2019, 09:27 AM
RE: LCD/OLED display using pydPiper - by bertron - 08-30-2019, 07:02 PM
RE: LCD/OLED display using pydPiper - by mezcal - 08-30-2019, 10:57 PM
RE: LCD/OLED display using pydPiper - by bertron - 08-31-2019, 08:13 AM
RE: LCD/OLED display using pydPiper - by mezcal - 09-05-2019, 01:30 PM
RE: LCD/OLED display using pydPiper - by ghera78 - 02-27-2020, 06:51 AM
RE: LCD/OLED display using pydPiper - by muchacho - 05-18-2020, 02:41 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 06-08-2020, 09:47 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 06-08-2020, 08:35 AM
RE: LCD/OLED display using pydPiper - by rh2018 - 06-09-2020, 01:05 PM
RE: LCD/OLED display using pydPiper - by Steve B - 09-15-2020, 04:19 PM
RE: LCD/OLED display using pydPiper - by Alaini93 - 10-05-2020, 11:12 PM
RE: LCD/OLED display using pydPiper - by Steve B - 10-06-2020, 09:31 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 10-06-2020, 02:13 PM
RE: LCD/OLED display using pydPiper - by fklco - 01-04-2021, 11:24 AM
RE: LCD/OLED display using pydPiper - by bigbulb - 01-31-2021, 12:54 PM
RE: LCD/OLED display using pydPiper - by bigbulb - 02-01-2021, 02:04 AM
RE: LCD/OLED display using pydPiper - by leobo - 03-21-2021, 07:41 PM
RE: LCD/OLED display using pydPiper - by KmPan - 03-28-2021, 04:56 AM
RE: LCD/OLED display using pydPiper - by Jempie - 06-29-2021, 01:01 PM
RE: LCD/OLED display using pydPiper - by Jempie - 06-30-2021, 06:45 AM
RE: LCD/OLED display using pydPiper - by DRONE7 - 06-30-2021, 08:13 AM
RE: LCD/OLED display using pydPiper - by Jempie - 06-30-2021, 10:40 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 06-30-2021, 12:29 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-03-2021, 06:27 AM
RE: LCD/OLED display using pydPiper - by Jempie - 07-04-2021, 09:53 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-04-2021, 05:32 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-06-2021, 09:52 AM
RE: LCD/OLED display using pydPiper - by Jempie - 07-06-2021, 09:54 AM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-06-2021, 03:47 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-06-2021, 04:08 PM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-06-2021, 06:08 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-11-2021, 07:57 PM
RE: LCD/OLED display using pydPiper - by Alaini93 - 07-11-2021, 10:07 PM
RE: LCD/OLED display using pydPiper - by Jempie - 07-20-2021, 09:22 AM
RE: LCD/OLED display using pydPiper - by Jempie - 08-07-2021, 09:49 AM
RE: LCD/OLED display using pydPiper - by Jempie - 09-17-2021, 07:54 AM
RE: LCD/OLED display using pydPiper - by Jempie - 09-18-2021, 08:04 AM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-22-2021, 10:14 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-22-2021, 10:41 PM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-23-2021, 02:43 PM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-23-2021, 02:57 PM
RE: LCD/OLED display using pydPiper - by DRONE7 - 09-23-2021, 07:26 PM
RE: LCD/OLED display using pydPiper - by Wallyboy - 09-23-2021, 09:27 PM
RE: LCD/OLED display using pydPiper - by Battum - 11-03-2021, 10:50 AM
RE: LCD/OLED display using pydPiper - by Battum - 11-04-2021, 11:12 AM
RE: LCD/OLED display using pydPiper - by uli_s - 11-06-2021, 07:55 PM
RE: LCD/OLED display using pydPiper - by Pranjal - 04-27-2022, 07:05 AM
RE: LCD/OLED display using pydPiper - by Pranjal - 05-24-2022, 04:04 AM
RE: LCD/OLED display using pydPiper - by leobo - 01-10-2022, 10:37 AM
LCD/OLED display using pydPiper - by winnor - 01-19-2022, 09:04 PM
RE: LCD/OLED display using pydPiper - by leobo - 01-26-2022, 05:48 AM
RE: LCD/OLED display using pydPiper - by lhkp0480 - 02-15-2022, 05:00 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-15-2023, 12:05 PM
RE: LCD/OLED display using pydPiper - by KmPan - 01-22-2023, 08:19 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-24-2023, 08:19 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-24-2023, 08:26 AM
RE: LCD/OLED display using pydPiper - by KmPan - 01-24-2023, 06:18 PM
RE: LCD/OLED display using pydPiper - by hcanning - 03-13-2024, 10:16 PM
RE: LCD/OLED display using pydPiper - by hcanning - 03-14-2024, 02:20 PM
RE: LCD/OLED display using pydPiper - by hcanning - 03-14-2024, 04:44 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 05-21-2024, 08:07 AM
RE: LCD/OLED display using pydPiper - by Dorffen - 05-26-2024, 07:13 PM
RE: LCD/OLED display using pydPiper - by ECELO - 05-27-2024, 06:14 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 05-27-2024, 06:59 PM
RE: LCD/OLED display using pydPiper - by vgnmnky - 06-25-2024, 07:02 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 06-27-2024, 07:10 PM
RE: LCD/OLED display using pydPiper - by vgnmnky - 06-27-2024, 08:13 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 06-27-2024, 08:22 PM
RE: LCD/OLED display using pydPiper - by Dorffen - 06-27-2024, 08:51 PM

Forum Jump: