Table Of Content¶
Plugin generic¶
Purpose¶
The generic plugin is used to handle xPL messages sent by xPL clients that are not part of Domogik. They can be arduino DIY devices, ... The generic plugin contains only the description of the xPL messages to catch and so there is nothing to start/stop and nothing to configure.
You just have to install the plugin, check it is present in the clients list and create some devices.
Please notice that you must see your external xPL clients in the clients list as xPL clients. If you don’t see them, it means that the xPL hub doesn’t see them and so the plugin won’t be able to catch the xPL messages.
To be detected by the xPL hub (and Domogik), a xPL client must implement the heartbeat xPL messages. More informations here : http://xplproject.org.uk/wiki/index.php/XPL_Specification_Document#Heartbeat_Messages Notice that some DIY projects don’t implement the heartbeat messages and so Domogik won’t see them!
If you want to create your own arduino xPL client, you can use this library : https://github.com/olebrun/xPL.Arduino
You can check if a xPL message is received on Domogik side by launching the dmg_dump tool.
Dependencies¶
There is no dependency.
Plugin configuration¶
There is nothing to configure.
Create the domogik devices¶
Set up your widgets on the user interface¶
You can now place the widgets of your devices features on the user interface.
Temperature devices¶
Overview¶
These devices are able to send the temperature.
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-temp.myarduino
target=*
}
sensor.basic
{
current=13
type=temp
device=tempsensor1
}
- current : contains the value
- device : contains the device address
Humidity devices¶
Overview¶
These devices are able to send the humidity.
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-humidity.myarduino
target=*
}
sensor.basic
{
current=75
type=temp
device=humiditysensor1
}
- current : contains the value
- device : contains the device address
Pressure devices¶
Overview¶
These devices are able to send the pressure in Pascal.
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-pressure.myarduino
target=*
}
sensor.basic
{
current=34
type=pressure
device=pressuresensor1
}
- current : contains the value
- device : contains the device address
CO2 devices¶
Overview¶
These devices are able to send the carbon dioxide informations.
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-co2.myarduino
target=*
}
sensor.basic
{
current=456
type=co2
device=co2sensor1
}
- current : contains the value
- device : contains the device address
Solar exposure (insolation) devices¶
Overview¶
These devices are able to send the solar exposure (insolation).
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-insolation.myarduino
target=*
}
sensor.basic
{
current=123
type=insolation
device=insolationsensor1
}
- current : contains the value
- device : contains the device address
Total volatile organic compound devices¶
Overview¶
These devices are able to send the total volatile organic compound.
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-tvoc.myarduino
target=*
}
sensor.basic
{
current=752
type=tvoc
device=tvocsensor1
}
- current : contains the value
- device : contains the device address
RGB devices¶
Overview¶
These devices are able to control RGB devices.
Configuration¶
When you create such a device, you will have to set this parameter:
Key | Type | Description |
---|---|---|
device | string | The device address. |
xPL message¶
xpl-trig/xpl-stat¶
Here is a sample of a compliant xPL message:
xpl-trig
{
hop=1
source=arduino-rgb.myarduino
target=*
}
arduino.rgb
{
command=setcolor
color=ff0000
device=rgb
}
- color : contains the color value in hexa RGB format without the #. Example for red : ‘ff0000’, for blue : ‘0000ff’
- device : contains the device address
xpl-cmnd¶
Here is a sample of a compliant xPL message:
xpl-cmnd
{
hop=1
source=arduino-rgb.myarduino
target=*
}
arduino.rgb
{
command=setcolor
color=ff0000
device=rgb
}
- color : contains the color value to set in hexa RGB format without the #. Example for red : ‘ff0000’, for blue : ‘0000ff’
- device : contains the device address
Development informations¶
There is no python part for this plugin. All is handled in the info.json file.
Tests¶
There is no automated tests for this plugin.
Manual tests¶
Create the devices¶
In Domogik administration, create the following devices :
Device type | Device name | Device address |
---|---|---|
RGB device | rgb | parentsbedroom |
CO2 sensors | co2 | co2sensor1 |
Humidity sensors | humidity | humiditysensor1 |
Insolation sensors | insolation | insolationsensor1 |
Pressure sensors | pressure | pressuresensor1 |
Temperature sensors | temperature | tempsensor1 |
Tvoc sensors | tvoc | tvocsensor1 |
Simulate some xPL clients¶
Once all device are created, launch the following commands :
cd tests
python co2.py
python humidity.py
python insolation.py
python pressure.py
python rgb.py
python temperature.py
python tvoc.py
Check the results¶
In Domogik administration, for each device, display its details and check the sensor value.
The expected values are :
Device name | Value |
---|---|
rgb | 00ff00 |
co2 | 213 |
humidity | 75 |
insolation | 1050 |
pressure | 75 |
temperature | 13 |
tvoc | 45 |