From 959fb8f239907237b81c6ad054055d50d43d46ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Wed, 19 Jun 2019 12:11:36 +0200 Subject: [PATCH] Migrate udpcommander plugin documentation --- udpcommander/README.md | 19 ++++++++++++ udpcommander/devicepluginudpcommander.cpp | 38 ----------------------- 2 files changed, 19 insertions(+), 38 deletions(-) create mode 100644 udpcommander/README.md diff --git a/udpcommander/README.md b/udpcommander/README.md new file mode 100644 index 00000000..7390928a --- /dev/null +++ b/udpcommander/README.md @@ -0,0 +1,19 @@ +# UDP commander + +This plugin allows to receive UDP packages over a certain UDP port and generates an event if the message content matches the param command. + +> Note: This plugin is ment to be combined with a rule. + +## Example + +If you create an UDP Commander on port 2323 and with the command `"Light 1 ON"`, following command will trigger an event in nymea and allows you to connect this event with a rule. + +> Note: In this example nymea is running on `localhost` + + + $ echo "Light 1 ON" | nc -u localhost 2323 + OK + +This allows you to execute actions in your nymea system when a certain UDP message will be sent to nymea. + +If the command will be recognized from nymea, the sender will receive as answere a `"OK"` string. diff --git a/udpcommander/devicepluginudpcommander.cpp b/udpcommander/devicepluginudpcommander.cpp index 4888c894..4436519b 100644 --- a/udpcommander/devicepluginudpcommander.cpp +++ b/udpcommander/devicepluginudpcommander.cpp @@ -21,44 +21,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/*! - \page udpcommander.html - \title UDP Commander - \brief Plugin for catching UDP commands from the network. - - \ingroup plugins - \ingroup nymea-plugins-maker - - This plugin allows to receive UDP packages over a certain UDP port and generates an \l{Event} if the message content matches - the \l{Param} command. - - \note This plugin is ment to be combined with a \l{nymeaserver::Rule}. - - \section3 Example - - If you create an UDP Commander on port 2323 and with the command \c{"Light 1 ON"}, following command will trigger an \l{Event} in nymea - and allows you to connect this \l{Event} with a \l{nymeaserver::Rule}. - - \note In this example nymea is running on \c localhost - - \code - $ echo "Light 1 ON" | nc -u localhost 2323 - OK - \endcode - - This allows you to execute \l{Action}{Actions} in your home automation system when a certain UDP message will be sent to nymea. - - If the command will be recognized from nymea, the sender will receive as answere a \c{"OK"} string. - - \chapter Plugin properties - Following JSON file contains the definition and the description of all available \l{DeviceClass}{DeviceClasses} - and \l{Vendor}{Vendors} of this \l{DevicePlugin}. - - For more details how to read this JSON file please check out the documentation for \l{The plugin JSON File}. - - \quotefile plugins/deviceplugins/udpcommander/devicepluginudpcommander.json -*/ - #include "devicepluginudpcommander.h" #include "plugin/device.h" #include "plugininfo.h"