Author Topic: Custom Plugin Design  (Read 10589 times)

0 Members and 1 Guest are viewing this topic.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #15 on: February 12, 2016, 04:55:28 PM »
Thanks, that means a lot to me.  I know most people don't feel they should pay for software.  It's too bad but I understand it.  It makes being a small software developer very nearly impossible if you want to earn money doing it.

As for the plugin we'll see if anyone else has any ideas.  Probably you won't be asked for anything "simple" though. :)

You could make a generic serial port plugin.  I have not done this since there is usually too much other customization required when using serial so it just makes more sense to use the python plugin but some might still find it useful, and you'd probably learn a lot doing it without it being too difficult or complex.

A plugin for a serial or network audio receiver might be good if you have one other than the Onkyo.

I know there will always be users looking for plugins for any home automation devices or software out there that we don't already have a plugin for (Vera, Hue, X10).  But that probably won't be simple.

People are often interested in easier ways to send notifications to their phones etc.

Some people are looking for a plugin for Plex but that will be a lot of work.

Setting up daily timers maybe...  That was on my to do list, although I find the GgCal plugin better for that anyway.  Some people might want something that works without internet access.

Obviously you should do whatever interests you that isn't too difficult.


nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Custom Plugin Design
« Reply #16 on: February 12, 2016, 05:09:31 PM »
James's ideas echo a couple that came to mind for me. Things that users have asked about. (As he said, most folks are not asking for simple things.)

Specifically, with the scheduled timers idea -- apart from being able to specify days of the week for regularly scheduled events (or daily, weekly, whatever), requests for adaptive sunset/sunrise timers have come up before.

Since that's pretty useful for home automation, maybe that's of interest to you.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

PegLegTV

  • $upporter
  • Sr. Member
  • *****
  • Posts: 499
  • Karma: 43
    • View Profile
Re: Custom Plugin Design
« Reply #17 on: February 12, 2016, 06:44:48 PM »
I'm not sure how much work these ideas would be, probably not simple like jitterjames and nime5ter said but might be worth looking into


1.) AutoRemote (sending and receiving messages)

2.) pushbullet (sending and receiving Messages)

with both of these we can already send notifications/messages but can not receive them, I'm using a pushbullet plugin with Eventghost to Receiver notifications but would prefer VC to handle it since I already have VC sending notifications

Eventghost has a plugin for Autoremote to send/receive messages but it wasn't reliable for me when I tested it out, so I just use an android tablet to forward the autoremote messages to VC (more on this in a future post  ;))




paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Custom Plugin Design
« Reply #18 on: February 13, 2016, 05:20:54 PM »
Thanks for the feedback folks.   These are good ideas and I will try to tackle some of them.  This is a good way for me to get back into programming (I used to program and was a great vb 6 and  vbscript programming in the day, but have been an infrastructure architect for 15 years). 

I have one question as I finish my first plugin.  Are there any nameing standards you would like me to use.  Right now the plugin is called vcWordPress, and commands are VCWordpress.post.

Easy to change if you have a standard.

In the end I decided to mix up something else I am working with, I am creating a plugin that posts to Wordpress.  I have it working fine, I am just finishing up the user interface.  Right now it just takes a simple title and post, but I have some ideas of how to let it use templates.

Anyone have any interest in this.


jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #19 on: February 13, 2016, 06:17:54 PM »
Well the name of the plugin determines the prefix for the actions and shorter is always better.  You certainly don't need VC at the beginning since that is a bit redundant and we actually have VC.* actions so please drop the VC.

WP would be best unless you think that it might be confused with some other plugin, in which case WordPress is fine.  I generally use CamelCase with the first letter also capitalised unless you are using acronyms such as WOL.  You can look at all the plugin names I'm already using to get an idea of what I think makes the most sense for a plugin name.

paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Custom Plugin Design
« Reply #20 on: February 15, 2016, 01:57:43 PM »
So.....

this is my first attempt.  it is pretty basic and uploads text to wordpress as a post.

I am working to update it to accept a template file and variables (this will make it much more usable).

Text can just text or be standard html.

Any feedback will be appreciated (even to tell me it sucks :-)   )

after this I will work on an FTP plugin so things like photos will be easy to add.  (any thoughts on this?).

Paul

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #21 on: February 15, 2016, 02:31:03 PM »
It does not want to load for me for some reason.

