Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
How to reload skin when device wakes up from sleep?
#1
Question 
I have Kodi v18.8 running on multiple devices with a shared MariaDB. One of the devices is a Shield TV that has Kodi always running and is simply put to sleep when not used.

Everything works fine, but there's a minor annoyance: When I wake it up from sleep, the skin isn't up-to-date. Widgets on the home screen doesn't reflect what's recently been played on other devices.

Since I use Home Assistant to automate my living room lights and window shades based on Kodi's state, playing/paused/idle/off, my initial thought was to let Home Assistant trigger Kodi's XBMC.ReloadSkin() function via JSON-RPC when the state changes from 'off'. I was disappointed to find that the function is not accessible via JSON-RPC.

Any suggestions for a work-around? Maybe I'm overlooking something obvious. Thanks.
Reply
#2
One other option is to remap one of your keys of your remote or keyboard, and do a skin refresh manually with a single button.
xml:

<keymap>
<global>
<keyboard>
<F5>XBMC.ReloadSkin()</F5>
</keyboard>
</global>
</keymap>

Triggering it via a wake-up is a bit more complex I think.
Reply
#3
That's how I have it mapped on all my devices, but the Shield TV remote just doesn't have enough buttons.

I could of course add a refresh option to the skin itself, but a manual step just doesn't pass the spouse-acceptance-factor and goes against my current home-automation mindset.

I guess I'm going to have to go with a bit rubbish solution like having the keypress sent via the Harmony Hub until something better comes along. The logitech remote itself isn't used in that room.

Thanks anyway.

Update:
Mustn't have been thinking straight when I wrote that. I could just trigger a key event via JSON-RPC.
Reply
#4
I'm thinking there might be a way to create a service addon that creates an xbmc.Monitor() object that can capture the wake up, then do a skin reload?

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
How to reload skin when device wakes up from sleep?0