TapHome
Community Beta Sensors

DFRobot SEN0644 Light Sensor

DFRobot SEN0644 waterproof IP68 ambient light sensor in TapHome over Modbus RTU on RS485. Read-only illuminance in lux (0–200,000 lx), firmware version as a service attribute, service actions for acquisition rate and calibration. Factory default 9600 8N1, slave ID 1, DC 5–32 V supply.

DFRobotModbus RTU1 deviceRevision 1.0 Last updated: November 12, 2026

Submitted by Benedikt

DFRobot SEN0644 Light Sensor

Import into the TapHome appHardware › Modbus › Add from template

Download Template
On this page

Integration guide

The DFRobot SEN0644 is a fully waterproof (IP68) ambient light sensor that communicates with TapHome over RS485 using Modbus RTU. It measures illuminance from 0 to 200,000 lux with a resolution of 0.01 lux and an accuracy of ±5 %, runs on a wide DC 5–32 V supply and works at −40 to +80 °C, so it can be mounted outdoors, in greenhouses or in workshops.

The template provides one read-only Illuminance device in lux, polled every 15 seconds, with the sensor firmware version as a service attribute and service actions for the acquisition rate and calibration. Typical uses are dusk detection for outdoor lighting and daylight-driven shading or lighting control. The register map and protocol description come from the DFRobot SEN0644 wiki.

Hardware connection

Mounting

Dimensions of the SEN0644 sensor: 28 mm head, M25x1.5 gland 33 mm wrench size, 1000 mm cable

The sensor head is mounted with an M25×1.5 gland thread:

ParameterValue
Thread length10 mm
Opening size25 mm
Wrench size33 mm
Cable diameter4–10 mm
Cable length1 m
ProtectionIP68
Operating temperature−40 to +80 °C

Point the transparent window towards the light source that should be measured and keep it unobstructed. Remove the protective cover from the sensor before use. The sensor is a precision device — do not disassemble it.

Wiring

The sensor has a four-wire cable:

Wire colourSignalDescription
RedVCCPower supply positive, DC 5–32 V
BlueGNDPower supply ground
Yellow485-ARS485 data line A
Green485-BRS485 data line B
  1. Connect the yellow wire (485-A) to terminal A and the green wire (485-B) to terminal B of the RS485 bus on the TapHome Core (or of a Bus Extender port).
  2. Connect the red wire (VCC) and the blue wire (GND) to a DC power supply of 5–32 V. The sensor draws less than 10 mA.
  3. The cable supplied with the sensor is 1 m long. Extend it in a junction box with a twisted-pair cable.
  4. Terminate the bus at both ends of the line. The TapHome wiring guide uses a 100 Ω resistor between A and B; the Core has it built in on every bus, the Bus Extender on none of its ports (see Bus Extender — wiring and bus termination).

For outdoor mounting outside the lightning protection zone, or whenever the bus cable leaves the building, isolate the bus — use a galvanically isolated port of the Bus Extender (Bus 3 or Bus 4) or an RS485 optical isolator, and power the sensor from a separate power supply.

Configuration

Modbus communication

Modbus RTU is the only interface of the sensor and needs no enable step. The factory settings match the template:

ParameterDefaultPermitted values
Slave address11–254 (255 is the general command address)
Baud rate9600 bps1200, 2400, 4800, 9600, 19200, 38400, 57600
Data bits88
ParityNoneNone, odd, even
Stop bits11

The sensor reads registers with function code 0x03 and writes them with function code 0x06; in 16-bit values the high byte comes first.

In TapHome, add the template on a Modbus RTU bus set to 9600 bps, 8 data bits, no parity and 1 stop bit, and enter the sensor address in the Modbus Slave ID import parameter (default 1).

Changing the address or serial parameters

With more than one device on the bus, each one needs its own address. The address, baud rate and parity are holding registers 0x0064, 0x0065 and 0x0066 and are best set with a Modbus commissioning tool during the initial installation:

RegisterContentValues
0x0064Device address1–254
0x0065Baud rate0 = 1200, 1 = 2400, 2 = 4800, 3 = 9600, 4 = 19200, 5 = 38400, 6 = 57600
0x0066Parity0 = none, 1 = odd, 2 = even

