View Categories

Base and MODBUS weather station

This tutorial demonstrates the method of integration of the Elsner Elektronik weatherstation model P03/3-MODBUS with the DOMIQ/Base.

The functionality of the station includes:

  • The temperature measurement.
  • The measurement of sun exposure with the use of three independent sensors – for the eastern, southern and western direction.
  • Wind speed measurement.
  • Detection of precipitation (rain and snow). The sensor does not respond to fog and hoarfrost.

There is also a version of the weather station with included GPS receiver which enhances the functionality with the reading of the geographic position and the present time. We recommend the version without GPS, as the Base module offers exactly the same functions and the station in this configuration is much cheaper.

The station is not equipped with the humidity and pressure sensors. It should be noted, that the wind speed measurement accurace is ±25% and the brightness measurement accuracy is ±35%. For these reasons, the station is the most useful for controlling shutters, roller blinds and sun-blinds or garden watering.

1. Configuration of the weather station #

The Elsner Elektronik P03/3-MODBUS weather station is using the MODBUS RTU protocol, which makes integration with the DOMIQ system very simple with the DOMIQ/Serial-4MB extension module. Connection shall be made using the 2-core wire, where terminals A and B of the weather station must be connected with terminals A and B of the Serial-4MB module.

The weather station is powered with 24V DC voltage; attention must be paid to correct polarisation of wires.

1.1. MODBUS parameters configuration #

The communication parameters are established with the use of micro-switches on the printed circuit board of the weather station. The manufacturer’s configuration, in which all the switches are off, has been presented in the figure below:

The default configuration corresponds to the following parameters: address 1, transmission speed – 19200bit/s, frame format – 8E1, terminator off.

Setting MODBUS address

The first block of 8 switches (on the right) serves the purpose of setting the MODBUS address of the device. The address is coded binarily, therefore, for instance, when we want to set address 26, then switches No. 2, 4 and 5 must be switched to ON position.

Setting transmission parameters

The other 8 switches serve the purpose of setting the data transmission parameters. The first 4 of them establish the transmission speed, the other 2 set the frame format. Switch No. 7 is not used. Switch No. 8 activates the termination of the data bus and should be switched on, if the weather station is connected at the end of the longer data line. The terminators should be switched on only in the case of the two terminal devices.

In the following parts of this tutorial we will use the manufacturer’s settings.

In order for the measurements performed by the weather station to be reliable, the instructions regarding installation included in the product documentation should be observed.

2. Base module configuration #

The Base module configuration boils down to three activities:

  1. Configuration of the MODBUS communication parameters of the Base module.
  2. Addition of the weather station registers readings.
  3. Display of the read-out values in a legible form.

The data from the weather station can be displayed in the Remote menu or on the visualization, optionally, it is also possible to associate the readings of values from the station with other Base module functions, for instance with events, logic or timers.

The more advanced issues, such as the use of data from the brightness sensors, including the sun position calculated by the Base for controlling the shutters and roller blinds will be described in other tutorial.

2.1. MODBUS configuration #

The fragment of the weather station documentation, concerning the operation of the MODBUS protocol, is described in a very misleading way. On top of that the station interprets the value of the MODBUS register start address erroneously, but this can be handled through use of start address multiplied by two, as in table below.

The table below contains the necessary data for configuration of the station:

RegisterTypeFormatGainNameRange
0inregint160.1Temperature-25 do 80°C
2inreguint16Sun exposure – south1 do 99 kLux
4inreguint16Sun exposure – east1 do 99 kLux
6inreguint16Sun exposure – west1 do 99 kLux
8inreguint16Brightness0 do 999 kLux
10inreguint160.1Wind speed0-70 m/s
13inreguint16Rain sensor256 = rain; 0 =NA
  1. The configuration begins with adding the interface and setting the transmission parameters compatible with the settings of the weather station:
  2. As the next step, add a device, assign an address to it in accordance with the settings of micro-switches on the PCB of the weather station and enter a unique name, e.g. meteo.
  3. Then add the readings of registers according to the table presented above. The names of registers may be discretional, in accordance with the principles of nomenclature of identifiers. The exemplary configuration may look as follows:
  4. The configuration is now ready. After saving the configuration and after several seconds, the data from the weather station should be visible in the State tab.

Import of the configuration

The elsner_p03.xml file with the configuration of the weather station ready for import is attached to this tutorial. The file must be imported in the MODBUS tab. In order to do it:

  • Click on the interface name and then push on the Import button.
  • Select the downloaded elsner_p03.xml file from your hard drive. After the correct import, the device will appear on the list.
  • Complete the following fields: Name (without spaces) and Address (according to the micro-switch settings on the PCB of the weather station).

2.2. The display of the measuring values #

In this subchapter, we will present the method of displaying the measurements from the weather station in the Remote application. The activities presented here can also be applied on the visualization.

The exemplary final effect may look as follows:

The Remote configuration:

  1. Add a page and a section and give them names.
  2. Add the Value element and complete its properties:
    • Enter a description in the Label field.
    • In the Channel field, enter the identifier, which is responsible for the reading of the given register. The syntax is as follows: MODBUS.<interface>.<device>.<name>in our case, for the temperature: MODBUS.int.meteo.temp.out.
    • In the Unit field, enter the unit of the displayed value.
    • Select the accuracy of displaying the measured value, determining the number of decimals.
  3. For the remaining Values, repeat step 2.
  4. In order to display information on precipitation, we used the Status element. In the Channel field, enter the name of the identifier responsible for the reading of precipitations, in our case MODBUS.int.meteo.rain. The lack of precipitation may be represented by the green light, and the precipitation may be represented by the blue light.
  5. Configuration is ready!. By analogy, you can define the readings on the visualization (use the following elements: Value and Light).

3. Application #

The data collected from the weather station, besides the purely informative function, can be used for controlling the subsystems of an intelligent home, such as:

  1. Shutter/external roller blinds. The measurement of sun exposure and wind is of greatest significance here. By combining the measurement of sun exposure with the information on position of the sun in the sky, calculated by the Base module, it is possible to control the shutters or roller blinds adaptively, so that as many as possible sun rays could get into the rooms during the cool season, or the other way round, so that the heating of the rooms during the summer time could be limited.

    Having the data from the wind sensor at our disposal, we can create such logic rules, which will lower the roller blinds during the strong wind in order to protect the windows from the potential hazards, or fold the sun blinds, in order to protect them from damage.
  2. Garden watering. After the precipitation is detected, the automation system will switch off the sprinklers to save water. Watering can be restarted after specific time from the moment of rain decay.

If your have any additional ideas or suggestions how to use the weather station for controlling the house automation system, feel free to share them in the comments on our Google+ profile.

Attached files #

Powered by BetterDocs

Select your currency
PLN Polish złoty
EUR Euro