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. Troubleshooting
  3. MQTT GW with RFM69 on RPi

MQTT GW with RFM69 on RPi

Scheduled Pinned Locked Moved Troubleshooting
25 Posts 4 Posters 1.7k Views 4 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.
  • Y Yveaux

    I found the root cause: https://github.com/mysensors/MySensors/issues/1458#issuecomment-739139339
    It is part of the signing code, so expected to occur on all nodes/gateways that request nonces for signing.
    Currently discussing if it is a real issue or not.

    T Offline
    T Offline
    TimO
    Hero Member
    wrote on last edited by
    #21

    @Yveaux thank you for digging in!

    1 Reply Last reply
    0
    • fritsF Offline
      fritsF Offline
      frits
      wrote on last edited by
      #22

      @joaoabs said in MQTT GW with RFM69 on RPi:

      Also happening in nodes:

      are you setting #define MY_TRANSPORT_WAIT_READY_MS ([timeout])? This causes MCO:PRO in my test cases as well.

      joaoabsJ 1 Reply Last reply
      0
      • fritsF frits

        @joaoabs said in MQTT GW with RFM69 on RPi:

        Also happening in nodes:

        are you setting #define MY_TRANSPORT_WAIT_READY_MS ([timeout])? This causes MCO:PRO in my test cases as well.

        joaoabsJ Offline
        joaoabsJ Offline
        joaoabs
        wrote on last edited by joaoabs
        #23

        @frits

        Don't think so, unless it is set by default.
        The code corresponding to the log:

        /*
         * 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-2019 Sensnology AB
         * Full contributor list: https://github.com/mysensors/MySensors/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.
         *
         *******************************
         */
        /**
         * @ingroup MySigninggrp
         * @{
         * @file SecureActuator.ino
         * @brief Example sketch showing how to securely control locks.
         *
         * This example will remember lock state even after power failure.
         *
         * REVISION HISTORY
         *  - See git log (git log libraries/MySensors/examples/SecureActuator/SecureActuator.ino)
         */
        
        /**
         * @example SecureActuator.ino
         * This example implements a secure actuator in the form of a IO controlled electrical lock.<br>
         * Multiple locks are supported as long as they are on subsequent IO pin indices. The first lock pin
         * is defined by @ref LOCK_1. The number of locks is controlled by @ref NOF_LOCKS .<br>
         * The sketch will require incoming messages to be signed and the use of signing backend is selected
         * by @ref MY_SIGNING_ATSHA204 or @ref MY_SIGNING_SOFT. Hard or soft ATSHA204 signing is supported.<br>
         * Whitelisting can be enabled through @ref MY_SIGNING_NODE_WHITELISTING in which case a single entry
         * is provided in this example which typically should map to the gateway of the network.
         */
        
        #define MY_DEBUG //!< Enable debug prints to serial monitor
        //#define MY_NODE_LOCK_FEATURE //!< Enable lockdown of node if suspicious activity is detected
        
        // RADIO STUFF
        #define MY_RADIO_RFM69 //!< RFM69 radio driver
        #define MY_RFM69_NEW_DRIVER
        #define MY_RFM69_FREQUENCY RFM69_433MHZ 
        //#define MY_IS_RFM69HW  
        #define MY_RFM69_ENABLE_ENCRYPTION
        //#define MY_DEBUG_VERBOSE_RFM69
        
        // SIGNING STUFF
        // Select soft/hardware signing method
        //#define MY_SIGNING_SOFT //!< Software signing
        #define MY_SIGNING_ATSHA204 //!< Hardware signing using ATSHA204A
        
        // Enable node whitelisting
        //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
        // Enable this if you want destination node to sign all messages sent to this node.
        #define MY_SIGNING_REQUEST_SIGNATURES //!< destination node signs all messages sent to this node
        
        // SETTINGS FOR MY_SIGNING_SOFT
        //#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 //!< Unconnected analog pin for random seed
        
        // SETTINGS FOR MY_SIGNING_ATSHA204
        #ifndef MY_SIGNING_ATSHA204_PIN
        #define MY_SIGNING_ATSHA204_PIN 17 //!< A3 - pin where ATSHA204 is attached
        #endif
        #define MY_DEBUG_VERBOSE_SIGNING //!< Enable signing related debug prints to serial monitor
        
        
        #define MY_NODE_ID 33
        
        #include <MySensors.h>
        
        
        #define LOCK_1  3     //!< Arduino Digital I/O pin number for first lock (second on pin+1 etc)
        #define NOF_LOCKS 2   //!< Total number of attached locks
        #define LOCK_LOCK 1   //!< GPIO value to write to lock attached lock
        #define LOCK_UNLOCK 0 //!< GPIO value to write to unlock attached lock
        
        void setup()
        {
        	for (int lock=1, pin=LOCK_1; lock<=NOF_LOCKS; lock++, pin++) {
        		// Set lock pins in output mode
        		pinMode(pin, OUTPUT);
        		// Set lock to last known state (using eeprom storage)
        		digitalWrite(pin, loadState(lock)?LOCK_LOCK:LOCK_UNLOCK);
        	}
        }
        
        void presentation()
        {
        	// Send the sketch version information to the gateway and Controller
        	sendSketchInfo("Secure Lock", "1.0");
        
        	// Fetch lock status
        	for (int lock=1, pin=LOCK_1; lock<=NOF_LOCKS; lock++, pin++) {
        		// Register all locks to gw (they will be created as child devices)
        		present(lock, S_LOCK, "SecureActuator", false);
        	}
        }
        
        /** @brief Sketch execution code */
        void loop()
        {
        }
        
        /**
         * @brief Incoming message handler
         *
         * @param message The message to handle.
         */
        void receive(const MyMessage &message)
        {
        	// We only expect one type of message from controller. But we better check anyway.
        	// And echoed messages are not accepted as control messages
        	if (message.getType()==V_LOCK_STATUS && message.getSensor()<=NOF_LOCKS && !message.isEcho()) {
        		// Change relay state
        		digitalWrite(message.getSensor()-1+LOCK_1, message.getBool()?LOCK_LOCK:LOCK_UNLOCK);
        		// Store state in eeprom
        		saveState(message.getSensor(), message.getBool());
        		// Write some debug info
        		Serial.print("Incoming change for lock:");
        		Serial.print(message.getSensor());
        		Serial.print(", New status: ");
        		Serial.println(message.getBool());
        	}
        }
        
        1 Reply Last reply
        0
        • Y Yveaux

          I found the root cause: https://github.com/mysensors/MySensors/issues/1458#issuecomment-739139339
          It is part of the signing code, so expected to occur on all nodes/gateways that request nonces for signing.
          Currently discussing if it is a real issue or not.

          joaoabsJ Offline
          joaoabsJ Offline
          joaoabs
          wrote on last edited by
          #24

          @Yveaux Hello, Any update if this is an issue or just a cosmetic log thing? Cheers

          Y 1 Reply Last reply
          0
          • joaoabsJ joaoabs

            @Yveaux Hello, Any update if this is an issue or just a cosmetic log thing? Cheers

            Y Offline
            Y Offline
            Yveaux
            Mod
            wrote on last edited by
            #25

            @joaoabs no, sorry. I didn't investigate any deeper.

            http://yveaux.blogspot.nl

            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


            11

            Online

            12.1k

            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