EIB_Items.pm

EIB_Item

SYNOPSIS

NONE

DESCRIPTION

EIB (European Installation Bus) items.

EIB/KNX website: http://konnex.org

The following EIB types are supported: (MH Klassname, DPT Type, EIS Type, Description)

    EIB1:    DPT  1.001, EIS 1,      Switches
    EIB2:    NA,         EIS 2,      Dimmers
    EIB3:    DPT 10.000, EIS 3,      Time
    EIB4:    DPT 11.000, EIS 4,      Date
    EIB5:    DPT  9.000, EIS 5,      Values (weather stations etc)
    EIB6:    DPT  5.001, EIS 6,      Scaling (0 - 100%)
    EIB7:    NA,         EIS 7,      Motor drives
    EIB8:    DPT  2.001, EIS 8,      forced control 2 bit
    EIB9:    DPT 14.00x, EIS 9,      32-bit float
    EIB10:   DPT  7.001, EIS 10,     16-bit unsigned integer
    EIB10_1: DPT  8.001, EIS 10.001, 16-bit   signed integer
    EIB11:   DPT 12.001, EIS 11,     32-bit unsigned integer
    EIB11_1: DPT 13.001, EIS 11.001, 32-bit   signed integer
    EIB14:   DPT  6.001, EIS 14,      8-bit   signed integer
    EIB14_1: DPT  5.010, EIS 14.1;    8-bit unsigned integer
    EIB15:   DPT 16.000, EIS 15,     14 byte text messages

    EIBW:    NA,         NA,         summary object for 2 EIS1 Objects
                                     to define the state of a window
                                     (closed, tilt, open)

INHERITS

Generic_Item

METHODS

eib_items_by_id

Lookup EIB_Item with the given address

new

Generic EIB_Item class. This class is not instantiated directly. It is used to inherit common EIB properties

printname

Item name to appear in logs etc

set_receive

detected an EIB event on the bus. Update item state to reflect the value in the event

send_write_msg

generate EIB message to set a value

send_read_msg

generate EIB message to read a value

receive_write_msg

process a message to set a value

receive_reply_msg

process a message with a reply value (read response)

receive_msg

entry point from device interface. Analyse message and call appropriate receive_*_msg handler

start_read_timer

set a timeout for waiting for read response

stop_read_timer

disable timer

read_timeout

No reply to read request. Retry or give up.

read_request

send a read request, and start timer

delayed_read_request

wait a while and then send a read request. If a read request is sent too soon, the EIB actuator may not have obtained a stable value, so we want to delay before sending the request.

INI PARAMETERS

NONE

AUTHOR

09/09/2005 Created by Peter Sjödin peter@sjodin.net 06/01/2009 Enhanced by Ralf Klueber r(at)lf-klueber.de 08/01/2009 Listening addresses by Mike Pieper mptei@sourceforge.net

SEE ALSO

NONE

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

EIB Sub-Items

INHERITS

EIB_Item

EIB1_Item

decode

translate EIS 1 data to state (on/off)

encode

translate state to EIS 1 data

EIG1G_Item

A group of EIB1 items. Setting the value of an EIB1 group will affect all members in the group. The class is used to keep track of EIB1 group memberships. If a write message is detected, all members will be updated.

DIB2_Item

 EIS 2: Dimming
  EIB dimmers can be controlled in three different ways:
  1. "control": brighten, dim, stop. Handled by class EIB21_Item
  2. "value": numerical value: Handled by class EIB6_Item
  3. "position": on, off. Handled by class EIB1_Item

  Class EIB2_Item is a meta-item to represent dimmers, consist of the three underlying item.
  The main purpose is to make a dimmer appear as a single item, while the real work is done
  by the three underlying items.

  The identifier for the EIB2_Item is composed of the concatenation of the addresses of
  the three underlying items, with '|' between them. For example, '1/0/90|1/0/91|1/4/1' is a dimmer
  with control address 1/0/90, value address 1/0/91, and position address 1/4/1.
new

create an EIB2_Item. Instantiate the three underlying items.

position

return "position" sub-item

control

return "control" sub-item

value

return "value" sub-item

set

Set EIB2 item. Parse state to determine the corresponding sub-item to call.

set_receive

received an event from one of the sub_items. If it was a numerical value ("Value"), update the "Position" subitem to 'on' or 'off'. If the value was zero, also set self to 'off'. Update level (0-100) to represent dimmer position

state_level

return 'on', 'off' or 'dim', depending on current setting (as obtained from "value" sub-item)

EIB2_Subitem

A generic class for the three dimming sub-functions

dimmer

return "dimmer" meta-item

set_receive

forward to meta-item

EIB21_Item

Dimming sub-function "control"

dimmer_timeout

dimmer should have reached stable state. Issue a read request to obtain current value

set

To allow adjusting dimmer value in real-time from for example web interface: If state is set to same dim/brighten value twice before dimmer timer has expired, it means "stop". For example, first 'dim' means start dimming, second means stop dimming (This behaviour is configurable via configuration parameter "eib_dim_stop_on_repeat")

set_receive

if it is a 'stop' event, generate a read request for the 'Value' sub-item, to learn the actual dimmer setting

EIB22_Item

Dimming sub-function "value". Set dimmer to a given brightness level (0-100) with 8 bit resolution Values are coded according to EIS 6

set_receive

detected a "read" or "write" message on the bus. For readable actuators, don't trust the values in "write" messages, as they may not have been accepted by the actuator. So if it is a write, and the actuator is readable, generate a read request to obtain the actual value from the actuator

EIB23_Item

Dimming sub-function "position". Set dimmer to on/off. Values are coded according to EIS 1

EIB3_Item

Uhrzeit

EIB4_Item

Uhrzeit

EIB5_Item

EIB6_Item

"scaling". Relative values 0-100% with 8 bit resolution

set_receive

detected a "read" or "write" message on the bus. For readable actuators, don't trust the values in "write" messages, as they may not have been accepted by the actuator. So if it is a write, and the actuator is readable, generate a read request to obtain the actual value from the actuator

EIB8_Item

"forced control". 2 bit

  Enforcement  ON  + Turn Device ON  (11)
  Enforcement  ON  + Turn Device OFF (10)
  Enforcement  OFF + Turn Device OFF (00)
  Enforcement  OFF + Turn Device ON  (01)

EIB9_Item

32-bit float

EIB10_Item

16-bit unsigned integer

EIB10.1_Item

16-bit signed integer

EIB11_Item

32-bit unsigned integer

EIB11.1_Item

32-bit signed integer

EIB14_Item

8-bit signed integer

EIB14_1_Item

"scaling". Relative values 0-255 with 8 bit resolution

set_receive

detected a "read" or "write" message on the bus. For readable actuators, don't trust the values in "write" messages, as they may not have been accepted by the actuator. So if it is a write, and the actuator is readable, generate a read request to obtain the actual value from the actuator

EIB7_Item

Drive control

  Blinds, windows, etc
  Drives can be controlled in two different ways:
  1. "move": up/down
  2. "stop": stop/step movement

  NB EIS7 objects may not be read, since this can cause drive movements
set

set EIB drive item. Parse state to determine the corresponding sub-item to call. Don't modify own state here -- that will be done later, when/if the sub-items call set_receive for this item.

EIB7_Subitem

generic class for drive sub-functions

new

Instantiated with last args "driveid": the id of EIS7 item to which this subitem belongs

set_receive

forward to main Drive item (EIS7 item)

EIB71_Item

Dimming sub-function "move"

EIB72_Item

Drive sub-function "stop"

EIB73_Item

Drive sub-function "step-up/step-down"

EIB15_Item

14-Byte Text Message

EIBW_Item

EIBW: Windows type of object wich uses 2 underlaying EIB1 Items (Top and Bottom) Definition as follows EIBW , GA1|GA2, Name, nameforOffOf|nameOffOn|NameOnOff|NameOnOn

new

create an EIBW_Item. Instantiate the three underlying items.

set_receive

received an event from one of the sub_items.

EIBW_Subitem

generic class for the three dimming sub-functions

set_receive

forward to meta-item

EIBW1_Item

AUTHOR

  09/09/2005  Created by Peter Sjödin peter@sjodin.net
  06/01/2009  Enhanced by Ralf Klueber r(at)lf-klueber.de
  08/01/2009  Listening addresses by Mike Pieper mptei@sourceforge.net

SEE ALSO

NONE

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 421:

Non-ASCII character seen before =encoding in 'Sjödin'. Assuming ISO8859-1

 EIB_Items.pm