Logging system information via add-on
#1
I'm playing around with an add-on that sends information about the device that it is running on to a log file on my server. What I'd like to do next is have a way to uniquely identify that device if it was one that I distributed to an employee.

So, for example, if employee 34 runs the add-on this log file will be generated sending some information about their device/system. However, I can't tell that it was employee 34. Since I'm provisioning the device before I roll it out, I'm thinking that maybe I could place a uniquely named dummy file somewhere that my Kodi add-on could look for and send the filename as part of the log file contents -- but I'm not sure A) how to do that or B) if there's an easier way.

I was also thinking of creating a new profile in Kodi (not using that profile, just creating a shell profile) and possibly looking for the existence of that profile's unique name to determine which employee was running the add-on. But again, A) not sure how to do that; B) not sure if there's a better way.

I hope this makes sense... and thanks ahead of time to anyone who can provide some suggestions here.
Reply
#2
configure a unique name in kodi:
Settings > Services > Device name

retrieve it in your addon:
Code:
devicename = xbmc.getInfoLabel('System.FriendlyName')
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Short and simple. Perfect! Thanks!! Smile
Reply
#4
can be changed by the user though.
If you want something a little more temper proof, you could use the ethernet MAC or the like. Note that this usually can still be changed, but not as easy as the kodi device name.
Reply

Logout Mark Read Team Forum Stats Members Help
Logging system information via add-on0