st=fail help please



  • Hi my name is Matias, I´m addicted to this website. I´m building my sensor network and now getting this common error.

    I have MQTT Gateway with OpenHab as controller

    MySensor vesion is 1.5 and using Arduino 1.6.5

    Working on the same room, gateway and 2 sensors are not talking as they should. I´m getting ST=Fail

    Here is the Log of one of my Sensors

    send: 21-21-0-0 s=255,c=0,t=18,pt=0,l=3,sg=0,st=fail:1.5
    send: 21-21-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0
    repeater started, id=21, parent=0, distance=1
    send: 21-21-0-0 s=255,c=3,t=11,pt=0,l=16,sg=0,st=fail:Relay + Humidity
    send: 21-21-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=fail:1.1
    send: 21-21-0-0 s=0,c=0,t=7,pt=0,l=0,sg=0,st=fail:
    send: 21-21-0-0 s=1,c=0,t=6,pt=0,l=0,sg=0,st=fail:
    find parent
    send: 21-21-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    send: 21-21-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,st=fail:
    send: 21-21-0-0 s=2,c=0,t=3,pt=0,l=0,sg=0,st=fail:
    send: 21-21-0-0 s=3,c=0,t=3,pt=0,l=0,sg=0,st=fail:
    send: 21-21-0-0 s=4,c=0,t=3,pt=0,l=0,sg=0,st=fail:

    Here is my gateway debug

    0;0;3;0;9;gateway started, id=0, parent=0, distance=0
    Ok!
    <<10 12 00 06 4D 51 49 73 64 70 03 02 00 3C 00 04 4D 51 54 54

    20 02 00 00
    <<82 17 00 E2 00 12 4D 79 4D 51 54 54 2F 32 30 2F 31 2F 56 5F 54 45 4D 50 00

    90 03 00 E2 00
    MyMQTT/20/1/V_TEMP
    0;0;3;0;9;send: 0-0-20-20 s=1,c=1,t=0,pt=0,l=0,sg=0,st=fail:
    <<82 16 00 E3 00 11 4D 79 4D 51 54 54 2F 32 30 2F 30 2F 56 5F 48 55 4D 00

    90 03 00 E3 00
    MyMQTT/20/0/V_HUM
    0;0;3;0;9;send: 0-0-20-20 s=0,c=1,t=1,pt=0,l=0,sg=0,st=fail:
    <<82 17 00 E4 00 12 4D 79 4D 51 54 54 2F 32 31 2F 31 2F 56 5F 54 45 4D 50 00

    90 03 00 E4 00
    MyMQTT/21/1/V_TEMP
    0;0;3;0;9;send: 0-0-21-21 s=1,c=1,t=0,pt=0,l=0,sg=0,st=fail:
    <<82 16 00 E5 00 11 4D 79 4D 51 54 54 2F 32 31 2F 30 2F 56 5F 48 55 4D 00

    90 03 00 E5 00
    MyMQTT/21/0/V_HUM
    0;0;3;0;9;send: 0-0-21-21 s=0,c=1,t=1,pt=0,l=0,sg=0,st=fail:
    0;0;3;0;9;read: 21-21-0 s=0,c=1,t=1,pt=7,l=5,sg=0:39.0
    MyMQTT/21/0/V_HUM

    30 17 00 11 4D 79 4D 51 54 54 2F 32 31 2F 30 2F 56 5F 48 55 4D 33 39 2E 30
    0;0;3;0;9;read: 21-21-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;0;3;0;9;send: 0-0-21-21 s=255,c=3,t=8,pt=1,l=1,sg=0,st=fail:0

    and this is what happended on my gateway when I send a command from OpenHab
    MyMQTT/21/2/V_LIGHT
    0;0;3;0;9;send: 0-0-21-21 s=2,c=1,t=2,pt=0,l=1,sg=0,st=fail:1

    Sensor does not get any message

    The 3 radios have the 4.7uF 35v capacitor.
    The Gateway has a 3.3 voltage regulator,
    I´m using 3 identical 3.3v 8 Mhz Arduino pro mini

    I don´t know what else to check.

    Hope you can help me.
    Thank you very much.


  • Hardware Contributor

    If these st=fails are gone when you put your finger on the antenna of the radio, then try to use less transmit power.

    Using the latest development build I do as follows:

    #define MY_RF24_PA_LEVEL RF24_PA_LOW


  • Admin

    Hi @matias53 ,

    Usually the ack failues is solved by decoupling the radio (giving it more stable power). Not sure if you've received a unusually bad batch of NRF-clones or should try to alter the cap-size/channel to get good transmission.

    Radio sometimes is a bit of voodoo dance. But stable radio powering helps a lot 🙂



  • I have been trying to solve this same error while using the GatewayESP826MQTTClient sketch in the development branch

    (http://forum.mysensors.org/topic/2352/guide-setting-up-and-testing-mqtt-client-gateway/2)

    I am powering the radio via the 3.3v pin on the nodemcu breakout board. I have a cap on the radio, as I have on all my radios, and I get very good range and reception.

    I will try to change the following:

    #define MY_RF24_PA_LEVEL RF24_PA_LOW

    Thank you,

    Mike



  • Hey all,
    I started to build an advanced sensor node after playing around the samples. Messed up sometimes, which took me few hours to figure out. So here are some basic things to check (probably for noobs like me):

    • This is NOT a 5V device, connect to 3.3V 🙂
    • Call "gw.process()" often! Without it a few messages might be still sent, but ack will surely fail.
    • Do NOT sleep. use gw.wait() (same when you do long operations on another device, like waiting for Serial events)
    • double-triple check if you use the same MyConfig.h for your sensors (forgot to flash with the new one)
    • take care when using interrupts. No Serial in ISR! 🙂
      +1: when you 'present' some sensors with ack, gw.wait() a bit between them for a better success rate.
      Hope you won't have these kind of issues.

    // If you this this post should not be here, please rage 😉


Log in to reply
 

Suggested Topics

  • 3
  • 15
  • 24
  • 1
  • 3
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts