Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. LogOTANode & LogOTAGateway

LogOTANode & LogOTAGateway

Scheduled Pinned Locked Moved Development
1 Posts 1 Posters 644 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    romeo01
    wrote on last edited by
    #1

    Hi All,

    Someone could confirm me that LogOTANode & LogOTAGateway sketch example work correctly.

    I'm unable to test the OTA degug feature because all characters sent by the node are unreadeable.

    In fact, I do not try with the logOTAGateway sketch, because I aready have a gateway running. But I use a new node with unique ID to receive all debug messages from the fist node (LogOTANode).

    TX_LogOTANode.ino (TX OTA)

    /**
     * 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
     *
     * Example for sending debug messages over the air (OTA).
     *
     */
    
    
    
    // Enable debug
    #define MY_DEBUG
    
    // Enable OTA debugging to Node 100
    #define MY_DEBUG_OTA (100)
    
    // Allow sending logs without MY_DEBUG_OTA enabled
    #define MY_OTA_LOG_SENDER_FEATURE
    
    #define MY_NODE_ID 50
    
    
    // Disable ACK for debug messages
    //#define MY_DEBUG_OTA_DISABLE_ACK
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    
    #include <MySensors.h>
    
    void setup()
    {
    }
    
    void presentation()
    {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("TX DebugSensor", "1.0");
    }
    
    // Arduino loop
    int c=0;
    void loop()
    {
      // Wait some time
      if (sleep(3000)==MY_SLEEP_NOT_POSSIBLE) {
        delay(3000);
      }
    
      // Count loops
      c++;
    
      // A debug message
      DEBUG_OUTPUT(PSTR("DEBUG\nc=%" PRId16 "\nmillis=%" PRId32 "\n"), c, hwMillis());
    
      // Send a log message with ACK to a node
      OTALog(100, true, PSTR("LOG\nc=%" PRId16 "\nmillis=%" PRId32 "\n"), c, hwMillis() );
    
    
      
    }
    

    RX_LogOTANode.ino (RX OTA)

    /**
    * 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.
    *
    */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable OTA log display
    #define MY_OTA_LOG_RECEIVER_FEATURE
    
    #define MY_NODE_ID 100
    
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    
    #define MY_BAUD_RATE 115200
    
    #include <MySensors.h>
    
    void setup()
    {
      // Setup locally attached sensors
    }
    
    void presentation()
    {
        sendSketchInfo("RX DEBUG Display", "1.0");
    
    }
    
    void loop()
    {
      // Send locally attached sensor data here
    }
    
    
    
    // Traite les messages provenant de la Gateway
    void receive(const MyMessage &message){
    
      OTALogPrint(message);
      
    }
    
    

    Pse confirm if the sketchs above are OK and run on your side.
    Thanks in advance.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    19

    Online

    12.0k

    Users

    11.2k

    Topics

    113.4k

    Posts


    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • MySensors
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular