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. !MCO:PRO:RC=1 in debug logs

!MCO:PRO:RC=1 in debug logs

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 3 Posters 54 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.
  • alowhumA Offline
    alowhumA Offline
    alowhum
    Plugin Developer
    wrote on last edited by alowhum
    #1

    When enabling MyDebug on a node I'm working on, I sometimes see bursts of this:

    
    100776 !MCO:WAI:RC=1
    100780 !MCO:PRO:RC=1
    100782 !MCO:PRO:RC=1
    100784 !MCO:PRO:RC=1
    100786 !MCO:PRO:RC=1
    100788 !MCO:PRO:RC=1
    100790 !MCO:PRO:RC=1
    100792 !MCO:PRO:RC=1
    100794 !MCO:PRO:RC=1
    100796 !MCO:PRO:RC=1
    100798 !MCO:PRO:RC=1
    100800 !MCO:PRO:RC=1
    100802 !MCO:PRO:RC=1
    100804 !MCO:PRO:RC=1
    100806 !MCO:PRO:RC=1
    100808 !MCO:PRO:RC=1
    100810 !MCO:PRO:RC=1
    100812 !MCO:PRO:RC=1
    100814 !MCO:PRO:RC=1
    100816 !MCO:PRO:RC=1
    100818 !MCO:PRO:RC=1
    100820 !MCO:PRO:RC=1
    100823 !MCO:PRO:RC=1
    100825 !MCO:PRO:RC=1
    100827 !MCO:PRO:RC=1
    100829 !MCO:PRO:RC=1
    100831 !MCO:PRO:RC=1
    100833 !MCO:PRO:RC=1
    100835 !MCO:PRO:RC=1
    100837 !MCO:PRO:RC=1
    100840 !MCO:PRO:RC=1
    ...etc...
    102779 !MCO:PRO:RC=1
    
    
    

    I don't see anything about this on the forum. I did find that MCO means "MySensors core".

    It seems to happen during the wait part of the code below, which is in the receive function:

        // Change relay state
        desiredState = message.getBool()?RELAY_ON:RELAY_OFF;
        if(desiredState == RELAY_ON){
          send(relay_message.setSensor(message.sensor).set(RELAY_ON)); // Send on state
          digitalWrite(RELAY_1, RELAY_ON);
          Serial.println(F("Turning on"));
          wait(PULSELENGTH);
          digitalWrite(RELAY_1, RELAY_OFF);
          Serial.println(F("Turned off"));
          //send(relay_message.setSensor(message.sensor).set(RELAY_OFF)); // Send off state
        }
        send(relay_message.setSensor(message.sensor).set(RELAY_OFF)); // Send off state
    	}
    

    Perhaps I should keep the receive function as brief as possible?

    mfalkviddM 1 Reply Last reply
    0
    • alowhumA Offline
      alowhumA Offline
      alowhum
      Plugin Developer
      wrote on last edited by
      #2

      Yes, that was it. I love it when I answer my own questions :-)

      1 Reply Last reply
      1
      • alowhumA alowhum

        When enabling MyDebug on a node I'm working on, I sometimes see bursts of this:

        
        100776 !MCO:WAI:RC=1
        100780 !MCO:PRO:RC=1
        100782 !MCO:PRO:RC=1
        100784 !MCO:PRO:RC=1
        100786 !MCO:PRO:RC=1
        100788 !MCO:PRO:RC=1
        100790 !MCO:PRO:RC=1
        100792 !MCO:PRO:RC=1
        100794 !MCO:PRO:RC=1
        100796 !MCO:PRO:RC=1
        100798 !MCO:PRO:RC=1
        100800 !MCO:PRO:RC=1
        100802 !MCO:PRO:RC=1
        100804 !MCO:PRO:RC=1
        100806 !MCO:PRO:RC=1
        100808 !MCO:PRO:RC=1
        100810 !MCO:PRO:RC=1
        100812 !MCO:PRO:RC=1
        100814 !MCO:PRO:RC=1
        100816 !MCO:PRO:RC=1
        100818 !MCO:PRO:RC=1
        100820 !MCO:PRO:RC=1
        100823 !MCO:PRO:RC=1
        100825 !MCO:PRO:RC=1
        100827 !MCO:PRO:RC=1
        100829 !MCO:PRO:RC=1
        100831 !MCO:PRO:RC=1
        100833 !MCO:PRO:RC=1
        100835 !MCO:PRO:RC=1
        100837 !MCO:PRO:RC=1
        100840 !MCO:PRO:RC=1
        ...etc...
        102779 !MCO:PRO:RC=1
        
        
        

        I don't see anything about this on the forum. I did find that MCO means "MySensors core".

        It seems to happen during the wait part of the code below, which is in the receive function:

            // Change relay state
            desiredState = message.getBool()?RELAY_ON:RELAY_OFF;
            if(desiredState == RELAY_ON){
              send(relay_message.setSensor(message.sensor).set(RELAY_ON)); // Send on state
              digitalWrite(RELAY_1, RELAY_ON);
              Serial.println(F("Turning on"));
              wait(PULSELENGTH);
              digitalWrite(RELAY_1, RELAY_OFF);
              Serial.println(F("Turned off"));
              //send(relay_message.setSensor(message.sensor).set(RELAY_OFF)); // Send off state
            }
            send(relay_message.setSensor(message.sensor).set(RELAY_OFF)); // Send off state
        	}
        

        Perhaps I should keep the receive function as brief as possible?

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

        @alowhum the warning is emitted at https://github.com/mysensors/MySensors/blob/dd91aeb9c30dbd658bd02c34445669a7cd996c0f/core/MySensorsCore.cpp#L60

        Calling wait and send from within receive can cause recursive loops, which is why the log message is shown.

        1 Reply Last reply
        1
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #4

          Ah, interesting, thanks for the explanation.

          tekkaT 1 Reply Last reply
          0
          • alowhumA alowhum

            Ah, interesting, thanks for the explanation.

            tekkaT Offline
            tekkaT Offline
            tekka
            Admin
            wrote on last edited by
            #5

            Updated log parser to include RC debug messages: https://github.com/mysensors/MySensors/pull/1396

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


            25

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            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