Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
f0ffe38
milesight-iot add new sensor AM107
Jan 14, 2021
1a19859
milesight-iot update index.yaml
Jan 14, 2021
a5fc351
milesight-iot add sensor am107 support
Jan 14, 2021
b30c192
mileight-iot format am107.yaml
Jan 14, 2021
643b16b
update vendor id to 601
Jan 19, 2021
bfc4ba2
Add files via upload
Jan 25, 2021
2d6bf99
Delete ug67.yaml
Feb 23, 2021
09ecbd0
Delete ug67.png
Feb 23, 2021
ec6d1eb
Delete em500-udl.png
Feb 23, 2021
be3cd6a
Delete em500-co2.png
Feb 23, 2021
e7ccc5b
Delete em300-th.png
Feb 23, 2021
c58e538
Delete ug67-profile-eu868.yaml
Feb 23, 2021
bcf481a
Add files via upload
Feb 23, 2021
337343e
name update
Feb 23, 2021
549707b
Add files via upload
Feb 23, 2021
6729894
Delete EM500-CO2.png
Feb 23, 2021
4b7847e
Delete EM500-UDL.png
Feb 23, 2021
941c153
Delete em500-co2.png
May 13, 2021
cf1ce18
Delete em500-udl.png
May 13, 2021
e3b89c6
Update index.yaml
May 17, 2021
0a321c6
Add files via upload
May 18, 2021
ef1ce39
Add files via upload
May 18, 2021
0e61ae3
Added EM500 series Sensors
Jun 1, 2021
91e2d4d
Merge branch 'master' of https://github.com/Milesight-IoT/lorawan-dev…
Jun 1, 2021
cd6a1e3
Update em300-mcs.yaml
Jun 1, 2021
a37ec80
Update
Jun 2, 2021
328c2da
Merge branch 'master' of https://github.com/Milesight-IoT/lorawan-dev…
Jun 2, 2021
900e988
Add new models
Jul 1, 2021
53a9126
Merge branch 'master' of https://github.com/Milesight-IoT/lorawan-dev…
Jul 1, 2021
eb1fa8d
Implemented some models
Jul 1, 2021
255f68d
Implemented examples
Jul 2, 2021
f9c47aa
Added WS558, EM310, AM300 and Updated some old description for other …
Nov 25, 2021
4b68147
Merge branch 'master' into master
Nov 25, 2021
d692733
Update index.yaml
Nov 25, 2021
f7f6df3
Merge branch 'master' of https://github.com/Milesight-IoT/lorawan-dev…
Nov 25, 2021
ce47bdc
Merge branch 'master' into master
Jaime-Trinidad Dec 3, 2021
8472722
files fixes
Jaime-Trinidad Dec 6, 2021
077e0c7
update am319
Jaime-Trinidad Dec 8, 2021
f635b3a
update em300
Jaime-Trinidad Dec 8, 2021
bf1dad2
update em300 firmware files
Jaime-Trinidad Dec 8, 2021
4018ccd
update em500-co2
Jaime-Trinidad Dec 8, 2021
a36cc0b
fixed files
Jaime-Trinidad Dec 14, 2021
e7b703c
update uc50x-codec
Jaime-Trinidad Dec 14, 2021
b0e4aff
Merge branch 'master' into master
Jaime-Trinidad Dec 14, 2021
57a95dd
update codecs
Jaime-Trinidad Dec 14, 2021
61eb651
Merge branch 'master' of https://github.com/Milesight-IoT/lorawan-dev…
Jaime-Trinidad Dec 14, 2021
47a0eed
fix ws301
Jaime-Trinidad Dec 14, 2021
4578f3a
more fixes
Jaime-Trinidad Dec 14, 2021
5ba6744
fix
Jaime-Trinidad Dec 14, 2021
f6a43dd
fix
Jaime-Trinidad Dec 14, 2021
5bb4879
fix uc1122
Jaime-Trinidad Dec 14, 2021
4a6b67a
fix uc1114
Jaime-Trinidad Dec 14, 2021
97ab171
uc51x
Jaime-Trinidad Dec 14, 2021
26f49ef
Merge branch 'master' into master
Feb 8, 2022
61d942c
Merge branch 'TheThingsNetwork:master' into master
Feb 11, 2022
76000d8
Fix codecs, decoders and images
rroemhild Mar 14, 2022
c3a9dc8
Merge branch 'master' into Milesight-IoT/master
rroemhild Mar 14, 2022
6a58537
Fix style issue
rroemhild Mar 14, 2022
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
189 changes: 78 additions & 111 deletions vendor/index.yaml

Large diffs are not rendered by default.

48 changes: 44 additions & 4 deletions vendor/milesight-iot/am107.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,55 @@ name: AM107
description: Ambience Monitoring Sensors

hardwareVersions:
- version: '1.4'
- version: '1.x'
numeric: 1
- version: '2.x'
numeric: 2

firmwareVersions:
- # Firmware version
version: 'V1.25'
- version: '1.43'
numeric: 1
hardwareVersions:
- '1.4'
- '1.x'

profiles:
EU863-870:
id: profile-eu868
lorawanCertified: true
codec: am107-codec
US902-928:
id: profile-us915
lorawanCertified: true
codec: am107-codec
AU915-928:
id: profile-au915
lorawanCertified: true
codec: am107-codec
AS923:
id: profile-as923
lorawanCertified: true
codec: am107-codec
CN470-510:
id: profile-cn470
lorawanCertified: true
codec: am107-codec
KR920-923:
id: profile-kr920
lorawanCertified: true
codec: am107-codec
IN865-867:
id: profile-in865
lorawanCertified: true
codec: am107-codec
RU864-870:
id: profile-ru864
lorawanCertified: true
codec: am107-codec

- version: '1.02'
numeric: 2
hardwareVersions:
- '2.x'

profiles:
EU863-870:
Expand Down
23 changes: 23 additions & 0 deletions vendor/milesight-iot/am307-codec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Uplink decoder decodes binary data uplink into a JSON object
uplinkDecoder:
fileName: am307.js
examples:
- description: Ambience Monitoring Sensors (example 1) - Milesight IoT
input:
fPort: 85
bytes: [0x01, 0x75, 0x5C, 0x03, 0x67, 0x34, 0x01, 0x04, 0x68, 0x65, 0x05, 0x00, 0x01]
output:
data:
battery: 92
temperature: 30.8
humidity: 50.5
activity: 'trigger'
- description: Ambience Monitoring Sensors (example 3) - Milesgiht IoT
input:
fPort: 85
bytes: [0x07, 0x7D, 0xE7, 0x04, 0x08, 0x7D, 0x07, 0x00, 0x09, 0x73, 0x3F, 0x27]
output:
data:
co2: 1255
tvoc: 7
pressure: 1004.7
113 changes: 113 additions & 0 deletions vendor/milesight-iot/am307.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
function decodeUplink(input) {
var res = Decoder(input.bytes, input.fPort);
if (res.error) {
return {
errors: [res.error],
};
}
return {
data: res,
};
}
/**
* Payload Decoder for The Things Network
*
* Copyright 2021 Milesight IoT
*
* @product AM307 / AM319
*/
function Decoder(bytes, port) {
var decoded = {};

for (var i = 0; i < bytes.length;) {
var channel_id = bytes[i++];
var channel_type = bytes[i++];
// BATTERY
if (channel_id === 0x01 && channel_type === 0x75) {
decoded.battery = bytes[i];
i += 1;
}
// TEMPERATURE
else if (channel_id === 0x03 && channel_type === 0x67) {
// ℃
decoded.temperature = readInt16LE(bytes.slice(i, i + 2)) / 10;
i += 2;

// ℉
// decoded.temperature = readInt16LE(bytes.slice(i, i + 2)) / 10 * 1.8 + 32;
// i +=2;
}
// HUMIDITY
else if (channel_id === 0x04 && channel_type === 0x68) {
decoded.humidity = bytes[i] / 2;
i += 1;
}
// ACTIVITY
else if (channel_id === 0x05 && channel_type === 0x00) {
decoded.activity = bytes[i] === 1 ? "trigger": "idle";
i += 1;
}
// LIGHT
else if (channel_id === 0x06 && channel_type === 0xCB) {
decoded.light_level = bytes[i];
i += 1;
}
// CO2
else if (channel_id === 0x07 && channel_type === 0x7D) {
decoded.co2 = readUInt16LE(bytes.slice(i, i + 2));
i += 2;
}
// TVOC
else if (channel_id === 0x08 && channel_type === 0x7D) {
decoded.tvoc = readUInt16LE(bytes.slice(i, i + 2));
i += 2;
}
// PRESSURE
else if (channel_id === 0x09 && channel_type === 0x73) {
decoded.pressure = readUInt16LE(bytes.slice(i, i + 2)) / 10;
i += 2;
}
// HCHO
else if (channel_id === 0x0A && channel_type === 0x7D) {
decoded.hcho = readUInt16LE(bytes.slice(i, i + 2)) / 100;
i += 2;
}
// PM2.5
else if (channel_id === 0x0B && channel_type === 0x7D) {
decoded["pm2.5"] = readUInt16LE(bytes.slice(i, i + 2));
i += 2;
}
// PM10
else if (channel_id === 0x0C && channel_type === 0x7D) {
decoded.pm10 = readUInt16LE(bytes.slice(i, i + 2));
i += 2;
}
// O3
else if (channel_id === 0x0D && channel_type === 0x7D) {
decoded.o3 = readUInt16LE(bytes.slice(i, i + 2)) / 100;
i += 2;
}
// BEEP
else if (channel_id === 0x0E && channel_type === 0x01) {
decoded.beep = bytes[i] === 1 ? "yes" : "no";
i += 1;
} else {
break;
}
}

return decoded;
}

/* ******************************************
* bytes to number
********************************************/
function readUInt16LE(bytes) {
var value = (bytes[1] << 8) + bytes[0];
return value & 0xffff;
}

function readInt16LE(bytes) {
var ref = readUInt16LE(bytes);
return ref > 0x7fff ? ref - 0x10000 : ref;
}
Binary file added vendor/milesight-iot/am307.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions vendor/milesight-iot/am307.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: AM307
description: The Milesight AM307 consists of ambient monitoring sensors such as activity level (PIR), humidity, temperature, light, CO2, TVOC, and barometric pressure for indoor ambiance monitoring. It works perfectly with Milesight IoT Cloud (Web & App) which allows monitoring your data in the office or on the go.

hardwareVersions:
- version: '1.x'
numeric: 1

firmwareVersions:
- version: '1.x'
numeric: 1
hardwareVersions:
- '1.x'

profiles:
EU863-870:
id: profile-eu868
lorawanCertified: true
codec: am307-codec
US902-928:
id: profile-us915
lorawanCertified: true
codec: am307-codec
AU915-928:
id: profile-au915
lorawanCertified: true
codec: am307-codec
AS923:
id: profile-as923
lorawanCertified: true
codec: am307-codec
CN470-510:
id: profile-cn470
lorawanCertified: true
codec: am307-codec
KR920-923:
id: profile-kr920
lorawanCertified: true
codec: am307-codec
IN865-867:
id: profile-in865
lorawanCertified: true
codec: am307-codec
RU864-870:
id: profile-ru864
lorawanCertified: true
codec: am307-codec

sensors:
- battery
- temperature
- humidity
- co2
- tvoc
- pressure
- pir
- light

dimensions:
width: 22
length: 100.8
height: 114

battery:
replaceable: true
type: ER14505

operatingConditions:
temperature:
min: -20
max: 60

relativeHumidity:
min: 0.1
max: 0.9

ipCode: IP30

keyProvisioning:
- custom
- join server
keySecurity: none
productURL: https://www.milesight-iot.com/lorawan/sensor/am300/
dataSheetURL: https://resource.milesight-iot.com/milesight/document/am300-series-datasheet-en.pdf
resellerURLs:
- name: 'iot.sales@milesight.com'
region:
- United States
- European Union
- Canada
url: https://www.milesight-iot.com/contact-us/

photos:
main: am307.png
other:
- am307.png

videos:
main: https://youtu.be/ax-kQnPY3PA
23 changes: 23 additions & 0 deletions vendor/milesight-iot/am319-codec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Uplink decoder decodes binary data uplink into a JSON object
uplinkDecoder:
fileName: am319.js

#examples:
# - description: Ambience Monitoring Sensors (example 1) - Milesight IoT
# input:
# fPort: 85
# bytes:
# [0x03,0x67,0x34,0x01,0x04, 0x68, 0x65,0x05,0x00,0x01,0x06,0xCB, 0x02, 0x07, 0x7D,0xA8,0x03,0x08,0x7D,0x25,0x00, 0x09,0x73,0x66,0x27, 0x0A, 0x7D,0x04,0x00,0x0B,0x7D,0x20,0x00, 0x0C, 0x7D, 0x30, 0x00 ]
# output:
# data:
# battery: 92
# temperature: 30.8
# humidity: 50.5
# activity: 'trigger'
# light_level: 2
# co2: 936
# tvoc: 37
# pressure: 1008.6
# hcho: 0.04
# pm2.5: 32
# pm10: 48
Loading