How to reload skin when device wakes up from sleep? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228) +---- Thread: How to reload skin when device wakes up from sleep? (/showthread.php?tid=356800) |
How to reload skin when device wakes up from sleep? - sialivi - 2020-09-01 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. RE: How to reload skin when device wakes up from sleep? - Klojum - 2020-09-01 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.
Triggering it via a wake-up is a bit more complex I think. RE: How to reload skin when device wakes up from sleep? - sialivi - 2020-09-01 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. RE: How to reload skin when device wakes up from sleep? - scott967 - 2020-09-02 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. . |