DS-103 LoRaWAN Three-Way Switch User Guide
Device Information: Model DS-103, devEui ffffff1000054348, gateway IP 192.168.31.205, Modbus Slave ID 15, BACnet Device ID 105
1 Protocol Overview
The DS-103 reports three-channel switch states, lock state, timer status, and signal quality on Fport 210.
1.1 Uplink Data Protocol (Fport 210)
Payload format (Fport 210):
| Byte | Field | Description |
|---|---|---|
| 0 | Reserved | Always 0x00 (protocol version) |
| 1 … N | TLV pairs | [Type(1 B)][Value(N B)] … repeating until end |
Each Type byte determines the field name and the number of following value bytes:
| Type | Value Bytes | Field Name | Encoding | Scale | Unit | Notes |
|---|---|---|---|---|---|---|
0x01 |
1 | model |
uint8 | — | — | Model code = 0x5C |
0x79 |
4 | timestamp |
uint32 BE | — | s | Device local Unix timestamp |
0x96 |
1 | lockState |
uint8 | — | — | 0=unlocked 1=locked |
0x22 |
1 | switch1State |
uint8 | — | — | 0=OFF 1=ON — 1st occurrence = channel 1 |
0x22 |
1 | switch2State |
uint8 | — | — | 0=OFF 1=ON — 2nd occurrence = channel 2 |
0x22 |
1 | switch3State |
uint8 | — | — | 0=OFF 1=ON — 3rd occurrence = channel 3 |
0xB0 |
4 | switchTimerStatus |
bitfield32 BE | — | — | Bit 0=ch1CloseTimer Bit 1=ch1OpenTimer Bit 2=ch2CloseTimer Bit 3=ch2OpenTimer Bit 4=ch3CloseTimer Bit 5=ch3OpenTimer Bit 30=lockTimer Bit 31=unlockTimer |
JavaScript Decoder Example:
// DS-103 Three-Way Switch — Fport 210 uplink decoder
function decodeUplink(bytes) {
var i = 1, r = {}, swIdx = 0;
function u32(b,o){ return ((b[o]<<24)|(b[o+1]<<16)|(b[o+2]<<8)|b[o+3])>>>0; }
while (i < bytes.length) {
var t = bytes[i++];
switch (t) {
case 0x01: r.model = bytes[i++]; break;
case 0x22: {
// Three consecutive 0x22 values = switch1, switch2, switch3
swIdx++;
r['switch'+swIdx+'State'] = bytes[i++]; // 0=OFF 1=ON
break;
}
case 0x79: r.timestamp = u32(bytes,i); i+=4; break;
case 0x96: r.lockState = bytes[i++]; break;
case 0xB0: {
var bits = u32(bytes,i); i+=4;
r.timerCloseEnabled1 = (bits&0x01)!==0;
r.timerOpenEnabled1 = (bits&0x02)!==0;
r.timerCloseEnabled2 = (bits&0x04)!==0;
r.timerOpenEnabled2 = (bits&0x08)!==0;
r.timerCloseEnabled3 = (bits&0x10)!==0;
r.timerOpenEnabled3 = (bits&0x20)!==0;
r.timerLockEnabled = (bits&0x40000000)!==0;
r.timerUnlockEnabled = (bits&0x80000000)!==0;
break;
}
default: i++; break;
}
}
return r;
}
// Example payload (hex): 00 01 5C 79 69 CC 83 28 96 00 22 01 22 01 22 00 B0 00 00 00 00
// → { model:92, timestamp:1775010600, lockState:0, switch1State:1, switch2State:1, switch3State:0 }
Script download: LPP.zip
Compatibility note: LPP.js is developed and tested against ChirpStack v4.17.0. The ChirpStack JavaScript codec API may differ across versions — if you are running a different ChirpStack version, review and adjust the script as needed before deployment.
1.2 Downlink Control Protocol
The DS-103 supports per-channel and all-channel switch commands (immediate/delayed/scheduled), lock commands, and cancel-timer commands via Fport 2.
Fport: 2 — 0x09 0x5C (model device header)
Packet format: 09 5C [CmdCode] [Target?] [Params...] Target byte: 0x01=ch1 (left), 0x02=ch2 (mid), 0x03=ch3 (right), 0xFF=all channels. T = delay/schedule time (uint32 BE, seconds or Unix timestamp). R = repeat flag: 0x00=once, 0x01=daily. Lock/unlock commands have no target byte.
| CmdCode | Packet Bytes | Description |
|---|---|---|
0x00 |
09 5C 00 [target] |
Switch OFF (target channel) |
0x01 |
09 5C 01 [target] |
Switch ON (target channel) |
0x02 |
09 5C 02 |
Unlock |
0x03 |
09 5C 03 |
Lock |
0x04 |
09 5C 04 [target] T3 T2 T1 T0 |
Delayed OFF (target channel, delay T seconds) |
0x05 |
09 5C 05 [target] T3 T2 T1 T0 |
Delayed ON (target channel, delay T seconds) |
0x06 |
09 5C 06 [target] T3 T2 T1 T0 R |
Scheduled OFF (target channel, Unix time T) |
0x07 |
09 5C 07 [target] T3 T2 T1 T0 R |
Scheduled ON (target channel, Unix time T) |
0x08 |
09 5C 08 T3 T2 T1 T0 |
Delayed unlock (delay T seconds) |
0x09 |
09 5C 09 T3 T2 T1 T0 |
Delayed lock (delay T seconds) |
0x0A |
09 5C 0A T3 T2 T1 T0 R |
Scheduled unlock (Unix time T) |
0x0B |
09 5C 0B T3 T2 T1 T0 R |
Scheduled lock (Unix time T) |
0x0C |
09 5C 0C [target] |
Cancel switch timer (target channel) |
0x0D |
09 5C 0D |
Cancel lock timer |
0x0E |
09 5C 0E |
Query current status |
JavaScript Encoder Example:
// DS-103 Three-Way Switch — Fport 2 downlink encoder
function encodeDownlink(data) {
// data.command : 'off'|'on'|'delayOff'|'delayOn'|'scheduleOff'|'scheduleOn'|
// 'lock'|'unlock'|'cancelTimer'|'cancelLockTimer'|'query'
// data.channel : 1|2|3|'all' (required for switch commands)
// data.delaySeconds / data.scheduleAt / data.repeatDaily
var H = [0x09, 0x5C];
var u32 = function(n){ return [(n>>>24)&0xFF,(n>>>16)&0xFF,(n>>>8)&0xFF,n&0xFF]; };
var targetMap = {1:0x01, 2:0x02, 3:0x03, all:0xFF};
var ch = (data.channel !== undefined) ? (targetMap[data.channel] || 0xFF) : 0xFF;
var T = (data.delaySeconds !== undefined) ? data.delaySeconds : (data.scheduleAt || 0);
var R = data.repeatDaily ? 0x01 : 0x00;
var cmd = String(data.command||'').trim().toLowerCase();
switch(cmd) {
case 'off': return H.concat([0x00, ch]);
case 'on': return H.concat([0x01, ch]);
case 'unlock': return H.concat([0x02]);
case 'lock': return H.concat([0x03]);
case 'delayoff': return H.concat([0x04, ch].concat(u32(T)));
case 'delayon': return H.concat([0x05, ch].concat(u32(T)));
case 'scheduleoff': return H.concat([0x06, ch].concat(u32(T)).concat([R]));
case 'scheduleon': return H.concat([0x07, ch].concat(u32(T)).concat([R]));
case 'delayunlock': return H.concat([0x08].concat(u32(T)));
case 'delaylock': return H.concat([0x09].concat(u32(T)));
case 'scheduleunlock':return H.concat([0x0A].concat(u32(T)).concat([R]));
case 'schedulelock': return H.concat([0x0B].concat(u32(T)).concat([R]));
case 'canceltimer': return H.concat([0x0C, ch]);
case 'cancellocktimer': return H.concat([0x0D]);
case 'query': return H.concat([0x0E]);
default: return [];
}
}
// Examples:
// encodeDownlink({command:'on', channel:1}) → [0x09,0x5C,0x01,0x01]
// encodeDownlink({command:'off', channel:'all'}) → [0x09,0x5C,0x00,0xFF]
// encodeDownlink({command:'delayOn', channel:2, delaySeconds:60}) → [0x09,0x5C,0x05,0x02,0x00,0x00,0x00,0x3C]
2 Getting Uplink Data
⚠️ The IP addresses (192.168.31.205/192.168.31.193), ChirpStack API token, Slave ID, BACnet Device ID, and devEui in the examples below are for demonstration only. Replace them with your actual gateway IP, ChirpStack API token, and device parameters.
2.1 ChirpStack MQTT Subscription
Subscribe to the MQTT topic to receive real-time uplink frames:
Application ID —3ef9e6b9-ec54-4eda-86b8-a5fb46899f39is the factory-default ChirpStack
application built into the gateway. Replace it with your actual application
ID if you have created a different one.
Gateway IP —192.168.31.205is the gateway WAN port IP shown as an
example. Replace it with your actual gateway IP address.
Device EUI —ffffff1000054348is the EUI of the example device.
Replace it with the EUI shown in the gateway device list, or use+
as a wildcard to subscribe to all devices at once.
# Subscribe to one specific device
mosquitto_sub -h 192.168.31.205 -p 1883 \
-u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/event/up"
# Subscribe to ALL devices on ALL applications (wildcard)
mosquitto_sub -h 192.168.31.205 -p 1883 \
-u gateway -P mqtt88888888 \
-t "application/+/device/+/event/up"
Example uplink payload (JSON):
{
"devEui": "ffffff1000054348",
"fPort": 210,
"object": {
... (decoded LPP fields)
}
}
2.2 IoT Hub HTTP API
Send a GET request to retrieve the latest device state:
curl -s "http://192.168.31.205:8070/api/getStatus?devEui=ffffff1000054348"
{
"success": true,
"result": {
"ds103ControlState": false,
"ds103RepeatDaily": false,
"lockState": 0,
"switch1State": false,
"switch2State": false,
"switch3State": false,
"timestamp": 1775030018,
"switchTimerStatus": 0,
"timerCloseEnabled1": false,
"timerOpenEnabled1": false,
"timerCloseEnabled2": false,
"timerOpenEnabled2": false,
"timerCloseEnabled3": false,
"timerOpenEnabled3": false,
"timerLockEnabled": false,
"timerUnlockEnabled": false,
"model": "DS-103"
}
}
2.3 IoT Hub Modbus TCP — Python Script
Script download: modbus_tcp_read.py
Use modbus_tcp_read.py to poll all registers at once:
python3 modbus_tcp_read.py --ip 192.168.31.205 --port 502 \
--slaveId 15 --sensorType DS-103
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
================================================================================================================================================================
Attribute | Addr | FC | Format | Order | Cnt | Scale | Raw(Hex) | Value | Unit
----------------------------------------------------------------------------------------------------------------------------------------------------------------
online | 6 | 03 | Bit/Bool | Big(ABCD) | 1 | x1 | 0001 | true | none
lastOnlineTime | 7 | 03 | UnixTime | Big(ABCD) | 2 | x1 | 69CC CEF0 | 1775030000 | second
ds103ControlTarget | 9 | 03 | Int16 | Big(ABCD) | 1 | x1 | 0000 | 0.0 | none
ds103ControlState | 10 | 03 | Bit/Bool | Big(ABCD) | 1 | x1 | 0000 | false | none
ds103ControlMode | 11 | 03 | Int16 | Big(ABCD) | 1 | x1 | 0000 | 0.0 | none
ds103DelaySeconds | 12 | 03 | Int32 | Big(ABCD) | 2 | x1 | 0000 0000 | 0.0 | seconds
ds103ScheduleTimestamp | 14 | 03 | UnixTime | Big(ABCD) | 2 | x1 | 0000 0000 | 0 | seconds
ds103RepeatDaily | 16 | 03 | Bit/Bool | Big(ABCD) | 1 | x1 | 0000 | false | none
lockState | 17 | 03 | Int16 | Big(ABCD) | 1 | x1 | 0000 | 0.0 | none
switch1State | 18 | 03 | Bit/Bool | Big(ABCD) | 1 | x1 | 0000 | false | none
switch2State | 19 | 03 | Bit/Bool | Big(ABCD) | 1 | x1 | 0000 | false | none
switch3State | 20 | 03 | Bit/Bool | Big(ABCD) | 1 | x1 | 0000 | false | none
... (25 fields total)
2.4 IoT Hub Modbus TCP — Modbus Poll
Tool download: Modbus Poll 9.5.0.1507.zip
- Open Modbus Poll, connect to
192.168.31.205:502, Slave ID15 - Menu Setup → Read/Write Definition, set Function Code = FC03, Start Address =
6, Length =65 - Click OK — values update in real-time
2.5 IoT Hub BACnet BIP — Python Script
Script download: bacnet_read.py
Use bacnet_read.py to read all BACnet objects:
python3 bacnet_read.py --ip 192.168.31.205 --port 47808 --id 105
Target: 192.168.31.205:47808 | BACnet ID: 105 | Scan: 10500-10599
------------------------------------------------------------
Type | Instance | Offset | Value | Object Name
------------------------------------------------------------
BI | 10502 | 2 | active | ffffff1000054348.online
AI | 10503 | 3 | 1775030016.00 | ffffff1000054348.lastOnlineTime
AV | 10504 | 4 | 0.00 | ffffff1000054348.ds103ControlTarget
BV | 10505 | 5 | inactive | ffffff1000054348.ds103ControlState
AV | 10506 | 6 | 0.00 | ffffff1000054348.ds103ControlMode
AV | 10507 | 7 | 0.00 | ffffff1000054348.ds103DelaySeconds
AV | 10508 | 8 | 0.00 | ffffff1000054348.ds103ScheduleTimestamp
BV | 10509 | 9 | inactive | ffffff1000054348.ds103RepeatDaily
BV | 10510 | 10 | inactive | ffffff1000054348.lockState
BV | 10511 | 11 | inactive | ffffff1000054348.switch1State
BV | 10512 | 12 | inactive | ffffff1000054348.switch2State
BV | 10513 | 13 | inactive | ffffff1000054348.switch3State
... (28 objects total)
2.6 IoT Hub BACnet BIP — YABE
Tool download: SetupYabe_v2.1.0.exe
- Open YABE, connect to
192.168.31.205:47808 - Expand Device 105 in the device tree
- Browse AI/BI/AV/BV/CV objects to view real-time values
3 Sending Control Commands
The DS-103 supports per-channel and all-channel switch commands (immediate/delayed/scheduled), lock commands, and cancel-timer commands via Fport 2.
⚠️ The IP addresses (192.168.31.205/192.168.31.193), ChirpStack API token, Slave ID, BACnet Device ID, and devEui in the examples below are for demonstration only. Replace them with your actual gateway IP, ChirpStack API token, and device parameters.
Script downloads: modbus_tcp_write.py · bacnet_write.py
Example 1a: Left Switch Connect / Disconnect — Connect / Close
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel left --value 1
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch1State: 1
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel left --value 1
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch1State: 1
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 1b: Left Switch Connect / Disconnect — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel left --value 0
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch1State: 0
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel left --value 0
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch1State: 0
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 2a: Middle Switch Connect / Disconnect — Connect / Close
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel middle --value 1
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch2State: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=2 signed=2
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch2State: 1
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel middle --value 1
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch2State: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=2
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch2State: 1
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 2b: Middle Switch Connect / Disconnect — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel middle --value 0
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch2State: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=2 signed=2
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch2State: 0
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel middle --value 0
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch2State: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=2
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch2State: 0
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 3a: Right Switch Connect / Disconnect — Connect / Close
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel right --value 1
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch3State: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=3 signed=3
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch3State: 1
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel right --value 1
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch3State: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=3
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch3State: 1
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 3b: Right Switch Connect / Disconnect — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel right --value 0
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch3State: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=3 signed=3
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch3State: 0
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel right --value 0
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch3State: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=3
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch3State: 0
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 4a: All Switch Connect / Disconnect — Connect / Close
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel all --value 1
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=255 signed=255
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch1State: 1
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel all --value 1
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=255
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch1State: 1
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 4b: All Switch Connect / Disconnect — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switch --channel all --value 0
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=255 signed=255
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch1State: 0
Link confirmation time: 5.167s
Control completed in: 5.178s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switch --channel all --value 0
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=255
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch1State: 0
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 5a: Lock / Unlock All Switches — Lock
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 lock --value 1
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
lockState: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
lockState: 1
Link confirmation time: 5.000s
Control completed in: 5.010s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 lock --value 1
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 1
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
lockState: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
lockState: 1
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": true,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 5b: Lock / Unlock All Switches — Unlock
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 lock --value 0
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
lockState: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=0 signed=0
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
lockState: 0
Link confirmation time: 5.000s
Control completed in: 5.010s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 lock --value 0
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 0
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
lockState: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=0
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
lockState: 0
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":0,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 0,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 6a: Delayed Left Switch (after 5 s) — Connect / Close
The device will wait 5 seconds before executing the switch command.
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel left --value 1 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel left --value 1 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 6b: Delayed Left Switch (after 5 s) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel left --value 0 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel left --value 0 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 7a: Delayed Middle Switch (after 5 s) — Connect / Close
The device will wait 5 seconds before executing the switch command.
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel middle --value 1 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=2 signed=2
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel middle --value 1 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=2
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 7b: Delayed Middle Switch (after 5 s) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel middle --value 0 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=2 signed=2
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel middle --value 0 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=2
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 8a: Delayed Right Switch (after 5 s) — Connect / Close
The device will wait 5 seconds before executing the switch command.
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel right --value 1 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=3 signed=3
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel right --value 1 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=3
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 8b: Delayed Right Switch (after 5 s) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel right --value 0 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=3 signed=3
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel right --value 0 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=3
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 9a: Delayed All Switch (after 5 s) — Connect / Close
The device will wait 5 seconds before executing the switch command.
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel all --value 1 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=255 signed=255
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel all --value 1 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=255
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 9b: Delayed All Switch (after 5 s) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchDelay --channel all --value 0 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=255 signed=255
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchDelay --channel all --value 0 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=255
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 10a: Scheduled Daily Left Switch (2026-04-01 10:30 CST) — Connect / Close
Scheduled for 2026-04-01 10:30:00 CST (timestamp 1775010600), repeat daily. Compute via: date -d '2026-04-01 10:30:00 +0800' +%s
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel left --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel left --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 10b: Scheduled Daily Left Switch (2026-04-01 10:30 CST) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel left --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel left --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 11a: Scheduled Daily Middle Switch (2026-04-01 10:30 CST) — Connect / Close
Scheduled for 2026-04-01 10:30:00 CST (timestamp 1775010600), repeat daily. Compute via: date -d '2026-04-01 10:30:00 +0800' +%s
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel middle --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=2 signed=2
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel middle --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=2
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 11b: Scheduled Daily Middle Switch (2026-04-01 10:30 CST) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel middle --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=2 signed=2
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel middle --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 2
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=2
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":2,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 2,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 12a: Scheduled Daily Right Switch (2026-04-01 10:30 CST) — Connect / Close
Scheduled for 2026-04-01 10:30:00 CST (timestamp 1775010600), repeat daily. Compute via: date -d '2026-04-01 10:30:00 +0800' +%s
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel right --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=3 signed=3
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel right --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=3
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 12b: Scheduled Daily Right Switch (2026-04-01 10:30 CST) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel right --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=3 signed=3
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel right --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 3
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=3
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":3,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 3,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 13a: Scheduled Daily All Switch (2026-04-01 10:30 CST) — Connect / Close
Scheduled for 2026-04-01 10:30:00 CST (timestamp 1775010600), repeat daily. Compute via: date -d '2026-04-01 10:30:00 +0800' +%s
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel all --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=255 signed=255
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel all --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=255
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 13b: Scheduled Daily All Switch (2026-04-01 10:30 CST) — Disconnect / Open
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 switchSchedule --channel all --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=255 signed=255
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 switchSchedule --channel all --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 255
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=255
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":255,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 255,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 14a: Delayed Lock / Unlock (after 5 s) — Lock
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 lockDelay --value 1 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 lockDelay --value 1 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 1
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": true,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 14b: Delayed Lock / Unlock (after 5 s) — Unlock
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 lockDelay --value 0 --delaySeconds 5
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=1 signed=1
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=5 signed=5
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 lockDelay --value 0 --delaySeconds 5
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 1
ds103DelaySeconds: 5
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=1
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=5
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":1,"ds103DelaySeconds":5,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 1,
"ds103DelaySeconds": 5,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 15a: Scheduled Daily Lock / Unlock (2026-04-01 10:30 CST) — Lock
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 lockSchedule --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=1 signed=1
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 lockSchedule --value 1 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 1
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=active
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":true,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": true,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 15b: Scheduled Daily Lock / Unlock (2026-04-01 10:30 CST) — Unlock
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 lockSchedule --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=2 signed=2
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=27084 signed=27084
ds103ScheduleTimestamp -> register 15 (4x40016) raw=33576 signed=-31960
ds103RepeatDaily -> register 16 (4x40017) raw=1 signed=1
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 lockSchedule --value 0 --scheduleTimestamp 1775010600 --repeatDaily
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 2
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 1775010600
ds103RepeatDaily: 1
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=2
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=1775010600
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=active
No immediate read-back confirmation defined for this command.
Control completed in: 0.011s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":2,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":1775010600,"ds103RepeatDaily":true}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 2,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 1775010600,
"ds103RepeatDaily": true
}
}
Example 16: Cancel Switch Timer (example: left channel)
Cancels any pending delayed or scheduled connect/disconnect command for the specified channel. Change --channel left/middle/right/all to target a different channel.
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 cancelSwitchTimer --channel left
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 3
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: (unchanged)
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=1 signed=1
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=3 signed=3
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
switch1State: (unchanged)
Link confirmation time: 5.000s
Control completed in: 5.010s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 cancelSwitchTimer --channel left
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 1
ds103ControlState: 0
ds103ControlMode: 3
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
switch1State: (unchanged)
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=1
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=3
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
switch1State: (unchanged)
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":3,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":3,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 3,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":1,"ds103ControlState":false,"ds103ControlMode":3,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 1,
"ds103ControlState": false,
"ds103ControlMode": 3,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
Example 17: Cancel Lock Timer
Cancels any pending delayed or scheduled lock/unlock command.
Modbus TCP:
python3 modbus_tcp_write.py --ip 192.168.31.205 --port 502 --slaveId 15 --sensorType DS-103 cancelLockTimer
Target: 192.168.31.205:502 | Slave ID: 15 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 3
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
lockState: (unchanged)
Attempt 1/1: writing control values (default)...
Modbus Poll write guide:
Batch 1: FC16 Write Multiple Registers | Start register: 9 (4x40010) | Count: 8
ds103ControlTarget -> register 9 (4x40010) raw=254 signed=254
ds103ControlState -> register 10 (4x40011) raw=0 signed=0
ds103ControlMode -> register 11 (4x40012) raw=3 signed=3
ds103DelaySeconds -> register 12 (4x40013) raw=0 signed=0
ds103DelaySeconds -> register 13 (4x40014) raw=0 signed=0
ds103ScheduleTimestamp -> register 14 (4x40015) raw=0 signed=0
ds103ScheduleTimestamp -> register 15 (4x40016) raw=0 signed=0
ds103RepeatDaily -> register 16 (4x40017) raw=0 signed=0
Observed values:
lockState: (unchanged)
Link confirmation time: 5.000s
Control completed in: 5.010s
The script automatically writes registers and reads them back for verification. The Modbus Poll write guide section in the output can be used directly as a reference for manual writes in Modbus Poll.
Modbus Poll:
- Connect to the gateway (IP
192.168.31.205, Port502, Slave ID15) - Menu Functions → 16 Write Multiple Registers
- Refer to the Modbus Poll write guide in the script output above for the Register Address and value to enter
- Click Send to send the write command
BACnet BIP:
python3 bacnet_write.py --ip 192.168.31.205 --port 47808 --id 105 --sensorType DS-103 cancelLockTimer
Target: 192.168.31.205:47808 | BACnet ID: 105 | Sensor: DS-103
Expected values:
ds103ControlTarget: 254
ds103ControlState: 0
ds103ControlMode: 3
ds103DelaySeconds: 0
ds103ScheduleTimestamp: 0
ds103RepeatDaily: 0
Expected confirmed state:
lockState: (unchanged)
Attempt 1/1: writing control values (default)...
YABE write guide:
ds103ControlTarget -> object analog-value,10504 | property present-value | type=analog-value | write=254
ds103ControlState -> object binary-value,10505 | property present-value | type=binary-value | write=inactive
ds103ControlMode -> object analog-value,10506 | property present-value | type=analog-value | write=3
ds103DelaySeconds -> object analog-value,10507 | property present-value | type=analog-value | write=0
ds103ScheduleTimestamp -> object analog-value,10508 | property present-value | type=analog-value | write=0
ds103RepeatDaily -> object binary-value,10509 | property present-value | type=binary-value | write=inactive
Observed values:
lockState: (unchanged)
Link confirmation time: 0.010s
Control completed in: 0.086s
The script automatically writes and reads back for verification. The YABE write guide section in the output can be used directly as a YABE manual-write reference.
YABE:
- Connect to the gateway (IP
192.168.31.205, Port47808), expand Device 105 - Refer to the YABE write guide in the script output above to locate the corresponding object
- Right-click the object → Write Property, set the property to
present-value, enter the target value, then click Write
IoT Hub HTTP:
Endpoint: POST http://192.168.31.205:8070/api/sendCommand
curl -s -X POST "http://192.168.31.205:8070/api/sendCommand" \
-H "Content-Type: application/json" \
-d '{"devEui":"ffffff1000054348","params":{"ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":3,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
{
"success": true,
"result": {
"devEui": "ffffff1000054348",
"status": "buffered"
}
}
ChirpStack REST API:
Endpoint: POST http://192.168.31.205:8090/api/devices/ffffff1000054348/queue
curl -s -X POST 'http://192.168.31.205:8090/api/devices/ffffff1000054348/queue' \
-H 'accept: application/json' \
-H 'Grpc-Metadata-Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{"flushQueue":true,"queueItem":{"confirmed":false,"isPending":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":3,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}}'
{
"id": "4e8b2c17-5f93-4a01-b8d0-2c91ef345678"
}
Formatted JSON payload:
{
"flushQueue": true,
"queueItem": {
"confirmed": false,
"isPending": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 3,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}
}
ChirpStack MQTT:
mosquitto_pub -h 192.168.31.205 -p 1883 -u gateway -P mqtt88888888 \
-t "application/3ef9e6b9-ec54-4eda-86b8-a5fb46899f39/device/ffffff1000054348/command/down" \
-m '{"flushQueue":true,"devEui":"ffffff1000054348","confirmed":false,"object":{"model":"DS-103","ds103ControlTarget":254,"ds103ControlState":false,"ds103ControlMode":3,"ds103DelaySeconds":0,"ds103ScheduleTimestamp":0,"ds103RepeatDaily":false}}'
Formatted JSON payload:
{
"flushQueue": true,
"devEui": "ffffff1000054348",
"confirmed": false,
"object": {
"model": "DS-103",
"ds103ControlTarget": 254,
"ds103ControlState": false,
"ds103ControlMode": 3,
"ds103DelaySeconds": 0,
"ds103ScheduleTimestamp": 0,
"ds103RepeatDaily": false
}
}