Vera Inclusion Issue



  • Inclusion not working. This seems to happen every time something changes i.e. MySensors version change, my ip scheme changes, phase of the moon, my brain farts etc. I'm guessing this is more a Vera/MySensors plugin issue than a GW problem but I've be wrong at least once in my life. Well maybe a few more times than one, maybe.

    The GW and the Vera both responed to a pings.

    I started by cleaing the GW's flash. I'm on MySensors 2.2.0 and Vera 1.7.3500. I using an Arduino Genuino Uno as a Eithernet 5100 GW with all the latest Arduino software and I downloaded the latest Arduino/Vera plugin's Ver. 1.5. This has worked in the passed. Normally in the Vera inclusion area the "Stop" button will be lit and when you press the "Start" button it will stay lit for the inclusion time of 60 sec. Right now neither one is lit and neither one will stay lit. They do light up if you hover over one of them. The 5100 is a Shield. The same Setting tab show the following

    Connected to: 10.0.0.200:5003
    Plugin Version: 1.5
    Lib Version:
    Unit:

    At startup Serial Debug shows the following on the GW. As you can see the radio works just fine.
    0 MCO:BGN:INIT GW,CP=RNNGA---,VER=2.2.0
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    12 TSM:INIT:GW MODE
    14 TSM:READY:ID=0,PAR=0,DIS=0
    17 MCO:REG:NOT NEEDED
    320 GWT:TIN:IP=10.0.0.200
    1323 MCO:BGN:STP
    My Vera Gateway V2.1, 4/27/18
    1324 MCO:BGN:INIT OK,TSP=1
    1329 TSF:MSG:READ,6-6-0,s=0,c=1,t=0,pt=7,l=5,sg=0:33.0
    1941 TSF:MSG:READ,25-25-0,s=0,c=1,t=0,pt=7,l=5,sg=0:77.0
    1947 TSF:MSG:READ,25-25-0,s=4,c=1,t=0,pt=7,l=5,sg=0:66.2

    When I start up my Scene controller I see the following in Debug on the GW which is what Vera should need when adding this device.
    1104624 TSF:MSG:READ,27-27-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    1104629 TSF:MSG:PINGED,ID=27,HP=1
    1104634 TSF:MSG:SEND,0-0-27-27,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    1104648 TSF:MSG:READ,27-27-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    1104690 !TSF:MSG:SEND,0-0-27-27,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0100
    1106678 TSF:MSG:READ,27-27-0,s=255,c=0,t=18,pt=0,l=5,sg=0:2.2.0
    1106691 TSF:MSG:READ,27-27-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    1108691 TSF:MSG:READ,27-27-0,s=255,c=3,t=11,pt=0,l=14,sg=0:SceneCNTL V2.6
    1108702 TSF:MSG:READ,27-27-0,s=255,c=3,t=12,pt=0,l=7,sg=0:4/26/18
    1108812 TSF:MSG:READ,27-27-0,s=1,c=0,t=6,pt=0,l=9,sg=0:Shop Temp
    1108920 TSF:MSG:READ,27-27-0,s=32,c=0,t=14,pt=0,l=12,sg=0:TempSetPoint
    1109028 TSF:MSG:READ,27-27-0,s=50,c=0,t=47,pt=0,l=4,sg=0:Hour
    1109136 TSF:MSG:READ,27-27-0,s=51,c=0,t=47,pt=0,l=3,sg=0:Min
    1109379 TSF:MSG:READ,27-27-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    1109386 TSF:MSG:SEND,0-0-27-27,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1

    Here is my GW sketch.
    //
    // My Vera 5100 GateWay V2.0 3/30/18
    // Must have Soft SPI Enabled and the Rasio pins moved
    // Also must have UDP Enabled
    //
    // * The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
    // *
    // * LED purposes:
    // * - To use the feature, uncomment WITH_LEDS_BLINKING in MyConfig.h
    // * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
    // * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
    // * - ERR (red) - fast blink on error during transmission error or recieve crc error
    // *
    // * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
    // *

    #define sketchInfo "My Vera Gateway V2.1"
    #define sketchDate ", 4/27/18"

    // Enable debug prints to serial monitor
    #define MY_DEBUG

    // Enable and select radio type attached
    #define MY_RADIO_NRF24

    // Enable gateway ethernet module type
    #define MY_GATEWAY_W5100

    // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
    #define MY_W5100_SPI_EN 4

    // Enable Soft SPI for NRF radio (note different radio wiring is required)
    // The W5100 ethernet module seems to have a hard time co-operate with
    // radio on the same spi bus.
    //#if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
    #define MY_SOFTSPI
    #define MY_SOFT_SPI_SCK_PIN 14
    #define MY_SOFT_SPI_MISO_PIN 16
    #define MY_SOFT_SPI_MOSI_PIN 15
    //#endif

    // When W5100 is connected we have to move CE/CSN pins for NRF radio
    #ifndef MY_RF24_CE_PIN
    #define MY_RF24_CE_PIN 5
    #endif
    #ifndef MY_RF24_CS_PIN
    #define MY_RF24_CS_PIN 6
    #endif

    // Enable to UDP
    #define MY_USE_UDP

    #define MY_IP_ADDRESS 10,0,0,200 // If this is disabled, DHCP is used to retrieve address
    // Renewal period if using DHCP
    //#define MY_IP_RENEWAL_INTERVAL 60000
    // The port to keep open on node server mode / or port to contact in client mode
    #define MY_PORT 5003

    // Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    #define MY_CONTROLLER_IP_ADDRESS 10,0,0,7

    // The MAC address can be anything you want but should be unique on your network.
    // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
    // Note that most of the Ardunio examples use "DEAD BEEF FEED" for the MAC address.
    #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0x01

    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    #define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    #define MY_INCLUSION_MODE_DURATION 60
    // Digital pin used for inclusion mode button
    #define MY_INCLUSION_MODE_BUTTON_PIN 3

    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300

    // Flash leds on rx/tx/err
    // Uncomment to override default HW configurations
    #define MY_DEFAULT_ERR_LED_PIN 7 // Error led pin
    #define MY_DEFAULT_RX_LED_PIN 8 // Receive led pin
    #define MY_DEFAULT_TX_LED_PIN 9 // Transmit LED

    #if defined(MY_USE_UDP)
    #include <EthernetUdp.h>
    #endif
    #include <Ethernet.h>
    #include <MySensors.h>

    void setup()
    {

    Serial.print(sketchInfo);
    Serial.println(sketchDate);
    }

    void loop() {
    }

    The Vera Advanced Params Tab looks like this.
    name MySensors Plugin
    device_type urn:schemas-arduino-cc:device:arduino:1
    altid
    ip 10.0.0.200:5003
    mac
    manufacturer
    model
    id_parent 0
    nobulk
    embedded
    disabled
    restricted
    device_file D_Arduino1.xml
    id 246
    room 2
    impl_file
    time_created 1524843290
    device_json D_Arduino1.json
    local_udn uuid:4d494342-5342-5645-00f6-000002aece62
    commUse rs232
    category_num 666

    And the Variables Tab looks like this.
    PluginVersion 1.5
    GWAddress 10.0.0.200:5003
    Unit I



  • When I started off and knew nothing about the MySensors system and was in the same spot as you (I didn't know what if anything worked). It was suggested i try the webserver example on the gateway. This would make sure the GW is talking to the LAN.

    Then I made a simple counting sketch on my node that counted from 0 to 250 in steps of 5, sending the count to my VeraPlus using the Multimeter Voltage parameter.

    Maybe this helps.


 

325
Online

7.8k
Users

8.7k
Topics

93.0k
Posts