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

  • 3
  • 7
  • 3
  • 11
  • 6
  • 2
  • 2

212
Online

10.3k
Users

10.7k
Topics

109.8k
Posts