Anything to be concerned about, or caused by MQTT gateway?



  • Hi Guys,

    I've finally built my multi sensor (rain, moisture, LUX, distance).

    On sensor startup I get the following:

    Starting sensor (RNNNA-, 2.0.0-beta)
    Radio init successful.
    send: 3-3-0-0 s=255,c=3,t=11,pt=0,l=8,sg=0,st=ok:Rn+M+T+H
    send: 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,st=ok:1.0
    send: 3-3-0-0 s=0,c=0,t=1,pt=0,l=0,sg=0,st=ok:
    send: 3-3-0-0 s=1,c=0,t=1,pt=0,l=0,sg=0,st=ok:
    send: 3-3-0-0 s=2,c=0,t=16,pt=0,l=0,sg=0,st=fail:
    send: 3-3-0-0 s=4,c=0,t=15,pt=0,l=0,sg=0,st=ok:
    send: 3-3-0-0 s=255,c=3,t=15,pt=0,l=2,sg=0,st=fail:
    send: 3-3-0-0 s=255,c=0,t=17,pt=0,l=10,sg=0,st=ok:2.0.0-beta
    send: 3-3-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,st=fail:0
    Init complete, id=3, parent=0, distance=1
    Moisture Sensor
    0
    send: 3-3-0-0 s=0,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    Rain Sensor
    0
    send: 3-3-0-0 s=1,c=1,t=16,pt=2,l=2,sg=0,st=ok:0
    548
    send: 3-3-0-0 s=2,c=1,t=37,pt=3,l=2,sg=0,st=ok:548
    Ping: 0 cm

    I'm using the MQTT gateway if that's related. Apart from the above failures the sensor works faultless. Further, if I use the standard repeater sketch for example I don't get the failures, so it must be lated to presentation, or something? The fails always occur in the same place.

    Can anyone help we diagnose if it's an issue?

    Thanks,

    Mark



  • Sorry to bump this, I've been trying to work it out but I'm still not sure why these particular items fail. Can anyone offer any insight?


  • Mod

    How close in time are the failing messages sent? There have been some cases where delaying 50-500ms between each send has helped.



  • @mfalkvidd I haven't changed anything from default, how would I introduce a delay for testing? Do you know what can cause such errors?

    Thank you!


  • Mod

    @Mark-Swift sending a lot in a short time can show power issues I guess.
    You add delay(500); between each send.



  • @mfalkvidd Makes sense, I'm currently using the latest development version and there's little in the sketch related to sends, do I need to edit one of the files in the library?


  • Mod

    Sorry, I'm not very familiar with the development version (still using 1.5).
    But it looks like the rain example is already waiting between each send (it uses wait, which is better than delay since delay blocks the radio from receiving):

    void presentation()  {
      // Register all sensors to gw (they will be created as child devices)
      sendSketchInfo(SKETCH_NAME, SKETCH_VERSION);
      wait(DWELL_TIME);
      present(CHILD_ID_RAIN_LOG, S_RAIN);
      wait(DWELL_TIME);
      present(CHILD_ID_TRIPPED_INDICATOR, S_MOTION);
      wait(DWELL_TIME);
    
    #ifdef DHT_ON
      present(CHILD_ID_HUM, S_HUM);
      wait(DWELL_TIME);
      present(CHILD_ID_TEMP, S_TEMP);
      wait(DWELL_TIME);
    #endif
    

    You could try increasing DWELL_TIME from 125 to 500 and see if that helps.



  • I'll give it a shot, thank you!


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 5
  • 6
  • 6

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts