Navigation

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

    Stab

    @Stab

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

    Stab Follow

    Best posts made by Stab

    • RE: RFM69HW: Some node are losing connection after few days

      @evb thanks for your answer. On my arduino pro mini, the red led is not blinking anymore when it occurs (ie I use a node as a door bell, and when I click on the button, when it is working fine the red led blinks when sending data to the gateway). So I would rather bet, arduino failure.

      I'm using 3.3V from arduino itself to power the RFM69HW. Is it better to use another source? I will try to power RFM in direct from power source, and will let you know if node still crashes after a couple of days/weeks.

      I post below the easiest sketch (door bell) on which I'm suffering those connection losses on, in case you notice something missing or wrong, please let me know, but again this is very basic...

      Thanks a lot for your help!

      
      //
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      
      #define MY_REPEATER_FEATURE
      #define MY_NODE_ID 21
      #define MY_RADIO_RFM69
      #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
      #define MY_IS_RFM69HW // Omit if your RFM is not "H"
      
      
      #include <MySensors.h>
      #include <Bounce2.h>
      
      #define CHILD_ID 3
      #define BUTTON_PIN  3  // Arduino Digital I/O pin for button/reed switch
      #define BUTTON_RESET 4
      
      Bounce debouncer = Bounce(); 
      int oldValue=1;
      
      // Change to V_LIGHT if you use S_LIGHT in presentation below
      MyMessage msg(CHILD_ID,V_TRIPPED);
      MyMessage msg2(4,V_STATUS);
      
      void setup()  
      {  
        // Setup the button
        pinMode(BUTTON_PIN,INPUT);
       
        // Activate internal pull-up
       digitalWrite(BUTTON_PIN,HIGH);
      //  digitalWrite(BUTTON_RESET,HIGH);
        
        // After setting up the button, setup debouncer
        debouncer.attach(BUTTON_PIN);
        debouncer.interval(5);
      }
      
      void presentation() {
          sendSketchInfo("Sonette", "1.0");
        present(CHILD_ID, S_DOOR);  
      }
      
      void loop() 
      {
        debouncer.update();
        // Get the update value
        int value = debouncer.read();
      
        if (value != oldValue) {
           // Send in the new value
           send(msg.set(value==HIGH ? 1 : 0));
           oldValue = value;
        }
      }
      
        void receive(const MyMessage &message)
      {
      
        if (message.sensor == 4) {
      Serial.print(" reset");
       pinMode(BUTTON_RESET,OUTPUT);
      digitalWrite(BUTTON_RESET,LOW);
        }
          
        
      }
      
      posted in Troubleshooting
      Stab
      Stab

    Latest posts made by Stab

    • RE: RFM69HW: Some node are losing connection after few days

      @evb thanks for your answer. On my arduino pro mini, the red led is not blinking anymore when it occurs (ie I use a node as a door bell, and when I click on the button, when it is working fine the red led blinks when sending data to the gateway). So I would rather bet, arduino failure.

      I'm using 3.3V from arduino itself to power the RFM69HW. Is it better to use another source? I will try to power RFM in direct from power source, and will let you know if node still crashes after a couple of days/weeks.

      I post below the easiest sketch (door bell) on which I'm suffering those connection losses on, in case you notice something missing or wrong, please let me know, but again this is very basic...

      Thanks a lot for your help!

      
      //
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable and select radio type attached
      
      #define MY_REPEATER_FEATURE
      #define MY_NODE_ID 21
      #define MY_RADIO_RFM69
      #define MY_RFM69_FREQUENCY RFM69_433MHZ // Set your frequency here
      #define MY_IS_RFM69HW // Omit if your RFM is not "H"
      
      
      #include <MySensors.h>
      #include <Bounce2.h>
      
      #define CHILD_ID 3
      #define BUTTON_PIN  3  // Arduino Digital I/O pin for button/reed switch
      #define BUTTON_RESET 4
      
      Bounce debouncer = Bounce(); 
      int oldValue=1;
      
      // Change to V_LIGHT if you use S_LIGHT in presentation below
      MyMessage msg(CHILD_ID,V_TRIPPED);
      MyMessage msg2(4,V_STATUS);
      
      void setup()  
      {  
        // Setup the button
        pinMode(BUTTON_PIN,INPUT);
       
        // Activate internal pull-up
       digitalWrite(BUTTON_PIN,HIGH);
      //  digitalWrite(BUTTON_RESET,HIGH);
        
        // After setting up the button, setup debouncer
        debouncer.attach(BUTTON_PIN);
        debouncer.interval(5);
      }
      
      void presentation() {
          sendSketchInfo("Sonette", "1.0");
        present(CHILD_ID, S_DOOR);  
      }
      
      void loop() 
      {
        debouncer.update();
        // Get the update value
        int value = debouncer.read();
      
        if (value != oldValue) {
           // Send in the new value
           send(msg.set(value==HIGH ? 1 : 0));
           oldValue = value;
        }
      }
      
        void receive(const MyMessage &message)
      {
      
        if (message.sensor == 4) {
      Serial.print(" reset");
       pinMode(BUTTON_RESET,OUTPUT);
      digitalWrite(BUTTON_RESET,LOW);
        }
          
        
      }
      
      posted in Troubleshooting
      Stab
      Stab
    • RFM69HW: Some node are losing connection after few days

      Hello Guys
      First of all I have to declare that I'm a big fan of Mysensors, I have now a dizain of node and building those and making it tailormade is just GREAT. Having said that, I have from time to time, lets say after a week of working fine, some node that disconnect and cannot be controled. When it is the case I have to manually reset the arduino, and then it' fine again for another couple of days.
      My configuration is RFM69HW + arduino and JEEDOM as a controler.

      Anyone else encounters same issues? Any suggestion or help?

      Would be great as this is currenlty the only cons I have in using Mysensors...

      posted in Troubleshooting
      Stab
      Stab