Skip to content
  • 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. Arduino Mega + eth shield -> presentation() never called
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Arduino Mega + eth shield -> presentation() never called

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 447 Views 2 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.
  • amemo06A Offline
    amemo06A Offline
    amemo06
    wrote on last edited by
    #1

    Hi,
    I finished and installed one of my box to handle several stuff.
    Description is below. I tested all independantly prior installation. All was looking quite fine. Function presentation() was called quite fast after reboot.
    Now that I installed everything in the 'production place', I noticed it may take hours or days until domoticz succeed to connect to the arduino

    Description of the sensors

    • Pool Temperature
    • Pool heating temperature
    • Water pump status (on or off)
    • 4 relays to water some plants
    • sensor for soil humidity
    • some other stuf
      Main material
    • arduino mega + ethernet shield. No radio.

    Domotic server is domoticz

    As written above, before I installed all the stuff, all was running quite fine.
    Testing was running quite smooth
    After reboot, function presentation() was called quite fast.

    Now since I installed eveything and plugged all sensors, after reboot it could take hours before the function presentation() is called.

    Any idea what I could have made wrong?

    Initially my 1st thought was the power supply which could be too weak.
    12v 1A which powers up 2 LM2596S.
    1 LM2596 is for the arduino in 9v
    1 LM2596 is for the 4 relay board with 5v
    I just put a power supply 12v 3A. Nothing has changed.

    So I plugged the laptop and found presentation() is either not called, either called a very long time after reboot.

    What could be the issue?
    Should I put a delay to avoid looking at sensors while waiting the presentation is performed? In other words, do nothing in the function loop() unless the presentation is called?

    The code logic is as follow in code sequence

    • function before()
      to initialize the Dallas temperature sensors and relays + some LEDs
    • function setup()
      to setup the manual buttons, debouncers....
    • function presentation() <<-- this is the one just not called or called after a very long time.
      to present the sketch and sensors
    • function loop()
      to handle the temperature and the manual action to buttons THEN send message to the domoticz server whenever something has changed.
      Typically there is always some temperature activity. Temperature changes quite often +/- 0.1°C
    • Finally a function receive()
      It receives the manual action from domoticz server.

    Any ideas or suggestion is welcome. Especially, if someone already faced the issue with function presentation() not called or called after a random long time.
    Thanks

    mfalkviddM 1 Reply Last reply
    0
    • amemo06A amemo06

      Hi,
      I finished and installed one of my box to handle several stuff.
      Description is below. I tested all independantly prior installation. All was looking quite fine. Function presentation() was called quite fast after reboot.
      Now that I installed everything in the 'production place', I noticed it may take hours or days until domoticz succeed to connect to the arduino

      Description of the sensors

      • Pool Temperature
      • Pool heating temperature
      • Water pump status (on or off)
      • 4 relays to water some plants
      • sensor for soil humidity
      • some other stuf
        Main material
      • arduino mega + ethernet shield. No radio.

      Domotic server is domoticz

      As written above, before I installed all the stuff, all was running quite fine.
      Testing was running quite smooth
      After reboot, function presentation() was called quite fast.

      Now since I installed eveything and plugged all sensors, after reboot it could take hours before the function presentation() is called.

      Any idea what I could have made wrong?

      Initially my 1st thought was the power supply which could be too weak.
      12v 1A which powers up 2 LM2596S.
      1 LM2596 is for the arduino in 9v
      1 LM2596 is for the 4 relay board with 5v
      I just put a power supply 12v 3A. Nothing has changed.

      So I plugged the laptop and found presentation() is either not called, either called a very long time after reboot.

      What could be the issue?
      Should I put a delay to avoid looking at sensors while waiting the presentation is performed? In other words, do nothing in the function loop() unless the presentation is called?

      The code logic is as follow in code sequence

      • function before()
        to initialize the Dallas temperature sensors and relays + some LEDs
      • function setup()
        to setup the manual buttons, debouncers....
      • function presentation() <<-- this is the one just not called or called after a very long time.
        to present the sketch and sensors
      • function loop()
        to handle the temperature and the manual action to buttons THEN send message to the domoticz server whenever something has changed.
        Typically there is always some temperature activity. Temperature changes quite often +/- 0.1°C
      • Finally a function receive()
        It receives the manual action from domoticz server.

      Any ideas or suggestion is welcome. Especially, if someone already faced the issue with function presentation() not called or called after a random long time.
      Thanks

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      Hi @amemo06

      What does the debug output say? (Could you post the entire log?)
      Adding serial prints inside the before() and setup() functions can be useful to see where the code hangs.

      If you haven't already found it, https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help/ has information on the most common problems and how to troubleshoot them efficiently.

      1 Reply Last reply
      0
      • amemo06A Offline
        amemo06A Offline
        amemo06
        wrote on last edited by
        #3

        Hi @mfalkvidd,
        thanks for the suggestion.
        For the complete log, there will be some wait time. I will have to come back to the location and record it. It may takes days.
        The only log I have was the last successful one.
        I have some serial prints in each main function.
        As it is visible in the log, I enter and leave properly in each.

        • before in and out,
        • setup in and out...
          And there is a lot of activity about temperature sensors prior the presentation.
          Each of these temperature reading are coming from the loop(). Each read do lead to a send(). So I was wondering if these send() could or couldn't be the reason of the random delay to execute the presentation? !
          Considering without presentation being executed, the sends are useless !
        0 MCO:BGN:INIT GW,CP=R-NGA---,REL=255,VER=2.3.1
        4 MCO:BGN:BFR
        Before_in:
        Before_out:
        684 GWT:TIN:IP=192.168.0.27
        1687 MCO:BGN:STP
        Setup_in:
        Setup_out:
        1688 MCO:REG:NOT NEEDED
        1692 MCO:BGN:INIT OK,TSP=NA
        Temp Sensor[5] tempidx[0]temp=29.30
        Temp Sensor[6] tempidx[1]temp=43.70
        Button sensor7 value=1
        Waterpump button value1 send 0
        Button sensor-1 value=1
        Button sensor-1 value=1
        Button sensor-1 value=1
        Button sensor-1 value=1
        Temp Sensor[5] tempidx[0]temp=29.20
        Temp Sensor[6] tempidx[1]temp=43.60
        Temp Sensor[5] tempidx[0]temp=29.30
        Temp Sensor[5] tempidx[0]temp=29.20
        Temp Sensor[5] tempidx[0]temp=29.30
        Temp Sensor[6] tempidx[1]temp=43.50
        Temp Sensor[6] tempidx[1]temp=43.60
        33609 GWT:TSA:ETH OK
        ->presentation_in:
        
        Nb temperature sensors=2
        S01-P22 Relais 1
        S02-P23 Relais 2
        S03-P24 Relais 3
        S04-P25 Relais 4
        Present sensor temperature[5] idx_temp=0 : desc=S05-P36 Temp 1-Pisc
        Present sensor temperature[6] idx_temp=1 : desc=S06-P36 Temp 2-Chauf
        S07-P35 Moteur Pisc
        <-presentation_out
        
        33636 GWT:RFC:MSG=0;0;3;0;2;
        33716 GWT:RFC:MSG=0;0;3;0;2;Get Version
        34708 GWT:RFC:MSG=0;0;3;0;18;PING
        Temp Sensor[6] tempidx[1]temp=43.50
        Temp Sensor[6] tempidx[1]temp=43.60
        Temp Sensor[6] tempidx[1]temp=43.50
        44723 GWT:RFC:MSG=0;0;3;0;18;PING
        54733 GWT:RFC:MSG=0;0;3;0;18;PING
        
        mfalkviddM 1 Reply Last reply
        0
        • amemo06A amemo06

          Hi @mfalkvidd,
          thanks for the suggestion.
          For the complete log, there will be some wait time. I will have to come back to the location and record it. It may takes days.
          The only log I have was the last successful one.
          I have some serial prints in each main function.
          As it is visible in the log, I enter and leave properly in each.

          • before in and out,
          • setup in and out...
            And there is a lot of activity about temperature sensors prior the presentation.
            Each of these temperature reading are coming from the loop(). Each read do lead to a send(). So I was wondering if these send() could or couldn't be the reason of the random delay to execute the presentation? !
            Considering without presentation being executed, the sends are useless !
          0 MCO:BGN:INIT GW,CP=R-NGA---,REL=255,VER=2.3.1
          4 MCO:BGN:BFR
          Before_in:
          Before_out:
          684 GWT:TIN:IP=192.168.0.27
          1687 MCO:BGN:STP
          Setup_in:
          Setup_out:
          1688 MCO:REG:NOT NEEDED
          1692 MCO:BGN:INIT OK,TSP=NA
          Temp Sensor[5] tempidx[0]temp=29.30
          Temp Sensor[6] tempidx[1]temp=43.70
          Button sensor7 value=1
          Waterpump button value1 send 0
          Button sensor-1 value=1
          Button sensor-1 value=1
          Button sensor-1 value=1
          Button sensor-1 value=1
          Temp Sensor[5] tempidx[0]temp=29.20
          Temp Sensor[6] tempidx[1]temp=43.60
          Temp Sensor[5] tempidx[0]temp=29.30
          Temp Sensor[5] tempidx[0]temp=29.20
          Temp Sensor[5] tempidx[0]temp=29.30
          Temp Sensor[6] tempidx[1]temp=43.50
          Temp Sensor[6] tempidx[1]temp=43.60
          33609 GWT:TSA:ETH OK
          ->presentation_in:
          
          Nb temperature sensors=2
          S01-P22 Relais 1
          S02-P23 Relais 2
          S03-P24 Relais 3
          S04-P25 Relais 4
          Present sensor temperature[5] idx_temp=0 : desc=S05-P36 Temp 1-Pisc
          Present sensor temperature[6] idx_temp=1 : desc=S06-P36 Temp 2-Chauf
          S07-P35 Moteur Pisc
          <-presentation_out
          
          33636 GWT:RFC:MSG=0;0;3;0;2;
          33716 GWT:RFC:MSG=0;0;3;0;2;Get Version
          34708 GWT:RFC:MSG=0;0;3;0;18;PING
          Temp Sensor[6] tempidx[1]temp=43.50
          Temp Sensor[6] tempidx[1]temp=43.60
          Temp Sensor[6] tempidx[1]temp=43.50
          44723 GWT:RFC:MSG=0;0;3;0;18;PING
          54733 GWT:RFC:MSG=0;0;3;0;18;PING
          
          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by mfalkvidd
          #4

          Sorry for being unclear. The log from node boot until where it gets "stuck" (i e where the significant slowdown occurs) should be sufficient.

          See https://github.com/mysensors/MySensors/issues/927 for a discussion on which order the different methods are called. It might help pinpoint the issue.

          If you don't mind, please post the node sketch. It makes it easier to match the debug output with what is happening.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          12

          Online

          11.7k

          Users

          11.2k

          Topics

          113.0k

          Posts


          Copyright 2019 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
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular