SenseCAP S2100 Data Logger is a powerful edge device featuring a LoRa transceiver which allows sending data to your prefered network server supporting frequency plans such as 863MHz ~928MHz. The S2100 is able to communicate to any sensor via MODBUS-RTU RS485 as well as Analog 4~20mA/0~10V and also GPIO level/pulse sensors.
One of its most remarkable features is its capabitily to work in harsh environments, since it implements the IP66 rated enclosure, suitable for outdoor use, high UV exposure, heavy rain, dusty conditions, etc.
Requirements
An Ubidots active account
An active account on Helium LNS
A SenseCap S2100 with sensor already configured. Please visit the following links in order to do so:
A cellphone running either Android or IOS with Bluetooth
Table of contents
1. Configure the SenseCap S2100
Please follow the steps given in section #1 of the following guide.
2. Register the SenseCap S2100 on Helium LNS
Please follow the steps given in section #2 of the following guide.
3. Create the Integration to Ubidots
Please follow the steps given in section #3 of the following guide
4. Configure the decoder function
Go to "Functions" section on your Helium Console
Click on "Create new function" button
Click "Custom"
Set a name for your decoder function
Delete all the code in the textbox
Paste the official decoder function for this device provided by Seeed Studio on their official GitHub repository
Click on "Save Function" button
5. Connect the Integration to Ubidots
Please follow section #5 of the following technical guide.
6. Configure the Ubidots decoder
Go to your Ubidots account
Go to "Devices" --> "Plugins"
Search for a newly created plugin. Its name is most likely to be "Helium integration"
Click on the pencil icon
Head to the "Decoder" section at the left side of the screen
Scroll down to the "Decoding Function" section and delete all the code present in the textbox
Paste the following code
Click on "SAVE & MAKE LIVE" button to save the changes
Decoder function code:
function format_payload (args) {
var messages = args['uplink_message']['decoded_payload']['messages']
var ubidotsPayload = {}
var varLabelMap = {
1: 'measurement1',
2: 'measurement2',
3: 'measurement3',
4: 'measurement4',
5: 'measurement5',
6: 'measurement6',
7: 'measurement7',
8: 'measurement8',
9: 'measurement9',
10: 'measurement10'
}
messages.forEach(msg => {
msg.forEach(innerList => {
if (innerList.hasOwnProperty('measurementId')) {
ubidotsPayload[varLabelMap[innerList.measurementId]] =
innerList['measurementValue']
}
})
})
return ubidotsPayload
}
module.exports = { format_payload };
7. Visualize the Data on Ubidots
Head to the “Devices” section on your Ubidots account and you’ll be able to see a newly create device with the same name as you used for “Device name” at step 2. Here you can check an example.
8. Feedback, Suggestion and Related Articles
Feel free to post questions or suggestions in our community portal, or contact us via support@ubidots.com.
Other users also found helpful...