Ethernet Gateway "Inclusion started by Button" messages...when no button connected.


  • Hero Member

    I updated to latest 1.4.1 version today and may have uncovered a bug...

    In the log there is repeating "Inclusing started by button" messages...think is i dont have a button attached. The pin is in fact floating. Ive set it to use D5 as im using the hacked iBoard. D5 being one of the pin traces cut to rewire the radio.

    I dont know if this was occurring on previous 1.3 or 1.4 builds.
    Im also using UI7 for this g/w so could be something there too....the UI7 "start" inclusion button was continually being set to 'Start"

    Anyway.. as the pin is floating, i thought "ok ill use the internal pulldown"
    so within the Mygateway.cpp file i did the following changes which seems to stop the events!:

     pinMode(pinInclusion, INPUT_PULLUP); - line 66
    
    // Add interrupt for inclusion button to pin
    PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, LOW); - line 86
    

    Now i dont this this will work for those wanting to use the physical button - so other than getting out the soldering iron, is there a better way for this to be done in s/w??

    I'm using the standard constructor:

    // No blink or button functionality. Use the vanilla constructor.
    MyGateway gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, INCLUSION_MODE_TIME);
    

    Here is the log before the changes...

     0;0;3;0;14;Gateway startup complete.
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304368
     10;255;3;0;1;1410304368
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304368
     10;255;3;0;1;1410304368
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304368
     10;255;3;0;1;1410304368
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304368
     10;255;3;0;1;1410304368
     10;255;3;0;1;1410304408
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304408
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304408
     10;255;3;0;1;1410304408
     10;255;3;0;1;1410304418
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304418
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304418
     10;255;3;0;1;1410304418
     10;255;3;0;1;1410304428
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304428
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304428
     10;255;3;0;1;1410304428
     10;255;3;0;1;1410304438
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304438
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304438
     10;255;3;0;1;1410304438
     10;255;3;0;1;1410304448
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304448
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304448
     10;255;3;0;1;1410304448
     10;255;3;0;1;1410304458
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304458
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304458
     10;255;3;0;1;1410304458
     10;255;3;0;1;1410304468
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304468
     0;0;3;0;9;Inclusion started by button.
     0;0;3;0;5;1
     0;0;3;0;9;read: 10-10-0 s=255,c=3,t=1,pt=0,l=10:1410304468
     10;255;3;0;1;1410304468
     10;255;3;0;1;1410304478
     0;0;3;0;9;send: 0-0-10-10 s=255,c=3,t=1,pt=0,l=10,st=ok:1410304478
     0;0;3;0;9;Inclusion started by button.

  • Admin

    Strange, as far as I can see the internal pullup is activated by default.

    https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MyGateway.cpp#L67

    Can it still float?



  • Hello,
    Firstly thanks for such a wonderful Arduino ecosystem, the effort you've put in is amazing.

    Just got my Vera Lite today. Had been playing around with MySenosrs and FHEM for a week then gave in and bought the Vera.

    I have an identical setup to gregl (modified iboard gateway, UI7 I think, no idea what I'm doing in Vera at the moment) and was getting the same 'inclusion' message every time the gateway received a remote node message.

    Implemented the changes in Mygateway.cpp and the error went away.

    Didn't seem to matter which pin I chose for the inclusion input.

    Thanks again,

    alex



  • Hi, i've the same problem with a toggling Inclusion signal in my SerialGateway and mySensors version 1.4.2. I understand that a missing pullup resistor on Pin3 and a none activated internal Pullup is the root cause of this problem. I solved it by modifing the MyGateway.cpp like this:

    	// Setup digital in that triggers inclusion mode
    	if (pinInclusion >= 0)
    	{
    		pinMode(pinInclusion, INPUT_PULLUP);
    		// Add interrupt for inclusion button to pin
    		PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, FALLING);
    	}
    

    Does this mean this there is an error in 1.4.2?


 

322
Online

8.2k
Users

9.1k
Topics

96.7k
Posts