Closed awkwardterrain-com closed 10 years ago
It seems that Plugin
in pluginList.push(new Plugin(that.app));
is undefined, maybe your plugin class can not be found or is not correctly loaded.
The class of your plugin has to be in a file named "index.js" in your plugin folder and must be returned at the end. (See: https://github.com/ni-c/heimcontrol.js/blob/master/plugins/gpio/index.js#L144)
Thanks a lot. That was the problem. I didn't see it at first because the code was there, but there was a parentheses in the wrong place.
I've stripped heimcontrol from all plugins and now I am trying to write my own.
I want to speak JSON to a TCP-Server on another Raspberry Pi and I want to include this "VirtualJoystick" as control for it.
As I am very noob, I'm just trying to adapt the patterns I see in the other plugins.
Unfortunately when I try to start heimcontrol right now I get the following error message:
I'm am 100% sure it is my plugin that is causing the issue, as heimcontrol starts up with no problem without any plugins or with the webcam plugin reinserted.
If I understand correctly PluginHelper is the code that tries to load my plugin into heimcontrol and also helps my plugin to connect to mongodb. Thats why I did what all the other plugins did:
this.pluginHelper = app.get('plugin helper');
The main problem is, that I don't understand the error message and therefore don't know where to look for an error in my plugin.
I've already tried to comment out all half finished or net yet completely understood code piece by piece (or basically everything) but I can't find what is causing this error.