Table Of Content

Plugin Diabox

Purpose

The Diabox plugin is used to monitor diabox weather station in live. Each station has different kind of sensors : temperature, pressure, humidity, wind speed and direction, rain rate. Most of the available station have all these sensors, but it’s not always true.

Interesting links about Diabox : *(fr) http://data.diabox.com/

Dependencies

  • Python dependancy : requests, json

Plugin configuration

There is no global configuration options for this plugin.

Create the domogik devices

Domogik device type : diabox.diabox_name

There is one device declared per diabox station, but the configuration is exactly the same for each device.

Here is the example with the device diabox.minou (Phare du Minou (29))

2 parameters are needed for a domogik device creation :

Key Type Description
device string The identifier of the diabox station. This identifier must be unique. If you want to have only one device for this diabox station, you can leave the default value (Example : dbx_Minou).
interval number The time in seconds between each time the diabox station is monitored. It could not be less than 60 seconds (prevent server overloading). 600 seconds (10 min) sounds great.

Start the plugin

You can now start the plugin (start button) and use the created domogik devices. If you created a new device after you started the plugin, you need to stop & start the plugin again.

Set up your widgets on the user interface

You can now place the widgets of your devices features on the user interface. Enjoy.

Development informations

Interval limitation

The refresh limitation of 60 seconds between 2 requests for the same diabox station is hard coded. It’s simply to prevent user to be too greedy... a so prevent server overloading.

How to add a new diabox station

That’s quick easy :

  • edit the info.json and add your device with his sensors
  • edit the lib/diaboxconfig.py and add your station on top of the file

Each diabox station has her own config (remote identifier and remote variable name). That’s why there is no common variable.

Wind unit : knot

The diabox are commonly used by sailors, so the wind speed unit is in knots (kts) by default. If you want to have it in km/h, you must multiply this value by 1.835

  • Example : 25 knots x 1.835 = 46 km/h

xPL messages

xpl-stat

The sensor.basic message is used:

xpl-stat
{
...
}
sensor.basic
{
type=<one of these sensors : temperature, humidity, windspeed, winddirection, pressure, rainrate>
device=<device_xpl_ref_device_id>
current=<value>
}

xpl-trig

n/a

xpl-cmnd

n/a

Changelog

1.0

  • Plugin creation with 16 diabox configured