Device Registration
The Siguino is registered as a Sigfox DevKit, so once you have received your Siguino you can activate it as a DevKit (one year’s free messages) by following the instructions at this address:
Once registered and powered (either by a standard 3v CR2 battery, or via the onboard pins), you should be able to navigate to the Sigfox backend and see messages arriving here:
One at the above address, click “Device Type” then click the name of the registered device in the table listed, followed by “Associated Devices” on the left hand menu, then click the Device ID in the table listed and finally “Messages” in the left hand menu.
Wia Integration
Wia.io is a great way to quickly make use of the data being sent by the Siguino. Head over to Wia and create a free account and once done, follow the sample instructions here to get your Siguino to send message data on to the Wia platform:
https://developers.wia.io/docs/integrations-sigfox

Javascript Code for Data extraction
var SiguinoFields = { SEQ_NUM: [0,8], TEMPERATURE: [8,15], LIGHT_AVG: [15,25], SHOCK_OCCURRED: [25, 26], MAG_OCCURRED: [26, 27], BATT_LVL: [27, 31], PRESSURE: [31,39], HUMIDITY: [39,46], ALTITUDE: [46,55] }; function reverse_string(s){ return s.split("").reverse().join(""); } function hex2bin(hex_val) { var returnValue = ''; // Empty string to add our data to later on. for (var i = 0; i < parseInt(hex_val.length / 2); i++) { // Determining the substring. var substring = hex_val.substr(i*2, 2); // Determining the binValue of this hex substring. var binValue = parseInt(substring, 16).toString(2); // If the length of the binary value is not equal to 8 we add leading 0s (js deletes the leading 0s) // For instance the binary number 00011110 is equal to the hex number 1e, // but simply running the code above will return 11110. So we have to add the leading 0s back. if (binValue.length != 8) { // Determining how many 0s to add: var diffrence = 8 - binValue.length; // Adding the 0s: for (var j = 0; j < diffrence; j++) { binValue = '0'+binValue; } } // Adding the binValue to the end string which we will return. returnValue += binValue; } // Returning the decompressed string. return returnValue; } function get_siguino_value(siguino_data, field_name){ if ((siguino_data.length%2)==1) siguino_data = "0" + siguino_data; var binary_data = hex2bin(siguino_data); var reversed = reverse_string(binary_data); var binary_value = reverse_string(reversed.slice(SiguinoFields[field_name][0], SiguinoFields[field_name][1])); //console.log(binary_value); var result = parseInt(binary_value, 2); if (field_name=="TEMPERATURE") { result /= 2; } return result; } let sigfoxData = event.data.sigfoxData; let result = get_siguino_value(sigfoxData,"TEMPERATURE"); output.body.data = result;
Recent Comments