Toon app: rotating through tiles, automatically

Forum about forum-provided applications on Toon

Moderator: marcelr

Toon app: rotating through tiles, automatically

Postby Toonz » Sat Apr 22, 2017 9:33 am

Hi all,

just before I really need to start packing for the holiday I would like to share my latest proof of concept.
Well, not only a concept, it is working fine but not sure if it is the best solution.
Challenge: rotate tiles on the homescreen to see more than just the 4 tiles of screen 1 in dim state (thanks Marcel for the suggestion)

Solution: I've implemented a timer which rotates through the different existing homescreen pages every 15 seconds in dim state only.
You now can see all those tiles in dim state you have never seen before :-)

Pro's: it is a clean, simple mod to the Homescreen.qml
Con's: if you want to have a tile fixed on screen you will need to add the same tile to all homescreens (like the clock for example)
Alternatively I could look into rotating single tiles but then the question is which tiles to select. Getting a bit more complicated quickly. Happy to hear your views.

If you want to implement this copy the code below to the Homesceen.qml in the apps folder homescreen at the Component.onCompleted (line 488 in my firmware)

Code: Select all
   Component.onCompleted: {
      registry.registerWidgetContainer("prominent", rightPanel);
//screen rotate start
      homescreenrotate.running = true;
//screen rotate end
   }

//screen rotate start

   function rotateHomescreen() {
      if (screenStateController.dimmedColors) {   // only rotate screen in dim state, ignore the last page (usually empty)
         var newpage = currentPage + 1;
         if (newpage >= pagecount - 1)
            newpage = 0;
         widgetNavBar.navigateBtn(newpage);
      }
   }

   Timer {
      id: homescreenrotate
      interval: 15000              //update every 15 sec, change to whatever you like
      triggeredOnStart: false         //can only be run once the page has loaded, not at start
      running: false            //timer will be started in the onCompleted function right above after loading the page
      repeat: true
      onTriggered: rotateHomescreen()
   }

//screen rotate end
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Software: modifications and extensions Toon

Postby Toonz » Sat May 13, 2017 2:08 pm

Toonz wrote:Hi all,

just before I really need to start packing for the holiday I would like to share my latest proof of concept.
Well, not only a concept, it is working fine but not sure if it is the best solution.
Challenge: rotate tiles on the homescreen to see more than just the 4 tiles of screen 1 in dim state (thanks Marcel for the suggestion)

Solution: I've implemented a timer which rotates through the different existing homescreen pages every 15 seconds in dim state only.
You now can see all those tiles in dim state you have never seen before :-)

Pro's: it is a clean, simple mod to the Homescreen.qml
Con's: if you want to have a tile fixed on screen you will need to add the same tile to all homescreens (like the clock for example)
Alternatively I could look into rotating single tiles but then the question is which tiles to select. Getting a bit more complicated quickly. Happy to hear your views.

If you want to implement this copy the code below to the Homesceen.qml in the apps folder homescreen at the Component.onCompleted (line 488 in my firmware)

Code: Select all
   Component.onCompleted: {
      registry.registerWidgetContainer("prominent", rightPanel);
//screen rotate start
      homescreenrotate.running = true;
//screen rotate end
   }

//screen rotate start

   function rotateHomescreen() {
      if (screenStateController.dimmedColors) {   // only rotate screen in dim state, ignore the last page (usually empty)
         var newpage = currentPage + 1;
         if (newpage >= pagecount - 1)
            newpage = 0;
         widgetNavBar.navigateBtn(newpage);
      }
   }

   Timer {
      id: homescreenrotate
      interval: 15000              //update every 15 sec, change to whatever you like
      triggeredOnStart: false         //can only be run once the page has loaded, not at start
      running: false            //timer will be started in the onCompleted function right above after loading the page
      repeat: true
      onTriggered: rotateHomescreen()
   }

//screen rotate end


Hi all,

In addition to the post above I've implemented a simple addon to the homescreen to rotate through all available tiles at a specific tile location on the homescreen at a configurable interval. Before sharing with you I would like to get some input from you guys:
Do you want to rotate through all tiles or a given (selection of) categories (as shown in the 'AddTile' screen) or do you prefer to be able to select a set of individual tiles to be included in the rotation. That selection can be easily implemented in the code, building screens for it is a bit more work.
Secondly, I now rotate the content of a specific tile on the first screen, the code can be easily changed to the tile of your liking. I will look into options to select the rotating tile (e.g. add a second button next to the '+' on an empty tile).

Views?

N.B TerrorSource, good work on DomoticzLight :-)
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Software: modifications and extensions Toon

Postby TerrorSource » Sat May 13, 2017 2:15 pm

Toonz wrote:
Toonz wrote:Hi all,

just before I really need to start packing for the holiday I would like to share my latest proof of concept.
Well, not only a concept, it is working fine but not sure if it is the best solution.
Challenge: rotate tiles on the homescreen to see more than just the 4 tiles of screen 1 in dim state (thanks Marcel for the suggestion)

