jooby-codec
    Preparing search index...

    Namespace getCurrentDemand

    Uplink command to read current demand data (load and voltage graphs).

    This command can be transmitted only via LoRaWAN.

    Supported only for: HARDWARE_VERSION - 3 (Silergy)

    import * as getCurrentDemand from 'jooby-codec/mtx1/commands/uplink/getCurrentDemand.js';
    import * as demandTypes from 'jooby-codec/mtx1/constants/demandTypes.js';

    // response to getCurrentDemand downlink command
    const bytes = [0x34, 0x34, 0x00, 0x45, 0x03, 0x0a, 0x40, 0x08, 0x6f, 0x08, 0x47, 0x08, 0x6e];

    // decoded payload
    const parameters = getCurrentDemand.fromBytes(bytes);

    console.log(parameters);
    // output:
    {
    date: {
    year: 26,
    month: 1,
    date: 20
    },
    firstIndex: 69,
    count: 3,
    period: 10,
    demands: [
    {
    energyType: demandTypes.VOLTAGE,
    values: [
    {voltage: 2159},
    {voltage: 2119},
    {voltage: 2158}
    ]
    }
    ]
    }

    Command format documentation

    Interfaces

    IGetCurrentDemandParameters
    IGetCurrentDemandResponseParameters
    IGetCurrentDemandValues

    Variables

    accessLevel
    examples
    headerSize
    id
    isLoraOnly
    maxSize
    name

    Functions

    fromBytes
    toBytes