DMX

Requirements

This plugin needs one of the supported DMX interfaces:

  • NanoDMX
  • DMXking it should work with other Enttec Pro compatible as well.

and pyserial.

apt-get install python-serial

Configuration

plugin.conf

[dmx]
   class_name = DMX
   class_path = plugins.dmx
   tty = /dev/usbtty...
#  interface = nanodmx

You have to adapt the tty to your local enviroment. In my case it’s /dev/usbtty-1-2.4 because I have the following udev rule:

# /etc/udev/rules.d/80-smarthome.rules
SUBSYSTEMS=="usb",KERNEL=="ttyACM*",ATTRS{product}=="NanoDMX Interface",SYMLINK+="usbtty-%b"

With ‘interface’ you could choose between ‘nanodmx’ and ‘enttec’. By default nanodmx is used.

items.conf

dmx_ch

With this attribute you could specify one or more DMX channels.

Example

[living_room]
    [[dimlight]]
        type = num
        dmx_ch = 10 | 11

Now you could simply use:

sh.living_room.dimlight(80)

to dim the living room light.

Functions

send(channel, value)

This function sends the value to the dmx channel. The value could be 0 to 255.

sh.dmx.send(12, 255)