Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Node to Node Communication

Node to Node Communication

Scheduled Pinned Locked Moved Development
36 Posts 6 Posters 18.9k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #25

    If you send it as a float value you must use getFloat (it is transmitted as binary data). Doing atoi will get you garbled data because it is not transmitted as ascii.

    If your memory is low, I suggest you either convert and send is as a string (char *) and do message.getString()

    or

    send it as a int and just do message.getInt() on the receiving side.

    BTW the "String" class you're using is VERY memory hungry and is probably the reason for low memory an after a while probably result in crashes (it fragments memory).

    C 1 Reply Last reply
    0
    • hekH hek

      If you send it as a float value you must use getFloat (it is transmitted as binary data). Doing atoi will get you garbled data because it is not transmitted as ascii.

      If your memory is low, I suggest you either convert and send is as a string (char *) and do message.getString()

      or

      send it as a int and just do message.getInt() on the receiving side.

      BTW the "String" class you're using is VERY memory hungry and is probably the reason for low memory an after a while probably result in crashes (it fragments memory).

      C Offline
      C Offline
      cleight
      wrote on last edited by
      #26

      @hek How do I send it as an integer?

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #27

        declare the variable you're sending as int or convert it by casting

        gw.send (msgHum.set(static_cast<int>(humidity)));

        http://www.learncpp.com/cpp-tutorial/44-type-conversion-and-casting/

        C 1 Reply Last reply
        0
        • hekH hek

          declare the variable you're sending as int or convert it by casting

          gw.send (msgHum.set(static_cast<int>(humidity)));

          http://www.learncpp.com/cpp-tutorial/44-type-conversion-and-casting/

          C Offline
          C Offline
          cleight
          wrote on last edited by
          #28

          @hek said:

          declare the variable you're sending as int or convert it by casting

          gw.send (msgHum.set(static_cast<int>(humidity)));

          http://www.learncpp.com/cpp-tutorial/44-type-conversion-and-casting/

          @hek Converting my sensor to send the data as an Integer worked and it is now parsing correctly, however I also have a humidity child sensor on that node I would like to send to node 11 as well, how would I capture that in the case statement?

          ChaoticC 1 Reply Last reply
          0
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by hek
            #29

            @cleight
            just switch on message.sensor (should be one of CHILD_ID_HUM, CHILD_ID_TEMP)

            1 Reply Last reply
            0
            • C cleight

              @hek said:

              declare the variable you're sending as int or convert it by casting

              gw.send (msgHum.set(static_cast<int>(humidity)));

              http://www.learncpp.com/cpp-tutorial/44-type-conversion-and-casting/

              @hek Converting my sensor to send the data as an Integer worked and it is now parsing correctly, however I also have a humidity child sensor on that node I would like to send to node 11 as well, how would I capture that in the case statement?

              ChaoticC Offline
              ChaoticC Offline
              Chaotic
              wrote on last edited by
              #30

              @cleight I posted code to do just that

              #define BEDROOM_NODE_ID 42
              #define KITCHEN_NODE_ID 44
              #define TEMP 0
              #define HUM 1
              float bdtemp = 0, bdhum =0, kntemp = 0, knhum =0;
              void incomingMessage(const MyMessage &message) {
                switch (message.sender) {
                      case BEDROOM_NODE_ID:
                           switch (message.sensor){
                                 case TEMP
                                       bdtemp = message.getFloat();
                                break; 
                                case HUM
                                       bdhum = message.getFloat();
                                break;
                        } 
                        break; 
                   case KITCHEN_NODE_ID:
                           switch (message.sensor){
                                case TEMP
                                       kntemp = message.getFloat();
                                break; 
                                case HUM
                                       knhum = message.getFloat();
                                break; 
                      } 
                       break; 
                }
               updateDisplay();  
              }
              
              C 1 Reply Last reply
              0
              • ChaoticC Chaotic

                @cleight I posted code to do just that

                #define BEDROOM_NODE_ID 42
                #define KITCHEN_NODE_ID 44
                #define TEMP 0
                #define HUM 1
                float bdtemp = 0, bdhum =0, kntemp = 0, knhum =0;
                void incomingMessage(const MyMessage &message) {
                  switch (message.sender) {
                        case BEDROOM_NODE_ID:
                             switch (message.sensor){
                                   case TEMP
                                         bdtemp = message.getFloat();
                                  break; 
                                  case HUM
                                         bdhum = message.getFloat();
                                  break;
                          } 
                          break; 
                     case KITCHEN_NODE_ID:
                             switch (message.sensor){
                                  case TEMP
                                         kntemp = message.getFloat();
                                  break; 
                                  case HUM
                                         knhum = message.getFloat();
                                  break; 
                        } 
                         break; 
                  }
                 updateDisplay();  
                }
                
                C Offline
                C Offline
                cleight
                wrote on last edited by
                #31

                @Chaotic I missed your code earlier, thank you for this, although while compiling is it saying I am missing a colon before knhum for some reason, need to dig deeper.

                ChaoticC 1 Reply Last reply
                0
                • C cleight

                  @Chaotic I missed your code earlier, thank you for this, although while compiling is it saying I am missing a colon before knhum for some reason, need to dig deeper.

                  ChaoticC Offline
                  ChaoticC Offline
                  Chaotic
                  wrote on last edited by
                  #32

                  @cleight that is what I get for coding on the fly

                  change

                  case TEMP
                  

                  and

                  case HUM
                  

                  with

                  case TEMP:
                  

                  and

                  case HUM:
                  
                  C 1 Reply Last reply
                  0
                  • ChaoticC Chaotic

                    @cleight that is what I get for coding on the fly

                    change

                    case TEMP
                    

                    and

                    case HUM
                    

                    with

                    case TEMP:
                    

                    and

                    case HUM:
                    
                    C Offline
                    C Offline
                    cleight
                    wrote on last edited by
                    #33

                    @Chaotic Thank you, I knew it had to be something simple.

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      cleight
                      wrote on last edited by
                      #34

                      Ok last issue to be worked out and I think I am good to go, thanks again to @Chaotic and @hek for there assistance with my project.

                      Last issue is with the sensor node, it sends the data to the LCD Node (node 11) but only sends the data to the gateway on boot, it will not send it to the gateway after it starts sending to Node 11. I would like it to send to both the Node and the Gateway all the time, that way Vera see the information as well as my LCD.

                      Here is the output of the Serial Monitor, also for some reason on each temp update it sends to node 11 twice for some reason:
                      sensor started, id 1
                      send: 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
                      send: 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
                      read: 0-0-1 s=255,c=3,t=6,pt=0,l=1:I
                      send: 1-1-0-0 s=255,c=3,t=11,pt=0,l=15,st=ok:Hot Tub Monitor
                      send: 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:2.0
                      send: 1-1-0-0 s=0,c=0,t=6,pt=0,l=5,st=ok:1.4.1
                      send: 1-1-0-0 s=1,c=0,t=7,pt=0,l=5,st=ok:1.4.1
                      send: 1-1-0-0 s=2,c=0,t=6,pt=0,l=5,st=ok:1.4.1
                      send: 1-1-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:67.2
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:67
                      T2: 67.20
                      send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=ok:66.2
                      T: 66.20
                      send: 1-1-0-0 s=1,c=1,t=1,pt=7,l=5,st=ok:36.0
                      send: 1-1-0-11 s=1,c=1,t=1,pt=2,l=2,st=ok:36
                      H: 36.00
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:75.7
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:75
                      T2: 75.70
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:80.1
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:80
                      T2: 80.10
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:81.6
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:81
                      T2: 81.60
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:81.7
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:81
                      T2: 81.70
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:79.8
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:79
                      T2: 79.80
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:78.1
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:78
                      T2: 78.10
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:76.7
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:76
                      T2: 76.70
                      send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:75.5
                      send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:75
                      T2: 75.50

                      Here is the sketch:

                      #include <SPI.h>
                      #include <MySensor.h>  
                      #include <DHT.h>
                      #include <DallasTemperature.h>
                      #include <OneWire.h>
                      
                      #define CHILD_ID_HUM 1
                      #define CHILD_ID_TEMP 2
                      #define CHILD_ID_HTTEMP 3
                      #define HUMIDITY_SENSOR_DIGITAL_PIN 3
                      //Waterproof Sensor addition
                      #define ONE_WIRE_BUS 4 //Pin where waterproof temp sensor is connected
                      #define MAX_ATTACHED_DS18B20 16
                      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
                      OneWire oneWire(ONE_WIRE_BUS);
                      DallasTemperature sensors(&oneWire);
                      
                      MySensor gw;
                      DHT dht;
                      float lastTemperature[MAX_ATTACHED_DS18B20];
                      int numSensors=0;
                      boolean receivedConfig = false;
                      float lastTemp;
                      float lastHum;
                      boolean metric = false; 
                      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                      MyMessage msgHTTemp(CHILD_ID_HTTEMP, V_TEMP);
                      
                      void setup()  
                      { 
                        // Startup OneWire
                        sensors.begin();
                      
                        gw.begin();
                        dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
                      
                        // Send the Sketch Version Information to the Gateway
                        gw.sendSketchInfo("Hot Tub Monitor", "2.0");
                      
                        // Fetch the number of attached temperature sensors
                        numSensors = sensors.getDeviceCount();
                      
                        // Present all sensors to controller
                        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
                          gw.present(i, S_TEMP);
                        }
                      
                        // Register all sensors to gw (they will be created as child devices)
                        gw.present(CHILD_ID_HUM, S_HUM);
                        gw.present(CHILD_ID_TEMP, S_TEMP);
                      
                        metric = gw.getConfig().isMetric;
                      }
                      
                      void loop()      
                      {  
                        // Process incoming messages (like config from server)
                        gw.process();
                      
                        //Fetch temperatures from Dallas sensors
                        sensors.requestTemperatures();
                      
                        // Red temperatures and send them to the controller
                        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
                      
                          // Fetch and round temperature to one decimal
                          float temperature = static_cast<float>(static_cast<int>((sensors.getTempFByIndex(i)) * 10.)) / 10.;
                      
                          //Only send data if temperature has changed and no error
                          if (lastTemperature[i] != temperature && temperature != -127.00) {
                      
                            // Send in the new temperature
                            delay(100);
                            gw.send(msgHTTemp.setSensor(i).set(temperature,1));
                            gw.send(msgHTTemp.setDestination(11).set(static_cast<int>(temperature)));
                            Serial.print("T2: ");
                            Serial.println(temperature);
                            lastTemperature[i]=temperature;
                          }
                        }
                      
                        delay(dht.getMinimumSamplingPeriod());
                      
                        //float temperature = dht.getTemperature();
                        float temperature = dht.getTemperature()*9/5 + 32;
                        if (isnan(temperature)) {
                          Serial.println("Failed reading temperature from DHT");
                        } 
                        else if (temperature != lastTemp) {
                          lastTemp = temperature;
                          if (!metric) {
                            //temperature = dht.toFahrenheit(temperature);
                            temperature = dht.getTemperature()*9/5 + 32;
                          }
                          delay(100);
                          gw.send(msgTemp.set(temperature, 1));
                          Serial.print("T: ");
                          Serial.println(temperature);
                        }
                      
                        float humidity = dht.getHumidity();
                        if (isnan(humidity)) {
                          Serial.println("Failed reading humidity from DHT");
                        } 
                        else if (humidity != lastHum) {
                          lastHum = humidity;
                          delay(100);
                          gw.send(msgHum.set(humidity, 1));
                          gw.send(msgHum.setDestination(11).set(static_cast<int>(humidity)));
                          Serial.print("H: ");
                          Serial.println(humidity);
                        }
                      
                        gw.sleep(SLEEP_TIME); //sleep a bit
                      }
                      
                      ChaoticC 1 Reply Last reply
                      0
                      • C cleight

                        Ok last issue to be worked out and I think I am good to go, thanks again to @Chaotic and @hek for there assistance with my project.

                        Last issue is with the sensor node, it sends the data to the LCD Node (node 11) but only sends the data to the gateway on boot, it will not send it to the gateway after it starts sending to Node 11. I would like it to send to both the Node and the Gateway all the time, that way Vera see the information as well as my LCD.

                        Here is the output of the Serial Monitor, also for some reason on each temp update it sends to node 11 twice for some reason:
                        sensor started, id 1
                        send: 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
                        send: 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
                        read: 0-0-1 s=255,c=3,t=6,pt=0,l=1:I
                        send: 1-1-0-0 s=255,c=3,t=11,pt=0,l=15,st=ok:Hot Tub Monitor
                        send: 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:2.0
                        send: 1-1-0-0 s=0,c=0,t=6,pt=0,l=5,st=ok:1.4.1
                        send: 1-1-0-0 s=1,c=0,t=7,pt=0,l=5,st=ok:1.4.1
                        send: 1-1-0-0 s=2,c=0,t=6,pt=0,l=5,st=ok:1.4.1
                        send: 1-1-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:67.2
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:67
                        T2: 67.20
                        send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=ok:66.2
                        T: 66.20
                        send: 1-1-0-0 s=1,c=1,t=1,pt=7,l=5,st=ok:36.0
                        send: 1-1-0-11 s=1,c=1,t=1,pt=2,l=2,st=ok:36
                        H: 36.00
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:75.7
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:75
                        T2: 75.70
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:80.1
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:80
                        T2: 80.10
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:81.6
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:81
                        T2: 81.60
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:81.7
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:81
                        T2: 81.70
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:79.8
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:79
                        T2: 79.80
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:78.1
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:78
                        T2: 78.10
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:76.7
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:76
                        T2: 76.70
                        send: 1-1-0-11 s=0,c=1,t=0,pt=7,l=5,st=ok:75.5
                        send: 1-1-0-11 s=0,c=1,t=0,pt=2,l=2,st=ok:75
                        T2: 75.50

                        Here is the sketch:

                        #include <SPI.h>
                        #include <MySensor.h>  
                        #include <DHT.h>
                        #include <DallasTemperature.h>
                        #include <OneWire.h>
                        
                        #define CHILD_ID_HUM 1
                        #define CHILD_ID_TEMP 2
                        #define CHILD_ID_HTTEMP 3
                        #define HUMIDITY_SENSOR_DIGITAL_PIN 3
                        //Waterproof Sensor addition
                        #define ONE_WIRE_BUS 4 //Pin where waterproof temp sensor is connected
                        #define MAX_ATTACHED_DS18B20 16
                        unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
                        OneWire oneWire(ONE_WIRE_BUS);
                        DallasTemperature sensors(&oneWire);
                        
                        MySensor gw;
                        DHT dht;
                        float lastTemperature[MAX_ATTACHED_DS18B20];
                        int numSensors=0;
                        boolean receivedConfig = false;
                        float lastTemp;
                        float lastHum;
                        boolean metric = false; 
                        MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                        MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                        MyMessage msgHTTemp(CHILD_ID_HTTEMP, V_TEMP);
                        
                        void setup()  
                        { 
                          // Startup OneWire
                          sensors.begin();
                        
                          gw.begin();
                          dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
                        
                          // Send the Sketch Version Information to the Gateway
                          gw.sendSketchInfo("Hot Tub Monitor", "2.0");
                        
                          // Fetch the number of attached temperature sensors
                          numSensors = sensors.getDeviceCount();
                        
                          // Present all sensors to controller
                          for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
                            gw.present(i, S_TEMP);
                          }
                        
                          // Register all sensors to gw (they will be created as child devices)
                          gw.present(CHILD_ID_HUM, S_HUM);
                          gw.present(CHILD_ID_TEMP, S_TEMP);
                        
                          metric = gw.getConfig().isMetric;
                        }
                        
                        void loop()      
                        {  
                          // Process incoming messages (like config from server)
                          gw.process();
                        
                          //Fetch temperatures from Dallas sensors
                          sensors.requestTemperatures();
                        
                          // Red temperatures and send them to the controller
                          for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
                        
                            // Fetch and round temperature to one decimal
                            float temperature = static_cast<float>(static_cast<int>((sensors.getTempFByIndex(i)) * 10.)) / 10.;
                        
                            //Only send data if temperature has changed and no error
                            if (lastTemperature[i] != temperature && temperature != -127.00) {
                        
                              // Send in the new temperature
                              delay(100);
                              gw.send(msgHTTemp.setSensor(i).set(temperature,1));
                              gw.send(msgHTTemp.setDestination(11).set(static_cast<int>(temperature)));
                              Serial.print("T2: ");
                              Serial.println(temperature);
                              lastTemperature[i]=temperature;
                            }
                          }
                        
                          delay(dht.getMinimumSamplingPeriod());
                        
                          //float temperature = dht.getTemperature();
                          float temperature = dht.getTemperature()*9/5 + 32;
                          if (isnan(temperature)) {
                            Serial.println("Failed reading temperature from DHT");
                          } 
                          else if (temperature != lastTemp) {
                            lastTemp = temperature;
                            if (!metric) {
                              //temperature = dht.toFahrenheit(temperature);
                              temperature = dht.getTemperature()*9/5 + 32;
                            }
                            delay(100);
                            gw.send(msgTemp.set(temperature, 1));
                            Serial.print("T: ");
                            Serial.println(temperature);
                          }
                        
                          float humidity = dht.getHumidity();
                          if (isnan(humidity)) {
                            Serial.println("Failed reading humidity from DHT");
                          } 
                          else if (humidity != lastHum) {
                            lastHum = humidity;
                            delay(100);
                            gw.send(msgHum.set(humidity, 1));
                            gw.send(msgHum.setDestination(11).set(static_cast<int>(humidity)));
                            Serial.print("H: ");
                            Serial.println(humidity);
                          }
                        
                          gw.sleep(SLEEP_TIME); //sleep a bit
                        }
                        
                        ChaoticC Offline
                        ChaoticC Offline
                        Chaotic
                        wrote on last edited by
                        #35

                        @cleight I think the easiest solution (all theory btw) would be to duplicate the message for each sensor

                        MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                        MyMessage msgHumLCD(CHILD_ID_HUM, V_HUM);
                        MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                        MyMessage msgTempLCD(CHILD_ID_TEMP, V_TEMP);
                        MyMessage msgHTTemp(CHILD_ID_HTTEMP, V_TEMP);
                        MyMessage msgHTTempLCD(CHILD_ID_HTTEMP, V_TEMP);
                        

                        then in the setup()

                        msgHumLCD.setDestination(11);
                        msgTempLCD.setDestination(11);
                        msgHTTPempLCD.setDestination(11);
                        

                        Then in the loop when you are doing the gw.send just do a second one for the LCD message (you shouldn't need the setDestination)

                        C 1 Reply Last reply
                        0
                        • ChaoticC Chaotic

                          @cleight I think the easiest solution (all theory btw) would be to duplicate the message for each sensor

                          MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                          MyMessage msgHumLCD(CHILD_ID_HUM, V_HUM);
                          MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                          MyMessage msgTempLCD(CHILD_ID_TEMP, V_TEMP);
                          MyMessage msgHTTemp(CHILD_ID_HTTEMP, V_TEMP);
                          MyMessage msgHTTempLCD(CHILD_ID_HTTEMP, V_TEMP);
                          

                          then in the setup()

                          msgHumLCD.setDestination(11);
                          msgTempLCD.setDestination(11);
                          msgHTTPempLCD.setDestination(11);
                          

                          Then in the loop when you are doing the gw.send just do a second one for the LCD message (you shouldn't need the setDestination)

                          C Offline
                          C Offline
                          cleight
                          wrote on last edited by
                          #36

                          @Chaotic Sorry for not getting back sooner on this, but I did confirm that your solution does indeed work and works very well. I can't wait to finish this project up and be able to post the Pictures/Sketch to share with the community.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          7

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.0k

                          Posts


                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • MySensors
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular