Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
22a0201
r718pa,r718pa4,r718pb,rp02 insert,r718n
netvox-tech Dec 7, 2023
a819bd8
add r718pa,r718pa4,r718pb,rp02,r718n3 support
netvox-tech Dec 7, 2023
c981d29
add r718pa,r718pa4,r718pb,rp02,r718n3 support
netvox-tech Dec 7, 2023
c724491
add photos
netvox-tech Dec 25, 2023
e891dc9
add photos
netvox-tech Dec 25, 2023
9fc99c9
R312A、R312FunctionKeyTrigger
netvox-tech Jan 23, 2024
2ff5ad9
photo submission
netvox-tech Apr 12, 2024
8c8b7e3
photo submission
netvox-tech Apr 12, 2024
039fae1
Report type 0x11,0x12 support
netvox-tech Jun 13, 2024
deae6cb
RA02G R603
netvox-tech Aug 21, 2024
df6c0b2
Merge branch 'master' into master
netvox-tech Aug 22, 2024
1d77269
ra02g,r603,r718pa,r718pb update
netvox-tech Aug 23, 2024
6e46933
Merge branch 'master' into master
Jaime-Trinidad Sep 9, 2024
2b6d6e9
modify r603,add r315la
netvox-tech Nov 14, 2024
487ca2f
Merge branch 'master' of https://github.com/netvox-tech/lorawan-devices
netvox-tech Nov 14, 2024
370f21c
r315la modify
netvox-tech Nov 18, 2024
b57363e
r211 update
netvox-tech Jan 22, 2025
d344d5d
ra02a,ra02c modify
netvox-tech Feb 12, 2025
e0f5173
r900pb02,r900pb02o1,r900pb03,r900pb03o1,ra02d1 add
netvox-tech Jun 27, 2025
86036f5
add r900pd01, r900pd01o1
netvox-tech Jul 2, 2025
985be3b
add r602b
netvox-tech Jul 17, 2025
cd337c2
add r900nac1,r900nac3,r900nac6,r900ndc
netvox-tech Aug 21, 2025
6f5bd60
add r900a01,r900a01o1
netvox-tech Aug 22, 2025
f15213e
add r900a02,r900a02o1,r900a03,r900a03o1
netvox-tech Aug 28, 2025
9f6c686
add r718pba15,r71832a01
netvox-tech Sep 16, 2025
7586985
add R718EC
netvox-tech Dec 22, 2025
b60ff64
add r718ce,r718ce2,r718ce4,r718cj,r718cj2,r718cj4,r718kb,r718pc
netvox-tech Jan 26, 2026
81e1540
add r718ce,r718ce2,r718ce4,r718cj,r718cj2,r718cj4,r718kb,r718pc
netvox-tech Jan 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions vendor/netvox/index.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,23 @@ endDevices:
- r31508
- r31509
- r31510
- r315la
- r602a
- r602b
- r603
- r711
- r711a
- r718a
- r718ab
- r718ad
- r718b
- r718b2
- r718ce
- r718ce2
- r718ce4
- r718cj
- r718cj2
- r718cj4
- r718ck
- r718ck2
- r718cn
Expand All @@ -51,6 +60,7 @@ endDevices:
- r718e
- r718ea
- r718eb
- r718ec
- r718f
- r718f2
- r718g
Expand All @@ -64,6 +74,7 @@ endDevices:
- r718j2
- r718ka
- r718ka2
- r718kb
- r718lb
- r718lb2
- r718ma
Expand All @@ -81,6 +92,8 @@ endDevices:
- r718pa22
- r718pe
- r718pb
- r718pb15a
- r718pc
- r718q
- r718qa
- r718t2
Expand All @@ -107,6 +120,7 @@ endDevices:
- r72615a
- r72616
- r72616a
- r72632a01
- r72716
- r730ck2
- r730ct2
Expand All @@ -119,8 +133,26 @@ endDevices:
- r831b
- r831c
- r831d
- r900a01
- r900a01o1
- r900a02
- r900a02o1
- r900a03
- r900a03o1
- r900nac1
- r900nac3
- r900nac6
- r900ndc
- r900pb02
- r900pb02o1
- r900pb03
- r900pb03o1
- r900pd01
- r900pd01o1
- ra02a
- ra02c
- ra02d1
- ra02g
- ra07w
- ra0715
- ra0715y
Expand Down
11 changes: 11 additions & 0 deletions vendor/netvox/payload/r211.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ function decodeUplink(input) {
data: data,
};
}
if (input.bytes[2] === 0x80)
{
data.Device = getDeviceName(input.bytes[1]);
data.SWver = input.bytes[3]/10;
data.HWver = input.bytes[4];
data.Datecode = padLeft(input.bytes[5].toString(16), 2) + padLeft(input.bytes[6].toString(16), 2) + padLeft(input.bytes[7].toString(16), 2) + padLeft(input.bytes[8].toString(16), 2);

return {
data: data,
};
}

case 0x21:
data.Cmd = getCmd(input.bytes[0]);
Expand Down
64 changes: 61 additions & 3 deletions vendor/netvox/payload/r315.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,67 @@ function decodeUplink(input) {
data.Humi = input.bytes[10]*0.5;
}
}
else if (input.bytes[2] == 0x02)
data.Illuminance = (input.bytes[4]<<8 | input.bytes[5]);

