-
-
Notifications
You must be signed in to change notification settings - Fork 17
yPluginApi
Sébastien Gallou edited this page Jun 23, 2016
·
4 revisions
The plugin API provides some services to plugins :
- Declaring, checking if already declared, getting details on devices and keywords
- Getting the event handler, used to wait events from Yadoms or from your plugin (timer, data reception...)
- Indicating the plugin current state to Yadoms
- Recording (= historizing) new data acquisitions
- Getting the informations (provided in the package.json) about the plugin
- Getting the current configuration of the plugin instance
See IYPluginApi.h file for full API documentation (located in yadoms/sources/shared/shared/plugin/yPluginApi).
Here are some recommandations about the usage of the API plugin.
2 types of method are available to historize data. The first historizes a keyword at a time, the second historizes a list of keywords. For performance issues, prefer to use the second form (which takes a list of keywords) as soon as you have several keywords to historize.
For the same reason as historization, prefer to use the declaration method taking a keyword list as soon as you have several keywords to declare.
Yadoms -- The ultimate house automation solution