Navigation

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

    Andy Phan

    @Andy Phan

    0
    Reputation
    1
    Posts
    170
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Andy Phan Follow

    Best posts made by Andy Phan

    This user hasn't posted anything yet.

    Latest posts made by Andy Phan

    • RE: Sensors node startup without gateway

      I have tried to work around the node initialization process without a gateway. Set static parent ID and set check uplink to false. The log shows node initialize completed, that is as far as it gets. So there is no way to properly initialize a node without a gateway.

      RFM69 transceiver workable solution is to implement RFM69 library and MyMessage.h. This is a one way communication. You can construct a MySensors message format and send to Gateway. You cannot receive data from controller.

      See attached sketch for RFM69HW transceiver.

      #include <RFM69.h>
      #include "MyMessage.h"
      
      // Construct a MySensors Message
      MyMessage SmokeSensorMsg(MyMessage &msg, uint8_t destination, uint8_t sensor, uint8_t command, uint8_t type, bool ack = false)
      {
        msg.sender = NODEID;
        msg.destination = destination;
        msg.sensor = sensor;
        msg.type = type;
        mSetCommand(msg,command);
        mSetRequestAck(msg,ack);
        mSetAck(msg,false);
        mSetPayloadType(msg, P_BYTE);
        return msg;
      }
      
      void Loop()
      {
         // Send message to Gateway
             typedef MyMessage message;     
             message msg = SmokeSensorMsg(msg, 
                              GATEWAYID, 
                              smokeSensorId, 
                              C_SET, 
                              V_TRIPPED, 
                              false);
        msg.bValue = (smokeReading > smoke_threshold)?1:0;  
           radio.send(GATEWAYID, (const void*)(&msg), sizeof(msg));
          
           }
      
      posted in Troubleshooting
      Andy Phan
      Andy Phan