Help with Code


  • Contest Winner

    Hi.

    I'm looking to condense these into two calls

    gw.getStatus(CHILD_ID_HUM, V_VAR1);
    HumStatus(gw.getMessage());
    gw.getStatus(CHILD_ID_HUM, V_VAR2);
    ledToggle(gw.getMessage());
    gw.getStatus(CHILD_ID_TEMP, V_VAR1);
    TempStatus(gw.getMessage());
    gw.getStatus(CHILD_ID_TEMP, V_VAR2);
    LowStatus(gw.getMessage());
    gw.getStatus(CHILD_ID_TEMP, V_VAR3);
    HighStatus(gw.getMessage());
    gw.getStatus(CHILD_ID_TEMP, V_VAR4);
    WeatherStatus(gw.getMessage());
    

    I cannot seem to find an example of taking multiple variables back on one call to the GW.

    pseudocode would be:

    gw.getstatus(CHILD_ID_DEVICE; V_VAR1, V_VAR2, V_VAR3, V_VAR4)
    

    anyone know if this can be done? These calls take some time in the sketch and I'd like to cut that down. I'm not sure if there is a some kind of limit to the message size...


  • Admin

    No, you cannot send multiple values per call to the gateway.

    Between sensors you could pack more values into one transmission if the other end knows how to "unpack". Just be aware of the current limit of 29 bytes payload per message.


  • Contest Winner

    @hek
    got it, thanks


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts