User Tools

Site Tools


upmprotocol

UPM Protocol

The RF-Protocol used by the UPM-Devices uses OOK-modulation of the 433.92MHz carrier signal. The digital signal is encoded using an Biphase Differential Manchester encoding. One message consists of 32 bits of data prepended by a 4 bit wake up code and is always repeated three times for redundancy. The temperature sensors sends a burst of three messages with a regular interval, and just uses “blind luck” not to send at the same time as another sensor if you have multiple sensors. In reality the sensor's clocks always has a small drift in time, so if you have four sensors they will drift relative to each other and eventually two will collide and “shadow” each other for a period of time. This “shadow”-period usually lasts a couple of hours depending on how fast the sensors drift.

The UPM receivers are quite smart when it comes to saving energy. When you start them they will switch on the receiver and scan for sensors for a couple of minutes. Once it has located the sensors (when they transmit), it will turn off the receiver and just turn it on when it expects the next transmission from one of the sensors and as soon as it has decoded a complete message it turns off the receiver again (usually after the first of the three repeats in a burst).

The encoding of the 32 bit message as far as I have been able to decode so far is described in the extract from the decoder source below. There are quit a few hours spent figuring this out, and I had help from Fredric Moestedt with the information on the wind and rain sensors and Wolfgang for additional information about timing and fixed bits. If anyone finds out any additional information on the protocol, please send me a mail!

/*
 * My current understanding of the UPM data message:
 * The message consists of four bytes.
 * x = Wake Up Code (1100)
 * c = House Code (0 - 15)
 * d = Device Code (1 - 4) ?
 * p = Primary value - Temperature/Rain/Wind speed value (low bits)
 * P = Primary value - Temperature/Rain/Wind speed value (high bits)
 * s = Secondary value - Humidity/Wind direction (low bits)
 * S = Secondary value - Humidity/Wind direction (high bits)
 * b = Low battery indication
 * z = Sequence number 0 - 2. Messages are sent in bursts of 3. For some senders this is always 0
 * C = Checksum. bit 1 is XOR of odd bits, bit 0 XOR of even bits in message
 * 
 * If HouseCode = 10 and deviceCode = 2, then p and P is Wind speed
 * and h and H is Wind direction
 * 
 * If HouseCode = 10 and deviceCode = 3, then p and P is rain
 * 
 * ____Byte 0_____  ____Byte 1_____  ____Byte 2_____  ____Byte 3_____  _Nib4__
 * 7 6 5 4 3 2 1 0  7 6 5 4 3 2 1 0  7 6 5 4 3 2 1 0  7 6 5 4 3 2 1 0  3 2 1 0
 * x x x x c c c c  d d 1 1 b S S S  s s s s 0 P P P  p p p p p p p p  z z C C
 *                                            
 * Temp (C) = RawValue / 16 - 50
 * Rain (total mm) = RawValue * 0,7
 * Wind Speed (mph)= RawValue (* 1/3,6 for km/h)
 * Humidity (%) = RawValue
 * Wind direction (deg) = RawValue * 45
 * 
 */
upmprotocol.txt · Last modified: 2018/11/03 02:59 by 127.0.0.1