Pages Layout transition

Hi all,

I’m creating a family friendly OH front end in pages. I’ll be using an old wall mounted ipad and I’ve got the following:

Overview page, only has time and date widget on and then click on the widget it takes you to a tabbed home page.

I’ve then got tabs based on what the family need to see / interact with, ie Home, Cameras etc.

My question is that ideally I’d like to have a way that after x amount of time the pages return to the overview page with the Time and Date on.

I’m thinking of it like a screensaver sort of idea. Once the user has interacted with the ipad I don’t necessarily want the screen that they were using left on display, to return to the date/time would be great…

Is this or anything similar possible?

No, not really. That would require altering the underlying lavascript that runs MainUI. Changes between pages are handled by the app javascript itself, there is no direct user control over that other than clicking on navigation links. You could try to submit a feature request on the web ui repository and see if some devs thinks that this feature is worth adding.

Thanks, thinking of a different way…

I know you can send a command to an item on clicking a widget and I know I can get that to open and then close a pop up.

Is there a similar way where you can open / close a page?

I’m thinking that when a user clicks on the time to go to my ‘home’ screen it sets an item to ON. I can then have a rule with a timer that runs and then turns the item to OFF after x seconds.

Once the item is OFF, it triggers the clock page to load.

Obviously the timer would be something like 5 mins, plenty long enough for the user to do what they need but not too long for the clock to return???

This is a matter of semantics at this point. If you create a “page” using SettingsPages in the UI, the answer is still just plain “no”. You can navigate to those pages using other parts of the app, you can link directly to the urls of those pages, but there is just nothing to tie the state of an item to what page the app is showing or what your browser targets without changing the code of the MainUI.

However, because of the flexibility of the custom widget system, there is basically nothing that you can build on a page that you cannot recreate as full widget. Some things can simply be duplicated as is (the same configuration yaml on the page code and widget code); some things you would have to work a little (or a lot) harder to truly duplicate. This would not be a MainUI “page” but it would be visually identical; the main difference being that you can put the widget on a popup and control that popup through the state of an item.

1 Like

Thanks, I might put a feature request in for a ‘screensaver’ option that has some sort of page timeout and returns you to a defaulted page.

I had started working on fitting everything into a popup but was hoping for a ‘pages’ solution.

I think I’ll give the popup idea a go and see where it gets me, as you say it wont be too hard to revert back.

you can create this page as an f7-popup and manage open/close through an item, just as you already did for your camera. The only difference would be that the item is triggered by time event instead of door bell.
To trigger a time event you can use rules/cron or profiles, I think.

Hi, yes that the plan for my testing tomorrow. :grinning:

Hi, a little advice if I may.

I’ve got widgets that open a popup when an item changes to an ON state and closes at the OFF state, (my camera popup widget)

I’ve got widgets that open a popup on clicking the widget card

I’ve got widgets that command an item ON / OFF

I’ve got widgets that open a popup on right click.

What I can’t work out is how to make a widget do more than one ‘action’.

I’m used to coding languages that are strictly structured but every guide and example I look at for clues seem to be in a slightly different format so I’m stuck on how to combine.

What I’m aiming for is the following:

A label card that updates an item to ON and also opens a popup to a page. It then also auto closes on the same item state changing to OFF.

Pointers very very welcome!

You can also use tap&hold to assign a second action to a widget.

As written above Auto close is also possible by rule (cron or timer) or profiles. Or are you asking for specific code?
I think profiles are the better option but I have not yet worked with them.

Widgets cannot perform more than one of the defined widget actions. But you can look here for a workaround:

1 Like


Yes I’ve got one that does tap and hold to assign a second action, that’s the closest I’ve got to getting what I’m after but it doesn’t quite do what I need, it’s almost there but not quite.

I’ve got the tap changing an item to ON and the T&H opening a popup but real life use case is that people aren’t going to remember to first tap on the widget and then T&H to open the popup.

So, is it not possible to have a widget to two direct actions on press? Can it not send a command and open a popup? Is it only capable of one or the other?

Profiles, can you explain more or point me to some text and I’ll do some reading. TIA


Sorry our messages crossed, it’s a shame about the single action per widget. That would be very handy and would infinitely expand the use case for the pages.

I’ll take a look at the post. Thanks.

Your widget can trigger a rule and there you have all options.

Thanks you’ve just given me an idea…

I was hoping to not have to do a multi hop process to update an item and open a popup but…

if I have a visible label card widget that updates an item, I can then have a rule that runs ok it changing and updates a second item, which is in turn called from an invisible widget, (like my camera widget), which opens a pop up.

I’ll have the second item on a timer so that the pop up closes after timeout and then also turns the first item off…

Off to play.