Wiren BoardDocumentation
Documentation / Sensors / WB-MSW v.4 TH
Device manual · English

WB-MSW v.4 TH

Wall-mounted temperature and humidity sensor with RS-485 Modbus RTU

revision 117114
Covered order codes (1)
  • WB-MSW v.4 TH — Temperature and humidity

WB-MSW v.4 is a wall-mounted RS-485 Modbus RTU sensor family for homes and offices. The WB-MSW v.4 TH order code contains the temperature and relative-humidity channels; the same hardware platform is also available with optional CO₂, VOC, illuminance, motion, sound-level, indicator and infrared-transceiver modules. This manual describes the complete family and clearly identifies functions that depend on the ordered configuration.

WB-MSW v.4 wall-mounted Modbus sensor
WB-MSW v.4 wall-mounted Modbus sensor

Models and enclosure options

Order-code scope: WB-MSW v.4 TH is the standard limited configuration with temperature and humidity measurement only. CO₂, VOC, motion, sound, illuminance, user LEDs and infrared functions are not fitted unless they are explicitly included in the ordered configuration.

CO₂ and VOC sensors are optional and must be selected when ordering. If an optional sensor is not fitted, the corresponding value is reported as zero or unavailable. The standard enclosure is white; black and mixed-colour enclosures are also available.

A black lens reduces the illuminance reading by approximately five to seven times and shortens the useful infrared range by about 2.5 to 3 times, typically to 3–4 m. Indicator LEDs are also much dimmer through the black lens. A flat cover can be ordered where motion detection, infrared control, LEDs and illuminance measurement are not required. The enclosure may be repainted; keep all sensor openings and the lens clear.

Product label on black enclosure
Product label and enclosure identification

Technical specifications

MeasurementRangeAccuracy or responseNotes
CO₂400–10,000 ppm±100 ppm + 5% of readingReady in about 3 minutes; automatic baseline calibration every 7 days
Temperature−40 to +80 °C±0.3 °C from 0 to +70 °C; ±0.5 °C outside this range1 s sensor time constant; enclosure reaches equilibrium in about 4 minutes
Relative humidity5–95% RH±3% RH at ambient temperature ≥0 °C1 s sensor time constant
Sound level39–90 dBA±2 dB; 5 s responseA-weighted level
Illuminance0–145,000 lx±10%; up to 1.5 s responseSpectral response approximates the human eye
VOC0–60,000 ppb ethanol equivalent±15% typical, ±40% maximumInitial readiness depends on the fitted sensor; see the VOC section
MotionUp to 8 m, 120°Ready about 8 s after power-upPassive infrared detector
IR transceiverUp to 10 m with clear lensReady about 1 s after power-upStores up to 80 commands; maximum 1,000 pulse symbols per command
Supply voltage9–28 V DC
Power consumption0.5 W typical; up to 1.6 W with CO₂ measurement; up to 4 W during simultaneous CO₂ measurement and IR transmission
InterfacesZigbee; RS-485 with Modbus RTU
Controls and indicatorsRed and green user LEDs, status LED and buzzer
Start-up timeApproximately 2 s, excluding individual sensor warm-up
Operating conditions−40 to +80 °C, up to 95% RH without condensation. With a CO₂ sensor fitted: −10 to +50 °C
Dimensions80 × 80 × 23.6 mm with lens; 60 mm mounting-hole spacing; compatible with a 68 mm round European wall box
Packaged weightApproximately 90 g
Service life / warranty8 years / 2 years

For screw terminals, use single insulated wire-end ferrules for 0.35–1 mm² conductors or twin ferrules for 0.35–0.5 mm² conductors. The recommended sleeve length is 8 mm and the tightening torque is 0.2 N·m. Size the cable and power supply for voltage drop and peak consumption.

Sensor operation

Temperature and humidity

The SHT40 sensor includes automatic compensation for heat generated inside the enclosure. The standard corrections are 0.30 °C for the main electronics, 0.31 °C for the CO₂ module and 0.14 °C for the VOC module. Raw uncompensated temperature and humidity are available in Modbus registers 284 and 285; a user temperature offset is available in register 245.

At relative humidity above 95%, the anti-condensation heater switches on automatically for one second. It can be controlled manually with coil register 2. A separate cleaning mode heats the sensing element to about 110 °C for one hour and temporarily suspends normal measurements other than raw temperature and humidity. Run cleaning only at an ambient temperature of 15–40 °C, never above 50 °C, and only when necessary because heater life is limited. Start cleaning from the controller interface or with coil register 8; input register 365 reports the remaining time in seconds.

