MODBUS AIO

From OpenMotics
Jump to navigation Jump to search

Introduction

The AIO design also supports Modbus thermostats directly connected to the Micro CAN. This enables physical Modbus thermostats to be seamlessly integrated in the Openmotics system and allow users to control their thermostats online, by mobile app and by physical thermostats.

These are the possibilities of the physical thermostat supported by Openmotics:

  • Allows to set the setpoint of a room
  • Allows to change the mode (vacation, auto, party etc)
  • Change between heating and cooling
  • Uses the internal temperature sensor as sensor probe for the Openmotics system

Supported Modbus thermostats

Today, only Openmotics Modbus thermostats are supported but more thermostats will be supported in the future.

How to connect the Modbus thermostat

Following is needed to connect a Modbus thermostat:

  • An installed Micro CAN
  • An Openmotics Modbus cable
  • An Openmotics Modbus thermostat

The Modbus thermostat will be connected to the Openmotics Micro CAN by using the Openmotics Modbus cable that converts the UART output of the Micro CAN to a modbus signal.

The Micro CAN will communicate with the Modbus thermostat and will read the temperature of the thermostat, is able to read and set the thermostat setpoint and read/set the thermostat mode.

How to configure the system after connecting a Modbus Thermostat

Step1: Find the Micro CAN ID

In the following steps, we need to know the ID of the Micro CAN on which the Modbus thermostat is connected. Each Micro CAN needs at least 1 switch.

First, use following CLI instruction:

input debug on

Press the switch connected to the Micro CAN that has the connected Modbus thermostat. In this example, I got following CLI return:

Input Nr 13 has been pressed 

Now, do the following CLI instruction:

can ping list

Following return:

Nr-ID2.ID1.ID0--Inp.link0-Inp.link1-Inp.link2-Inp.link3-Inp.link4-Inp.link5-Tem.link0-Tem.link1-Type-Firmware-Boot-ID_NE-Modbus-Type-Min-MAX-delay--Volt--
00 008.228.145  008(000)  255(255)  255(255)  255(255)  255(255)  255(255)  008(000)  255(255)  044  F2.0.44  255   069   005   072  000 255 015ms  12.14V
01 238.081.226   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
02 154.043.222   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
03 140.120.075   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
04 172.084.031   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
05 100.166.094  013(005)  014(006)  255(255)  255(255)  255(255)  255(255)  255(255)  255(255)  000  F2.0.50  255   069   255   255  000 255 017ms  11.98V
OK

In the above example, check for all Micro CAN's the Inp.link0..5 and look for 13 (value not between brackets). In our example, we've found ID 100.166.94 containing input 13.

Step 2: Configure the Modbus ID

We're using a thermostat that responds to Modbus ID 1. This needs to be programmed in the Micro CAN by using following CLI instruction:

basic action activate 20 26 100 166 94 1

To check if the instruction has been programmed in the Micro CAN, use again the CAN ping instruction:

ping can list

Return:

Nr-ID2.ID1.ID0--Inp.link0-Inp.link1-Inp.link2-Inp.link3-Inp.link4-Inp.link5-Tem.link0-Tem.link1-Type-Firmware-Boot-ID_NE-Modbus-Type-Min-MAX-delay--Volt--
00 008.228.145  008(000)  255(255)  255(255)  255(255)  255(255)  255(255)  008(000)  255(255)  044  F2.0.44  255   069   004   128  000 255 015ms  12.10V
01 238.081.226   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
02 154.043.222   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
03 140.120.075   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
04 172.084.031   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
05 100.166.094  013(005)  014(006)  255(255)  255(255)  255(255)  255(255)  255(255)  255(255)  000  F2.0.50  255   069   001   255  000 255 017ms  3.46V
OK

As you can see, in the column Modbus, you see address 1 for our Micro CAN

Configure the Modbus Type

The Modbus Type represents 8 bits, those 8 bits will tell you which data (temperature, humidity etc) will be taken from the Modbus thermostat or from the Micro CAN connected sensors.

Modbus Type:

  • .BIT7: =0->Modbus VOC is used, =1->uCAN VOC is used
  • .BIT6: =0->Modbus CO2 is used, =1->uCAN CO2 is used
  • .BIT5: =0->Modbus humidity is used, =1->uCAN humidity is used
  • .BIT4: =0->Modbus temp is used, =1->uCAN temp is used
  • .BIT3: =0->Modbus LUX is used, =1->uCAN LUX is used
  • .BIT2: =0->Modbus SOUND is used, =1->uCAN SOUND is used
  • .BIT1:
  • .BIT0:

We've a thermostat that uses temperature, humidity and CO2. However, we will only use temperature and humidity from the Modbus thermostat (thus thermostat type = 0d11001111 = 207). This needs to be programmed in the Micro CAN by using following CLI instruction:

basic action activate 20 27 100 166 94 207

To check if the instruction has been programmed in the Micro CAN, use again the CAN ping instruction:

ping can list

Return:

Nr-ID2.ID1.ID0--Inp.link0-Inp.link1-Inp.link2-Inp.link3-Inp.link4-Inp.link5-Tem.link0-Tem.link1-Type-Firmware-Boot-ID_NE-Modbus-Type-Min-MAX-delay--Volt--
00 008.228.145  008(000)  255(255)  255(255)  255(255)  255(255)  255(255)  008(000)  255(255)  044  F2.0.44  255   069   004   171  000 255 015ms  12.02V
01 238.081.226   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
02 154.043.222   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
03 140.120.075   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
04 172.084.031   NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA(NA)    NA     NA     NA    NA    NA    NA   NA  NA >500ms  NA
05 100.166.094  013(005)  014(006)  255(255)  255(255)  255(255)  255(255)  255(255)  255(255)  000  F2.0.50  255   069   001   207  000 255 017ms  12.01V
OK

As you can see, in the column Type, you see Type 207 for our Micro CAN

ThermostatMode:

  • .BIT7: Wait Gateway for Setpoint to be updated (1)
  • .BIT6: Wait Micro CAN for Setpoint to be updated (1)
  • .BIT5:
  • .BIT4: Thermostat responding (1)
  • .BIT3: Mode
  • .BIT2: Mode
  • .BIT1: Cooling (0), Heating (1)
  • .BIT0: Thermostat not in use (0), in use (1)