I’m working on my first plugin and want to create a parent with 8 childs.
I could create an parent in App>Develop Apps>Create device.
After that i could run some lua code to create 8 child for the parent.
My question is;
How could i automaticly create an parent with 8 childs in 1 lua startup sequence?
What i have is;
- device description file
- implementation file with “init”
- Init create 8 child with a for/do loop based on an hardcoded (for testing) deviceId
The only way i could think is to first create a device with luup.chdev
After the parent is created, i could get the deviceId and based on that i could create the child.
But this process results in 2 engine reloads and is therefore very slow.
Have you looked at the other plugins that create child devices. The preferred method is to use the luup.chdev api.
You may find the Somfy Walkthrough helpful.
I looked at the Somfy “guide”, IORelay plugin, played with the plugin editor of the marketplace, looked at the NetAtmo plugin and many more.
My feeling is that all information is highly fragmented and i’m lost in all the information, “tutorials”, plugin examples etc.
I tried to make a very basic plugin in the marketplace.
The plugin only exists of some plugin info and a upnp device with type “urn:schemas-upnp-org:device:BinaryLight:1”
When i try to test-install it on my vera3 i get the meaning full message;
Error
Installation failed, reason: to install plugin.
???
edit: 21:02
It looks like i wasn’t logged in on my Vera…
No i get this “message”
Error
Installation failed, reason: missing parameters
Could somebody help me with this (by email and in Dutch) ?
marco(apendingetje)frijmann(puntsel)nl
You’re right, it’s not easy.
If I understand correctly, you’re trying to use the test feature of MiOS apps. This doesn’t work. Just go to the next page and install a specific version. I had exactly the same problem when I started writing apps for the market place
great to hear that i’m not the only one… :-\
edit:
shoot me, new plugin and again a strange error
[see attachment]
Looks like you are trying to use existing plugin file names. This doesn’t work. You should make names unique to your plugin. This is a serious flaw in the plugin development flow which means you can’t easily distribute shared libraries between apps. There are workarounds, but for the moment make your file names (and seviceId) unique to your own developments.
OMG… so this means that its not possible to use the apps creator for;
http://wiki.micasaverde.com/index.php/Luup_Somfy_Walkthrough
You need to make changes to filenames, ID etc, and if its not working, your lost because you don’t know where its going wrong…
:o >:(
This is what i earlier sad about that information is fragmented, incomplete, etc. :-[
Not quite. You can use them if they’re there already, you just can’t put them in the same Mios
install.
In fact, you SHOULD use existing devices and services wherever possible.