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. Troubleshooting
  3. need help with node not sending info

need help with node not sending info

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 2 Posters 2.4k Views 1 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.
  • C Offline
    C Offline
    carleki
    wrote on last edited by carleki
    #1

    Hello,
    I have just make my "2AA slim node" and in the serial monitor here is what I obtain :

    send: 90-90-0-0 s=255,c=3,t=15,pt=2,l=2,sg=0,st=fail:0
    send: 90-90-0-0 s=255,c=0,t=18,pt=0,l=5,sg=0,st=fail:1.5.4
    send: 90-90-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0
    repeater started, id=90, parent=0, distance=1
    send: 90-90-0-0 s=255,c=3,t=11,pt=0,l=13,sg=0,st=fail:Temp Sens Bat
    send: 90-90-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.3
    send: 90-90-0-0 s=1,c=0,t=23,pt=0,l=0,sg=0,st=fail:
    send: 90-90-0-0 s=2,c=0,t=23,pt=0,l=0,sg=0,st=fail:
    send: 90-90-0-0 s=0,c=0,t=6,pt=0,l=0,sg=0,st=ok:
    send: 90-90-0-0 s=1,c=1,t=24,pt=7,l=5,sg=0,st=fail:230.0
    send: 90-90-0-0 s=2,c=1,t=25,pt=7,l=5,sg=0,st=fail:4.958
    send: 90-90-0-0 s=0,c=1,t=0,pt=7,l=5,sg=0,st=fail:20.1
    
    

    Can someone help me ?
    Thanks :)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #2

      Hi @carmelo42

      "st=fail" means the receiving node or gateway has problems sending ack back to the sending node.

      Its probably a hardware issue (power and/or range). Try adding a capacitor (http://www.mysensors.org/build/connect_radio#connecting-a-decoupling-capacitor) to the receiving radio, change powersource, move receiver/sender closer to eachother or build a repeater. If you think its a software issue you can try to clear the eeprom (http://www.mysensors.org/build/debug#clearing-eeprom) and reupload your sketch.

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      C 1 Reply Last reply
      1
      • S sundberg84

        Hi @carmelo42

        "st=fail" means the receiving node or gateway has problems sending ack back to the sending node.

        Its probably a hardware issue (power and/or range). Try adding a capacitor (http://www.mysensors.org/build/connect_radio#connecting-a-decoupling-capacitor) to the receiving radio, change powersource, move receiver/sender closer to eachother or build a repeater. If you think its a software issue you can try to clear the eeprom (http://www.mysensors.org/build/debug#clearing-eeprom) and reupload your sketch.

        C Offline
        C Offline
        carleki
        wrote on last edited by
        #3

        @sundberg84 thanks :)

        All my nodes (and GW, pretty sure) have already decoupling capacitors ...

        I'm using "standard" temperature sketch :

          /**
         * The MySensors Arduino library handles the wireless radio link and protocol
         * between your home built sensors/actuators and HA controller of choice.
         * The sensors forms a self healing radio network with optional repeaters. Each
         * repeater and gateway builds a routing tables in EEPROM which keeps track of the
         * network topology allowing messages to be routed to nodes.
         *
         * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
         * Copyright (C) 2013-2015 Sensnology AB
         * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
         *
         * Documentation: http://www.mysensors.org
         * Support Forum: http://forum.mysensors.org
         *
         * This program is free software; you can redistribute it and/or
         * modify it under the terms of the GNU General Public License
         * version 2 as published by the Free Software Foundation.
         *
         *******************************
         *
         * DESCRIPTION
         *
         * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
         * http://www.mysensors.org/build/temp
         */
        
        #include <MySensor.h>  
        #include <SPI.h>
        #include <DallasTemperature.h>
        #include <OneWire.h>
        #include <Vcc.h>
        
        #define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No
        #define ID_BatPcnt 1
        #define ID_Bat 2
        int node_id = 93; // on donne un ID au node
        
        const float VccMin   = 1.6;             // Vcc mini attendu, en Volts.
        const float VccMax   = 3.06;           // Vcc Maximum attendu, en Volts (2 piles AA neuves)
        const float VccCorrection = 2.52/2.6; // calibration : Vcc mesuré au multimètre / Vcc mesuré par l'Arduino par vcc.Read_Volts() dans sketch 1/2
        Vcc vcc(VccCorrection);
        
        #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected 
        #define MAX_ATTACHED_DS18B20 16
        unsigned long SLEEP_TIME = 15000; // Sleep time between reads (in milliseconds)900000 15 minutes - 600000 10 minutes
        OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
        DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
        MySensor gw;
        MyMessage msgBAT_PCNT(ID_BatPcnt,V_VAR1); // on utilise le type V_VAR1 pour le % de charge des piles
        MyMessage msgBAT(ID_Bat,V_VAR2);          // on utilise le type V_VAR2 pour la tension des piles
        float lastTemperature[MAX_ATTACHED_DS18B20];
        int numSensors=0;
        boolean receivedConfig = false;
        boolean metric = true; 
        // Initialize temperature message
        MyMessage msg(0,V_TEMP);
        
        void setup()  
        { 
          // Startup up the OneWire library
          sensors.begin();
          // requestTemperatures() will not block current thread
          sensors.setWaitForConversion(false);
        
          // Startup and initialize MySensors library. Set callback for incoming messages. 
          gw.begin(NULL, node_id, true);
        
          // Send the sketch version information to the gateway and Controller
          gw.sendSketchInfo("Temp Sens Bat", "1.3");
        
          // Fetch the number of attached temperature sensors  
          numSensors = sensors.getDeviceCount();
        
          // Present all sensors to controller
          gw.present(ID_BatPcnt, S_CUSTOM);  // type S_CUSTOM pour le capteur "% de charge"
          gw.present(ID_Bat, S_CUSTOM);      // type S_CUSTOM pour le capteur "tension"
          for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
             gw.present(i, S_TEMP);
          }
        }
        
        
        void loop()     
        {     
          // Process incoming messages (like config from server)
          gw.process(); 
        // mesure de Vcc
              float v = vcc.Read_Volts();
              // calcul du % de charge batterie
              float p = 100 * ((v - VccMin) / (VccMax - VccMin));
              // On envoie les données des capteurs et de l'état de la batterie au Gateway
              //gw.sendBatteryLevel(p);  // Inutile...
              gw.send(msgBAT_PCNT.set(p, 1)); // 1 décimale
              gw.send(msgBAT.set(v, 3));      // 2 décimales
          // Fetch temperatures from Dallas sensors
          sensors.requestTemperatures();
        
          // query conversion time and sleep until conversion completed
          int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
          // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
          gw.sleep(conversionTime);
        
          // Read temperatures and send them to 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>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
         
            // Only send data if temperature has changed and no error
            #if COMPARE_TEMP == 1
            if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
            #else
            if (temperature != -127.00 && temperature != 85.00) {
            #endif
         
              // Send in the new temperature
              gw.send(msg.setSensor(i).set(temperature,1));
              // Save new temperatures for next compare
              lastTemperature[i]=temperature;
            }
          }
          gw.sleep(SLEEP_TIME);
        }
        
        
        S 1 Reply Last reply
        0
        • C carleki

          @sundberg84 thanks :)

          All my nodes (and GW, pretty sure) have already decoupling capacitors ...

          I'm using "standard" temperature sketch :

            /**
           * The MySensors Arduino library handles the wireless radio link and protocol
           * between your home built sensors/actuators and HA controller of choice.
           * The sensors forms a self healing radio network with optional repeaters. Each
           * repeater and gateway builds a routing tables in EEPROM which keeps track of the
           * network topology allowing messages to be routed to nodes.
           *
           * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
           * Copyright (C) 2013-2015 Sensnology AB
           * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
           *
           * Documentation: http://www.mysensors.org
           * Support Forum: http://forum.mysensors.org
           *
           * This program is free software; you can redistribute it and/or
           * modify it under the terms of the GNU General Public License
           * version 2 as published by the Free Software Foundation.
           *
           *******************************
           *
           * DESCRIPTION
           *
           * Example sketch showing how to send in DS1820B OneWire temperature readings back to the controller
           * http://www.mysensors.org/build/temp
           */
          
          #include <MySensor.h>  
          #include <SPI.h>
          #include <DallasTemperature.h>
          #include <OneWire.h>
          #include <Vcc.h>
          
          #define COMPARE_TEMP 0 // Send temperature only if changed? 1 = Yes 0 = No
          #define ID_BatPcnt 1
          #define ID_Bat 2
          int node_id = 93; // on donne un ID au node
          
          const float VccMin   = 1.6;             // Vcc mini attendu, en Volts.
          const float VccMax   = 3.06;           // Vcc Maximum attendu, en Volts (2 piles AA neuves)
          const float VccCorrection = 2.52/2.6; // calibration : Vcc mesuré au multimètre / Vcc mesuré par l'Arduino par vcc.Read_Volts() dans sketch 1/2
          Vcc vcc(VccCorrection);
          
          #define ONE_WIRE_BUS 3 // Pin where dallase sensor is connected 
          #define MAX_ATTACHED_DS18B20 16
          unsigned long SLEEP_TIME = 15000; // Sleep time between reads (in milliseconds)900000 15 minutes - 600000 10 minutes
          OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
          DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
          MySensor gw;
          MyMessage msgBAT_PCNT(ID_BatPcnt,V_VAR1); // on utilise le type V_VAR1 pour le % de charge des piles
          MyMessage msgBAT(ID_Bat,V_VAR2);          // on utilise le type V_VAR2 pour la tension des piles
          float lastTemperature[MAX_ATTACHED_DS18B20];
          int numSensors=0;
          boolean receivedConfig = false;
          boolean metric = true; 
          // Initialize temperature message
          MyMessage msg(0,V_TEMP);
          
          void setup()  
          { 
            // Startup up the OneWire library
            sensors.begin();
            // requestTemperatures() will not block current thread
            sensors.setWaitForConversion(false);
          
            // Startup and initialize MySensors library. Set callback for incoming messages. 
            gw.begin(NULL, node_id, true);
          
            // Send the sketch version information to the gateway and Controller
            gw.sendSketchInfo("Temp Sens Bat", "1.3");
          
            // Fetch the number of attached temperature sensors  
            numSensors = sensors.getDeviceCount();
          
            // Present all sensors to controller
            gw.present(ID_BatPcnt, S_CUSTOM);  // type S_CUSTOM pour le capteur "% de charge"
            gw.present(ID_Bat, S_CUSTOM);      // type S_CUSTOM pour le capteur "tension"
            for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
               gw.present(i, S_TEMP);
            }
          }
          
          
          void loop()     
          {     
            // Process incoming messages (like config from server)
            gw.process(); 
          // mesure de Vcc
                float v = vcc.Read_Volts();
                // calcul du % de charge batterie
                float p = 100 * ((v - VccMin) / (VccMax - VccMin));
                // On envoie les données des capteurs et de l'état de la batterie au Gateway
                //gw.sendBatteryLevel(p);  // Inutile...
                gw.send(msgBAT_PCNT.set(p, 1)); // 1 décimale
                gw.send(msgBAT.set(v, 3));      // 2 décimales
            // Fetch temperatures from Dallas sensors
            sensors.requestTemperatures();
          
            // query conversion time and sleep until conversion completed
            int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
            // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
            gw.sleep(conversionTime);
          
            // Read temperatures and send them to 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>((gw.getConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
           
              // Only send data if temperature has changed and no error
              #if COMPARE_TEMP == 1
              if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
              #else
              if (temperature != -127.00 && temperature != 85.00) {
              #endif
           
                // Send in the new temperature
                gw.send(msg.setSensor(i).set(temperature,1));
                // Save new temperatures for next compare
                lastTemperature[i]=temperature;
              }
            }
            gw.sleep(SLEEP_TIME);
          }
          
          
          S Offline
          S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by
          #4

          @carmelo42 - sounds good, but there are issues with your radio since you get st=fail. Check my advice in the first post and see if something helps you.

          Controller: Proxmox VM - Home Assistant
          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

          1 Reply Last reply
          0
          • C Offline
            C Offline
            carleki
            wrote on last edited by
            #5

            I have cleaned the eeprom last night after your advice, and the node is currently at 50 centimeters from the GW. (I have also changed the power source for the node : I was using 1 x CR2032 battery, but last night I have used 2 brand new AA batteries)

            On my Slim AA Node, I have not the C5 cap, I will add it ...

            Can it be a bootoloader issue ? (I'm using my Atmega at 8 Mhz)

            S 1 Reply Last reply
            0
            • C carleki

              I have cleaned the eeprom last night after your advice, and the node is currently at 50 centimeters from the GW. (I have also changed the power source for the node : I was using 1 x CR2032 battery, but last night I have used 2 brand new AA batteries)

              On my Slim AA Node, I have not the C5 cap, I will add it ...

              Can it be a bootoloader issue ? (I'm using my Atmega at 8 Mhz)

              S Offline
              S Offline
              sundberg84
              Hardware Contributor
              wrote on last edited by
              #6

              @carmelo42 - st:fail is most probalblt not a bootloader issue.
              50cm? Have you tried separating them? Some radios doesnt like when they are to close to eachother. Also try another radio if possible.

              Controller: Proxmox VM - Home Assistant
              MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
              MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
              RFLink GW - Arduino Mega + RFLink Shield, 433mhz

              1 Reply Last reply
              0
              • C Offline
                C Offline
                carleki
                wrote on last edited by
                #7

                yes, I have tried 15 meters away : same problem

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  carleki
                  wrote on last edited by
                  #8

                  I have added the C5 capacitor (on the "My Slim 2AA node"), and replaced the nrf24 from my GW with a NRF24L01+PA+LNA.

                  It's way better :)

                  So far, no problem .. I will keep you updated in the following days

                  Anyway, thanks for your help :dancer:

                  1 Reply Last reply
                  2

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  11

                  Online

                  12.0k

                  Users

                  11.2k

                  Topics

                  113.4k

                  Posts


                  Copyright 2025 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