Show periodically updated variable on home screen.
#1
Hi all,

I've been trying to display the currently playing song of my MPD daemon on my home screen. I'm not new to programming, but I am new to Kodi and it's internals.

I was hoping it would be as easy as declaring a variable that is available to the skin/interface elements/xml, and updating that variable using external scripts (i've got some python scripts that output the exact string I need in a variable). I've ended up thinking I need a add-on or service to periodically run the external scripts and update the variable, but I'm getting nowhere.

All help is appreciated.

PS: I'm not looking for a plugin or add-on or service that already does this for me, or a MPD client or whatever. My main goal posting here is to understand what I need to do, not find something that already does this.

Thanks!
Reply
#2
Yes, you need a python service which updates the skin variables you need. If you like look at my very basic service which updates some variables of a hardware monitor.
https://github.com/Snecx/service.skinhelper.IP
You can get the variables in the screen with a info var. Something like this $INFO[Window(Home).Property(SkinHelperIP.wanip)
This should help you.
Reply
#3
@_Andy_ That does help! Thanks!
Reply
#4
Hi _Andy_ !

Could You adopt this service to run on Python 3 ( Matrix and newer ) ?
I tried with python2to3 but there are errors starting after conversion.

I am trying to display some temperatures on my home screen on Kodi 19.4 from windows using Open Hardware Monitor with the skin mimic.lr ...

Kind regards : Zoltan.
Reply

Logout Mark Read Team Forum Stats Members Help
Show periodically updated variable on home screen.0