After changing the address or the baud rate, switch the sensor off and on again. If the current address is unknown, read registers 0x0064 and 0x0065 at the general command address 0xFF — the answer contains the real address and the baud rate.

The sensor also has a soft reset command (register 0x00E0) and a factory reset command (register 0x00F0, the manufacturer’s example writes 0 to it at address 0xFF). A factory reset can change the address and baud rate as well, so check them afterwards.

After changing the address, baud rate or parity, change the TapHome bus settings and the Modbus Slave ID import parameter to match — otherwise communication stops after the power cycle.

Device capabilities

Illuminance

Illuminance shows the measured ambient light level in lux. The value is a 32-bit unsigned integer in two consecutive holding registers — 0x0002 (high 16 bits) and 0x0003 (low 16 bits). The template reads both in one function-code 03 request (MODBUSR(H, 2, UInt32), high word first) and divides the raw value by 1000. TapHome polls it every 15 seconds; the device is read-only.

Typical values from the manufacturer:

SituationIlluminance
Night0.001–0.02 lx
Moonlit night0.02–0.3 lx
Cloudy, indoors5–50 lx
Reading a book50–60 lx
Cloudy, outdoors50–500 lx
Sunny, indoors100–1,000 lx

The measuring range of the sensor ends at 200,000 lx.

Firmware version

The sensor firmware version is a read-only service attribute of the Illuminance device (register 0x0067).

Acquisition rate and calibration

The Illuminance device has three service actions:

  • Set acquisition rate — writes the illumination acquisition rate (register 0x0046), level 1–20. Lower values increase the measurement frequency.
  • Set calibration enable — switches the calibration function of the sensor on or off (register 0x0047: 1 = enabled, 0 = disabled).
  • Set calibration compensation — writes the calibration compensation value (register 0x0048). The value is entered enlarged 100 times: a compensation of 1.4 is written as 140. The manufacturer calculates it as (collected illuminance ÷ actual ambient illuminance) × 100 — for example a collected value of 221 lx at an actual 260 lx gives (221 ÷ 260) × 100 = 85.

Troubleshooting

No reading in TapHome

  • Check the A/B wiring: yellow is A, green is B. Swapped A and B lines are a common installation error on RS485 buses.
  • Check that the bus is not disconnected and that the supply voltage is within DC 5–32 V.
  • Check that the Modbus Slave ID import parameter matches the sensor address (default 1) and that the bus runs at the sensor’s serial settings (default 9600 8N1).

Reading is zero or implausibly low

  • Check that there is a light source and that the protective cover of the sensor has been removed.
  • Check that the transparent window faces the light and is not obstructed or covered.

Communication lost after a power cycle

If the address or baud rate was changed in registers 0x0064–0x0066, the sensor starts with the new values after the power cycle. Set the TapHome bus and the Modbus Slave ID to match. If the address is unknown, query it at the general command address 0xFF (register 0x0064) with a Modbus commissioning tool.

Available devices 1

These devices appear in TapHome after import.

SEN0644 Light Sensor Module
Illuminance Variable
Service Attributes
Firmware version
Service Actions
Set acquisition rate
Set calibration enable
Set calibration compensation

Illuminance

Read
MODBUSR(H, 2, UInt32) / 1000
Service Attributes
Firmware version
MODBUSR(H, 103, UInt16)
Service Actions
Set acquisition rate
Parameters: Rate (1-20) (1–20 Rt)
MODBUSWNE(H, 70, UInt16, Rt)
Set calibration enable
Parameters: Enable calibration (Enabled / Disabled)
MODBUSWNE(H, 71, UInt16, En)
Set calibration compensation
Parameters: Compensation (value x100) (0–65535 Cc)
MODBUSWNE(H, 72, UInt16, Cc)
Connection: Modbus RTU • 9600 baud• 8N1 • Slave ID: $[SlaveId]

Import parameters

Enter these values when you import the XML.

Asked in the appDefault
Modbus Slave ID1

Found a problem with this device template?

Tell us what's wrong, what's missing, or how the template should behave. We rely on your feedback to keep the catalog accurate.

Template · TapHome portal DFRobot SEN0644 Light Sensor Open this template in the Customer Portal to apply it to one of your homes, or to draft a refinement and submit it back to the catalog. Modbus RTU View in TapHome portal