Show calendar and read MySQL database
#1
Hi all
I'd like to add two additional screens to my Kodi setup. I have the software on my Windows 10 office PC, my Android 8 phone, OSMC on a Raspberry Pi3. Sadly no longer on my tablet, as this only has Android 4.
All of these connect to a central server for file storage, and a MySQL shared Kodi database.

I'd like to show my Google calendar as a screen. Even if it's just on the Raspberry Pi (OSMC / Linux). I can always just swap screens on the Windows PC.
The second page / screen I'd like to add, is to read some data from a MySQL database or generated webpage, and display some numbers / text from the result.

So far, I do not see any add-on's that support either, and I do not think Kodi can do this itself. I'd be targeting Kodi 18 I guess

I think I need to do this via Python on Kodi, and as an add-on? For the database read, do I do this directly from MySQL (Kodi already uses this for shared library) or do I create HTML or XML on the server, sending that to Kodi?

Any input on where / how to begin? Do I need to create an add-on, or can I do this another way?
Whatever tips would be appreciated

Thanks in advance
Reply
#2
It does sound like an addon.  In this case my sense is that Kodi will only be displaying data, so you're going to need to look at the Kodi WindowXML stuff to create a window for display.  How you get that data is up to you, but be aware that the Kodi 17/18 Python interpreter is 2.7, so you can't use any Python3 until Kodi 19 comes out.  For the Google Calendar you'll have to look at the Google APIs to figure out how to get the data.  For the other MySQL or generated web page, you need to decide which of those you're going to use, as the python modules you need to use are different.  Depending on the exact data, the XML might be easier, but without more info it's hard to say.
Reply
#3
Thank you for that!!
Now I have several places to research and learn further, and a good starting point!!

For now I don't really have too much more specific info. Other than showing the calendar (as one thing) and just retrieving some numbers from a MySQL database (the other request). I could do all the processing / maths server side via SQL scripting and just grab the result from a record

Thank you again!!
Reply
#4
The quick and dirty way would be make the calendar as ListItem object each date added as folder, each event added as file (that way you have different icons), because if you never did anything in windowXML thing on kodi its imo a bit hard to start.
But yeah, best results will be with WindowXML.
Proud developer for Shoko and Nakamori. Long time xbmc/kodi user. IT Freak at Monogatari.
Reply
#5
(2022-10-26, 11:55)DanieSuad Wrote: I'm sure you will do well. I wish you the best of luck.

Do not come to this forum to "revive" old topics/threads with your totally useless remarks.
Your forum account will not last very long when you continue your behavior.
Reply

Logout Mark Read Team Forum Stats Members Help
Show calendar and read MySQL database0