send many variables in one messages



  • Hi.
    I have a problem with Blinds. I work with domoticz.
    I try to use one STM32 to control 6 blinds. My sketch calculating position (depend of time) and provide V_UP, V_DOWN and V_STOP buttons for each blind.

    But I want to send actual position to the controller when blind is moving.

    At start i create Message:

    MyMessage msg(0,V_COVER);
    

    Presentation section:

    for (int i=0; i <= blind_cont-1; i++){present(i, S_COVER);}
    

    And when I want sent actual position :

    for (int i=0; i <= blind_cont-1; i++)
                        {
                          if (dstatus[i] != V_STOP) {
                          send(msg.setSensor(i).setType(V_PERCENTAGE).set(dposition[i],5),false); wait(250);
                          }
                          
                        }
    

    It;s correct ? Becouse DOMOTICZ doesn't receive anythink.


Log in to reply
 

Suggested Topics

47
Online

11.4k
Users

11.1k
Topics

112.6k
Posts