Want to add another page similar to Details [Solved]

I see that on the main Tile for a device the button with the “More” icon uses an Event to trigger a Method to “OpenDetails”. Where is the association defined to have the details page open and referenced to the @Device of the Tile.

I want to add another association like this but trigger from a different button on the Tile that would open a specific page referenced to the @Device the Tile is setup for.

In the MethodAction (Method Invoker) using “Tile” for the “TargetName” the only “Method” to show is the “OpenDetails” method. I have tried entering the new page I want to use but the @Device reference from the Tile does not carry with it.

How can I add custom pages like the Details page that is already built in?

Jerry

I found it. Use this script on a Tile button to pass the @Device information to the new page.

var deviceName = App.GetDeviceAttribute("@Device.Name");
var detailsTemplate = "MySpecialUniquePage.xaml";
App.PushPage(detailsTemplate,deviceName);

This app continues to amaze me with the things you can do.

Just to clarify, you are only doing it this way because you don’t want it to open the “DetailsTemplate” for the Device object? Is that correct?

You are allowed to assign custom pages to the DetailsTemplate property, so you could just assign “MySpecialUniquePage.xaml” to it & use the standard Tile.OpenDetails or App.OpenDeviceDetails methods. But I’m guessing you want to use multiple Details pages for the same object? In that case, you will have to do something like you are currently doing.

Hi Bill,
Right now I only have Kasa smart plugs and switches so I’ve been tailoring tiles to use for my devices. I have tiles for Kasa Smart Plugs and tiles for Kasa Energy Plugs. Although The Home Remote works without any modifications I am only creating my own Tiles for learning the program better.

This is how my devices look with my Tiles. Red tiles indicate when a device is Unknown.

I wanted to open multiple pages from each tile, each tile has buttons to open a certain type of page.

Information Icon Opens an Information page (Details)

Timer Icon Opens a Timer page to allow a quick setup of a Sleep Timer
Computer Desk Sleep Timer

Refresh Icon Refreshes the energy values on an appropriate tile
Living Room Tile
The values are refreshed on a time value set in the plugin settings area but can be immediately refreshed with this button.

All devices connect direct with their IP addresses so I don’t need the cloud connection with these. One last thing I am going to look into is reaching these devices away from home through my domain address.

Thank-you all for the help and answering questions. I’ve seen the projects others are posting and they are so cool but way advanced past me. I am trying to learn enough so someday I can dedicate a tablet for a Home Remote layout like I’ve seen showcased here.

Jerry

1 Like