Navigation

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

    SteveO1234

    @SteveO1234

    1
    Reputation
    4
    Posts
    438
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    SteveO1234 Follow

    Best posts made by SteveO1234

    • RE: Noob--API help?

      Thanks for the encouragement and help! So it seems as I need to create this message handler function that is referenced in the gw.begin().. And from that point any incoming messages are routed through the function?

      //
      void incomingMessage(const MyMessage &message)
      {
        if (message.isAck())
        {
          Serial.println("This is an ack from gateway");
        }
        if (message.type == V_LIGHT)
        {
          // Change relay state
          state = message.getBool();
          Serial.print ("State = ");
          Serial.print (state);
          // Store state in eeprom
          gw.saveState(ID, state);
          Serial.print("Incoming change for sensor:");
          Serial.print(message.sensor);
          Serial.print(", New status: ");
          Serial.println(message.getBool());
        }
      }
      //
      
      posted in Development
      SteveO1234
      SteveO1234

    Latest posts made by SteveO1234

    • RE: Noob--API help?

      Thanks for the encouragement and help! So it seems as I need to create this message handler function that is referenced in the gw.begin().. And from that point any incoming messages are routed through the function?

      //
      void incomingMessage(const MyMessage &message)
      {
        if (message.isAck())
        {
          Serial.println("This is an ack from gateway");
        }
        if (message.type == V_LIGHT)
        {
          // Change relay state
          state = message.getBool();
          Serial.print ("State = ");
          Serial.print (state);
          // Store state in eeprom
          gw.saveState(ID, state);
          Serial.print("Incoming change for sensor:");
          Serial.print(message.sensor);
          Serial.print(", New status: ");
          Serial.println(message.getBool());
        }
      }
      //
      
      posted in Development
      SteveO1234
      SteveO1234
    • RE: Noob--API help?

      I solved my immediate concern by gleening off other sketches. It's another way to learn. Now I can control my loop by checking the state on the controller.

      Learning a little along the way. My question remains--is there a resource available beyond the API page that outlines the steps to embrace this awesome technology?

      Thanks,
      --Steve

      posted in Development
      SteveO1234
      SteveO1234
    • Noob--API help?

      Hi,

      Loving this stuff! I'm ready to move on from basics and want to start more original work. Hence the need to dive into the API.

      Is there any guide, beyond the description on the API page as to how it all fits together?

      For example I'm trying to run my loop() code based on the state of the device in Vera. The hardware and program runs OK, and the node is talking to the GW. I'd really benefit from some kind of tutorial. Is there such a thing? I don't seem to grasp it all yet.

      Thanks in advance,
      --Steve

      posted in Development
      SteveO1234
      SteveO1234
    • RE: First sensor ... so close but no temp reading

      I had the same problem... I just added the I_Arduino1.xml to the gateway as you suggested and it worked! Thanks.
      --Steve

      posted in Vera
      SteveO1234
      SteveO1234