else if (input.bytes[2] == 0x02){
data.Illuminance = (input.bytes[4]<<8 | input.bytes[5])+"Lux";
data.LowTemperatureAlarm = input.bytes[6] & 1;
data.HighTemperatureAlarm = input.bytes[6]>>1 & 1;
data.LowHumidityAlarm = input.bytes[6]>>2 & 1;
data.HighHumidityAlarm = input.bytes[6]>>3 & 1;
data.LowIlluminanceAlarm = input.bytes[6]>>4 & 1;
data.HighIlluminanceAlarm = input.bytes[6]>>5 & 1;
}
else if(input.bytes[2] == 0x011){
let FunctionEnable = (input.bytes[5]<<8 |input.bytes[6]);
data.THSensor = FunctionEnable & 1;
data.LightSensor = FunctionEnable>>1 & 1;
data.PIRSensor = FunctionEnable>>2 & 1;
data.EmergenceButton = FunctionEnable>>3 & 1;
data.TiltSensor = FunctionEnable>>4 & 1;
data.InternalContactSwitch = FunctionEnable>>5 & 1;
data.ExternalContactSwitch1 = FunctionEnable>>6 & 1;
data.ExternalContactSwitch2 = FunctionEnable>>7 & 1;
data.InternalShockSensor = FunctionEnable>>8 & 1;
data.ExternalShockSensor = FunctionEnable>>9 & 1;
data.ExternalDryContactPointIN = FunctionEnable>>10 & 1;
data.DryContactPointOut = FunctionEnable>>11 & 1;
data.ExternalWaterLeakSenor1 = FunctionEnable>>12 & 1;
data.ExternalWaterLeakSenor2 = FunctionEnable>>13 & 1;
data.ExternalSeatSensor = FunctionEnable>>14 & 1;
data.ExternalGlassSensor1 = FunctionEnable>>15 & 1;
data.ExternalGlassSensor2 = input.bytes[4]& 1;

let BinarySensorReport = (input.bytes[7]<<8 | input.bytes[8]);
data.PIRSensorState = BinarySensorReport & 1;
data.EmergenceButtonaLAlarmState = BinarySensorReport>>1 & 1;
data.TiltSensorState = BinarySensorReport>>2 & 1;
data.InternalContactSwitchSensorState = BinarySensorReport>>3 & 1;
data.ExternalContactSwitch1SensorState = BinarySensorReport>>4 & 1;
data.ExternalContactSwitch2SensorState = BinarySensorReport>>5 & 1;
data.InternalShockSensorState = BinarySensorReport>>6 & 1;
data.ExternalShockSensorState = BinarySensorReport>>7 & 1;
data.ExternalDryContactPointINState = BinarySensorReport>>8 & 1;
data.ExternalWaterLeak1SenorState = BinarySensorReport>>9 & 1;
data.ExternalWaterLeak2SenorState = BinarySensorReport>>10 & 1;
data.ExternalSeatSenorState = BinarySensorReport>>11 & 1;
data.ExternalGlassSenor1State = BinarySensorReport>>12 & 1;
data.ExternalGlassSenor2State = BinarySensorReport>>13 & 1;
}
else if(input.bytes[2] == 0x12){
if (input.bytes[4] & 0x80){
var tmpval = (input.bytes[4]<<8 | input.bytes[5]);
data.Temp = (0x10000 - tmpval)/100 * -1;
}else{
data.Temp = (input.bytes[4]<<8 | input.bytes[5])/100;
}
data.Humidity = (input.bytes[6]<<8 | input.bytes[7])*0.01 +"%";
data.Illuminance = (input.bytes[8]<<8 | input.bytes[9])+"Lux";
data.LowTemperatureAlarm = input.bytes[10] & 1;
data.HighTemperatureAlarm = input.bytes[10]>>1 & 1;
data.LowHumidityAlarm = input.bytes[10]>>2 & 1;
data.HighHumidityAlarm = input.bytes[10]>>3 & 1;
data.LowIlluminanceAlarm = input.bytes[10]>>4 & 1;
data.HighIlluminanceAlarm = input.bytes[10]>>5 & 1;
}
break;

case 7:
Expand Down
184 changes: 184 additions & 0 deletions vendor/netvox/payload/r315la.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
function getCfgCmd(cfgcmd){
var cfgcmdlist = {
1: "ConfigReportReq",
129: "ConfigReportRsp",
2: "ReadConfigReportReq",
130: "ReadConfigReportRsp",
3: "SetOnDistanceThresholdRreq",
131: "SetOnDistanceThresholdRrsq",
4: "GetOnDistanceThresholdRreq",
132: "GetOnDistanceThresholdRrsp",
};
return cfgcmdlist[cfgcmd];
}

