Electronics > Projects, Designs, and Technical Stuff

Figuring out an RS485 protocol?

<< < (6/8) > >>


Here are my advance:

110568d8 – Living room thermostat
40 – Id SetPoint temperature
02c2 – Value
2d7ff – Id real temperature
02ba – Value

Which model of thermostat do you have??

i have also Uponor Device. I want to repace the original uponor room thermostat and use home automation system that has rs485 interface.

With the Infos form here and with the log of one of my thermostat, i think i have some more idea of the protocol, but it is still something missing.

i also have a set nearly looks like the other ones postet here.

10   4   21   77   FF   D3   49                                                                     
10   4   21   77   40   3   4   3E   0   0   3F   0C   8   3B   2   B3   53   D0                                    
10   4   21   77   2D   7F   FF   3D   0   0   0C   0   24   37   1   9A   38   3   B6   3B   2   B3   3C   0   48   35   80   0   4A   31

see this set for example.

i think the first byte is something like device type. i use t145, wich is more basic one then yours.
i think uponor uses diffrent values for diffrent thermostat types.

i also think that this is a poll message form the controller to get the the values from the connectet thermostats.
10   4   21   77   FF   D3   49   

in my case the termostat answers with this to packets.
i think i have found something intressting.
see this messages. i have removed the header at the beginning and the crc at the end
I think the message follows a simple rule. 1 byte messege code, 2 bytes value.
using this rules i think about that:

40   3   4   3E   0   0   3F   0C   8   3B   2   B3                                    
2D   7F   FF   3D   0   0   0C   0   24   37   1   9A   38   3   B6   3B   2   B3   3C   0   48   35   80   0

40 = actual temp = x03x04 -> 772 -> (772-320)/18 = 25,1°C
3E = ?
3F = ?
3B = set Point temp = x2x3B -> 571 -> (571-320)/18 = 20,6°

and the second packet
2D = ? not sure, maybe a value in twos complement. in KNX 7fff is reserved for not available value.
3D = ?
0c = humidity? -> sure about this. the value could be posible, but i dont know if this thermostat is able to messure humidity.
37 = Min possible Set Point Temp (5°C)
38 = Max possible Set Point Temp (35°C)
3B = again the setpont temp
3C = ?

after i study the modbus document i think ther should be some values for:
heating/cooling mode,
day/night mode,
diffrent setpoint temp in cooling mode
diffrent setpoint temp in night mode  (maybe after the 2D) could be -2K or something
actual humidity
setpoint humidity.

so now the problem is: on my thermostat i can only change the setpoint temp. When i change the setpoint temp i can see diffrent value after 3B. When i use hairdryer i can see higher value after 40.

could maybe one of you check if my theory could be bossible? Or mybe somone of you have thermostat wher you can see humidity, or something else to double check if i have found right messeg code.

i have attached excel sheet. you can put your message there and it calculates the thinks i found out.

Thank you

Hi guys,
This topic really helped me out on my quest. I'm a bit stuck and I don't really know what to do, hopefully you can help out.

So I have a Uponor Smatrix Base X-245 base station with the Uponor Smatrix Base T-146 Bus thermostats. I have 8 of them hooked up, and this is the output I can read using a Raspberry Pi 3B+ and a MAX485 device:

--- Code: ---110c1bcaffbdb4
--- End code ---

So I was really happen when I was able to read the actual and set temperature values from this response. Since the request/responses adhere to the CRC-16 (Modbus) check, I started an attempt to set the temperatures. So I've installed the Python package minimalmodbus and configured my instrument as follows:

--- Code: ---import minimalmodbus
from gpiozero import OutputDevice
de = OutputDevice(23)
re = OutputDevice(24)
instrument = minimalmodbus.Instrument('/dev/serial0', 1, minimalmodbus.MODE_RTU)
instrument.serial.timeout = None
instrument.debug = True

--- End code ---

But whatever command I try to send, e.g. instrument.read_register(40006,0,3,True) to read the value set for channel 6, I keep getting the "11 0C" response, which indicates that it's an functioncode 12 "Get Comm Event Log" response.

This is the error:

--- Code: --->>> instrument.read_register(40006,0,3,True)
MinimalModbus debug mode. Will write to instrument (expecting 7 bytes back): 01 03 9C 46 00 01 4B 8F (8 bytes)
MinimalModbus debug mode. Clearing serial buffers for port /dev/serial0
MinimalModbus debug mode. No sleep required before write. Time since previous read: 2965.81 ms, minimum silent period: 2.01 ms.
MinimalModbus debug mode. Response from instrument: 11 0C 1B CA FF BD B4 (7 bytes), roundtrip time: 7.0 ms. Timeout for reading: 0.0 ms.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/minimalmodbus.py", line 486, in read_register
  File "/usr/local/lib/python3.7/dist-packages/minimalmodbus.py", line 1245, in _generic_command
    payload_from_slave = self._perform_command(functioncode, payload_to_slave)
  File "/usr/local/lib/python3.7/dist-packages/minimalmodbus.py", line 1330, in _perform_command
    response, self.address, self.mode, functioncode
  File "/usr/local/lib/python3.7/dist-packages/minimalmodbus.py", line 1875, in _extract_payload
    responseaddress, slaveaddress, response
minimalmodbus.InvalidResponseError: Wrong return slave address: 17 instead of 1. The response is: '\x11\x0c\x1bÊÿ½´'
--- End code ---

Do you guys know what to do? Is it possible that the Uponor Smatrix Base X-245 only has a subset of the Modbus functions implemented? If so, what would my best shot be to write something back?

I tried to capture a possible request to change the temperature, but all I can see is the log where I went from 21,5°C (707°K, \x02\xc4) to 25,0°C (770°K, \x03\x02)

--- Code: ---110c04eaff95b2
110c04ea4002c43e00003f0c02 42b3008a9b

110c04ea4002c43e00003f0c02 3c00483b030242b3004466


--- End code ---


--- Quote from: dimmu311 on November 15, 2020, 09:32:10 pm ---
could maybe one of you check if my theory could be bossible? Or mybe somone of you have thermostat wher you can see humidity, or something else to double check if i have found right messeg code.

--- End quote ---

Hi dimmu311,

I own a SMatrix Wave with five T146 thermostats. Such thermostats doesn't have any humidity sensor, only a configurable remote temperature sensor.
My only available settings on the unit is modifying the ECO temperature and defining this remote sensor.

I'm working on completing a sketch for a Wemos D1 mini + MAX485 behaving as a sniffer and publishing to a MQTT topic (so homeassistant displays several climate entities). Will publish it as soon as it is "fine"

Edit: I have uploaded thee sketch at https://github.com/witokondoria/homeassistant_uponor

I would think that uponor is not following the Modbus protocol partially on each different product

My Smatrix base only uses the function code 0x05 (write single coil) maybe because all of my units are T146. On programmable thermostats (T148), other function codes might be used


[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Go to full version