In the controller web interface, TH Sensor Heater Enabled switches on the heater, and TH Sensor Heater Cleaning Mode Enabled activates cleaning mode. Both channels are hidden by default. Enable them in the channel list in the device settings to display their switches on the Devices page.

Motion detection

Current Motion is a short moving average and is suitable for fast polling. Max Motion keeps the maximum value over a configurable period, 10 seconds by default in register 282, and is suitable for slower polling. The sensitivity threshold can be raised to reduce triggers from pets. Firmware 4.37 and later also allows the input RC-filter time constant to be adjusted. Fast Modbus events can be used for immediate wired notifications.

Current Motion and Max Motion graphs
Current Motion and Max Motion response

Indicators and buzzer

The red and green user LEDs can be flashed under automation control; the buzzer is available in every configuration. User LEDs require the lens board used by the illuminance and IR options. A separate green status LED indicates data exchange and can be disabled.

To disable the green status indicator through Modbus, write 1 to holding register 130; write 0 to enable it (the default). For a device at address 202 on /dev/ttyRS485-1 using 38400 bit/s, 8N2, stop the driver with systemctl stop wb-mqtt-serial, run the required command, then restart it with systemctl start wb-mqtt-serial:

modbus_client -mrtu -b38400 -pnone -s2 /dev/ttyRS485-1 -a202 -t6 -r130 1  # disable
modbus_client -mrtu -b38400 -pnone -s2 /dev/ttyRS485-1 -a202 -t6 -r130 0  # enable
Sensor indicator animation
User indicator operation

Infrared transceiver

The receiver and eight infrared emitters are located behind the lens. Learn a remote-control command once, store it in a numbered cell, then replay it from Zigbee or Modbus. A command may contain up to 1,000 high/low pulse pairs whose durations are represented in microseconds. The transmitter is intentionally wide-angle and can control equipment visible from the sensor. For individual control of several nearby air conditioners, use dedicated directional IR transmitters.

Illuminance and sound

The illuminance channel uses an optical filter shaped to the sensitivity of the human eye and responds within about 1.5 seconds. The sound channel reports an A-weighted sound-pressure level in dBA and provides a configurable noise-detected state.

VOC and indoor-air quality

Units made before August 2023 can contain an SGPC3 VOC module. It takes about six minutes to become ready, returns 0xFFFF during warm-up and adjusts its baseline every 12 hours. Later units use an ENS160 VOC module and firmware 1.5 or later. It reports VOC and an air-quality index immediately, but its initial self-calibration takes about 24 hours. Keep the sensor powered continuously during calibration.

AQIVOC, ppbAssessmentRecommended action
10–65ExcellentTarget condition; unlimited exposure
265–220GoodVentilation recommended
3220–660AcceptableVentilate and identify the source
4660–2,200PoorVentilate intensively and remove the source
52,200–5,500HazardousIntensive ventilation; limit exposure to hours

Carbon dioxide

The optional CO₂ module uses the non-dispersive infrared (NDIR) principle.

NDIR carbon dioxide sensor construction
NDIR CO₂ sensor construction

Automatic baseline calibration treats the lowest reading observed over seven days as approximately 400 ppm. For reliable calibration, the room must be unoccupied or well ventilated for part of each week. If this cannot be guaranteed, calibrate the module manually in fresh air using the wired interface.

CO₂ concentrationTypical interpretation
400–450 ppmNormal outdoor air
Below 600 ppmGood indoor air
600–1,000 ppmStale-air complaints may begin
1,000–2,500 ppmDrowsiness and reduced concentration are possible
2,500–5,000 ppmAdverse effects become more likely
5,000 ppmCommon maximum eight-hour occupational exposure level

Installation and wiring

Connect 9–28 V DC to V+ and GND. The green status LED flashes during normal communication unless it has been disabled. Long cables require adequate conductor size to keep the voltage at the sensor within specification during CO₂ measurement and IR transmission.

When calculating voltage drop on a long supply cable, use the peak consumption of up to 4 W per sensor, including simultaneous CO₂ measurement and IR transmission.

Power connection diagram
Power connection

Mount the sensor on an interior wall, typically 1–1.6 m above the floor, away from sunlight, radiators, doors, drafts and local heat sources. Exterior walls can bias temperature readings. A 68 mm round European wall box can be used; the wall box is only for the cable and does not provide spare space behind the electronics. For surface mounting, use screws with heads approximately 7 mm in diameter and the 60 mm hole spacing.

Recommended room position for wall sensor
Recommended placement in a room

To open the enclosure, hold it with both hands, press the two halves gently and lift the front cover.

Controller setup and configuration