Solution: I've implemented a timer which rotates through the different existing homescreen pages every 15 seconds in dim state only.
You now can see all those tiles in dim state you have never seen before :-)

Pro's: it is a clean, simple mod to the Homescreen.qml
Con's: if you want to have a tile fixed on screen you will need to add the same tile to all homescreens (like the clock for example)
Alternatively I could look into rotating single tiles but then the question is which tiles to select. Getting a bit more complicated quickly. Happy to hear your views.

If you want to implement this copy the code below to the Homesceen.qml in the apps folder homescreen at the Component.onCompleted (line 488 in my firmware)

Code: Select all
   Component.onCompleted: {
      registry.registerWidgetContainer("prominent", rightPanel);
//screen rotate start
      homescreenrotate.running = true;
//screen rotate end
   }

//screen rotate start

   function rotateHomescreen() {
      if (screenStateController.dimmedColors) {   // only rotate screen in dim state, ignore the last page (usually empty)
         var newpage = currentPage + 1;
         if (newpage >= pagecount - 1)
            newpage = 0;
         widgetNavBar.navigateBtn(newpage);
      }
   }

   Timer {
      id: homescreenrotate
      interval: 15000              //update every 15 sec, change to whatever you like
      triggeredOnStart: false         //can only be run once the page has loaded, not at start
      running: false            //timer will be started in the onCompleted function right above after loading the page
      repeat: true
      onTriggered: rotateHomescreen()
   }

//screen rotate end


Hi all,

In addition to the post above I've implemented a simple addon to the homescreen to rotate through all available tiles at a specific tile location on the homescreen at a configurable interval. Before sharing with you I would like to get some input from you guys:
Do you want to rotate through all tiles or a given (selection of) categories (as shown in the 'AddTile' screen) or do you prefer to be able to select a set of individual tiles to be included in the rotation. That selection can be easily implemented in the code, building screens for it is a bit more work.
Secondly, I now rotate the content of a specific tile on the first screen, the code can be easily changed to the tile of your liking. I will look into options to select the rotating tile (e.g. add a second button next to the '+' on an empty tile).

Views?

N.B TerrorSource, good work on DomoticzLight :-)


Well, i prefer the All-Tiles rotation. You don't need to use > to go to the next tile page then. I only prefer to set the timer manually(or in the scripts) so the tile rotation time is configurable.
Guess that it's hard to code to just rotate particular Tiles.

Any possiblity that you can send me an email so we can chat about the apps? got a few more ideas myself but i cannot code that myself.
TerrorSource
Member
Member
 
Posts: 121
Joined: May 2017

Re: Software: modifications and extensions Toon

Postby marcelr » Sat May 13, 2017 3:12 pm

I would like to see the top line of tiles on the first page stay in place, and have the other tiles (from all pages) rotate through the bottom line of tiles. Not sure if that's possible, though.

Anyway, just my 2ct.
marcelr
Advanced Member
Advanced Member
 
Posts: 868
Joined: May 2012
Location: Ehv

Re: Software: modifications and extensions Toon

Postby TerrorSource » Sat May 13, 2017 3:28 pm

marcelr wrote:I would like to see the top line of tiles on the first page stay in place, and have the other tiles (from all pages) rotate through the bottom line of tiles. Not sure if that's possible, though.

Anyway, just my 2ct.


Maybe build 1 script with multiple options would do the trick for everyone :)
modus1 = rotate all screens
modus2 = rotate top row
modus3 = rotate bottom row
TerrorSource
Member
Member
 
Posts: 121
Joined: May 2017

Re: Software: modifications and extensions Toon

Postby Toonz » Sat May 13, 2017 4:59 pm

TerrorSource wrote:.... I only prefer to set the timer manually(or in the scripts) so the tile rotation time is configurable.

It is already configurable in the script in milliseconds :)

TerrorSource wrote:.... Guess that it's hard to code to just rotate particular Tiles.

Probably easy to do, can select by name probably, will need to be hardcoded in the script or via an external text file

marcelr wrote:I would like to see the top line of tiles on the first page stay in place, and have the other tiles (from all pages) rotate through the bottom line of tiles. Not sure if that's possible, though.

Good idea, possible for sure

TerrorSource wrote:Maybe build 1 script with multiple options would do the trick for everyone :)
modus1 = rotate all screens
modus2 = rotate top row
modus3 = rotate bottom row

Yep, this is how I already did my first attempt, two separate functions, one to rotate the whole screen and one to rotate on a single tile.

Need to think about a couple of other things as well:
- need to implement a way to start/stop scrolling to allow you to modify the homescreens (and/or reset to the standard layout)
- ideally the ability to change to one of the other modules without the need for restarting the qui .
I most likely will add a menu item for the homescreen config, easiest way to implement the two items above I think

Thanks a lot for your suggestions, first 'release' coming soonish (bit busy at work).
By the way, the wastecollection app is finished and going through the last testing cycles and final QA review (my wife :D ).
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Toonz » Tue May 23, 2017 7:41 pm

Hi all,

