Table Of Content

Plugin k8056

Purpose

The k8056 plugin is used to control the Velleman k8056 relay board

http://www.velleman.eu/products/view/?country=fr&lang=en&id=351282

_images/k8056.png

Dependencies

Python module: pyserial (>=2.5)

K8056 Board need a serial interface.

it’s possible to remote control th board with the Remserial program: http://lpccomp.bc.ca/remserial/

Plugin configuration

Only need to set the “K8056 serial device”

Create the domogik devices

Domogik device type : “k8056 relay”

2 parameters are needed for a domogik device creation:

Key Type Description
addresse integer k8056 board address (805600001..805600255) for real address (1..255)
unit integer Relay number of k8056 board (1..9), 9 is for all relay
_images/Domogik_k8056_Device.png

Start the plugin

You can now start the plugin (start button) and use the created domogik devices.

Set up your widgets on the user interface

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

_images/Domoweb_k8056_Widgets.png

Development informations

xPL messages

xpl-cmnd

The ac.basic message is used:

xpl-cmnd
{
...
}
ac.basic
{
address=<address (805600001..805600255) for k8056 board address (1..255)>
unit=<relay number of k8056 board (1..9), 9 is for all relay>
command=<value : on|off>
}

xpl-stat

The ac.basic message is used:

xpl-stat
{
...
}
ac.basic
{
address=<address (805600001..805600255) for k8056 board address (1..255)>
unit=<relay number of k8056 board (1..9), 9 is for all relay>
command=<value : on|off>
}

xpl-trig

n/a

Protocole informations

Technical Description of K8056 Board serial protocol

  • Port RS232 is configure with this setting: 2400/8/n/1

  • To control the k8056 card, the correct sequence needs to be send like this:

    • Ascii code 13
    • Card address (1..255)
    • Instruction (see below), only supported now ‘S’|’C’|’T’ set/clear/toggle
    • Relay (‘1’..‘9’), 9 for all relay
    • Checkum, it is the 2-complement of the sum of the 4 previous bytes + 1.
  • Instructions:

    • ‘E’: Emergency stop all cards.
    • ‘D’: Display address of all cards in a binary fashion (LD1:MSB, LD8:LSB)
    • ‘S’: Set a relay, followed by relay # (‘1’..‘9’ in ASCII), 9 for all relay.
    • ‘C’: Clear a relay, followed by relay # (‘1’..‘9’ in ASCII), 9 for all relay.
    • ‘T’: Toggle a relay, followed by relay # (‘1’..‘8’ in ASCII).
    • ‘A’: Change the current address of a card, followed by the address (1..255)
    • ‘F’: Force all cards address to 1 (default)
    • ‘B’: Send a byte, Allows to control the 8 relays in 1 byte (LD1:MSB, LD8:LSB)

Changelog

0.1

  • Plugin creation