On a Wiren Board controller, open the serial-device configuration and either scan the RS-485 bus or add the WB-MSW v.4 template manually. The device then appears on the Devices page, where measured values, optional outputs and configuration parameters are available. Disable unused channels in the wb-mqtt-serial driver settings so the interface matches the installed sensor options.

  1. Connect the powered sensor to an RS-485 port and verify the A/B polarity and common ground.
  2. Add the WB-MSW v.4 template automatically by bus scan or manually in the serial-device settings.
  3. Enter the factory Modbus address from the enclosure label and keep the default serial settings unless the bus uses another supported speed.
  4. Save the configuration, open the Devices page and confirm that temperature and humidity update without communication errors.

Without a Wiren Board controller, configure the module with the Wiren Board web configurator or any Modbus RTU master through a USB-to-RS-485 adapter. Update the device firmware before troubleshooting a parameter that is missing from an older template.

Modbus RTU operation

WB-MSW v.4 supports the standard Modbus RTU functions for reading and writing one or multiple registers. The default serial parameters are shown below. Current firmware accepts either one or two stop bits even when the master setting does not exactly match. For lower latency on a busy bus, a rate of 115,200 bit/s is recommended after every device on the segment has been configured for it.

ParameterDefault
Baud rate9,600 bit/s
Data bits8
ParityNone
Stop bits2

Modbus address

Each device uses a unique address from 1 to 247. The factory address is printed on the enclosure. Address 0 is reserved for broadcast requests. Change the address only while the target device can be identified unambiguously, then update the master configuration to the new value.

Factory Modbus address labels
Factory Modbus address labels

Fast Modbus extension

Fast Modbus adds rapid discovery and event polling while remaining compatible with ordinary Modbus masters. Event-capable registers are marked with a lightning symbol in the register map. The feature is enabled by a master command; no special wiring is required.

Essential register map

The table lists the registers most often used for commissioning. Unsupported optional channels return their documented error value. Signed values must be decoded as signed integers before applying scale.

AddressTypePurposeFormat / values
0InputTemperature×0.01 °C
1InputRelative humidity×0.01 %RH
2CoilTemperature/humidity heater0 off; 1 on
8CoilOne-hour TH cleaning mode0 off; 1 start
9–10InputIlluminance32-bit value, ×0.01 lx
11InputVOC concentrationppb; 0xFFFF means unavailable
83InputInstalled CO₂ sensor typeModel code
88HoldingManual CO₂ reference valueppm
95HoldingCO₂ automatic baseline calibration0 disabled; 1 enabled
245HoldingUser temperature compensationSigned ×0.01 °C
280InputMax MotionEvent-capable optional channel
283InputCurrent MotionEvent-capable optional channel
284InputRaw temperature before compensationSigned ×0.01 °C
285InputRaw relative humidity before compensationSigned ×0.01 %RH
365InputTH cleaning time remainingSeconds
955HoldingCommunication-loss timeoutSeconds; default 10
956HoldingFail-safe action0 none; 1 replay IR command
957HoldingFail-safe IR command number1–80
130HoldingStatus indicator1 disables; 0 enables (default)

Infrared command storage

Configurations fitted with the infrared option provide 80 persistent command cells. Learn a remote control command once, store it in a numbered cell, and replay it from the controller or by writing the documented IR registers. Use holding registers 5500, 5501 and 5502 for reliable integration with third-party Modbus masters. The WB-MSW v.4 TH order code does not include the infrared module.

{"learn_start":0}
{"learn_stop":0}
{"play_store":0}
{"clear_store":0}

Replace 0 with the required cell number. For temporary RAM learning and playback use:

{"learn_ram_start":"ON"}
{"learn_ram_stop":"ON"}
{"play_ram":"ON"}
Virtual infrared controller
Example virtual IR controller

Fail-safe action

A fail-safe action can replay one stored IR command if controller communication is lost. The timer restarts after every successfully processed Modbus packet; the default timeout is 10 seconds. Normal operation resumes automatically when communication returns. By default, no IR command is assigned. Configure the timeout, playback action and stored command number before enabling this function.

Fail-safe configuration
Fail-safe configuration

Firmware update and reset

The main controller firmware is updated over RS-485. On a Wiren Board controller, use the device firmware updater; on another system, use the supported Modbus firmware-update service. Stored configuration is preserved during a normal update. Do not disconnect power or the RS-485 line while an update is in progress. The optional NS8 CO₂ module is updated automatically together with the WB-MSW v.4 firmware.

A factory reset restores device settings but retains the connection settings required to reach the module. After a reset or address change, verify the master configuration before returning the sensor to service.

Dimensions and internal layout

Revision 117114.