CAN Control Installation

From OpenMotics
Revision as of 16:39, 12 February 2017 by Wilbert (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


OpenMotics allows the use of micro CAN switches. micro CANs have the advantage that they can use bus cabling allowing different switches to be connected on the same bus cable.

The CAN environment exist of minimum 2 components:

  • CAN Control: This is the controller that does the conversion between the RS485 Bus en the CAN bus. Every CAN installation requires minimum 1 CAN Control but can have more when more cabling rings are installed (per floor for example).
  • micro CAN: This is the module that will be installed behind the different switches and that allows connection of switches and leds. Depending on the model, the micro CAN can have additional sensors on-board like temperature, humidity and others.

Every micro CAN, sensor and led that has been assigned in the CAN bus will take up an input or sensor position. Depending on the number of switches and sensors assigned, the CAN Control will create multiple input and/or sensor modules. Those modules will be added to the Gateway when initialization is performed. One CAN Control can have 240 inputs and 240 sensors assigned (which is the maximum of the total system). When multiple CAN buses are present, multiple CAN Controls can be used.

For more information regarding the CAN Control Release notes see CAN Control Release Notes

For more information regarding the CAN Control hardware installation, see Hardware Installation Guide

Cable to use between CAN Control and the micro CANs: EIB (2x twisted pair, full copper, shielded, 0.8mm)

It will also be possible in the future to connect DALI output modules on the CAN Control module. For more information, see the DALI Installation Guide.


When all cabling is done and power is set the CAN Control, first the modules must be initialized on the CAN bus.

Initializing the micro CAN

First, the micro CAN must be initialized before the CAN Control can be initialized.

  • Press every switch that will be used. When successful, the Led will go on for a few seconds. A second press on that switch will not trigger the led anymore.
  • When the used micro CAN has a sensor connected, the first switch that is pressed on that module will automatically also initialize the connected sensors.

Every press of a switch will generate CAN traffic which can be seen on the Leds of the CAN Control. If you've doubts if a switch is properly working, you can also look at the CAN traffic.

Initializing the CAN Control

Once the micro CAN are initialized (and thus created the necessary input and sensor modules in the CAN Control), the CAN Control can be initialized now. See also the Leds CAN Control to understand their functionality.

  • Start module initialization by using the portal or maintenance mode:
 module discover start
  • The orange led on the CAN Control must be ON now (If not, check your RS485 cabling). Press the CAN Control init button now (you only have 1 button on this module so you can't miss) which will add the necessary input/sensor modules in the Gateway. You will see the modules that appears in the portal or in maintenance mode. Please note that there is no difference between (for the Gateway) between a normal input module and an input module coming from the CAN Control (idem for sensor module).
  • Stop module initialization by using the portal or maintenance mode:
 module discover stop

Note1: When new micro CAN are added or certain micro CAN are not initialized yet, do the initialization of the CAN buttons and restart the initialization of the CAN Control again. The missing input and/or sensor modules will then be added.

Note2: A micro CAN can have up to 6 inputs. Every input behaves as a separate CAN identity which means that every input must be initialized.

Note3: The order in which the individual inputs are initialized will also determine the input number.

Test the CAN Control & micro CAN

To test the input, do the following actions:

  • Go to Maintenance mode and type following function:
 input debug on
  • Press on the necessary micro CAN and the result must appear on the console. If not, the micro CAN is not working (due to bus issues for example) or not initialized yet.

Test the CAN Sensors

In Maintenance Mode, perform the following instructions:

  • Check if the sensors appears in the sensor list:
 temperature list             ;Check all temperature sensors
 humidity list                ;Check all humidity sensors
  • If you want to check which sensor is on which module, use the indicate instruction:
 sensor indicate 1            ;In this case, all the leds of sensor 1 will fade-in and out

Using the CAN leds

Every micro CAN has a led per input. Every output of the system can program up to 4 leds that will follow this output. A typical example is the Bathroom led on the outside of the bathroom: When the Bathroom is occupied, the Led will be flashing.

Every output can trigger up to 4 leds. To do so, every output has 8 bytes (2 bytes per led action) reserved in the Eeprom Memory Model starting at Page 221.

The led action consist of 2 bytes:

  • Led Nr: Every CAN input has a led linked to it. The Led nr has a range of 0-239.
  • Led function: The led function will program how the led will behave at what brightness. See Led function for the details.

The leds can also be programmed to go ON or OFF depending on certain conditions. For example, when a light is still ON somewhere in your house, a led should blink to indicate that not all lights are off.


Let's create an example in maintenance mode how to activate leds and how to use them:

Search for the right led

We presume we've already activated the micro CAN and CAN gateway. First we want to know if we've the right leds (linked to a micro CAN) so following command will be executed:

 input debug on

Now, every input that is pressed will appear on the console. We want to link 2 leds to 1 output and we will press the 2 associated switches (in this example, we get input 10 and 11). Now we know the led numbers, the input debug can be switched off:

 input debug off

We can also test our leds by using the following instruction (in this case for input/led 10):

 input indicate 10

Link a led to an output

Now we want to link output 1 to led 10 and 11. Furthermore, Led 10 should go ON when output 1 is ON and led 11 should go ON when output 1 is OFF. Furthermore, Led 11 should fade in/out when it is ON. To see all the details which bytes to program, see eeprom Memory Model Page 221.

 eeprom write 221 8 10       ;Led 10 is linked to Output 1
 eeprom write 221 9 15       ;Output ON -> Led ON at max brightness, Output OFF -> Led OFF (see Led function)
 eeprom write 221 10 11      ;Led 11 is linked to Output 1
 eeprom write 221 11 207     ;Output ON -> Led OFF, Output OFF -> Led ON fading in/out at Max brightness (see Led function)

Test the led by switching the output

To test the leds, switch output 1 ON and OFF:

 output on 1
 output off 1

Activate a Led function by using Basic Actions

It's also possible to activate leds (on/off/blink etc) by using Basic Actions 212 to 217. See Basic Action details in Action Types document.

 basic action activate 213 23          'BA 213 23: Switch On led 23
 basic action activate 214 24          'BA 214 24: Fast blinking of led 24
 basic action activate 212 25          'BA 212 25: Switch off led 25

Note: You have different possibilities to activate leds (BA's, condition based, Follow output) so be aware that, if these possibilities are used on the same led, the last activated function will be present on the led.

Program a condition to switch on/off a led

We can also program the led behavior depending on for example the number of lights that are ON (for more info, see Memory Model eeprom page 229). In this example, we will make led 15 blink fast when 1 or more lights are ON and the led will be switched off when no lights are ON.

 eeprom write 229 0 15       ;execute instruction on led 15 when all lights are off
 eeprom write 229 1 128      ;Switch off led, see Led condition function
 eeprom write 229 8 15       ;execute instruction on led 15 when NrofLights>0 
 eeprom write 229 9 24       ;led will blink fast at medium brightness, see Led condition function

Adapt the Minimum/Maximum brightness of the Leds

It's possible to change the Minimum/Maximum brightness of the CAN leds used. To do this, a change of eeprom values is needed. For more information about the Minimum/Maximum brightness, see Memory Model Page0/Byte31-32.

 eeprom write 0 31 0         ;Minimum brightness: I want to keep my leds off when a led is off
 eeprom write 0 32 128       ;Maximum Brightness: I prefer my leds less bright when switched ON

It's also possible to set the Minimum/Maximum brightness by using Basic Actions. These BA's will not change the eeprom value so after a power outage, the eeprom values will always be used. The use of these BA's is very useful to change the brightness during day and night for example. See Action Types BA 218 and 219.

Some notes

Note 1: The CLI instruction "eeprom activate" is not needed in all of the above cases.

Note 2: Since the eeprom information must be copied from the Gateway to the CAN Control over the RS485 bus, the changes can take up to 30 seconds before the changes take effect.

Note 3: If the CAN Control is added to an existing installation in a later stage, the full eeprom information must be copied from the gateway to the CAN Control. This can take up to 20 minutes before the systems are synchronized. If the systems are not fully synchronized, the sniffer functionality of the CAN Control will not be active yet and will not detect the output changes and so the leds will not yet follow the programmed outputs.

Note 4: The Master and Gateway should know which modules are normal input/sensor modules and which modules are generated by the CAN control and thus CAN input/sensor modules. To indicate the module type, the Memory Model has been extended with Page2-31/Byte252 which indicates the module Type. If byte 252 = 255 then it's a normal module. If byte 252 = 67 ("C") then it's a module generated by the CAN control. See Memory Model for more information.