Mcf-lw12terwp

Any support questions you might have can be asked here:
https://www.thethingsnetwork.org/marketplace/product/mcf-lw12terwpimage

1 Like

Any idea how to decode the payload sent by this device, where is the documentation?
Iā€™m getting this kind of hex payloads:
ā€œ01080124240001180401ā€.

That payload looks like the time sync request.

1 Like

There was some misunderstandings from my side and broke telephone, e.g. we have to different sensors. Now we can decode all data from mcf88 and ELSYS.

1 Like

This is a time sync request. In the Enginko/MCF88 you can find the decoder for this request

http://iot.mcf88.cloud/LoRaWeb/#/resources

### TIME SYNC REQUEST


/*                               ___   ___
 *                           __ / _ \ / _ \
 *           _ __ ___   ___ / _| (_) | (_) |
 *          |  _ ` _ \ / __| |_ > _ < > _ < 
 *          | | | | | | (__|  _| (_) | (_) |
 *          |_| |_| |_|\___|_|  \___/ \___/
 *
 *          WEB:    https://www.mcf88.it
 *          E-MAIL: info@mcf88.it
 */

/*
 * VERSION: 1.0.0
 * 
 * INPUT:
 * payload          -> Time Sync payload
 * 
 * OUTPUT:
 * syncID           -> id of sync request
 * syncVersion      -> major, minor and build version
 * applicationType  -> sensor type
 * rfu              -> future use bytes
 */
function parseTimeSync(payload) {
    const uplinkId = payload.substring(0, 2);
    if (uplinkId.toUpperCase() === '01') {
        const syncID = {
            variable: 'syncID',
            value: payload.substring(2, 10)
        };
        const syncVersion = {
            variable: 'syncVersion',
            value: payload.substring(10, 12) + "." + payload.substring(12, 14) + "." + payload.substring(14, 16)
        };
        const applicationType = {
            variable: 'applicationType',
            value: payload.substring(16, 20)
        };
        const rfu = {
            variable: 'rfu',
            value: payload.substring(20)
        };

        return [
            syncID,
            syncVersion,
            applicationType,
            rfu
        ];
    } else {
        return null;
    }
}