New Plugin Support

In hopes of making it easier to create new plugins…
Why don’t we post some dummy plugins that could be the template used to create new plugins?
This would help for simple applications of just gathering information and displaying it with no actions involved…

Also I have been playing with a new plugin and want to pass some new ideas along…
Sometimes it is nice on the UI to change what variable is being displayed without rewriting the code…for example, I have an array of information being read from a multi channel temp/relay module. I create a variable called “index”, and in my code I write to the variable displayed in the UI form the array using the index. The results are that a user can go under the advanced tab and change the index value…once the Vera restarts the UI now displays that variable. This could be a handy way to give Users more options on what they display on the UI.
Take a look at the screen shots and you will see how this works.

Code:
local index =(luup.variable_get(“urn:cd-ALLSEAS-com:device:ALLS:1”, “Index”, ParentDevice))
local I = tonumber (index)
luup.variable_set(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,DATA_ARRAY{I},ParentDevice)

(change the brackets on DataArray…can’t display them in the forum)

I would love to hear what other are doing…plugin development has a steeeeep learning curve!

Regards
Tim Alls

Some “dummy” or “template” plug-ins would be great.

I definitely agree that the learning curve is steep. I’m a fairly experienced developer (embedded or otherwise), but still found the “getting started” process frustrating. I spent an inordinate amount of time trying to piece together reliable information from all the disjointed (and sometimes inaccurate) information in the forum, wiki, and code.mios.com. Then, to make things worse, I immediately ran into some serious “undocumented” bugs (in UI5) that I had to work around. (always fun when your “Hello World” equivalent doesn’t work due to platform bugs :slight_smile:

Some nicely put together examples would also help illustrate the “best practices” for coding on MiOS.

I’d certainly support this too…

[quote=“hugheaves, post:2, topic:170702”]Some “dummy” or “template” plug-ins would be great.

I definitely agree that the learning curve is steep. I’m a fairly experienced developer (embedded or otherwise), but still found the “getting started” process frustrating. I spent an inordinate amount of time trying to piece together reliable information from all the disjointed (and sometimes inaccurate) information in the forum, wiki, and code.mios.com. Then, to make things worse, I immediately ran into some serious “undocumented” bugs (in UI5) that I had to work around. (always fun when your “Hello World” equivalent doesn’t work due to platform bugs :slight_smile:

Some nicely put together examples would also help illustrate the “best practices” for coding on MiOS.[/quote]

I am willing to support by posting the templates I am using (stripped down from other plugins) but it would be nice if an experienced programmer would review the templates to see if they are correct in structure and form.
I am very new to this…so I could be making mistakes.
Regards
Tim

I guess one way would be to post 'em then sit back and wait for the comments… :wink:

Ha…That seems to be the format here! ;D

If it’s mine the first comment will be “you must be stupid stupid stupid” .
I am making progress but it’s slow…here is a PC program that will complement the X-300 plugin I am working on…
An eight channel temperature logger for a windows PC.

Tim