PDA

View Full Version : Needing basic help on SBC plugins



iisfaq
2009-09-11, 23:09
Hi all

I need some real basic help.

How do I start creating a plugin for the SqueezeBox Duet controller?

I have read the WIKI and followed the details at:
wiki.slimdevices.com/index.php/SqueezePlay_Applet_Guide

At the end it says to follow the link to this page:
wiki.slimdevices.com/index.php/SqueezePlay_Applets

This page states "Please note this page is out of date and will be updated for 7.3 which uses an alternative mechanism to download applets to the Squeezebox Controller."

I am running 7.3.3 - so what gives - how do I do this? And how to I publish to the SqueesePlay?

Also is there an IDE that people use to develop plugins?

I can't think you write this stuff in notepad.exe and then install into squeezeplay and find it does not work and then go back to notepad and edit it manually!

I see that there are IDE's for LUA - should I be using one of these?

I really just want to take an existing plugin and modify it - like a hello world. But I find that the WIKI is lacking and needs updating by someone who actually knows this stuff.

Is there a basic tutorial that explains what tools I need to use and the process to install and debug my scripts? I would have thought that the WIKI would have all of this.

Chris

erland
2009-09-13, 00:42
Hi all

I need some real basic help.

How do I start creating a plugin for the SqueezeBox Duet controller?

I have read the WIKI and followed the details at:
wiki.slimdevices.com/index.php/SqueezePlay_Applet_Guide

At the end it says to follow the link to this page:
wiki.slimdevices.com/index.php/SqueezePlay_Applets

This page states "Please note this page is out of date and will be updated for 7.3 which uses an alternative mechanism to download applets to the Squeezebox Controller."

I am running 7.3.3 - so what gives - how do I do this?

My recommendation would be to download Squeezeplay Desktop and look at some existing applets. The information on the wiki with sample applets tend to be out of date since no one takes the time to update it.




And how to I publish to the SqueesePlay?

With Squeezeplay Desktop it's possible to select between several skins, so you can use it to simulate the screen size of a Controller or if you use Squeezeplay Desktop 7.4 you can also simulate a Touch or Radio.

During development it's easiest to use SqueezePlay desktop because then you can put your applet files directly in the correct place in the Squeezeplay Desktop installation and edit them in place and just restart Squeezeplay Desktop to look at the changes.

I'm not sure how they are installed on Windows, but in my Linux installation of Squeezeplay Desktop I have a "share/jive/applets" directory that contains all applets. During development I just add my own sub directory here with my own applet.

When you are releasing something which you want other people to use you will need a repository XML file with and <applets> element with your applet. The download address to this repository XML file is configured in the Extension Downloader tab (or Plugins tab in 7.4) in SqueezeCenter. You can look at my testing repository XML file for a sample which contains the Information Screen applet:
http://erlandplugins.googlecode.com/svn/repository/trunk/testing.xml



Also is there an IDE that people use to develop plugins?

I can't think you write this stuff in notepad.exe and then install into squeezeplay and find it does not work and then go back to notepad and edit it manually!

I see that there are IDE's for LUA - should I be using one of these?

I'm using Linux so I use gedit which basically is notepad.exe with syntax highlighting. For someone like me who normally works with modern Java IDE's it feels very basic, so if there is something better I also like to know.

You at least want something that's able to show the code with syntax highlighting coloring. Everything is better is better than notepad.exe so at least use a editor made for programmers, Notepad++ is one step in the right direction.

I've tried some IDE's for perl development but I always got stuck setting up all dependencies in the IDE project so I reverted back to a simple editor. If there is something that works for lua development I also like to know.



I really just want to take an existing plugin and modify it - like a hello world. But I find that the WIKI is lacking and needs updating by someone who actually knows this stuff.

As I said above, it's best to look at one of the bundled applets.
Find one that's somewhat similar to what you like to do.

There are some sample applets bundled which even have a license that allows direct copying, these are stored in the "Test" and "Bounce" directories.

All the other other applets currently have the Logitech Public Source licensing that doesn't allow you to re-distribute your changes but Logitech has said that they are going to make most of them free to change and redistribute. I've personally decided that I'm probably fine as long as I don't do anything that will decrease Logitech's earnings on the Squeezebox hardware.

If you have questions, I think it's better to post in the Developers sections since most developers read that section.

Also, unless you are already aware of it, many things that are shown on the Controller is actually implemented in perl in SqueezeCenter. So if you just want to add a menu with some functionality behind it you might want to write a perl plugin instead of a lua applet. However, it's hard to say since we don't know what type of applet you like to do.



Is there a basic tutorial that explains what tools I need to use and the process to install and debug my scripts? I would have thought that the WIKI would have all of this.

I've no idea if it's possible to debug, I've so far just used the logging mechanism. If you use Squeezeplay Desktop you can enable logging on various levels.

bluegaspode
2009-09-13, 09:19
I took the freedom to update the wiki:

Dev-Guide to creating Applets now includes some words about creating a repository:
http://wiki.slimdevices.com/index.php/SqueezePlay_Applet_Guide#Getting_your_applet_on_a_ SqueezeboxController

Page about installing applets was also updated to include Repositories:
http://wiki.slimdevices.com/index.php/SqueezePlay_Applets


I'm working pretty much like erland: Using the desktop-version for fast testing, using Eclipse with some Beta-LUA-Plugin to have some code-highlighting.
Very old-style coding with no outline or content-completion :(
I'd be very interested to know, how the logitech-develepors develop applets ?

iisfaq
2009-09-13, 19:23
My recommendation would be to download Squeezeplay Desktop and look at some existing applets. The information on the wiki with sample applets tend to be out of date since no one takes the time to update it.


That for that - I have installed it.



During development it's easiest to use SqueezePlay desktop because then you can put your applet files directly in the correct place in the Squeezeplay Desktop installation and edit them in place and just restart Squeezeplay Desktop to look at the changes.




I'm not sure how they are installed on Windows, but in my Linux installation of Squeezeplay Desktop I have a "share/jive/applets" directory that contains all applets. During development I just add my own sub directory here with my own applet.


On my windows machine it installed into
C:\Program Files\SqueezePlay

And in that folder there is a \lua\applets folder with 35 folders with names like "Clock" and "Default Skin"



When you are releasing something which you want other people to use you will need a repository XML file with and <applets> element with your applet. The download address to this repository XML file is configured in the Extension Downloader tab (or Plugins tab in 7.4) in SqueezeCenter. You can look at my testing repository XML file for a sample which contains the Information Screen applet:
http://erlandplugins.googlecode.com/svn/repository/trunk/testing.xml


I will do that thanks...



If you have questions, I think it's better to post in the Developers sections since most developers read that section.


Thanks I will keep that in mind.



I've no idea if it's possible to debug, I've so far just used the logging mechanism. If you use Squeezeplay Desktop you can enable logging on various levels.

Thanks again for the comments I really appreciate it.

Chris

iisfaq
2009-09-13, 19:24
I took the freedom to update the wiki:


Execelent I will head over and check out the new article.


Chris