Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Joe13
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by Joe13

    • RE: MySensors - Get Temperature value from another node through the Gateway

      @kimot that part i missed. thanks for pointing that out. I will give this option also a try. its just that the other sensors that are in the other rooms are already set in place and I do not want to pluck them out and recode them. So pulling the values from the GW would have been an advantage. But anyways, if that is the way to go, then Ill probably do that.
      Thanks everyone for your inputs

      posted in Development
      Joe13
      Joe13
    • RE: MySensors - Get Temperature value from another node through the Gateway

      As an update.
      Finally after wrapping my head around the topic and knowing that you cant just send a value from one node in a VAR1 and expect it to just retain that value and get it in another node, i used the node - node communication and it worked!!!.

      so my send sketch is

      send(pcMsg.setDestination(1).setSensor(101).set(temperature,1));
      

      and receive sketch is

      void loop() 
      {
         request(0, V_VAR1);
       }
      
      void receive(const MyMessage &message) {
      
       if (message.type==V_VAR1) {
         if (message.sensor==101) {
      
         
          // Write some debug info
          Serial.print("Incoming change for sensor:");
          Serial.print(message.sensor);
          Serial.print("\n");
          Serial.print(", New status: ");
          Serial.println(message.getFloat());
         }
        } 
      

      I am able to get the value from the second node. But was just wondering why '0' is used in the request(0, V_VAR1) call when the value is being directly sent from the 1st node to the 2nd node

      posted in Development
      Joe13
      Joe13