Skip to content

GCE Binding ​

This binding aims to handle various GCE Electronics equipments. IPX800 is a 8 relay webserver from gce-electronics with a lot of possibilities:

  • 8 Digital Input
  • 8 Relay (250V / 10A / channel)
  • 4 Analog Input
  • 8 Counters
  • Ability to cascade up to 3 extensions for a total of 32 inputs / 32 relay

Each IPX800 connected to openHAB must be configured with the setting 'Send data on status changed' on the website in M2M > TCP client.

To make it simple, IPX800 is a simple device that drives output and retrieves input. On input we generally connect push buttons (for instance house switches), on outputs we can connect light bulbs for instance.

Features of the binding:

  • Multi ipx support
  • Direct TCP connection
  • Auto reconnect
  • Simple clic/Long press
  • Pulse mode support

Binding Configuration ​

There is no configuration at binding level.

Thing Configuration ​

The IPX800v3 (ID : 'ipx800v3') accepts the following configuration parameters :

PropertyDefaultRequiredDescription
hostnameYesIP address or hostname.
portNumber9870NoTCP client connection port.
pullInterval*5000NoRefresh interval (in ms)

The binding will query periodically the 'globalstatus.xml' page of the IPX to get fresh information. This is especially useful for Analog inputs and Counter as modification of these values on PLC side does not trigger any M2M message.

The thing provides four groups of channels.

Digital Inputs ​

This represents the inputs of the PLC. Each can be open or closed. They are usually commuted by physical devices like pushbuttons, magnets...

Digital Input Channels (contacts) ​

Each input will have these associated channels:

GroupChannel NameItem TypeR/WDescription
contactportnumberContactRStatus of the actual port (OPEN, CLOSED)
contactportnumber-durationNumber:TimeRUpdated when the port status changes to the duration of the previous state.

Associated events:

Channel Type IDOptionsDescriptionConf Dependency
portnumber-eventTriggered on or after a port status change
PRESSEDTriggered when state changes from OPEN to CLOSED
RELEASEDTriggered when state changes from CLOSED to OPEN
LONG_PRESSTriggered when RELEASED after a long periodlongPressTime
SHORT_PRESSTriggered when RELEASED before a long periodlongPressTime
PULSETriggered during CLOSED statepulsePeriod

Configuration ​

PropertyDefaultUnitDescription
debouncePeriod0(*)msDebounce time (ignores flappling within this time). No debounce is done if '0'.
longPressTime0(*)msDelay before triggering long press event. Ignored if '0'.
pulsePeriod0(*)msPeriod of pulse event triggering while the entry is closed. Ignored if '0'.
pulseTimeout0(*)msPeriod of time after pulsing will be stopped. None if '0'.
  • Values below 100ms should be avoided as the JVM could skip them and proceed in the same time slice.

Digital Outputs Channels (relays) ​

Each output will have these associated channels:

GroupChannel NameItem TypeR/WDescription
relayportnumberSwitchR/WStatus of the actual port (ON, OFF)
relayportnumber-durationNumber:TimeRUpdated when the port status changes to the duration of the previous state.

Configuration ​

PropertyDefaultDescription
pulsefalseIf set, the output will be in pulse mode, releasing it after the contact

Counters Channels ​

Each counter will have these associated channels:

GroupChannel NameItem TypeR/WDescription
countercounternumberNumberRActual value of the counter
countercounternumber-durationNumber:TimeRUpdated when the counter status changes to the duration of the previous state.

Configuration ​

This channel has no configuration setting.

Analog Inputs Channels ​

Each analog port will have these associated channels:

GroupChannel NameItem TypeR/WDescription
analogportnumberNumberRValue of the port.
analogportnumber-durationNumber:TimeRUpdated when the port status changes to the duration of the previous state.
analogportnumber-voltageNumber:ElectricPotentialRElectrical equivalency of the analogic value

Configuration ​

PropertyDefaultDescription
hysteresis0If set, the channel will ignore status if change (+ or -) is less than hysteresis/2

Rule Actions ​

Multiple actions are supported by this binding. In classic rules these are accessible as shown in the example below:

Getting ipxActions variable in scripts

rules
 val ipxActions = getActions("gce","gce:ipx800v3:43cc8d07")
 if(null === ipxActions) {
        logInfo("actions", "ipxActions not found, check thing ID")
        return
 } else {
        // do something with sunActions
 }

resetCounter(counterId) ​

Resets the value of the given counter to 0.

  • counterId (Integer) - id of the counter.

reset(placeholder) ​

Restarts the PLC.

  • placeholder (Integer) - This parameter is not used (can be null).

Example ​

Things ​

ipx800.things

dsl

Thing gce:ipx800v3:ipx "IPX800" @ "diningroom" [hostname="192.168.0.144", portNumber=9870] {
    Channels:
        Type contact : contact#1 [       // Aimant Détection porte de garage ouverte
            debouncePeriod=2500,
            pulsePeriod=1000,
            pulseTimeout=60000
        ]
        Type contact : contact#2 [       // Aimant Détection porte de garage fermée
            debouncePeriod=2500
        ]
        Type relay : relay#8 [       // Actionneur porte de garage
            pulse=true
        ]
}

ipx800.items

dsl

Group gIPXInputs "Inputs" <input>
Contact input1 "Porte garage ouverte [%s]" <contact> (gIPXInputs) {channel="gce:ipx800v3:ipx:contact#1"}
Contact input2 "Porte garage fermée [%s]"  <contact> (gIPXInputs) {channel="gce:ipx800v3:ipx:contact#2"}

Group gIPXOutputs "Outputs" <output>
Switch output3 "Chaudière" <furnace> (gIPXOutputs) {channel="gce:ipx800v3:ipx:relay#3"}
Switch output4 "Lumière Porche" <light> (gIPXOutputs) {channel="gce:ipx800v3:ipx:relay#4"}