Kodi Community Forum

Full Version: Getting MAC address?, + control KAI functionality?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello everybody,
i have 2 questions:

1. can anybody tell me, how to get the mac address of the xbox running the py script via python?

2. is there a possibility to get access to the kai functionality of xbmc? in special: is it possible to detach and attach the kai gui of xmbc to the engine via python?

i am running the kai engine on my wrt router, and i have a script to restart,stop,install and so on kaid on my wrt from my xbox. that's great, but xbmc doesn't reconnect it's kai gui to the engine, after restarting the kai engine, so my only possibility here is to restart the whole xbmc what is not a very smart solution...
i guess, getting no answers means: there are no answers, right? is there a page, where i could add a feature wish for the xbmc python engine?
both are not possible. you could get the ip adress of the xbox but that's all.
is there a chance to get this things into the xbmc python engine? i think the python engine is a *very* cool feature for extending the xbmc, as there is no need to hassle with all the xbe license stuff thing... extending this engine would help to increase the addon coding support for xbmc, i believe..

if i had a legal comiler and ide, i would try to implement this enhancements myself into xbmc, but i don't have...
for wrtkaidcommander, right?

try this at the end of installkaidxbox():

Quote: if (xbox_mac=="00:50:f2:xx:xx:xx"):
self.command("ping -c 1 "+xbmc.getipaddress())
self.command("sed -i 's/00:50:f2:xx:xx:xx/'`awk /'"+xbmc.getipaddress()+"/ {print $4}' /proc/net/arp`'/g' /tmp/kaid.conf")

it pings the xbox to make sure that it's fresh in the wrt's arp table, then it extracts the mac address and inserts it into kaid.conf on the wrt.

gultig
cool! thanks for that input! :-)
hi z0diac,

just tried your script. it works great.

it works with sveasoft satori-4.0 v2.07.1.7sv also.

thanks
thanks for he info, i will add his o the readme file.
hi z0diac,

i used your wrtkaidcommander class in a script, made it a dialog and added a few features "hacks" that some people may find useful.

what is your thought on me releasing it. i'd give you full credit for the main part of the script.

i'd really like some opinions on if there was a better way to do something, but i would have to release it to do that.

thanks
i also customized the z0diac script
basically i added a stop/upload/start command so i don't have to execute all three steps. if anyone is interested i' could share my mods

bernd