Setup VM (using Nodejs version 10 or above)
Download the source code
tar -zxf shio-http-server-v1.11.tar.gz
cd shio-http-server-v1.11
ls -al
decode.js
.env
index.js
package.json
package-lock.json
README.md
npm install express body-parser dotenv mqtt fs-extra
npm WARN http-server@1.0.0 No repository field.
+ dotenv@8.2.0
+ body-parser@1.19.0
+ mqtt@3.0.0
+ express@4.17.1
+ fs-extra@9.0.1
added 131 packages from 85 contributors and audited 131 packages in 4.061s
found 0 vulnerabilities
node index.js
Server start! (8080)
Receiving Message
When data comes in, two messages will be shown in console:
1 Received packet
2 Data packet
Save iBeacon list to a file
To save the iBeacon list to a file, specify the file name in .evn and uncomment FILE.
Integration to Other Systems
Hive MQTT
You can add your mqtt broker address in .env
PORT=8080
TZ=Asia/Hong_Kong
MQTT_HOST=mqtt://broker.mqttdashboard.com
MQTT_PORT=8000
Server start! (8080)
To MQTT server:mqtt://broker.mqttdashboard.com:8000
node index.js
Server start! (8080)
To MQTT server:mqtt://broker.mqttdashboard.com:8000
Visit http://www.hivemq.com/demos/websocket-client/ to get your data

You can see your data after subscribing softhard/# with QoS 0


JSON Format Definition
| NBIOT Packet | { uId: integer, gId: integer , deviceId: string, payload: string, freq: string, datarate: string, snr: string, rssi: string, seqnum: string, timestamp: string, UTC, port: integer, lpwantype: ‘NBIOT’, imei: string } | { uId: 13, gId: 443, deviceId: ‘89882280666017606371’, payload: ‘143601070ff10e06e0’, freq: ‘::ffff:18.197.48.88’, datarate: ‘-‘, snr: ‘-‘, rssi: ‘-63’, seqnum: ‘1’, timestamp: ‘2021-07-20T17:51:49+00:00’, port: 8062, lpwantype: ‘NBIOT’, imei: ‘867648043619087’ } |
| LORAWAN Packet | { uId: integer, gId: integer, deviceId: string, payload: string, freq: integer, datarate: integer, snr: integer, rssi: integer, seqnum: integer, timestamp: string, UTC, port: integer, lpwantype: ‘LORAWAN’, imei: string } | { uId: 13, gId: 443, deviceId: ‘0004a30b00fbceed’, payload: ‘14060107138801011F023C’, freq: 923200000, datarate: 5, snr: 9, rssi: -17, seqnum: 2, timestamp: ‘2021-07-20T17:33:17+00:00’, port: 1, lpwantype: ‘LORAWAN’, imei: ‘ac1f09fffe0465ad’ } |
| SIGFOX Packet | { uId: integer, gId: integer, deviceId: string, payload: string, freq: string, datarate: string, snr: string, rssi: string, seqnum: string, timestamp: string, UTC, port: ‘-‘, lpwantype: ‘SIGFOX’, imei: string } | { uId: 48, gId: 252, deviceId: ’13C7E25′, payload: ‘010110024c3901933a0276’, freq: ‘-‘, datarate: ‘-‘, snr: ‘6.00’, rssi: ‘-116.00’, seqnum: ‘328’, timestamp: ‘2021-07-28T12:56:53+00:00’, port: ‘-‘, lpwantype: ‘SIGFOX’, imei: ‘7C54’ } |
Data Packet – Edge ECO
5in1 Odor Sensor
| Status | Data |
| Power up | {“model”:”Edge ECO NBIoT”,”status”:”online”,”version”:”1.10.0″} {“temperature”:27.4,”humidity”:63,”co2″:636,”tvoc”:30,”pm2″:34,”hcho”:30,”h2s”:93,”nh3″:967} |
| Regular message | {“temperature”:27.4,”humidity”:63,”co2″:636,”tvoc”:30,”pm2″:34,”hcho”:30,”h2s”:93,”nh3″:967} |
5in1 Sensor
| Status | Data |
| Power up | {“model”:”Edge ECO NBIoT”,”status”:”online”,”version”:”1.10.0″} {“temperature”:27.4,”humidity”:52,”co2″:401,”tvoc”:0,”pm2″:24,”hcho”:0} |
| Regular message | {“temperature”:27.4,”humidity”:52,”co2″:401,”tvoc”:0,”pm2″:24,”hcho”:0} |
Odor Sensor
| Status | Data |
| Power up | {“model”:”Edge ECO NBIoT”,”status”:”online”,”version”:”1.10.0″} {“temperature”:27.4,”humidity”:63,”h2s”:93,”nh3″:967} |
| Regular message | {“temperature”:27.4,”humidity”:63,”h2s”:93,”nh3″:967} |
5in1 Odor Light Sensor
| Status | Data |
| Power up | {“model”:”Edge ECO NBIoT”,”status”:”online”,”version”:”1.10.0″} {“temperature”:24.4,”humidity”:61,”co2″:402,”tvoc”:30,”pm2″:50,”hcho”:140,”h2s”:4,”nh3″:10} {“light”:55} |
| Regular message | {“temperature”:24.4,”humidity”:61,”co2″:402,”tvoc”:30,”pm2″:50,”hcho”:140,”h2s”:4,”nh3″:10} {“light”:55} |
Data Packet – Edge Lite
Temperature Sensor
| Power up | |
| Sample Payload | 141600090203050710440100f50247 |
| Decoded payload | {“model”:”Edge Lite NBIoT”,”status” :”online”,”version”:”2.3.5″,”vdd”:4 164,”temperature”:24.5,”humidity”:7 1} |
| Regular message | |
| Sample Payload | 1416010710440100f60243 |
| Decoded payload | {“model”:”Edge Lite NBIoT”,”status” :”active”,”vdd”:4164,”temperature”: 24.6,”humidity”:67} |
Door Sensor (Normally close)
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:1} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:1} |
| Door is opened | {“vdd”:4200,”temperature”:26,”humidity”:40,”input1″:0} |
| Door is closed | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:1} |
Flood Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Floor is wet | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:1} |
| Floor is dry | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:0} |
Limit Switch / Gate Sensor (Normally open)
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Switch is closed | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:1} |
| Switch is opened | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:0} |
IR Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| An object is detected | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:1} |
| No object in front | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:0} |
PIR Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| A moving object is detected | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:1} |
Smoke Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Smoke is detected | {“vdd”:4201,”temperature”:26,”humidity”:39,”input1″:1} |
Door Counter
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4196,”temperature”:26.3,”humidity”:50,”input1″:0,”count”:0} |
| Regular message | {“vdd”:4196,”temperature”:26,”humidity”:52,”input1″:0,”count”:1} |
| Door count reaches the limit | {“vdd”:4195,”temperature”:26.1,”humidity”:53,”input1″:0,”count”:12} |
IR / Capsense Level Detector
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4199,”temperature”:26.6,”humidity”:38,”input1″:0} |
H2S Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4199,”temperature”:26.1,”humidity”:48,”h2s”:26890} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4197,”temperature”:26,”humidity”:45,”h2s”:26890} |
CO Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4196,”temperature”:23.8,”humidity”:32,”co”:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4196,”temperature”:23.8,”humidity”:32,”co”:0} |
Noise Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”vdd”:4252,”temperature”:28.5,”humidity”:56,”noise”:47} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4252,”temperature”:28.5,”humidity”:56,”noise”:49} |
Ultrasonic Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.4.87″,”vdd”:3890,”temperature”:20.9,”humidity”:58,”distance”:0} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”vdd”:4133,”temperature”:16.8,”humidity”:44,”distance”:0} |
Ultrasonic Aqua Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″,”distance”:7650,”speed”:0,”signal_level”:13,”water_level”:7.65} |
| Regular message | {“model”:”Edge Lite NBIoT”,”status”:”active”,”distance”:7650,”speed”:0,”signal_level”:13,”water_level”:7.65} |
9-axis Motion Sensor
| Status | Data |
| Power up | {“model”:”Edge Lite NBIoT”,”status”:”online”,”version”:”1.10.0″} {“vdd”:4170,”temperature”:26.2,”humidity”:31,”acc_x”:0.13,”acc_y”:-0.97,”acc_z”:0.22} {“angular_rate_x”:2.5,”angular_rate_y”:-4.3,”angular_rate_z”:0.1,”magnetic_field_x”:0,”magnetic_field_y”:0.33,”magnetic_field_z”:0.29} |
| Regular message | {“vdd”:4170,”temperature”:26.2,”humidity”:31,”acc_x”:0.13,”acc_y”:-0.97,”acc_z”:0.22} {“angular_rate_x”:2.5,”angular_rate_y”:-4.3,”angular_rate_z”:0.1,”magnetic_field_x”:0,”magnetic_field_y”:0.33,”magnetic_field_z”:0.29} |
Data Packet – Edge Router
iBeacon
| Status | Data |
| Power up | {“model”:”Edge Router NBIoT”,”status”:”online”} |
| Regular message | {“ibeacon_group”:”00″,”ibeacon_num”:”05″,”ibeacon_set”:”(0400030009C4;76)(800018385754;76)(80001D3A5754;80)(800019B95754;63)(105357FF1E03;87)”} |
Data Sender
| Status | Data |
| Power up | {“model”:”Edge Router NBIoT”,”status”:”online”} |
| Regular message | {“data”:”hello”} |
Key definition
| Field | Key Name | Unit | Format |
| Temperature | temperature | °C | signed, 1 decimal place |
| Humidity | humidity | % | unsigned |
| Light | light | lux | unsigned |
| GPS | gps_quality | unsigned | |
| gps_satellite | unsigned | ||
| gps_lat | signed, dd format | ||
| gps_long | signed, dd format | ||
| gps_altitude | m | unsigned | |
| gps_speed | m/s | unsigned | |
| gps_course | unsigned | ||
| Battery | vdd | mV | unsigned |
| Analog | analog | signed | |
| FW Version | version | string | |
| Count | count | ||
| External temperature | external_temperature | °C | signed, 1 decimal place |
| Input | input1 | bool | |
| input2 | bool | ||
| input3 | bool | ||
| Distance | distance | mm | unsigned |
| Motion | motion | bool | |
| IR Temperature | ir_internal_temperature | °C | signed, 1 decimal place |
| ir_external_temperature | °C | signed, 1 decimal place | |
| Occupancy | occupancy | bool | |
| Waterleak | waterleak | bool | |
| Model | model | string | |
| Status | status | string | |
| IBeacon | ibeacon_group | unsigned | |
| ibeacon_num | unsigned | ||
| ibeacon_set | string | ||
| Data | data | string | |
| Lift Signal | lift | string | |
| Noise | noise | dB | unsigned |
| Acceleration | acc_x | g | signed, 2 decimal place |
| acc_y | g | signed, 2 decimal place | |
| acc_z | g | signed, 2 decimal place | |
| Angle | ang_x | signed, 2 decimal place | |
| ang_y | signed, 2 decimal place | ||
| Speed | speed | m/s | unsigned, 2 decimal place |
| Signal Level | signal_level | dBm | unsigned |
| Water Level | water_level | m | unsigned, 2 decimal place |
| In Count | in_count | unsigned | |
| Out Count | out_count | unsigned | |
| Angular Rate | angular_rate_x | dps | signed, 1 decimal place |
| angular_rate_y | dps | signed, 1 decimal place | |
| angular_rate_z | dps | signed, 1 decimal place | |
| Magnetic Field | magnetic_field_x | Gauss | signed, 2 decimal place |
| magnetic_field_y | Gauss | signed, 2 decimal place | |
| magnetic_field_z | Gauss | signed, 2 decimal place | |
| Timestamp | ts_type | 1: System time 2: GPS time | |
| ts_year | |||
| ts_month | |||
| ts_day | |||
| ts_hour | |||
| ts_minute | |||
| ts_second | |||
| Current | current | A | unsigned, 2 decimal place |
| Colour | colour_red | lux | unsigned |
| colour_blue | lux | unsigned | |
| colour_green | lux | unsigned | |
| colour_white | lux | unsigned | |
| Total Suspended Particles 總懸浮顆粒 (TSP) | tsp | μg/m3 | unsigned |
| PM1.0 超细颗粒物 | pm1 | μg/m3 | unsigned |
| PM2.5 细颗粒物 | pm2 | μg/m3 | unsigned |
| PM10 可吸入颗粒物 | pm10 | μg/m3 | unsigned |
| Sulphur dioxide 二氧化硫 (SO2) | so2 | ppb | unsigned |
| Nitrogen dioxide 二氧化氮 (NO2) | no2 | ppb | unsigned |
| Carbon monoxide 一氧化碳 (CO) | co | ppm | unsigned |
| Ozon 臭氧 (O3) | o3 | ppb | unsigned |
| Hydrogen sulfide 硫化氫 (H2S) | h2s | ppb | unsigned |
| Carbon dioxide 二氧化碳 (CO2) | co2 | ppm | unsigned |
| Total Volatile Organic Compound 總揮發性有機化合物 (TVOC) | tvoc | ppb | unsigned |
| Formaldehyde 甲醛 (HCHO) | hcho | μg/m3 | unsigned |
| Ammonia 氨 (NH3) | nh3 | ppb | unsigned |
| Methane 甲烷 (CH4) | ch4 | ppb | unsigned |
| Propane 丙烷 (C3H8) | c3h8 | ppb | unsigned |
| Ethanol 乙醇 (C2H5OH) | c2h5oh | ppb | unsigned |
