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-Model-Speed-Status-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   255   255   255   255   000   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    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    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    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    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.54  255   069   255   255   255   255   000   000 255  019ms 11.98V

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.

For Modbus Parameter explanation, See Modbus Parameters

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-Model-Speed-Status-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   255   255   255   255   000   000 255  019ms 12.12V
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    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    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    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    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.54  255   069   001   255   255   255   000   000 255  025ms 11.96V

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

Step 3: Configure the Modbus Speed

We're using a thermostat in this example that works at a Modbus speed of 9600 baud.

For Modbus Parameter explanation, See Modbus Parameters

This needs to be programmed in the Micro CAN by using following CLI instruction:

basic action activate 20 27 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-Model-Speed-Status-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   255   255   255   255   000   000 255  019ms 12.12V
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    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    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    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    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.54  255   069   001   255   255   001   000   000 255  025ms 11.96V

As you can see, in the column Speed, you see speed 1 for our Micro CAN

Step 4: Configure the Modbus Model

We're using thermostat Model 0 in this example.

For Modbus Parameter explanation, See Modbus Parameters

This needs to be programmed in the Micro CAN by using following CLI instruction:

basic action activate 20 29 100 166 94 0

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-Model-Speed-Status-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   255   255   255   255   000   000 255  019ms 12.12V
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    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    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    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    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.54  255   069   001   255   000   001   000   000 255  025ms 11.96V

As you can see, in the column Model, you see Model 0 for our Micro CAN

05 100.166.094  013(005)  014(006)  255(255)  255(255)  255(255)  255(255)  010(002)  255(255)  000  F2.0.54  255   069   001   207   000   001   002   000 255  019ms 11.98V

Step 5: 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.

For Modbus Type explanation, See Modbus Parameters

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
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-Model-Speed-Status-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   255   255   255   255   255   000   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    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    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    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    NA    NA  NA >500ms  NA
05 100.166.094   NA(NA)    NA(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
06 023.241.051  015(007)  040(008)  255(255)  255(255)  255(255)  255(255)  010(002)  255(255)  000  F2.0.54  255   069   001   207   000   001   002   000 255  019ms 11.98V


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

Step 4: Add sensor in the Master processor

Once the above steps are performed, the uCAN is programmed and now the uCAN must request a sensor number from the master. This is done by pushing one of the switches connected on the uCAN. To see if this has been successfully executed, do the following:

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)  009(001)  255(255)  000  F2.0.50  255   069   001   207  000 255 017ms  12.01V
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-Model-Speed-Status-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   255   255   255   255   255   000   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    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    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    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    NA    NA  NA >500ms  NA
05 100.166.094   NA(NA)    NA(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
06 023.241.051  015(007)  040(008)  255(255)  255(255)  255(255)  255(255)  010(002)  255(255)  000  F2.0.54  255   069   001   207   000   001   002   000 255  019ms 11.98V


As you can see, in the column Temp.Link0, you see that sensor 9 has appeared in our uCAN. So Sensor 9 will be used to display the Thermostat Modbus data. You can use the below instruction to display the Sensor data:

sensor list

Return: