• 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15
Your 1st Add-On: Hello World!
Now, I have a question which probably fits into this topic.

I have a script which executes navigation commands e.g this line:
Code:
xbmc.executebuiltin("Action(up)")
It works fine, selection moves up one step, however Kodi does not recognize it as a user activity. It neither resets the idle time nor exits from screensaver if it is active.

If I apply the same command from SSH console like this:
Code:
kodi-send --action="up"
then the command handled as a regular user activity.

What do you think, this behavior is intended or a fault?
Reply
Hi Guys,

Is there a way to have more than once script in helloworld? I have to use it with extendedscriptinfo in the following way

when clicking movies it does xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=movie)')
when clicking tv shows it does xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=tv)')
when clicking search it does xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=movie,query=qqqqq)')

the only thing I can think of is multiple helloworld addons installed or somehow having the xml perform action based on mouseclick button pressed

any advice would be appreciated. thank you
Reply
(2017-03-13, 11:02)david.zentner Wrote: Hi Guys,

Is there a way to have more than once script in helloworld? I have to use it with extendedscriptinfo in the following way

when clicking movies it does xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=movie)')
when clicking tv shows it does xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=tv)')
when clicking search it does xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=movie,query=qqqqq)')

the only thing I can think of is multiple helloworld addons installed or somehow having the xml perform action based on mouseclick button pressed

any advice would be appreciated. thank you

That sounds like a contextmenu addon. What exactly are you trying to do
Reply
Hi guys, can you help me? I create a kodi addon for first time.now i want install it on my kodi (on raspberry pi3), how can i install my addons? I uploaded that on dropbox and add the link addres in file manager/add source, but i using instaal from zip file and select source i created, but nothing isnt there.
Thanks for ur helping
Reply
Razze,

Trying to set the home buttons on my main menu, so it acts as follows

when clicking movies it does RunScript(script.extendedinfo,info=list,type=movie)
when clicking tv shows it does RunScript(script.extendedinfo,info=list,type=tv)
when clicking search it does RunScript(script.extendedinfo,info=list,type=movie,query=qq​qqq)

I have tried changing in the settings.xml and for some reason it does not work. The only work around I have used so far is using helloworld and having it execute the command, however I can only seem to use it for one command, so if I use it for movies, I can not also use for TV Shows or Search as above

In helloworld if I use xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=tv)') it performs the action perfectly,
It would appear I need to have multiple addon.xml option for helloworld or somehow make it read the name of the button I have clicked in kodi

Thanks
Reply
(2017-03-14, 08:11)david.zentner Wrote: Razze,

Trying to set the home buttons on my main menu, so it acts as follows

when clicking movies it does RunScript(script.extendedinfo,info=list,type=movie)
when clicking tv shows it does RunScript(script.extendedinfo,info=list,type=tv)
when clicking search it does RunScript(script.extendedinfo,info=list,type=movie,query=qq​qqq)

I have tried changing in the settings.xml and for some reason it does not work. The only work around I have used so far is using helloworld and having it execute the command, however I can only seem to use it for one command, so if I use it for movies, I can not also use for TV Shows or Search as above

In helloworld if I use xbmc.executebuiltin('RunScript(script.extendedinfo,info=list,type=tv)') it performs the action perfectly,
It would appear I need to have multiple addon.xml option for helloworld or somehow make it read the name of the button I have clicked in kodi

Thanks

Simplest thing would probably be to create four addons then. Everything else would need you to give some parameters from your skin, which will lead to it not beeing upgradable.
Reply
Thanks champ

I ended up editing the settings.xml for the skin and this yielded the result I was chasing Smile

thank you for your advice
Reply
Hello,

I have written a simple addon to control a HD car radio receiver module. Some parts of it are copied and I do have it running on a raspberry pi.

My addon includes a service.py and addon.py;

Addon.py services user input (click commands from a touch panel) and sends corresponding serial messages to the receiver module.
Service.py receives serial messages from the receiver module and displays info on the LCD screen such as Frequency, signal level, HD title and artist info etc.

