Vera MySensors plugin : Cannot send command - communications error

  • Contest Winner

    After a couple year hiatus I'm trying to update my MySensors network to the latest version. My Vera controller crapped out, otherwise I'd still be very happy with my older version... now I have to re-learn (fun).

    Starting with the Ethernet Gateway, after using this code:

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    // 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
    // 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
    #ifndef MY_RF24_CS_PIN
    #define MY_RF24_CS_PIN 6
    // Enable UDP communication
    //#define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    //#define MY_IP_ADDRESS 10,0,1,5
    // If using static ip you can define Gateway and Subnet address as well
    //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
    //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
    // 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 192, 168, 178, 254
    // 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, 0xED
    // Enable inclusion mode
    // Enable Inclusion mode button on gateway
    // Set inclusion mode duration (in seconds)
    // Digital pin used for inclusion mode button
    // Set blinking period
    // 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 pin
    #if defined(MY_USE_UDP)
    #include <EthernetUdp.h>
    #include <Ethernet.h>
    #include <MySensors.h>
    void setup()
        // Setup locally attached sensors
    void presentation()
        // Present locally attached sensors here
    void loop()
        // Send locally attached sensors data here

    and Vera version 1.7.855, I am able to see the connection in the plugin:
    0_1501103065697_Screen Shot 2017-07-26 at 16.13.09.png

    but I am getting this nasty error after the Luup loads:

    0_1501103154989_Screen Shot 2017-07-26 at 16.12.09.png

    the Serial debug from the gateway displays only this:

    0_1501103207331_Screen Shot 2017-07-26 at 17.06.29.png

    anyone seen anything like this?

  • Contest Winner

    I've tried removing and reloading the plugin, but no worky...

    Anyone have suggestions? I'm using the Arduino W5100 Arduino Shield...

  • Contest Winner

    So, keeping with the communication with myself...

    I was able to properly connect the gateway switching some pins around, I guess that happened sometime in the last couple of major upgrades. The ethernet gateway (I was using for mire than two years( I'd assumed was wired properly.

    Gateway is now on v1.5, my Vera UI7 can see it with no communication issues.

    However, I now have the problem of Can't Press start for inclusion on Gateway which folks advised to downgrade the Arduino IDE and compile the Gateway using Arduino IDE 1.6.11.

    I tried that but it will not compile.

    Can someone (anyone) tell me how to compile the Ethernet Gateway for Version 1.5 such that it will not suffer from the IDE bug and reset when I press the include button in my connected Vera?

    The instructions just tell you to download the latest version of the IDE...


  • Hero Member

    Hi Jim,

    What MySensors library version are you using now?

    What kind of compile error are you getting? I think I remember there was some issue with new versions of avr board deffinitions, please chech what version you are using.

    All so try uncommenting the following for the inclusion issue:


    I'll see if I can find something more helpful to share when I find some time.


  • @BulldogLowell,
    I have been having the exact same issues. However, I have finally got inclusion to start working. The trick for me was not down grading the whole IDE, but only downgrading the Boards.

    Tools | Board | Board Manager and Searching for AVR. The "Arduino AVT Boards" was at version 1.6.19. which did not work. I downgraded to 1.6.11 and now my GW does not reset and inclusion works.

    Give that a try.


  • Contest Winner

    @peterjackson said in MySensors plugin : Cannot send command - communications error:

    Arduino AVT Boards

    Thank you, I did exactly as you said and it now works, I can toggle inclusion mode on my controller.

    Must I now use the 1.6.11 Board Manager for all my nodes?

  • Contest Winner


    Hey Tomas! It has been a while. I didn't notice your post at first glance.

    Thanks for the response. As I mentioned above, compiling under the older version Board Manager worked well (and as I mentioned, I had to rewire the device!).

    I'm now on version 1.5 for the Vera plugin, but Arduino IDE is 2.0.0 which was the default when I added it with the Arduino IDE's library manager. Would you recommend another version?

    Switching all of my sketches over to the new library version went well, and I am up and running. I really like the way the latest version is structured. MySensors has come a long way since its genesis. I also like that it is part of the Arduino IDE's Library toolset; very nice @hek .

    It is great to hear from you!


  • I don't think so. The bug sounds like it is with the Ethernet module somehow. A temp/humidity sensor is working ok and it was compiled with the newer version.

  • Hero Member


    Yeah, it has been a while. Glad to see that you are back.

    Were you able to get your GW working with Vera?
    Anyhow here are the versions I'm using now.

    Arduino IDE tool 1.6.11
    Arduino AVR Boards 1.6.11 (Like already mentioned check this from the Board Manager in Ardiono IDE some newer versions had issues with the Ethernet GW causing it to reboot when sending the inclusion mode command).
    MySensors Library version 2.1.1 (This is the most recent "stable" version and I recommend using it, I still have some nodes using 2.0.0 and 2.0.1 but the GW needs to be the latest to be able to communicate with both latest and older nodes).

    The Vera MySensors Plugin version is still 1.5 and have not received any major changes in a loong time.

    If you get some kind of compilation error please post the error also.


  • Contest Winner


    I'm using MySensors 2.0.0, which was the default when I downloaded using the Arduino IDE's library manager. I'll probably linger here a while until i learn all of the MySensors abstractions. It is nice and easy now.

    I'm using Arduino 1.8.2, which is almost C++ 11. I really like the latest version, I'll just keep using the AVR Boards 1.6.11 for my MySensors projects.

    @peterjackson set me straight, and all is working well. I'm up and running with all of the MySensors nodes I've built. It is a drag updating some of my devices; many were not built for easy access to the USB serial connectors. I have only myself to blame for that.

    I'd been working mainly with WiFi devices lately, but they get expensive if all you want is basic functionality, the MySensors backbone is perfect.

    Built any cool projects lately?

Log in to reply

Suggested Topics

  • 8
  • 5
  • 66
  • 9
  • 3
  • 15
  • 2
  • 1