Better way to handle this Kodi web page when PC off?

I’ve created some pages to display the Kodi Chorus2 web GUI in Home Remote.

I’ve also added some control buttons. The power button is linked to the PowerToggle button of the Harmony activity for the Media Center PC and the Refresh button refreshes the web page element.

If the Harmony Media Center PC activity is off and I go in to the page in HR on the Windows 10 app it looks like this:

Which is kinda OK, I can then press the power button and wait however long for the Harmony Media Center PC activity to fire up. I then have to press the refresh button to get the Kodi web GUI to appear. It doesn’t ever appear unless I manually press the refresh button after the HTPC has booted up etc.

However on the Android app I see an ugly cannot display web page message.

And this is how it looks once the HTPC is up and running:

I am just wondering how others are handling the Kodi Chorus2 web GUI within Home Remote?

Cheers.

I disable buttons unless conditions exsist, In this case if the pc was off I would not even be able to get into the kodi page. Button to enter kodi page is enabled when pc is on. I host kodi from my nvidia shield so in my case when my shield is on.

Perhaps I can somehow hide the webbrowser element until the HTPC is powered on.

And some kind of please wait loading message until it does appear.

I will have to have a mess about with it and see.

Yeah that could work. I use Veras wol ping plugin to indicate when the PC is on. Kodi on my shield works well since it is on 24/7, it only draws 2 or 3 watts when in sleep mode, only the hdmi output goes to sleep.

I have already got WOL Ping sensor devices installed in Vera that indicate when the HTPC’s are on or not, so might use those, probably better than using the Harmony activity .switch in HR.

My HTPC’s were really expensive custom built iTX ones like £600 each, based on Intel i3 CPU / GPU, but they are pretty old now. I’m running Linux LibreElec.

I’d probably use an Android box next time when they need replacing.

I had one of these cases when I first got into all of this. It was nice but a bit overkill so I eventually sold it. I now have something that has the same form factor but without the touch screen.

download

1 Like

Zalman !

I use to work for a smart home company back in the day in South East Asia, so I’ve built my fair share of HTPCs. We sold home cinema systems based on Windows MCE and MyMovies.dk then.

1 Like

Yes I used MyMovies back in the day.

These were nice ITX cases - OrigenAE M10 Mini-ITX That’s the one I have in my living room still.

This was my all time favourite Micro ATX HTPC case - Moneual 312

And this thing was a bit of a beast - Luxa2 LM 300 Pro

1 Like

OK I don’t know what I am doing LOL.

This isn’t working the Web Browser element is not visible even when the Kodi WOL switch is turned on.

Use device binding to Kodi01wol.switch vs element binding

Its the same, the web browser is not visible in the app when the Kodi.WOL.Switch is On.

Here is the Vera SDATA for that switch

{ "name": "KODI01 - WOL", "altid": "", "id": 38, "category": 3, "subcategory": -1, "room": 1, "parent": 0, "ip": "192.168.0.7", "configured": "1", "status": "1" }

Add a Label to your page that shows the status of your Switch. That’ll help you determine exactly what the problem is. The issue may have nothing to do with your visibility configuration.

I’ve added a label for that Kodi01 WOL switch, it says its ON which it is.

But I can’t figure out how to have the Web Browser element only visible when that switch is on.

What I have configured now the web browser doesn’t appear at all.

Your Setter is not configured correctly. The Value needs to be True.

is visable on browser element unchecked. binding to Vera switch, value On, in setter isvisable True.

OK got it working

Testing on the Android tablet now.

I just need to know how to have some kind of banner in the middle of the page that says something when the Kodi PC is OFF.

Like press the power button and wait or whatever.

1 Like

Yes the banner can be element binded to your browser. when browser isvisible False. banner is isvisable True. Alternatively I suppose the browser can just eclipse the banner.

OK on the Android tablet when the HTPC is OFF and the WOL switch in Vera is OFF etc, when I go in to this Kodi web player page now in HR, I don’t see the web browser, which is good, because now I no longer see that ugly cannot load webpage screen. (Mostly)…

I then press the power button on this page and wait, most times the timing is right and when the Kodi01Wol.Switch turns ON it then displays the Kodi Chorus2 web GUI.

However sometimes the timing is off a bit and it makes the web browser visible, but I see the cannot display page message instead. Seems you cannot add a delay in to a DataTrigger.

I’ve also added a label banner and that is working when the Kodi01Wol.Switch is OFF the banner says “KODI is Off” in the middle of the page:

And when the KodiWol.Switch is ON that banner is not visible and disappears.

There is quite a long lag though from Kodi being up and running on my TV screen, to the Kodi01Wol.Switch in Vera changing to the On state and therefore the Kodi web GUI being visible in Home Remote. Maybe 20 to 30 seconds or more sometimes.

Attached is my Kodi Web Player .xaml file, if anyone wants to have a play around with it.

Kodi01WebPlayer.xaml (9.3 KB)