• 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 15
Your 1st Add-On: Hello World!
#61
(2015-01-18, 01:42)nikstra Wrote: There is no "Hello World" add-on in the (Helix) repository as the wiki says and a search for "hello" gave no results either. I've found it at github but I was a bit confused.
I ran into that as well and I thought I had screwed something up with all of my tinkering. Luckily it is extremely easy to just download the files from Github, unzip, and drop into your addons folder.
Reply
#62
I have submitted it the official repository today.

Hopefully with will be accepted.

Apologies for the delay,
Reply
#63
Hi All, I'm really interested in the Hello World add-on and I'm a noobie to RasPi and XBMC so apologies in advance if my questions are basic. I'd like to install it by sshing into the XBMC with another Raspberry Pi. Does anyone know how I can install it in the XBMC using the command line in Raspbmc? I am currently trying to do it on the RasPi with XBMC but I'd eventually like to be able to do it by ssh from a second RasPi.

Using the command line in Raspbmc I cloned the files from github after I installed git:
$ sudo apt-get install git
$ git clone https://github.com/zag2me/plugin.program.hello.world

Now in the command line using the commands:
$ cd /home/pi/plugin.program.hello.world
$ ls
results in the 5 files being listed.

The above lines put 'plugin.program.hello.world' into home/pi directory but I can't seem to run the add-on. Does anyone know how I can get this to work
1. Using the Confluence interface from this point
2. Use the command line in Raspbmc to unzip it and put it into the Video or Programs Add-on folder, so that I can run it when I launch XBMC by navigating to Video/Programs main folder without using the confluence interface to unzip and manually add it to the add-ons section?

I hope this makes sense and I appreciate any help any one can give me. Cheers!
Reply
#64
Maria, I believe you are not placing it in the correct folder. You will need to put the hello world plugin into your Kodi addons folder which resides in (I believe) ~/.kodi/userdata/
Reply
#65
Hi Craig,

Thanks a million for pointing me in the right direction! I looked it up and I put the plugin into /home/pi/.kodi/addons and it worked perfectly!!! It resides in the Program Add-on folder. Yesterday I was using .xbmc which was obviously incorrect.

Cheers again!
Reply
#66
Excellent, I'm glad you were able to get it working with the help of my not-quite-correct instructions Smile
Reply
#67
Just for info, you can ftp into any linux install and copy it using the normal ftp program. Just connect with SFTP to the machines IP.

This is much easier than all that ssh stuff Wink
Reply
#68
Hello. My coding knowledge is very limited but I would like to try and make a simple addon.

I have found *THIS* which allows users to make an addon that calls on it to fetch a stream URL and play it in XBMC.

The developer gives this example...

Code:
import livestreamer
streams = livestreamer.streams("http://www.twitch.tv/librizzilol")
streamurl= streams['best'].url
play('test',streamurl,'icon.png')


Can someone please help me with a template of how I would use this to make an addon?
It looks like it should be simple to do but when I gave it a go XBMC through up a script failed error.

I downloaded the hello world example and changed the addon.py file to this...

Code:
import xbmcaddon
import xbmcgui
import livestreamer

streams = livestreamer.streams("http://www.twitch.tv/librizzilol")
streamurl= streams['best'].url
play('test',streamurl,'icon.png')

I also added this "<import addon="script.module.livestreamer"/>" to my addon.xml...

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.program.hello.world" name="Hello World" version="1.0.0" provider-name="zag">
    <requires>
        <import addon="xbmc.python" version="2.14.0"/>
        <import addon="script.module.livestreamer"/>
    </requires>
    <extension point="xbmc.python.pluginsource" library="addon.py">
        <provides>executable</provides>
    </extension>
    <extension point="xbmc.addon.metadata">
        <platform>all</platform>
        <summary lang="en">Popup Hello World</summary>
        <description lang="en">Example Plugin to show hello world</description>
        <license>GNU General Public License, v2</license>
        <language></language>
        <forum>http://forum.kodi.tv/showthread.php?tid=209948</forum>
        <source>https://github.com/zag2me/plugin.program.hello.world</source>
        <email>[email protected]</email>
    </extension>
</addon>

Maybe much more code is needed to make it actually work...I dont know.
Any help is much appreciated.

Cheers,
Chris.
Reply
#69
Is there any resource on the recommended way to do logging in kodi?
Reply
#70
(2015-01-25, 02:04)Razze Wrote: Is there any resource on the recommended way to do logging in kodi?

you should use the xbmc.log() function:
http://mirrors.xbmc.org/docs/python-docs....html#-log

we kindly request everyone only to use the LOGDEBUG level,
that way you don't clutter the normal xbmc.log file with your addon messages.
when using LOGDEBUG, logging will only be done when you enable debuglogging in kodi.
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
#71
(2015-01-25, 02:04)Razze Wrote: Is there any resource on the recommended way to do logging in kodi?

One thing I find useful is to have an addon setting to enable debugging for just the addon and use LOGDEBUG unless this is enabled. I have almost never needed Kodi debugging enabled to find an issue with an addon and it generally fills the log, making it harder to find the addon's log messages.
Reply
#72
I know that this is probably slightly off topic as my question isn't about the Hello World-addon, but it's nonetheless python related.
I'm doing the tutorials in PyCharm's Educational Edition, but – for the love of God – I can't solve this one:


hello = "Hello"
world = 'World'

hello_world = type here
print(hello_world) # Note: you should print "Hello World"


I'm suppose to use chained concatenation and one-space " ".
No matter what I replace type here with I get HelloWorld – not Hello World.

All help will be appreciated!
CuBox-i4Pro & RPi3
OpenELEC 8.0.4
Reply
#73
hello_word = hello + " " + world surely?
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#74
(2015-01-30, 02:56)bossanova808 Wrote: hello_word = hello + " " + world surely?

Ahh, there we are. I tried every combination, but all of them with only one "+".
Man, I feel like a clown once I see the truth. But hey, I have to crawl before I can walk.

Thanks for the help! Much appreciated!
CuBox-i4Pro & RPi3
OpenELEC 8.0.4
Reply
#75
Has anything changed in Kodi recently to stop Hello World installing from a zip file.

I developed an addon that uses serial and I manually added the serial files to the script folder on my devices and all works fine. Before I added serial the addon zip file was available for download on one of my servers. I can't for the life of me get the latest version to be accepted by Gotham.

So I went back to the Hello World version and Gotham is rejecting this too (on my RaspBMC system).

The error I get when trying to install from the zip file is 'Addon does not have the correct structure'. Although I'm not convinced that the error message that pops up is correct because the log refers to a timeout error and unable to read the zip file. The server is running quite slow but I have tried 30 times and I am able to upload the zip to the server. Tried from Windows laptop and Raspberry Pi and they are both failing to install Hello World.

For my live addon will it be ok for the serial directory to be in the scripts main directory (as it is currently coded for in python) or should it go in the resources directory? I struggled to write the code for serial to be in the resources directory but if it will only install in there then I guess I have no choice.
Easy Home Automation to Control your RF device within Kodi XBMC
Want to watch TV everywhere you go? Pop by the Want To Watch TV site.
Image
Reply
  • 1
  • 3
  • 4
  • 5(current)
  • 6
  • 7
  • 15

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