mirror of https://github.com/nymea/nymea.git
43 lines
3.0 KiB
Plaintext
43 lines
3.0 KiB
Plaintext
/*!
|
|
\page getting-started-plugins.html
|
|
\title Getting Started
|
|
\brief Understanding the basic concept of nymea plugins
|
|
|
|
Plugins in nymea are used to expand the functionalitys and capabilitys of the nymea server. A plugin is basically a shared library,
|
|
which will be loaded dynamically from the nymea server during the start up process. Each plugin has a \e name, a \e uuid and a
|
|
list of supported \e vendors which will be visible in the system once the plugin is loaded. Each of thouse \l{Vendor}{Vendors} contains
|
|
a list of supported \l{DeviceClass}{DeviceClasses}. A \l{DeviceClass} describes how the supported \l{Device} looks like, how it will be
|
|
created (\l{DeviceClass::CreateMethod}{CreateMethod}), how the setup (\l{DeviceClass::SetupMethod}{SetupMethod}) looks like and what you
|
|
can do with the \l{Device}.
|
|
|
|
\section1 Devices
|
|
A device in nymea can represent a real device, a gateway or even a service like weather. When you want to represent you own device / service in nymea,
|
|
you should try to abstract that device and think in terms like:
|
|
|
|
\list
|
|
\li \l{ParamType}{ParamTypes} \unicode{0x2192} A \l{Device} can have \l{Param}{Params}, which will be needed to set up the device
|
|
(like IP addresses or device identification) and give information needed for setup and load a device. The \l{ParamType} represents
|
|
the description of an actual \l{Param}.
|
|
\li \l{StateType}{StateTypes} \unicode{0x2192} A \l{Device} can have \l{State}{States}, which basically represent a value of a \l{Device}
|
|
like \e {current temperature} or \e ON/OFF. The \l{StateType} represents the description of an actual \l{State}.
|
|
\li \l{EventType}{EventTypes} \unicode{0x2192} A \l{Device} can emit \l{Event}{Events}, which basically represent a signal.
|
|
An example of an \l{Event} could be: \e {Button pressed}. An \l{Event} can have \l{Param}{Params} to give the possibility to pass
|
|
information with the signal. The \l{EventType} represents the description of an actual \l{Event}.
|
|
\li \l{ActionType}{ActionTypes} \unicode{0x2192} A \l{Device} can execute \l{Action}{Actions}, which represent basically
|
|
a method for the \l{Device} which the user can execute. An example of an \l{Action} could be: \e {Set temperature}.
|
|
An \l{Action} can have \l{Param}{Params} to give the possibility to parameterize the action. The \l{ActionType} represents
|
|
the description of an actual \l{Action}.
|
|
\endlist
|
|
|
|
The \l{DeviceClass} represents the description of an actual \l{Device}.
|
|
|
|
\section1 Hardware resources
|
|
The \e libnymea provides a list of \l{Hardware Resources}{HardwareResources}, which can be used in every plugin. When sou start writing a plugin, you need to know which resource you will need. Each resource provides it's own interface for a \l{DevicePlugin}. In the plugin you don't have to take care about the resource.
|
|
|
|
\section1 Getting started with a plugin
|
|
|
|
|
|
|
|
|
|
*/
|