I would like to change the behavior of my Tune up/down control based on a variable that is captured in service.py; basically i want my Tune button to send a command to change frequency if I tuned to a non-HD channel or step to the next HD channel if I tuned to a HD channel with multiple audio streams.

How can I access a variable in service.py from addon.py?
Reply
Hi KM5TZ. I am doing something similar with a Service Addon that stays up and running, and KeyMap buttons to tell it what to do. The way to do that is with the "SetProperty" and "GetProperty" commands. There is a Python version, and a Kodi Action version.

Google "xbmc setproperty" to get more info. Basically, you choose a window ID, 10000, and choose a random fieldname, like "my_field". Then you use SetProperty("my_field", "new value", 10000) to send from your first addon, and use "new_value = GetProperty("my_field", 10000). There is a Python version for this and a KeyMap Action version for this.

In python, you have this in your "send" script:

import xbmc, xbmcaddon, xbmcgui

...

window=xbmcgui.window(10000)

...

window.setProprty("my_field", "up")

...


And in your Receive Addon you have this:
import xbmc, xbmcaddon, xbmcgui

...

window=xbmcgui.window(10000)

...

my_action = window.getProperty("my_field")

...


Of course, you put this in a loop, declare "window" to be a global, etc.


-- Cayford
Reply
Cayfordb,

Thank you very much for the reply.... I have implemented your suggestion and is working perfectly!

My next challenge is how to turn an image on and off (signal level bars) in my skin xml file. My initial attempts using setVisible(True/False) were unsuccessful.
Reply
I have created an addon that reads some information from my car (via serial interface) and displays it on a window. The window I have coded in XML and the python code (addon.py and service.py). It works perfectly.

To date I have only one window which is placed in resources\skins\default\720p folder of my addon and is named myaddonname.xml

Now I would like to add additional windows as I have too much information for one page. I have added a control to my existing window to launch a new window. I have read the manual and understand I must name my new XML window customN.XML. I have placed it in the same folder as my existing window (720p) and my new window has a unique id which i launch using <onclick>ActivateWindow(id)</onclick>.

The kodi.log indicates it cannot find my new window. How/where do i inform kodi that I have added a new XML file so it knows where to look?

I read somewhere that I need to add a reference to my new XML file in includes.XML but there is no includes.xml in my addon.

I'm lost and need help please!

update 6/5/17
What I ended up doing was generating multiple windows from one xml file by enabling (visible) and disabling (not visible) Controls (labels, images, progress bars) from within my Python code. Since each of my windows shares common features this worked out well and my addon now has about 9 windows that navigate perfectly!
Reply
If u added a normal windows it will have to go into Kodi skin folder not the add-on folder.. i personal having figure out how to create the window for the add within the add myself... I only know the skin side which is why you missing the custom window it's not in the skin folder.
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
Thanks for the reply. I tried this and Kodi loaded the new window but into background! I believe the log indicated it was loaded into memory. It did not become the active screen. Pressing my back button made the new screen visible (instead of Home screen), Pressing back again brings up the home screen. This sort of suggests to me that if I launched the new skin from home page it might work as expected but I want to launch it from my addon's page. Any ideas on this?
Reply
Please ignore, I've figured it out. Seems I can't delete posts yet. Confused
Reply
I have two pairs of headphones. I know English very well (not my native language) and I enjoy watching movies in native language. My friend doesn't know English at all. I want to watch some movies with him, but to be able to watch it in English I need some way to redirect English language soundtrack to the first headphones, and my native language soundtrack to the other. Can you point me out in the right direction? Basically I need to turn on two soundtracks simultaneously and redirect them to different audio devices (using Windows 10, but if it helps can use linux). Also if someone has already working solution or any other video player that he knows can do it - please do tell. I just did not find anything on the internet and have come to the conclusion that I need to write it myself, might as well write it for KODI since I'm watching everything in it.
Reply
  • 1
  • 11
  • 12
  • 13(current)
  • 14
  • 15

Logout Mark Read Team Forum Stats Members Help
Your 1st Add-On: Hello World!5