EDIT:  Sorry I forgot to unblock the dlls !  :bonk
« Last Edit: February 15, 2016, 03:09:18 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #22 on: February 15, 2016, 02:38:07 PM »
I recommend (again) that you reference the latest version of PluginInterface (version 2.0.4.3) and not version 1.2.0.0

and also that you build your plugin using .Net 4.5.1

Then just upload what goes into the plugin folder, not the other files such as the plugininterface.dll

For some reason you uploaded a .zip which contained some files and another .zip which confused me a bit.

On a different subject which I should have mentioned eariler: Ideally you should not include the options.xml file.  When options.xml is not found the plugin should use default values until the user saves options.  That way they won't overwrite their settings any time they update the program or plugins.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #23 on: February 15, 2016, 02:38:40 PM »
By the way I'm not personally interested in the WP plugin but an FTP plugin sounds interesting.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #24 on: February 15, 2016, 03:14:40 PM »
The 2nd and 3rd parameter have the same name: "WordPressPost".

The third one accepts an integer but we don't know what integer means what.  Maybe 0 is draft and 1 is Post?

# Params is showing as (1-3), and if that is correct then the 2nd and 3rd params themselves should be marked as optional.

If you start VC with the command line parameter -admin then you will be able to edit the actions in the Action Selection Tree.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #25 on: February 15, 2016, 03:20:18 PM »
IT WORKS THOUGH!!!

 :clap :clap :clap

paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Custom Plugin Design
« Reply #26 on: February 15, 2016, 04:28:11 PM »
There is a readme.txt that explains the integer parameter.  I will clean it up to true and false to publish or not.  That was already in the plans.

Adding the PluginInterface.dll was a mistake.  It is not needed in that folder.  I am targeting the newer dll.

I checked and my target framework is 4.5.1.  is that not what you are seeing?

I was not sure what the number of parameters tag was for.  There are 3 non-optional parameters.

and last, honestly wordpress in not a particular interest of mine, and probably not to most people who would find this.  But it was something I thought I could learn on fairly fast.

I will finish making some changes to this plugin (as listed in the readme.txt) and then move on to the FTP plugin.

I have also been looking at sunset and sunrise plugins.  I have a working function that will calculate both based on IP address or a couple of different location methods, (gps co-ordinates, country, and so forth) so that is in the works.

Is there an easy way to make these available and discover-able by the community at large?


Paul






jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Custom Plugin Design
« Reply #27 on: February 15, 2016, 06:12:13 PM »
Adding the PluginInterface.dll was a mistake.  It is not needed in that folder.  I am targeting the newer dll.

I checked and my target framework is 4.5.1.  is that not what you are seeing?Paul
OK good.
No sorry, I can't actually tell, I was just troubleshooting when it did not work but that was because I forgot to "unblock" the dll files.


I was not sure what the number of parameters tag was for.  There are 3 non-optional parameters.
It should be set to 3 then so that users will know that they need to enter 3 params.  1-3 would imply that the first is required and the next two are optional, and it causes the boxes to appear in a different colour.

Is there an easy way to make these available and discover-able by the community at large?

Not really at the moment other than posting on the forum.  If a plugin gets to a state that seems good enough and it's something that more than one or two people might want then I can include it in the standard install.

I could also create a board on the forum just for user made plugins.  It has never come up before because no one ever made any!

Thanks.

paulbeauvais

  • Jr. Member
  • **
  • Posts: 22
  • Karma: 2
    • View Profile
Re: Custom Plugin Design
« Reply #28 on: February 20, 2016, 04:20:58 AM »
Here is a FTP plugin I am working on (almost production state I think). 

it supports both FTP and FTPS

I added some local file manipulation to make it easier.

I am getting a couple of non-events in the history window when events run.  I am having trouble tracking these down.  If you get around to it I would like to know your thoughts.

This plugin allows the following FTP and FTPS functions:
upload
binary upload
download
binary download
create a directory (both local and remote)
delete a file or directory (both local and remote)
move a file or directory (local)
Rename a file or directory (both local and remote)

Please let me know what you think and suggestions would be great.

Paul

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2009
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Custom Plugin Design
« Reply #29 on: February 20, 2016, 12:51:50 PM »
Very cool. I look forward to having time to test this out. Thanks for sharing.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)