Problems with first sensors



  • Hello,

    A few days ago I build a serial gateway using an arduino nano clone and a NRF24L01 with antenna. My raspberry pi 3 is running domoticz as controller.

    Domoticz seems to recognize the serial mysensors gateway (USB) and shows version 2.0.

    For testing I build a motion sensor (HC-SR501, arduino nano, NRF24L01) and uploaded a an unmodified mysensors example-sketch. Under setup->hardware->gateway->setup (german translation) I was able to see a child no. 255 (doesn´t the example used child ID 1?), which was named S_ARDUINO_REPEATER_NODE version 1 instead of motion sensor. I was never able to see this in devices.

    Tried to upload the sketch once again with a clean installation of the arduino IDE from arduino.cc. Installed the newest IDE version and mysensors 2.0.

    But, now on compiling a sketch, the IDE tells me:
    In file included from /Users/XX 1/Dropbox/Arduino/MySensors/MotionSensor/MotionSensor.ino:2:0:
    /Users/XX/Documents/Arduino/libraries/MySensors/MySensors.h:287:4: error: #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
    #error No forward link or gateway feature activated. This means nowhere to send messages! Pretty pointless.
    ^
    /Users/XX 1/Dropbox/Arduino/MySensors/MotionSensor/MotionSensor.ino:41:22: fatal error: MySensor.h: No such file or directory
    #include <MySensor.h>
    ^
    compilation terminated.
    exit status 1

    The sketch:

    #include <MyConfig.h>
    #include <MySensors.h>
    
    /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0 - Henrik Ekblad
     * 
     * DESCRIPTION
     * Motion Sensor example using HC-SR501 
     * http://www.mysensors.org/build/motion
     *
     */
    
    // Enable debug prints
    // #define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    #include <SPI.h>
    #include <MySensor.h>
    
    unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
    #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
    #define INTERRUPT DIGITAL_INPUT_SENSOR-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
    #define CHILD_ID 1   // Id of the sensor child
    
    // Initialize motion message
    MyMessage msg(CHILD_ID, V_TRIPPED);
    
    void setup()  
    {  
      pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
    }
    
    void presentation()  {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Motion Sensor", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID, S_MOTION);
    }
    
    void loop()     
    {     
      // Read digital motion value
      boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; 
            
      Serial.println(tripped);
      send(msg.set(tripped?"1":"0"));  // Send tripped value to gw 
     
      // Sleep until interrupt comes in on motion sensor. Send update every two minute. 
      sleep(INTERRUPT,CHANGE, SLEEP_TIME);
    }
    

    I am very frustrated. Why don´t I see the sensor in domiticz and why does the IDE not compile the sketch. This error occurs on my mac and my windows pc.

    Little help would be great... thanks.


  • Hardware Contributor

    Hello.

    I don't think this is an unmodified sketch 😉 There are multiple wrong things like the two different Mysensors includes etc.. Here is the right one : https://github.com/mysensors/MySensors/blob/development/examples/MotionSensor/MotionSensor.ino
    And you need to config your sketch. You can read this, it can help you:
    https://www.mysensors.org/about/arduino#installing-the-sensor-libraries
    https://forum.mysensors.org/topic/4276/converting-a-sketch-from-1-5-x-to-2-0-x



  • Oh, I thought the examples are ready for mysensors library 2.0. So, first step I have to do is to change some lines in the sketch...

    But, I already used the "manage library" function in the IDE and installed mysensors 2.0. So, I am wondering why all these errors still come up.



  • Your new code from github for the motion compiled without any problems.

    2 days ago I uploaded the serial gateway sketch from https://www.mysensors.org/build/serial_gateway. This sketch is not compatible to mysensor library 2.0 ?

    I found some new example code on github, but at the moment, I don´t really know how to change the sketch to 2.0 compatibility.


  • Hardware Contributor

    yes sketch are ready, the sketch from example folder is ok.
    perhaps you didn't paid attention, but imho you have changed something...Look at the top of your sketch, mysensors is two times included and not right. And if you look at the sketch I've linked (which is from example folder), you will see it's done once like this

    #include  <Mysensors.h>
    

    And you have this in your :

    #include <MyConfig.h>
    #include <MySensors.h>
    ...
    #include <MySensor.h>
    
    

  • Hardware Contributor

    ah ok. I don't know for these sketch. But those from the arduino example folder should be ok.
    If not, clean your arduino install, and install it again. with the help from the links above, this should be ok.
    I hope it helps.



  • Nano seems to be damaged. Trying a new one tomorrow.
    One more question, please: I downloadee mysensors library 20.
    As I am using a serial hateway, I notices the gateway sketch uses the old gw.xxx structure. Do I have to modfiy the sketch on my own for preparing it for library 2.0? (My programming skills are under development). On githib the sketch is very basic, there is missing a lot?!


  • Hardware Contributor

    where do you see that gateway use old structure?
    the serial gw sketch you have in arduino ide should be the same as github. if not, you have not well updated your lib..
    don't worry, the sketch is very basic but it works. it's because lot of stuff is hidden for easing the lib use.



  • To me as a newbie it is a bit confusing...

    This sketch comes from mysensors.org:

    **
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * DESCRIPTION
     * The ArduinoGateway prints data received from sensors on the serial link. 
     * The gateway accepts input on seral which will be sent out on radio network.
     *
     * The GW code is designed for Arduino Nano 328p / 16MHz
     *
     * Wire connections (OPTIONAL):
     * - Inclusion button should be connected between digital pin 3 and GND  
     * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
     *
     * LEDs (OPTIONAL):
     * - 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 
     * 
     */
    
    #define NO_PORTB_PINCHANGES  
    
    #include <MySigningNone.h>
    #include <MyTransportRFM69.h>
    #include <MyTransportNRF24.h>
    //#include <MyHwATMega328.h>
    #include <MySigningAtsha204Soft.h>
    #include <MySigningAtsha204.h>
    
    #include <SPI.h>  
    #include <MyParserSerial.h>  
    #include <MySensor.h>  
    #include <stdarg.h>
    #include <PinChangeInt.h>
    #include "GatewayUtil.h"
    
    #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
    #define INCLUSION_MODE_PIN  3 // Digital pin used for inclusion mode button
    #define RADIO_ERROR_LED_PIN 4  // Error led pin
    #define RADIO_RX_LED_PIN    6  // Receive led pin
    #define RADIO_TX_LED_PIN    5  // the PCB, on board LED
    
    // NRFRF24L01 radio driver (set low transmit power by default) 
    MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);
    //MyTransportRFM69 transport;
    
    // Message signing driver (signer needed if MY_SIGNING_FEATURE is turned on in MyConfig.h)
    //MySigningNone signer;
    //MySigningAtsha204Soft signer;
    //MySigningAtsha204 signer;
    
    // Hardware profile 
    MyHwATMega328 hw;
    
    // Construct MySensors library (signer needed if MY_SIGNING_FEATURE is turned on in MyConfig.h)
    // To use LEDs blinking, uncomment WITH_LEDS_BLINKING in MyConfig.h
    #ifdef WITH_LEDS_BLINKING
    MySensor gw(transport, hw /*, signer*/, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN);
    #else
    MySensor gw(transport, hw /*, signer*/);
    #endif
    
    char inputString[MAX_RECEIVE_LENGTH] = "";    // A string to hold incoming commands from serial/ethernet interface
    int inputPos = 0;
    boolean commandComplete = false;  // whether the string is complete
    
    void parseAndSend(char *commandBuffer);
    
    void output(const char *fmt, ... ) {
       va_list args;
       va_start (args, fmt );
       vsnprintf_P(serialBuffer, MAX_SEND_LENGTH, fmt, args);
       va_end (args);
       Serial.print(serialBuffer);
    }
    
      
    void setup()  
    { 
      gw.begin(incomingMessage, 0, true, 0);
    
      setupGateway(INCLUSION_MODE_PIN, INCLUSION_MODE_TIME, output);
    
      // Add interrupt for inclusion button to pin
      PCintPort::attachInterrupt(pinInclusion, startInclusionInterrupt, RISING);
    
    
      // Send startup log message on serial
      serial(PSTR("0;0;%d;0;%d;Gateway startup complete.\n"),  C_INTERNAL, I_GATEWAY_READY);
    }
    
    void loop()  
    { 
      gw.process();
    
      checkButtonTriggeredInclusion();
      checkInclusionFinished();
      
      if (commandComplete) {
        // A command wass issued from serial interface
        // We will now try to send it to the actuator
        parseAndSend(gw, inputString);
        commandComplete = false;  
        inputPos = 0;
      }
    }
    
    
    /*
      SerialEvent occurs whenever a new data comes in the
     hardware serial RX.  This routine is run between each
     time loop() runs, so using delay inside loop can delay
     response.  Multiple bytes of data may be available.
     */
    void serialEvent() {
      while (Serial.available()) {
        // get the new byte:
        char inChar = (char)Serial.read(); 
        // if the incoming character is a newline, set a flag
        // so the main loop can do something about it:
        if (inputPos<MAX_RECEIVE_LENGTH-1 && !commandComplete) { 
          if (inChar == '\n') {
            inputString[inputPos] = 0;
            commandComplete = true;
          } else {
            // add it to the inputString:
            inputString[inputPos] = inChar;
            inputPos++;
          }
        } else {
           // Incoming message too long. Throw away 
            inputPos = 0;
        }
      }
    }
    

    Looks like the sketch for mysensors library 1.x.

    And this one is from github:

     /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * DESCRIPTION
     * The ArduinoGateway prints data received from sensors on the serial link. 
     * The gateway accepts input on seral which will be sent out on radio network.
     *
     * The GW code is designed for Arduino Nano 328p / 16MHz
     *
     * Wire connections (OPTIONAL):
     * - Inclusion button should be connected between digital pin 3 and GND  
     * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
     *
     * LEDs (OPTIONAL):
     * - To use the feature, uncomment MY_LEDS_BLINKING_FEATURE 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 
     * 
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // Set LOW transmit power level as default, if you have an amplified NRF-module and
    // power your radio separately with a good regulator you can turn up PA level. 
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    
    // Enable serial gateway
    #define MY_GATEWAY_SERIAL
    
    // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
    #if F_CPU == 8000000L
    #define MY_BAUD_RATE 38400
    #endif
    
    // Flash leds on rx/tx/err
    #define MY_LEDS_BLINKING_FEATURE
    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Inverses the behavior of leds
    //#define MY_WITH_LEDS_BLINKING_INVERSE
    
    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    #define MY_INCLUSION_BUTTON_FEATURE
    
    // Inverses behavior of inclusion button (if using external pullup)
    //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
    
    // 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 
    
    // Uncomment to override default HW configurations
    //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
    //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
    
    #include <SPI.h>
    #include <MySensors.h>  
    
    void setup() { 
      // Setup locally attached sensors
    }
    
    void presentation() {
     // Present locally attached sensors 
    }
    
    void loop() { 
      // Send locally attached sensor data here 
    }
    

    To me ot looks like this is meant for mysensors.org 2.0, which looks incomplete. Think, they have to be merged ?


  • Hardware Contributor

    I know the difference between the two versions. But, as I said, no need to merge.
    Please note:

    • The examples you found on mysensors.org are, i guess, not all updated yet. but mysensors team is working hard, it's lot of work 😉

    • The example from github are compiled for mysensors 2. You think this is incomplete but that's wrong. The stuff you think missing is simply hidden. For easing noob experience.

    • So only 1.x older user sketch need to be updated to 2.0. If you are starting with mysensors, i don't think you have older sketch to convert, isn't it?

    • if not already done., use https://www.mysensors.org/about/arduino#installing-the-sensor-libraries to install the latest lib from Arduino software

    • Then no need to go to mysensors or git to get the latest examples. It's available in Arduino software. File Menu\Examples\Mysensors

    For discovering Arduino software, or arduino in general, you can have a look at
    https://www.arduino.cc/en/Guide/HomePage
    https://www.arduino.cc/en/Tutorial/HomePage
    https://www.arduino.cc/en/Reference/HomePage



  • Oh, just realized domoticz setup uses a serial gateway baud rate of 115.200, the sketches are using 38.400. Perhaps, this is the big mistake.



  • It is very frustrating...

    Uploaded the serial gateway sketch from examples ro my serial gateway (not serialgateway485). I just modified the baud rate to 115200. domoticz recognizes the gateway as version 2.0.

    I also uploaded the motion sketch from examples to a new arduino nano and modified nothing.

    Domoticz now is able to see the node, but it is named unknown. The child ID 255 (that must be wrong) is named S_ARDUINO_REPEATER_NODE - that is wrong. It has to be S_MOTION. Despite I was using the newest sketch, domoticz calls it version 1.0.

    Could someone tell me the solution, please?



  • @blebbens

    The version 1.0 comes from this piece of code and has nothing to do with the mysensors version.

    void presentation()  {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Motion Sensor", "1.0");
    

    It would be nice to see the serial output from your node when you connect it to your gateway.
    Also try to comment out the sleep function so there is less code that could cause a problem.



  • This is the code for my serial gateway to domoticz (arduino nano, NRF24L01+PA+ANTENNA) I am actually using...

     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * DESCRIPTION
     * The ArduinoGateway prints data received from sensors on the serial link. 
     * The gateway accepts input on seral which will be sent out on radio network.
     *
     * The GW code is designed for Arduino Nano 328p / 16MHz
     *
     * Wire connections (OPTIONAL):
     * - Inclusion button should be connected between digital pin 3 and GND  
     * - RX/TX/ERR leds need to be connected between +5V (anode) and digital pin 6/5/4 with resistor 270-330R in a series
     *
     * LEDs (OPTIONAL):
     * - To use the feature, uncomment MY_LEDS_BLINKING_FEATURE 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 
     * 
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // Set LOW transmit power level as default, if you have an amplified NRF-module and
    // power your radio separately with a good regulator you can turn up PA level. 
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    
    // Enable serial gateway
    #define MY_GATEWAY_SERIAL
    
    // Define a lower baud rate for Arduino's running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
    #if F_CPU == 8000000L
    #define MY_BAUD_RATE 115200
    #endif
    
    // Flash leds on rx/tx/err
    #define MY_LEDS_BLINKING_FEATURE
    // Set blinking period
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Inverses the behavior of leds
    //#define MY_WITH_LEDS_BLINKING_INVERSE
    
    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    // Enable Inclusion mode button on gateway
    #define MY_INCLUSION_BUTTON_FEATURE
    
    // Inverses behavior of inclusion button (if using external pullup)
    //#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
    
    // 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 
    
    // Uncomment to override default HW configurations
    //#define MY_DEFAULT_ERR_LED_PIN 4  // Error led pin
    //#define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
    //#define MY_DEFAULT_TX_LED_PIN  5  // the PCB, on board LED
    
    #include <SPI.h>
    #include <MySensors.h>  
    
    void setup() { 
      // Setup locally attached sensors
    }
    
    void presentation() {
     // Present locally attached sensors 
    }
    
    void loop() { 
      // Send locally attached sensor data here 
    }
    

    And this sketch is for the motion sensor (arduino nano, HC-SR501 and NRF24L01+PA+ANTENNA)...

     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0 - Henrik Ekblad
     * 
     * DESCRIPTION
     * Motion Sensor example using HC-SR501 
     * http://www.mysensors.org/build/motion
     *
     */
    
    // Enable debug prints
    // #define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    #include <SPI.h>
    #include <MySensors.h>
    
    unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
    #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
    #define CHILD_ID 1   // Id of the sensor child
    
    // Initialize motion message
    MyMessage msg(CHILD_ID, V_TRIPPED);
    
    void setup()  
    {  
      pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input
    }
    
    void presentation()  {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Motion Sensor", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID, S_MOTION);
    }
    
    void loop()     
    {     
      // Read digital motion value
      boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; 
            
      Serial.println(tripped);
      send(msg.set(tripped?"1":"0"));  // Send tripped value to gw 
    
      // Sleep until interrupt comes in on motion sensor. Send update every two minute.
      sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);
    }
    

    Domoticz still recognizes the motion sensor as "unknown" and S_ARDUINO_REPEATER.

    And, the debug seriell monitor tells me:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    

    Hope, someone can help - it is very frustrating.


  • Admin

    @blebbens Please also post the debug log of your GW while the node is booting.



  • Okay, could you please tell me how to do that.
    At the moment I do not know where to find it.


  • Hero Member

    @blebbens connect the gateway to your computer usb port and look at the serial to see the debug log.

    In addition where does domoticz show the "unknown" sensor? In the hardware log there is always one with id 255 for the node.

    From you log I read a lot of "failed" messages. This indicates transmission errors which could result from your amplified radio's. These a more error prone than the non amplified ones. For testing you better use the non amplified.



  • 0_1468656309681_IMG_1021.jpg

    This is what domoticz looks like...

    Connecting the serial gateway to my computer means, I can not connect it to domoticz ?
    For debugging I have to enable #define MY_DEBUG ?
    Or, is there a way to read the log file on the gateway ?


  • Hardware Contributor

    I don't know about domoticz but perhaps you can get the logs. Or use MYSController.

    Otherwise, when you need it, you can debug gw and node on your computer. Just connect both devices to your computer. Then of course this is not connected to domoticz but for debugging i often do this, it's useful.

    So:

    • connect gw+node to your computer
    • then use Serial monitor from arduino if you want, to monitor one device. choose right baudrate and comport of course
    • and for other device, use another serial monitor like putty etc..
      or a sniffer if you really want to keep it connected to your controller. But for noobs, i would advice to simply use two serial monitor when you need to debug, easier..

  • Hero Member

    @blebbens your domoticz screen looks fine. No errors but also no sensors reported. Only the node is known.
    As @scalz mentioned, just connect the node and gateway to your computer watch what happens on the serial monitor (arduino idea or whatever you are using) the node does not have to be connected to domoticz for initial debugging.



  • Okay, I have...

    The motion sensor connected to the Arduino IDE. The output of the serial monitor (at this time the gateway was connected to the controller):

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    

    An at this point I had the gateway connected to the arduino IDE (the motion sensor was not connected to the computer):

    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.0.0
    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    

    I never had both, gateway and sensor, connected to the monitor at the same time. I am afraid, I didn´t understand to use MYScontroller. Did not find the com-port settings etc. It always tries to connect to gateway 192.168.0.x, my network is not set up to this IP.

    Does the output help ?


  • Hardware Contributor

    nope, output can't help as it's only one device..

    I think you're talking about MYSController config when you say 192.168.0.x, isn't it? or i don't understand lol

    To know your serialports in use:

    • with Win for instance, go to something like Control Panel → Device Manager → COM & LPT ports
    • connect your devices to usb, and disconnect one by one. So now you know which one use which port.

    About MYSController: you will need to setup the serial port for GW.

    • With GW connected to usb, click Settings button and then click Gateway tab.
    • Check Serial GW and choose port&bauds.
    • Now, still in MYSController, you can click Connect button. There are tabs in MYSController for different debug levels. Look a bit at features.
    • It should connect, if it does not, un/replug your gw, and reclick Connect.

    Then you'll have the logs for your GW if it is enabled in sketch of course.
    As said above, if you would like, you could use another software (serial monitor) in place of MYSController. but not required here.

    Now, for the other device (node), you can monitor it in Arduino software by setting well port&bauds. you know it now 😉

    Could you try in this order, please :

    • plug GW only. And connect with MYSController
    • then plug node, and open your Arduino Serial monitor.

    does it work? if no, logs, thx 😉



  • Okay, done it... both connected, gw on MYScontroller, motion sensor monitored using IDE...

    Sensor output:

    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    

    And gateway output:

    MYScontroller debug:

    16.07.2016 19:43:42	INFO	Flushing FIFO
    16.07.2016 19:43:42	INFO	Connected to COM7
    16.07.2016 19:43:44	RX	0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    16.07.2016 19:43:44	CHILD	New child discovered, node id=0, child id=internal
    16.07.2016 19:43:44	RX	0;255;3;0;9;TSM:INIT
    16.07.2016 19:43:44	RX	0;255;3;0;9;TSM:RADIO:OK
    16.07.2016 19:43:44	RX	0;255;3;0;9;TSM:GW MODE
    16.07.2016 19:43:44	RX	0;255;3;0;9;TSM:READY
    16.07.2016 19:43:44	RX	0;255;3;0;14;Gateway startup complete.
    16.07.2016 19:43:44	RX	0;255;0;0;18;2.0.0
    16.07.2016 19:43:44	DEBUG	Update child id=255, type=S_ARDUINO_REPEATER_NODE
    16.07.2016 19:43:44	RX	0;255;3;0;9;No registration required
    16.07.2016 19:43:44	RX	0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    16.07.2016 19:44:44	RX	0;255;3;0;9;TSP:SANCHK:OK
    16.07.2016 19:45:44	RX	0;255;3;0;9;TSP:SANCHK:OK
    

    MySensors debug:

    8	16.07.2016 19:43:44	TX	-1	-1		-1	-1	NA (-1)	N/A	NA (-1)	-1			required
    

    Nodes debug: this message was shown before I connected the sensor to power

    7	16.07.2016 19:43:44	0 - Gateway	S_ARDUINO_REPEATER_NODE	S_ARDUINO_REPEATER_NODE	2.0.0	
    

    And messages tab:

    6	16.07.2016 19:43:44	RX	0 - Gateway	INTERNAL	C_INTERNAL	NO	I_GATEWAY_READY	Gateway startup complete.
    7	16.07.2016 19:43:44	RX	0 - Gateway	INTERNAL	C_PRESENTATION	NO	S_ARDUINO_REPEATER_NODE	2.0.0
    

    Okay, hope, this helps now.

    That´s strange, because there is no repeater... just a motion sensor sketch.



  • No one ? It is so frustrating...

    Read some more threads like this (https://forum.mysensors.org/topic/4280/simple-serial-gateway-and-sensor-does-not-work)... seems to be a common problem of MySensors 2.0 ?




  • Admin

    @blebbens Your logs look ok, but your radios don't seem to talk to each other - this could possibly hint to radio interference or HW issues. Try:
    (1) reduce PA power by setting:

    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    

    and recompile and reflash GW and node sketch.

    (2) move node and GW further away from each other
    (3) Switch off WiFi AP

    Please report back on any of these solutions with log from GW and node.

    Thanks.



  • Now I defined MY_RF24_PA_LEVEL RF24_PA_LOW in both, gateway and sensor.
    Before I have done this, I compiled and uploaded the ClearEpromConfig.

    The logs... gateway:

    17.07.2016 15:52:22	STARTUP	Initialize message logging
    17.07.2016 15:52:22	STARTUP	1.0.0 (build 3314)
    17.07.2016 15:52:22	STARTUP	FPC 3.0.0 / Lazarus 1.6
    17.07.2016 15:52:22	STARTUP	still under development :) tekka 2016
    17.07.2016 15:52:22	STARTUP	Load INI file...
    17.07.2016 15:52:22	STARTUP	INI version 1.0.0 (build 3314)
    17.07.2016 15:52:23	INFO	*** Logging START ***
    17.07.2016 15:52:23	VERSION	1.0.0 (build 3314)
    17.07.2016 15:52:23	INFO	Logging=TRUE
    17.07.2016 15:52:23	INFO	AutoID=TRUE
    17.07.2016 15:52:23	INFO	AutoFW=TRUE
    17.07.2016 15:52:23	STARTUP	INI file loaded
    17.07.2016 15:52:23	STARTUP	Loading FW repository...
    17.07.2016 15:52:23	REPO	FW "Blink" loaded. t=10, v=1, blocks=80, crc=0x46D4
    17.07.2016 15:52:23	REPO	FW "TimeReporter" loaded. t=20, v=1, blocks=736, crc=0xE923
    17.07.2016 15:52:23	REPO	FW repository loaded. Items=2
    17.07.2016 15:52:23	STARTUP	Initialize message types
    17.07.2016 15:52:23	NODE	New node discovered, node id=0
    17.07.2016 15:52:23	NODE	New node discovered, node id=255
    17.07.2016 15:52:23	INFO	read MySensors.xml
    17.07.2016 15:52:23	INFO	Application: MYSController
    17.07.2016 15:52:23	INFO	Node id=0 skipped
    17.07.2016 15:52:23	INFO	Node id=255 skipped
    17.07.2016 15:52:30	UPDATE	current=1.0.0.3314 remote=1.0.0.3314
    17.07.2016 15:52:32	INFO	Flushing FIFO
    17.07.2016 15:52:32	INFO	Connected to COM9
    17.07.2016 15:52:34	RX	0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    17.07.2016 15:52:34	CHILD	New child discovered, node id=0, child id=internal
    17.07.2016 15:52:34	RX	0;255;3;0;9;TSM:INIT
    17.07.2016 15:52:34	RX	0;255;3;0;9;TSM:RADIO:OK
    17.07.2016 15:52:34	RX	0;255;3;0;9;TSM:GW MODE
    17.07.2016 15:52:34	RX	0;255;3;0;9;TSM:READY
    17.07.2016 15:52:34	RX	0;255;3;0;14;Gateway startup complete.
    17.07.2016 15:52:34	RX	0;255;0;0;18;2.0.0
    17.07.2016 15:52:34	DEBUG	Update child id=255, type=S_ARDUINO_REPEATER_NODE
    17.07.2016 15:52:34	RX	0;255;3;0;9;No registration required
    17.07.2016 15:52:34	RX	0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    
    6	17.07.2016 15:52:34	RX	0 - Gateway	INTERNAL	C_INTERNAL	NO	I_GATEWAY_READY	Gateway startup complete.
    7	17.07.2016 15:52:34	RX	0 - Gateway	INTERNAL	C_PRESENTATION	NO	S_ARDUINO_REPEATER_NODE	2.0.0
    

    And, the sensor...

    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    

    They now are far away from each other...

    I think, all cables are connected to the right position.

    EDIT:
    Found a MQ-135 air quality sensor. Uploaded the mysensor example sketch. But, the same error output in serial monitor.

    0_1468765905388_NRF24L01.jpg

    Please take a look at this picture of my NRF24L01 amplified. Perhaps, it is wrong wired ? On my NRF24 there is no mark for GND, so I took this picture.

    But, isn´t my gateway (wired the same) working very well ? Is there a way to find out, if the wiring is wrong ? Would the gateway work like you can see in the log ?

    Or another idea: I changed the gateway´s sketch to a baud rate of 115200. The sensor´s sketches don´t contain this information. Do I need to set their baud rate to 115200, too ?


  • Admin

    @blebbens Looks like you have nRF24L01, not nRF24L01+. The nRF24L01 does not support 250Kbps (see here, page 8 ). MySensors is set (by default) to 250Kbps datarate. In your case, try this:

    #define MY_RF24_DATARATE RF24_1MBPS
    
    

    and recompile and reflash GW and node.


  • Hardware Contributor

    @blebbens
    could you show a link where you bought radio modules you're using please. I think @tekka may have found the problem 🙂

    For people who are getting same messages "FPAR FAIL", I think you may fall into the old case "st:fail", hardware related like using capa for radio, tekka advices above etc... where radio does not work properly and there is no ACK back so the comm is not validated. Then, after multiple retries, it fails.

    I can confirm this at least for static nodes. On my side, the latest v2.0 from dev branch works ok for me. as expected 😉 Config tested for the moment is serial gw with exotic mcu atsam (I mean compared to classic gw). And the node is a multisensors. Radio is RFM69.



  • Flashed ClearEpromConfig...

    Added to the sketches...
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define MY_RF24_DATARATE RF24_1MBPS

    Think, this overrides MyConfig.h ?

    What a pity... just the same output... recognized as "unknown" S_ARDUINO_REPEATER_NODE.

    I bought this NRF:
    http://www.aliexpress.com/item/1sets-Special-promotions-1100-meter-long-distance-NRF24L01-PA-LNA-wireless-modules-with-antenna/32341792715.html?spm=2114.13010608.0.161.TbEXts

    But, the delivered NRFs have no marked GND.

    Oh, any ideas left ? Delivery of standard NRFs take 30-40 days.

    Extract of MyConfig.h:

    /**
     * @def MY_RF24_SPI_MAX_SPEED
     * @brief MY_RF24_SPI_MAX_SPEED to overrule default nRF24L01+ SPI speed.
     */
    //#define MY_RF24_SPI_MAX_SPEED 4000000
    
    /**
     * @def MY_RF24_CE_PIN
     * @brief Default RF24 chip enable pin setting. Override in sketch if needed.
     */
    #ifndef MY_RF24_CE_PIN
    	#if defined(ARDUINO_ARCH_ESP8266)
    		#define MY_RF24_CE_PIN 4
    	#elif defined(ARDUINO_ARCH_SAMD)
    		#define MY_RF24_CE_PIN 27
    	#else
    		#define MY_RF24_CE_PIN 9
    	#endif
    #endif
    
    /**
     * @def MY_RF24_CS_PIN
     * @brief Default RF24 chip select pin setting. Override in sketch if needed.
     */
    #ifndef MY_RF24_CS_PIN
    	#if defined(ARDUINO_ARCH_ESP8266)
    		#define MY_RF24_CS_PIN 15
    	#elif defined(ARDUINO_ARCH_SAMD)
    		#define MY_RF24_CS_PIN 3
    	#else
    		#define MY_RF24_CS_PIN 10
    	#endif
    #endif
    
    /**
     * @def MY_RF24_PA_LEVEL
     * @brief Default RF24 PA level. Override in sketch if needed.
     */
    #ifndef MY_RF24_PA_LEVEL
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #endif
    
    /**
     * @def MY_RF24_CHANNEL
     * @brief RF channel for the sensor net, 0-125.
     * Frequence: 2400 Mhz - 2525 Mhz Channels: 126
     * http://www.mysensors.org/radio/nRF24L01Plus.pdf
     * 0 => 2400 Mhz (RF24 channel 1)
     * 1 => 2401 Mhz (RF24 channel 2)
     * 76 => 2476 Mhz (RF24 channel 77)
     * 83 => 2483 Mhz (RF24 channel 84)
     * 124 => 2524 Mhz (RF24 channel 125)
     * 125 => 2525 Mhz (RF24 channel 126)
     * In some countries there might be limitations, in Germany for example only the range 2400,0 - 2483,5 Mhz is allowed
     * http://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/Allgemeinzuteilungen/2013_10_WLAN_2,4GHz_pdf.pdf
     */
    #ifndef MY_RF24_CHANNEL
    #define MY_RF24_CHANNEL	76
    #endif
    
    /**
     * @def MY_RF24_DATARATE
     * @brief RF24 datarate (RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps or RF24_2MBPS for 2Mbps).
     */
    #ifndef MY_RF24_DATARATE
    #define MY_RF24_DATARATE RF24_250KBPS
    #endif
    


  • Have you tried to use another sketch?
    Just a random mysensors sketch to see if it that one also get presented as repeater node.
    Maybe just take one with a button and make your own (if you dont have any) and see if the buttonpress gets transmitted.



  • @Tore-André-Rosander
    Have tried out different sample-sketches from library, e.g. motion and air quality.

    It is... so... frustrating. There has to be a stupid mistake causing the sensors to report their availability as repeater node.


  • Admin

    @blebbens I totally understand your frustration but I'm afraid, your issue seems HW/radio-related. The logs look normal, also the repeater node message (which is actually emitted from the GW, see your domoticz screenshot and GW log). If you can get a different pair of nRF24L01+ (the P-version), I'd retry with those.



  • Is it just me or does it look like the repeater node is not the actual sensor node?

    If you look at the logs " Gateway INTERNAL C_PRESENTATION NO S_ARDUINO_REPEATER_NODE 2.0.0" "New child discovered, node id=0, child id=internal" and "Update child id=255, type=S_ARDUINO_REPEATER_NODE"

    How about try to define the node id manually?
    And just to be sure the clear eeprom config sketch in the mySensors examples.
    You can also try the RF24 library ping-pong examples to test your radios.



  • Ok so connections appear to be my major problem.... my dupont cables seem to be a bit dodgy... now wired with solid jumpers i can get the 'gettingstarted' sketch of the RF24 library working.

    Now i have the following log from the sensor which is encouraging but still weird:

    0_1468831166660_upload-4129d0ca-3934-4199-b4a4-5eb6553a1103

    Anything obvious now? The sketch on the sensor is the basic motionsensor one from the examples of 2.0.0 and the gateway is the serialgateway sketch... both no changes



  • @SGi

    I am not an expert but i had the same problem. I think a controller determines the id. But since you have none, it can't be done this way. Set a static ID with

    #define MY_NODE_ID 11 
    

    or something



  • @nielsokker Yea you are probably right, no problem now though since as soon as i hooked it up to my controller everything works fine 🙂 dodgy wires on the gateway was the issue all along.... using the very basic node sketch i can now see it in Domoticz and watch it turn on/off every 10 secs 🙂


  • Admin

    @SGi Excellent, have fun 👍



  • Think, I do not understand yet.
    The motion sketch uses #define CHILD_ID 1.
    Where do I have to insert #define MY_NODE_ID 1 ? Just into the skecht of the motion sensor ?



  • @blebbens i think you can just put it over "define child id"



  • @Tore-André-Rosander said:

    define child id"

    I think so too.

    These are probably just minor mistakes, changing from MySensors versions.



  • So, I have to delete CHILD_ID und change it to MY_NODE_ID?

    Okay, reaching home today, perhaps. Hope, this works.



  • No, just add the define node id.



  • @blebbens

    The old define, might become useless, but it wont be in the way either. It is your choice.


  • Hardware Contributor

    @blebbens use MY_NODE_ID to define the id of your node. the child id is for your sensors id, not the node id.



  • @blebbens I just replaced my RPi Gateway (the direct connection to GPIO) with the Serial Gateway, and the Repeater node you are seeing must be your gateway. Before i connected any nodes i got the same repeater node listed as hardware as you did, so it is probably your node that is the problem.



  • I have exactly same error after loading new sketch (sensebender with BMP085). It was working fine for few days and suddenly it doesn't work. After verting my modification it doesn't work. Clear EEPROM doesn't solve the problem. RFM69W and static ID.
    Gateway work fine with other sensors (sensebender without mods).

    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=100)
    TSM:FPAR
    TSP:MSG:SEND 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 100-100-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    
    


  • Sorry, I made a mistake when updating my sketch with (deleting bad zero to change 100 to 10 ...)
    #define MY_RFM69_NETWORKID 100
    #define MY_NODE_ID 100
    Works fine now !



  • hi,

    Was not at home for about 2 weeks now (driving home in 2 days), but AliExpress delivered 10 NRF2401 non-amplified without antenna. Is it still necessary to define low power and data rate of 1mbps?

    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define MY_RF24_DATARATE RF24_1MBPS

    Do I have to set the node ID still manually?



  • I thought my problem was dodgy Dupont cables but after more experimenting all issues have now gone by soldering a 80mm aerial to the radio 🙂 like a magic fix....

    0_1469865212533_Capture.JPG



  • Still cant get the stutus LED's working tho... hmmmm any suggestions? i have checked the polarity and connections are good to pins 4,5,6



  • I am trying to set up a Serial Gateway using the arduino IDE, this time using a NRF24L01 (not amplified, with build-in-antenna).

    The Sketch compiles without any error, but afterwards the IDE tells me an error occurred: error during uploading the Sketch.

    This occurs on compiling mysensors sketches.

    Never had this Problem before. Now I get this error on all WIN10-machines.

    Any tips ?


  • Admin

    @blebbens Did you manage to get your nodes running with a new set of RF24+ radios?



  • No...it ... is... so... frustrating...

    Arduino IDE works fine, but all things combined with mysensors are not working.

    Tried to upload the ClearEepromConfig sketch to the serial gateway (nano, NRF24L01+). After compiling the sketch, the IDE is not able to upload the sketch to the nano (error on uploading the sketch). The same with other example mysensors sketches.

    Tried this on 2 WIn10-PCs and 2 Macs.


  • Admin

    @blebbens ...and uploading a sketch works with other non-MySensors sketches (i.e. blink example)? - did you select the right board in the boards manager?



  • Yes, chose arduino nano.
    Blank sketches work fine, uploading is no problem.


  • Admin

    @blebbens This is weird - can you post the log from the IDE here for both cases (i.e. successful uploading and failing)?



  • Tried it severl times... uploading an empty sketch works fine.
    Uploading a mysensors sketch ends with:

    Arduino: 1.6.10 (Windows 10), Board: "Arduino Nano, ATmega328"
    
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\blebb\OneDrive\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10610 -build-path "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\blebb\AppData\Local\Temp\arduino_modified_sketch_724130\GatewaySerial.ino"
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\blebb\OneDrive\Documents\Arduino\libraries" -fqbn=arduino:avr:nano:cpu=atmega328 -ide-version=10610 -build-path "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\blebb\AppData\Local\Temp\arduino_modified_sketch_724130\GatewaySerial.ino"
    Using board 'nano' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
    Detecting libraries used...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\blebb\OneDrive\Documents\Arduino\libraries\MySensors" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\blebb\OneDrive\Documents\Arduino\libraries\MySensors" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src\SPI.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\blebb\OneDrive\Documents\Arduino\libraries\MySensors" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp" -o "nul"
    Generating function prototypes...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\blebb\OneDrive\Documents\Arduino\libraries\MySensors" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp" -o "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
    "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
    Sketch wird kompiliert...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\blebb\OneDrive\Documents\Arduino\libraries\MySensors" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp" -o "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp.o"
    Compiling libraries...
    Compiling library "SPI"
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\libraries\SPI\SPI.cpp.o
    Compiling library "MySensors"
    Compiling core...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10610 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_pulse.S.o"
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\WInterrupts.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\hooks.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_analog.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_digital.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_pulse.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_shift.c.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\CDC.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial0.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial1.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial2.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial3.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\IPAddress.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\PluggableUSB.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\Print.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\Stream.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\Tone.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\USBCore.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\WMath.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\WString.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\abi.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\main.cpp.o
    Zuvor kompilierte Datei wird verwendet: C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\new.cpp.o
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_pulse.S.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\WInterrupts.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\hooks.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_analog.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_digital.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_pulse.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\wiring_shift.c.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\CDC.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial0.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial1.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial2.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\HardwareSerial3.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\IPAddress.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\PluggableUSB.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\Print.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\Stream.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\Tone.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\USBCore.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\WMath.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\WString.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\abi.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\main.cpp.o"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc-ar" rcs  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\core.a" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\core\new.cpp.o"
    Linking everything together...
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p  -o "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/GatewaySerial.ino.elf" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\sketch\GatewaySerial.ino.cpp.o" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp\libraries\SPI\SPI.cpp.o" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/core\core.a" "-LC:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp" -lm
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/GatewaySerial.ino.elf" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/GatewaySerial.ino.eep"
    "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom  "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/GatewaySerial.ino.elf" "C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/GatewaySerial.ino.hex"
    Bibliothek SPI in Version 1.0 im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI  wird verwendet
    Bibliothek MySensors in Version 2.0.0 im Ordner: C:\Users\blebb\OneDrive\Documents\Arduino\libraries\MySensors  wird verwendet
    
    Der Sketch verwendet 13.982 Bytes (45%) des Programmspeicherplatzes. Das Maximum sind 30.720 Bytes.
    Globale Variablen verwenden 714 Bytes (34%) des dynamischen Speichers, 1.334 Bytes für lokale Variablen verbleiben. Das Maximum sind 2.048 Bytes.
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b57600 -D -Uflash:w:C:\Users\blebb\AppData\Local\Temp\buildfc036358b36fd5724eaef1c2da26543a.tmp/GatewaySerial.ino.hex:i 
    Beim Hochladen des Sketches ist ein Fehler aufgetreten
    

    Sorry, did not find any logfile. I just want to use mysensors. Bought so many sensors.


  • Admin

    @blebbens I'm afraid, but your issue is not MySensors-related.

    However, this may give further information:
    For comparison, please post the same Arduino IDE log when uploading the blink example (not an empty sketch) and - if successful - confirm that you see a blinking led in a 1sec interval.

    blink example:

    // the setup function runs once when you press reset or power the board
    void setup() {
      // initialize digital pin 13 as an output.
      pinMode(13, OUTPUT);
    }
    
    // the loop function runs over and over again forever
    void loop() {
      digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
      delay(1000);              // wait for a second
      digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
      delay(1000);              // wait for a second
    }
    


  • Hi,

    I downgraded from arduino.cc IDE 1.6.10 to 1.6.8. Now it uploads to the arduino nano without errors...

    Seriell monitor (serial gateway):

    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.0.0
    0;255;3;0;9;No registration required
    0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    0;255;3;0;9;TSP:SANCHK:OK
    

    Now I want to connect the gw to my test VeraEdge. I followed the instructions, uploaded the .xml-files and created a device. But, in APPS/DEVELOP PPS/SERIAL PORT CONFIG" I can not find the via USB connected serial gateway. And, I do not know where to restart vera itself or the luup engine.

    The dashboard shows this message: MySensors plugin : Choose the Serial Port. Under DEVICES the MySensors Plugin shows: Lua Startup Failure.

    Using the IDE I saw the gw is working (see above). Why does Vera not recognize the gw on USB ?

    Could someone help, please ?


  • Hero Member

    @blebbens

    Did you manage to do these steps in your Vera device:

    Finally, go to: APPS Develop Apps Serial port configuration. See the screenshot to the right.

    For the Used by device: setting, select the Arduino Gateway Plugin [] from the menu of available devices.
    Set baud rate to 115200.
    Set the parity to none with 8 data bits and 1 stop bit.

    more details here -> https://www.mysensors.org/controller/vera#configuring-the-vera-plugin-for-the-serialusb-gateway



  • There is no device listed in APPS/DEV APPS/Serial Port Config. There is only a save button.
    That´s the big problem. Vera does not recognize the to USB connected gateway.


Log in to reply
 

Suggested Topics

12
Online

11.4k
Users

11.1k
Topics

112.7k
Posts