I found during testing that the rotation of tiles as I do it now negatively impacts stability over time (I now remove and create tiles on the fly).
Rotating full homescreens is not an issue as the individual tiles are not touched in that case.
Need to do some more research. No ETA.... :(

What happened is that each changed tile was added to the config xml (creating a lot of duplicates).
At next reboot all these duplicates are being loaded again until memory is full and the Toon reboots itself.

Regardz,

Toonz
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Toonz » Sun May 28, 2017 11:56 pm

Hi all,

the issues with my previous attempt to rotate tiles have been resolved.
The following homescreen mod gives you the ability to automatically rotate tiles on the first page of the homescreens in 4 ways:
0: no rotation, behaviour as normal
1: rotate only the right bottom tile and leave the other three untouched (both normal and dim state)
2: rotate the bottom two tiles and leave the upper two untouched (both normal and dim state)
3: rotate the whole homescreen. In this case no tile configuration is changed, merely the next homepage is selected every x seconds (only in dim state)

You can change the behaviour 'on the fly' by clicking on the new icon just right of the '>' page selector at the bottom.
The small number in the icon represent the rotation mode above.
Default value is 0 (no rotation).

Installation:
I uploaded my full homescreen app (version 3.7.9) but the best way to implement is probably to copy/paste all changes into your own homescreen app.
Changes to be made:
- copy the 4 SettingsIconx.png icons from the drawables folder into your own homescreen/drawables folder.
- copy/paste alle code changes (5 blocks) in Homescreen.qml which are marked between:
// start mod rotating tiles
and
// end mod rotating tiles
- change the 'cycle time' in the first block if you want, default is 15 seconds (property int rotationInterval : 15000)

Important notes:
- only tiles which are visible at the start of qt-gui will be included in the rotation. If you want to include newer tiles as well my advice is to stop rotation (setting 0) first, finish your homescreen/tile layout and restart the gui.
- rotation will only start 3 minutes after completing the loading of the homepage to wait for the initial initialisation of the tiles at startup


Have fun. As always happy to hear different views on how this can be implemented (critical comments are received as a gift :) )

Homescreenmod_tiles_rotation.png
Homescreenmod_tiles_rotation.png (57.16 KiB) Viewed 4107 times
Attachments
homescreen_rotating_tiles_V0.2.zip
(42.38 KiB) Downloaded 68 times
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Wunser » Thu Sep 28, 2017 7:23 pm

Any chance for an update that works with the newest toon firmware? I tried deploying these code changes, but it left the panel in a qt-reboot loop.
Wunser
Starting Member
Starting Member
 
Posts: 9
Joined: September 2017

Re: Toon app: rotating through tiles, automatically

Postby Toonz » Fri Sep 29, 2017 9:14 am

Wunser wrote:Any chance for an update that works with the newest toon firmware? I tried deploying these code changes, but it left the panel in a qt-reboot loop.

Sure, which firmware version do you have?
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Toonz » Fri Sep 29, 2017 7:22 pm

I already did the one for firmware version 4.4.21.
It is a modded version of Homescreen.qml.
DO NOT INSTALL ON OTHER FIRMWARE VERSIONS.!!!
Unzip the attached file in the folder .../qml/apps/homescreen

I can make one for 4.7.23 as well rather quickly if anyone is interested

Kind regardz,

Toonz
Attachments
Homescreen_rotating_tile_mod_firmware_4.4.21.zip
(7.99 KiB) Downloaded 68 times
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Templar » Sat Sep 30, 2017 9:50 am

Toonz wrote:I can make one for 4.7.23 as well rather quickly if anyone is interested

FW 4.8.25 is already released.
Templar
Member
Member
 
Posts: 84
Joined: March 2011
Location: Netherlands

Re: Toon app: rotating through tiles, automatically

Postby Toonz » Sat Sep 30, 2017 2:16 pm

useless release ;-)
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Toonz » Sat Sep 30, 2017 8:08 pm

Toonz wrote:I already did the one for firmware version 4.4.21.
It is a modded version of Homescreen.qml.
DO NOT INSTALL ON OTHER FIRMWARE VERSIONS.!!!
Unzip the attached file in the folder .../qml/apps/homescreen

I can make one for 4.7.23 as well rather quickly if anyone is interested

Kind regardz,

Toonz

Apologies, also copy the attached icons in /qml/apps/homescreen/drawables, otherwise you still see nothing ;-)
Attachments
drawables_Homescreen_4.4.21.zip
(10.78 KiB) Downloaded 44 times
Toonz
Advanced Member
Advanced Member
 
Posts: 625
Joined: December 2016

Re: Toon app: rotating through tiles, automatically

Postby Wunser » Sun Oct 15, 2017 1:26 pm

Toonz wrote:I already did the one for firmware version 4.4.21.

I can make one for 4.7.23 as well rather quickly if anyone is interested

Kind regardz,

Toonz


Yep, very very interested :D
Wunser
Starting Member
Starting Member
 
Posts: 9
Joined: September 2017

Next

Return to Toon Apps

Who is online

Users browsing this forum: No registered users and 1 guest