function getCmdToID(cmdtype){
if (cmdtype == "ConfigReportReq")
return 1;
else if (cmdtype == "ConfigReportRsp")
return 129;
else if (cmdtype == "ReadConfigReportReq")
return 2;
else if (cmdtype == "ReadConfigReportRsp")
return 130;
else if (cmdtype == "SetOnDistanceThresholdRreq")
return 3;
else if (cmdtype == "SetOnDistanceThresholdRrsq")
return 131;
else if (cmdtype == "GetOnDistanceThresholdRreq")
return 4;
else if (cmdtype == "GetOnDistanceThresholdRrsp")
return 132;
}

function getDeviceName(dev){
var deviceName = {
221: "R315LA"
};
return deviceName[dev];
}

function getDeviceID(devName){
var deviceName = {
"R315LA": 221
};
return deviceName[devName];
}

function padLeft(str, len) {
str = '' + str;
if (str.length >= len) {
return str;
} else {
return padLeft("0" + str, len);
}
}

function decodeUplink(input) {
var data = {};
switch (input.fPort) {
case 6:
if (input.bytes[2] === 0x00)
{
data.Device = getDeviceName(input.bytes[1]);
data.SWver = input.bytes[3]/10;
data.HWver = input.bytes[4];
data.Datecode = padLeft(input.bytes[5].toString(16), 2) + padLeft(input.bytes[6].toString(16), 2) + padLeft(input.bytes[7].toString(16), 2) + padLeft(input.bytes[8].toString(16), 2);

return {
data: data,
};
}

data.Device = getDeviceName(input.bytes[1]);
if (input.bytes[3] & 0x80)
{
var tmp_v = input.bytes[3] & 0x7F;
data.Volt = (tmp_v / 10).toString() + '(low battery)';
}
else
data.Volt = input.bytes[3]/10;

data.VModbusID = input.bytes[4];
data.Status = (input.bytes[5] == 0x00) ? 'Off' : 'On';
data.Distance = (input.bytes[6]<<8 | input.bytes[7])+"mm";
data.LowDistanceAlarm = input.bytes[8] & 1;
data.HightDistanceAlarm = input.bytes[8]>>1 & 1;
break;

case 7:
data.Cmd = getCfgCmd(input.bytes[0]);
data.Device = getDeviceName(input.bytes[1]);

if ((input.bytes[0] === getCmdToID("ConfigReportRsp"))
|| (input.bytes[0] === getCmdToID("SetOnDistanceThresholdRrsq")))
{
data.Status = (input.bytes[2] === 0x00) ? 'Success' : 'Failure';
}
else if (input.bytes[0] === getCmdToID("ReadConfigReportRsp"))
{
data.MinTime = (input.bytes[2]<<8 | input.bytes[3]);
data.MaxTime = (input.bytes[4]<<8 | input.bytes[5]);
data.BatteryChange = input.bytes[6]/10;
data.DistanceChange = (input.bytes[7]<<8 | input.bytes[8])+"mm"
}
else if (input.bytes[0] === getCmdToID("GetOnDistanceThresholdRrsp"))
{
data.OnDistanceThreshold = (input.bytes[2]<<8 | input.bytes[3])+"mm";
}

break;

default:
return {
errors: ['unknown FPort'],
};

}

return {
data: data,
};
}

function encodeDownlink(input) {
var ret = [];
var devid;
var getCmdID;

getCmdID = getCmdToID(input.data.Cmd);
devid = getDeviceID(input.data.Device);

if (input.data.Cmd == "ConfigReportReq")
{
var mint = input.data.MinTime;
var maxt = input.data.MaxTime;
var battery = input.data.BatteryChange*10;
var distance = input.data.DistanceChange;
ret = ret.concat(getCmdID, devid, (mint >> 8), (mint & 0xFF), (maxt >> 8), (maxt & 0xFF), battery, (distance >> 8), (distance & 0xFF), 0x00, 0x00);
}
else if (input.data.Cmd == "SetOnDistanceThresholdRreq")
{
var onDistanceThreshold = input.data.OnDistanceThreshold;
ret = ret.concat(getCmdID, devid, (onDistanceThreshold >> 8), (onDistanceThreshold & 0xFF), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
}
else if ((input.data.Cmd == "ReadConfigReportReq")
|| (input.data.Cmd == "GetOnDistanceThresholdRreq"))
{
ret = ret.concat(getCmdID, devid, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
}
return {
fPort: 7,
bytes: ret
};
}

function decodeDownlink(input) {
var data = {};
switch (input.fPort) {
case 7:
data.Cmd = getCfgCmd(input.bytes[0]);
data.Device = getDeviceName(input.bytes[1]);
if (input.bytes[0] === getCmdToID("ConfigReportReq"))
{
data.MinTime = (input.bytes[2]<<8 | input.bytes[3]);
data.MaxTime = (input.bytes[4]<<8 | input.bytes[5]);
data.BatteryChange = input.bytes[6]/10;
data.DistanceChange = (input.bytes[7]<<8 | input.bytes[8])+"mm"
}
else if (input.bytes[0] === getCmdToID("SetOnDistanceThresholdRreq"))
{
data.OnDistanceThreshold = (input.bytes[2]<<8 | input.bytes[3])+"mm";
}
break;

default:
return {
errors: ['invalid FPort'],
};
}

return {
data: data,
};
}
Loading