Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. joaoabs
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by joaoabs

    • RE: Is MySensors RPI GW 32bit only?

      @joaoabs Got it. It doesn't compile if we don't replace the RFM69_MAX_PACKET_LEN (0x40ul) ๐Ÿ™‚

      And I can confirm that the procedure above worked. Compiled directly in a RPI4 with 64bit OS.

      pi@raspberrypi:~ $ file /usr/local/bin/mysgw
      /usr/local/bin/mysgw: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=beb479db20a0f93b0fc004832e06c8213d779bb6, for GNU/Linux 3.7.0, with debug_info, not stripped
      
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Is MySensors RPI GW 32bit only?

      @Dragos-Pascale said in Is MySensors RPI GW 32bit only?:

      in hal/transport/RFM69/driver/new/RFM69_new.h you must also replace
      #define RFM69_MAX_PACKET_LEN (0x40u) with
      #define RFM69_MAX_PACKET_LEN (0x40ul)
      if you are using RFM69 radio

      @Dragos-Pascale Why that change? What is the behavior if you don't do it?

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Relay

      Hi,
      Trying to go deep on the API and come this this doubt: The second example (with button) the child seems to be declared as "S_LIGHT" and the receiving messages are "V_LIGHT", while the first example seems better suitable for a relay (child as "S_BINNARY" and requests as "V_STATUS").
      I haven't found any "S_LIGHT" or "V_LIGHT" in the API, only "S_LIGHT_LEVEL" and "V_LIGHT_LEVEL". What is the most suitable type for a relay node with a local button?

      posted in Announcements
      joaoabs
      joaoabs
    • RE: [Solved] How to check RFM69 is a HW model ?

      Hi,

      By the PCB silk I was wrongly thinking that the module could be on of "RFM69" or "RFM69H" or "RFM69W" and "RFM69HW".

      Now if I understood correctly the diagram, the module can only be either the "RFM69W" (low power 13dBm) or the "RFM69HW" (high power 20dBm).

      Since this module has the "H" marked it should be "RFM69HW" and that is confirmed by the other side of it, because it has the two additional black ICs.

      Thanks!

      rfm69-2.jpg

      posted in Hardware
      joaoabs
      joaoabs
    • RE: [Solved] How to check RFM69 is a HW model ?

      Resuscitating this old post...

      Not sure which type is my RFM69.

      It isn't marked as "RFM69HW" neither simply as "RFM69". It seems it is a "RFM69H" (no W).

      Is there any flag like "MY_IS_RFM69H" (without "W") ? ๐Ÿ˜€

      What should I use for this one? I'm getting erratic behavior in both flag options (with "MY_IS_RFM69HW")....

      rfm69.jpg

      posted in Hardware
      joaoabs
      joaoabs
    • Is it possible to request sensor status (via MQTT)?

      Hi,

      I'm testing a dual-SSR node connected to 220v (therefore, never sleeping).
      The node data is the following:

      Node ID: 80
      Childs:
      * HTU21 TEMP: 20
      * HTU21 HUM: 40
      * SSR1: 10
      * SSR2: 11
      

      Following the MySensors API structure

      Node-ID   /   Child-ID   /  Command   /  Ack   / Type  / Payload
      

      I believe I'm able to set a relay via MQTT with the command line command:

      mosquitto_pub -d -h 192.168.2.180 -u myuser -P mypass -t mysensors-in/80/10/1/1/2 -m "0"
      

      and get (what I believe its the confirmation):

      pi@raspberrypi:~ $ mosquitto_sub -h 192.168.2.180 -p 1883 -u myuser -P mypass -t mysensors-out/80/# -d
      Client mosqsub|5920-raspberryp sending CONNECT
      Client mosqsub|5920-raspberryp received CONNACK (0)
      Client mosqsub|5920-raspberryp sending SUBSCRIBE (Mid: 1, Topic: mysensors-out/80/#, QoS: 0)
      Client mosqsub|5920-raspberryp received SUBACK
      Subscribed (mid: 1): 0
      
      
      Client mosqsub|5920-raspberryp received PUBLISH (d0, q0, r0, m0, 'mysensors-out/80/10/1/1/2', ... (1 bytes))
      0
      

      I don't have at the moment anything connected to the relay to confirm if its switching or not, so I was trying to use the "request" command to request the child statuses.

      Something like:

      mosquitto_pub -d -h 192.168.2.180 -u myuser -P mypass -t mysensors-in/80/10/2/1/2 -m ""
      
      

      Even trying to request temperature statuses:

      pi@raspberrypi:~/mysensors-back $ mosquitto_pub -d -h 192.168.2.180 -u myuser -P mypass -t mysensors-in/80/20/2/1/0 -m ""
      
      

      but I'm not getting anything:

      Client mosqsub|6459-raspberryp received PUBLISH (d0, q0, r0, m0, 'mysensors-out/80/20/2/1/0', ... (0 bytes))
      Client mosqsub|6459-raspberryp received PUBLISH (d0, q0, r0, m0, 'mysensors-out/80/10/2/1/2', ... (0 bytes))
      

      I've read in the API documentation that the "request" command is "usually from an actuator destined for controller" so I'm wondering if it would be just "usually" or definitely "uniquelly" ๐Ÿ˜Š . Would there be any way of "asking" the sensors their statuses (via MQTT)?

      Cheers

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: MQTT GW with RFM69 on RPi

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

      posted in Troubleshooting
      joaoabs
      joaoabs
    • Soldering a coax cable to RFM69

      Hi,

      What do you think about this?
      Wanted to increase the GW range so trying to use a bigger 433MHz antenna.
      Would this be the correct way to make it?

      alt text

      Comment/suggestions will be welcomed

      posted in My Project
      joaoabs
      joaoabs
    • Can a node request a status from other node?

      Hello,

      I'd like to have a "6 button node" that will control lights (in other nodes). Since some lights are far away (not visible), I'm thinking in putting there a led just to signal if the light is currently on or off.

      For this to happen, I guess I'll have to request the status of each light every time a button is pressed (or pool it every 10m or so).

      Is this possible? How?

      Thanks

      posted in Feature Requests
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ My Slim 2AA Battery Node

      Hi @m26872

      Congrats for the great and simple design.
      I've been troubleshooting this slimnode with RFM69 radios and realized that a shunt between RFM69's DIO0 and Mega328's INT0 is required, otherwise the node will not "hear" the gateway. Even if the nrf2rmf69 board is used this shunt is required.
      It seems this is a re-current issue. Although this may be solved in the PCB2.0 could it be mentioned somewhere in the page above?

      Thanks and cheers!

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: Can't receive parent answer

      @frits I think you are right!

      I admit initially I didn't thought it could be that because I have a slim node working 100%, but after your comment, I checked it and there is in fact a shunt between INT0 and DIO0 (I must have done it last year or so and didn't remember). The other nodes I've been trying don't have it, so that's likely the case.

      Maybe the slim node page could have some reference to this?

      I'll solder some shunts and will re-try this evening, but I'm sure that was the problem.

      My slim nodes PCB's are red, but were ordered in 2018. Not sure what PCB release they are, though.

      Thank you very much!

      posted in Troubleshooting
      joaoabs
      joaoabs
    • Can't receive parent answer

      Hi,

      Trying to integrate a basic node but it seems it isn't "hearing" the GW.
      It boots up nicely, starts the signing backend and radio encryption. Then, it tries to find a parent, the gateway answers but it seems it isn't "heard" by the node.

      The node is 2m away from the gateway, I've tried different RFM69HW modules and different PCBs (slim node PCB).
      The node is a slimnode with internal 8MHz clock. Other nodes are working fine with the GW.

      Any idea what can be wrong?

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RPNNAS-X,FQ=8,REL=255,VER=2.3.2
      40 SGN:PER:OK
      75 SGN:INI:BND OK
      77 TSM:INIT
      79 TSF:WUR:MS=0
      81 TSM:INIT:TSP OK
      83 TSM:INIT:STATID=34
      86 TSF:SID:OK,ID=34
      88 TSM:FPAR
      90 SGN:SGN:NREQ=255
      2095 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4102 !TSM:FPAR:NO REPLY
      4104 TSM:FPAR
      4106 SGN:SGN:NREQ=255
      6109 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8116 !TSM:FPAR:NO REPLY
      8118 TSM:FPAR
      8120 SGN:SGN:NREQ=255
      10123 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      12130 !TSM:FPAR:NO REPLY
      12132 TSM:FPAR
      12134 SGN:SGN:NREQ=255
      14139 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      16146 !TSM:FPAR:FAIL
      16148 TSM:FAIL:CNT=1
      16150 TSM:FAIL:DIS
      16152 TSF:TDI:TSL
      26155 TSM:FAIL:RE-INIT
      26157 TSM:INIT
      26159 TSM:INIT:TSP OK
      26161 TSM:INIT:STATID=34
      26165 TSF:SID:OK,ID=34
      26167 TSM:FPAR
      26169 SGN:SGN:NREQ=255
      28174 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      30181 !TSM:FPAR:NO REPLY
      30183 TSM:FPAR
      30185 SGN:SGN:NREQ=255
      32190 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      34197 !TSM:FPAR:NO REPLY
      34199 TSM:FPAR
      34201 SGN:SGN:NREQ=255
      36206 ?TSF:MSG:SEND,34-34-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      38213 !TSM:FPAR:NO REPLY
      
      Dec 06 19:28:25 DEBUG TSF:MSG:READ,34-34-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 06 19:28:25 DEBUG TSF:MSG:BC
      Dec 06 19:28:25 DEBUG TSF:MSG:FPAR REQ,ID=34
      Dec 06 19:28:25 DEBUG TSF:CKU:OK,FCTRL
      Dec 06 19:28:25 DEBUG TSF:MSG:GWL OK
      Dec 06 19:28:26 DEBUG SGN:SGN:NREQ=34
      Dec 06 19:28:30 DEBUG !TSF:MSG:SEND,0-0-34-34,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      Dec 06 19:28:33 DEBUG TSF:MSG:READ,34-34-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 06 19:28:33 DEBUG TSF:MSG:BC
      Dec 06 19:28:33 DEBUG TSF:MSG:FPAR REQ,ID=34
      Dec 06 19:28:33 DEBUG TSF:CKU:OK,FCTRL
      Dec 06 19:28:33 DEBUG TSF:MSG:GWL OK
      Dec 06 19:28:34 DEBUG SGN:SGN:NREQ=34
      Dec 06 19:28:38 DEBUG !TSF:MSG:SEND,0-0-34-34,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      
      
      #define MY_DEBUG //!< Enable debug prints to serial monitor
      
      // 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 = 
      #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 34
      #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("****\n\nIncoming change for lock:");
      		Serial.print(message.getSensor());
      		Serial.print(", New status: ");
      		Serial.println(message.getBool());
          Serial.print("\n\n****\n");
      	}
      }
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • How to req actuator status?

      Hi,

      I currently have an actuator node working fine with MySensors MQTT Gateway. It is based on the Mysensors Example "SecureActuator".
      I'm able to turn on/off a LED via the commands:

      mosquitto_pub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-in/33/2/1/1/36 -m "1"
      mosquitto_pub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-in/33/2/1/1/36 -m "0"
      

      (pretty cool, also integrated with Google Home via NodeRed/NORA - I can say "Hey Google, turn on switch" and it turns on ๐Ÿ˜Š )

      Anyway, now, I want to request the status of the actuator. According to the Serial API documentation, the request string/topic should be something like 33/2/2/1/36/? where:

      33 - Node ID
      2 - Child ID
      2 - Req command
      1 - Ack required
      36 - V_LOCK_STATUS
      ? - Not sure what payload to specify in a REQ message. Putting it blank.

      This translates to the following MQTT command:

      mosquitto_pub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-in/33/2/2/1/36 -m "0"
      

      And I'm listening for the answer on mysensors-out/33/2/#:

      mosquitto_sub -h 192.168.2.180 -p 1883 -u mysensorsuser -P mysensorspassword -t mysensors-out/33/2/# -m ""
      

      I can see the node successfully receives the request and answers it, but it seems the payload goes empty:

      1551798 TSF:MSG:READ,0-0-33,s=2,c=3,t=16,pt=0,l=0,sg=1:
      1551804 SGN:SKP:MSG CMD=3,TYPE=16
      1551884 SGN:SKP:MSG CMD=3,TYPE=17
      1552144 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      1552152 SGN:NCE:XMT,TO=33
      1552211 TSF:MSG:READ,0-0-33,s=2,c=2,t=36,pt=0,l=0,sg=1:
      1552218 SGN:BND:NONCE=C00217CFDA07E9004AFB50A82FDBF9DF70694D160C143A7FFCAAAAAAAAAAAAAA
      1552338 SGN:BND:HMAC=34A3A557133449E969F16377121ECFCCDA8CDD7A86DD4A74B5B482F3A15623F7
      1552347 SGN:VER:OK
      1552349 TSF:MSG:ECHO REQ
      1552353 SGN:SKP:ECHO CMD=2,TYPE=36
      1552588 TSF:MSG:SEND,33-33-0-0,s=2,c=2,t=36,pt=0,l=0,sg=0,ft=0,st=OK:
      

      So, any idea what am I missing here?

      Cheers

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Anyone using Slimnode (RFM69) with MySensors 2.3.2?

      After much tentative-error, found a working setup.
      The drawback is that the node cannot be more that 4m away from the gateway in order to communication flow normally. Could this be bad quality RFM69's?

      I mean, isn't supposed that 433MHz range would be higher than this? I was expecting it to cross walls and so...

      The Slim node is currently powered by a USB/serial adapter (not battery) connected to the laptop so it shouldn't be a low power issue. All nrf2rfm69 modules have a bought 433MHz spiral antenna (like the picture), including the GW and I have also soldered a 10uF SMD tantalum capacitor (smd code 106A) in the back side.

      Antennas picture
      SMD capacitor picture

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: MQTT GW with RFM69 on RPi

      @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());
      	}
      }
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: MQTT GW with RFM69 on RPi

      Also happening in nodes:

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RPNNAA-X,FQ=8,REL=255,VER=2.3.2
      40 SGN:PER:OK
      69 SGN:INI:BND OK
      71 TSM:INIT
      71 TSF:WUR:MS=0
      75 TSM:INIT:TSP OK
      77 TSM:INIT:STATID=33
      79 TSF:SID:OK,ID=33
      81 TSM:FPAR
      83 SGN:SGN:NREQ=255
      90 ?TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      212 TSF:MSG:READ,0-0-33,s=255,c=3,t=8,pt=1,l=1,sg=1:0
      219 SGN:SKP:MSG CMD=3,TYPE=8
      221 TSF:MSG:FPAR OK,ID=0,D=1
      2099 TSM:FPAR:OK
      2099 TSM:ID
      2101 TSM:ID:OK
      2103 TSM:UPL
      2105 SGN:SKP:MSG CMD=3,TYPE=24
      3133 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      3811 TSF:MSG:READ,0-0-33,s=255,c=3,t=25,pt=1,l=1,sg=1:1
      3817 SGN:SKP:MSG CMD=3,TYPE=25
      3821 TSF:MSG:PONG RECV,HP=1
      3823 TSM:UPL:OK
      3825 TSM:READY:ID=33,PAR=0,DIS=1
      3829 SGN:PRE:SGN REQ
      3831 SGN:PRE:WHI NREQ
      3833 SGN:SKP:MSG CMD=3,TYPE=15
      3872 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      3880 SGN:PRE:XMT,TO=0
      3883 SGN:PRE:WAIT GW
      4837 TSF:MSG:READ,0-0-33,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      4843 SGN:SKP:MSG CMD=3,TYPE=15
      4847 SGN:PRE:SGN REQ,FROM=0
      4851 SGN:SKP:MSG CMD=3,TYPE=16
      4925 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      4933 SGN:SGN:NCE REQ,TO=0
      6141 TSF:MSG:READ,0-0-33,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      6148 SGN:SKP:MSG CMD=3,TYPE=17
      6152 SGN:NCE:FROM=0
      6154 SGN:BND:NONCE=F1D60B20DB00FF5950A64E8FFA7DEDE90956E7505DA37EF4DBAAAAAAAAAAAAAA
      6273 SGN:BND:HMAC=FC296959CE1E51BF6EB60BD781CF1C003FA4E32AF2160D0F813160CCBF1B7095
      6283 SGN:SGN:SGN
      6404 TSF:MSG:SEND,33-33-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.3.2
      6412 SGN:SKP:MSG CMD=3,TYPE=16
      7460 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      7467 !SGN:SGN:NCE REQ,TO=0 FAIL
      7471 !TSF:MSG:SIGN FAIL
      8058 TSF:MSG:READ,0-0-33,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      8065 SGN:SKP:MSG CMD=3,TYPE=17
      8069 SGN:NCE:FROM=0
      8071 SGN:BND:NONCE=DE60142AA1B91F73CB35274D2B050BB8B51D4578E9F32D75CBAAAAAAAAAAAAAA
      8189 SGN:BND:HMAC=AC6BCA42658012BFD9A118AC2F347756D6EB2B3BB5EDB9D6CEE5E5271A136ACB
      8513 TSF:MSG:READ,0-0-33,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      8519 SGN:SKP:MSG CMD=3,TYPE=17
      8523 SGN:NCE:FROM=0
      8525 SGN:BND:NONCE=DE60142AA1B91F73CB35274D2B050BB8B51D4578E9F32D75CBAAAAAAAAAAAAAA
      8644 SGN:BND:HMAC=AC6BCA42658012BFD9A118AC2F347756D6EB2B3BB5EDB9D6CEE5E5271A136ACB
      9474 SGN:SKP:MSG CMD=3,TYPE=16
      10524 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=2,st=NACK:
      10530 !SGN:SGN:NCE REQ,TO=0 FAIL
      10534 !TSF:MSG:SIGN FAIL
      10536 SGN:SKP:MSG CMD=3,TYPE=16
      11587 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=4,st=NACK:
      11593 !SGN:SGN:NCE REQ,TO=0 FAIL
      11597 !TSF:MSG:SIGN FAIL
      11599 SGN:SKP:MSG CMD=3,TYPE=16
      12650 !TSF:MSG:SEND,33-33-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=6,st=NACK:
      12656 !SGN:SGN:NCE REQ,TO=0 FAIL
      12660 !TSF:MSG:SIGN FAIL
      12662 SGN:SKP:MSG CMD=3,TYPE=16
      13713 !TSF:MSG:SEND,33-33-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=8,st=NACK:
      13719 !SGN:SGN:NCE REQ,TO=0 FAIL
      13723 !TSF:MSG:SIGN FAIL
      13725 MCO:REG:REQ
      13727 SGN:SKP:MSG CMD=3,TYPE=26
      14467 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=10,st=NACK:2
      14475 !TSM:READY:UPL FAIL,SNP
      14477 TSM:FPAR
      14479 SGN:SGN:NREQ=255
      14487 ?TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=11,st=OK:
      15235 TSF:MSG:READ,0-0-33,s=255,c=3,t=16,pt=0,l=0,sg=1:
      15241 SGN:SKP:MSG CMD=3,TYPE=16
      15321 !TSF:SND:TNR
      15323 !SGN:NCE:XMT,TO=33 FAIL
      16476 !TSF:SND:TNR
      16496 !TSM:FPAR:NO REPLY
      16498 TSM:FPAR
      16500 SGN:SGN:NREQ=255
      16508 ?TSF:MSG:SEND,33-33-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      16805 TSF:MSG:READ,0-0-33,s=255,c=3,t=8,pt=1,l=1,sg=1:0
      16812 SGN:SKP:MSG CMD=3,TYPE=8
      16816 TSF:MSG:FPAR OK,ID=0,D=1
      18479 !TSF:SND:TNR
      18518 TSM:FPAR:OK
      18520 TSM:ID
      18520 TSM:ID:OK
      18522 TSM:UPL
      18524 SGN:SKP:MSG CMD=3,TYPE=24
      19552 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      20289 TSF:MSG:READ,0-0-33,s=255,c=3,t=25,pt=1,l=1,sg=1:1
      20295 SGN:SKP:MSG CMD=3,TYPE=25
      20297 TSF:MSG:PONG RECV,HP=1
      20301 TSM:UPL:OK
      20303 TSM:READY:ID=33,PAR=0,DIS=1
      20307 SGN:PRE:SGN REQ
      20310 SGN:PRE:WHI NREQ
      20312 SGN:SKP:MSG CMD=3,TYPE=15
      20416 TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      20424 SGN:PRE:XMT,TO=0
      20426 SGN:PRE:WAIT GW
      20430 !MCO:WAI:RC=1
      20432 !MCO:PRO:RC=1
      20434 !MCO:PRO:RC=1
      20436 !MCO:PRO:RC=1
      20439 !MCO:PRO:RC=1
      20441 !MCO:PRO:RC=1
      20443 !MCO:PRO:RC=1
      20445 !MCO:PRO:RC=1
      20447 !MCO:PRO:RC=1
      20449 !MCO:PRO:RC=1
      20451 !MCO:PRO:RC=1
      20455 !MCO:PRO:RC=1
      20457 !MCO:PRO:RC=1
      20459 !MCO:PRO:RC=1
      20461 !MCO:PRO:RC=1
      20463 !MCO:PRO:RC=1
      20465 !MCO:PRO:RC=1
      20467 !MCO:PRO:RC=1
      20469 !MCO:PRO:RC=1
      20471 !MCO:PRO:RC=1
      20473 !MCO:PRO:RC=1
      20477 !MCO:PRO:RC=1
      20480 !MCO:PRO:RC=1
      20482 !MCO:PRO:RC=1
      20484 !MCO:PRO:RC=1
      20486 !MCO:PRO:RC=1
      20488 !MCO:PRO:RC=1
      20490 !MCO:PRO:RC=1
      20492 !MCO:PRO:RC=1
      20494 !MCO:PRO:RC=1
      20496 !MCO:PRO:RC=1
      20498 !MCO:PRO:RC=1
      20502 !MCO:PRO:RC=1
      20504 !MCO:PRO:RC=1
      20506 !MCO:PRO:RC=1
      20508 !MCO:PRO:RC=1
      20510 !MCO:PRO:RC=1
      20512 !MCO:PRO:RC=1
      20514 !MCO:PRO:RC=1
      20516 !MCO:PRO:RC=1
      20518 !MCO:PRO:RC=1
      20520 !MCO:PRO:RC=1
      20523 !MCO:PRO:RC=1
      20527 !MCO:PRO:RC=1
      20529 !MCO:PRO:RC=1
      20531 !MCO:PRO:RC=1
      20533 !MCO:PRO:RC=1
      20535 !MCO:PRO:RC=1
      20537 !MCO:PRO:RC=1
      20539 !MCO:PRO:RC=1
      20541 !MCO:PRO:RC=1
      20543 !MCO:PRO:RC=1
      20545 !MCO:PRO:RC=1
      20549 !MCO:PRO:RC=1
      20551 !MCO:PRO:RC=1
      20553 !MCO:PRO:RC=1
      20555 !MCO:PRO:RC=1
      20557 !MCO:PRO:RC=1
      20559 !MCO:PRO:RC=1
      20561 !MCO:PRO:RC=1
      20563 !MCO:PRO:RC=1
      20566 !MCO:PRO:RC=1
      20568 !MCO:PRO:RC=1
      20570 !MCO:PRO:RC=1
      20574 !MCO:PRO:RC=1
      20576 !MCO:PRO:RC=1
      20578 !MCO:PRO:RC=1
      20580 !MCO:PRO:RC=1
      20582 !MCO:PRO:RC=1
      20584 !MCO:PRO:RC=1
      20586 !MCO:PRO:RC=1
      20588 !MCO:PRO:RC=1
      20590 !MCO:PRO:RC=1
      20592 !MCO:PRO:RC=1
      20594 !MCO:PRO:RC=1
      20598 !MCO:PRO:RC=1
      20600 !MCO:PRO:RC=1
      20602 !MCO:PRO:RC=1
      20604 !MCO:PRO:RC=1
      20606 !MCO:PRO:RC=1
      20609 !MCO:PRO:RC=1
      20611 !MCO:PRO:RC=1
      20613 !MCO:PRO:RC=1
      20615 !MCO:PRO:RC=1
      20617 !MCO:PRO:RC=1
      20621 !MCO:PRO:RC=1
      20623 !MCO:PRO:RC=1
      20625 !MCO:PRO:RC=1
      20627 !MCO:PRO:RC=1
      20629 !MCO:PRO:RC=1
      20631 !MCO:PRO:RC=1
      20633 !MCO:PRO:RC=1
      20635 !MCO:PRO:RC=1
      20637 !MCO:PRO:RC=1
      20639 !MCO:PRO:RC=1
      20641 !MCO:PRO:RC=1
      20645 !MCO:PRO:RC=1
      20647 !MCO:PRO:RC=1
      20649 !MCO:PRO:RC=1
      20652 !MCO:PRO:RC=1
      20654 !MCO:PRO:RC=1
      20656 !MCO:PRO:RC=1
      20658 !MCO:PRO:RC=1
      20660 !MCO:PRO:RC=1
      20662 !MCO:PRO:RC=1
      20664 !MCO:PRO:RC=1
      20666 !MCO:PRO:RC=1
      20670 !MCO:PRO:RC=1
      20672 !MCO:PRO:RC=1
      20674 !MCO:PRO:RC=1
      20676 !MCO:PRO:RC=1
      20678 !MCO:PRO:RC=1
      20680 !MCO:PRO:RC=1
      20682 !MCO:PRO:RC=1
      20684 !MCO:PRO:RC=1
      20686 !MCO:PRO:RC=1
      20688 !MCO:PRO:RC=1
      20692 !MCO:PRO:RC=1
      20695 !MCO:PRO:RC=1
      20697 !MCO:PRO:RC=1
      20699 !MCO:PRO:RC=1
      20701 !MCO:PRO:RC=1
      20703 !MCO:PRO:RC=1
      20705 !MCO:PRO:RC=1
      20707 !MCO:PRO:RC=1
      20709 !MCO:PRO:RC=1
      20711 !MCO:PRO:RC=1
      20713 !MCO:PRO:RC=1
      20717 !MCO:PRO:RC=1
      20719 !MCO:PRO:RC=1
      20721 !MCO:PRO:RC=1
      20723 !MCO:PRO:RC=1
      20725 !MCO:PRO:RC=1
      20727 !MCO:PRO:RC=1
      20729 !MCO:PRO:RC=1
      20731 !MCO:PRO:RC=1
      20733 !MCO:PRO:RC=1
      20736 !MCO:PRO:RC=1
      20738 !MCO:PRO:RC=1
      20742 !MCO:PRO:RC=1
      20744 !MCO:PRO:RC=1
      20746 !MCO:PRO:RC=1
      20748 !MCO:PRO:RC=1
      20750 !MCO:PRO:RC=1
      20752 !MCO:PRO:RC=1
      20754 !MCO:PRO:RC=1
      20756 !MCO:PRO:RC=1
      20758 !MCO:PRO:RC=1
      20760 !MCO:PRO:RC=1
      20764 !MCO:PRO:RC=1
      20766 !MCO:PRO:RC=1
      20768 !MCO:PRO:RC=1
      20770 !MCO:PRO:RC=1
      20772 !MCO:PRO:RC=1
      20774 !MCO:PRO:RC=1
      20776 !MCO:PRO:RC=1
      20779 !MCO:PRO:RC=1
      20781 !MCO:PRO:RC=1
      20783 !MCO:PRO:RC=1
      20785 !MCO:PRO:RC=1
      20789 !MCO:PRO:RC=1
      20791 !MCO:PRO:RC=1
      20793 !MCO:PRO:RC=1
      20795 !MCO:PRO:RC=1
      20797 !MCO:PRO:RC=1
      20799 !MCO:PRO:RC=1
      20801 !MCO:PRO:RC=1
      20803 !MCO:PRO:RC=1
      20805 !MCO:PRO:RC=1
      20807 !MCO:PRO:RC=1
      20809 !MCO:PRO:RC=1
      20813 !MCO:PRO:RC=1
      20815 !MCO:PRO:RC=1
      20817 !MCO:PRO:RC=1
      20819 !MCO:PRO:RC=1
      20822 !MCO:PRO:RC=1
      20824 !MCO:PRO:RC=1
      20826 !MCO:PRO:RC=1
      20828 !MCO:PRO:RC=1
      20830 !MCO:PRO:RC=1
      20832 !MCO:PRO:RC=1
      20836 !MCO:PRO:RC=1
      20838 !MCO:PRO:RC=1
      20840 !MCO:PRO:RC=1
      20842 !MCO:PRO:RC=1
      20844 !MCO:PRO:RC=1
      20846 !MCO:PRO:RC=1
      20848 !MCO:PRO:RC=1
      20850 !MCO:PRO:RC=1
      20852 !MCO:PRO:RC=1
      20854 !MCO:PRO:RC=1
      20856 !MCO:PRO:RC=1
      20860 !MCO:PRO:RC=1
      20862 !MCO:PRO:RC=1
      20865 !MCO:PRO:RC=1
      20867 !MCO:PRO:RC=1
      20869 !MCO:PRO:RC=1
      20871 !MCO:PRO:RC=1
      20873 !MCO:PRO:RC=1
      20875 !MCO:PRO:RC=1
      20877 !MCO:PRO:RC=1
      20879 !MCO:PRO:RC=1
      20881 !MCO:PRO:RC=1
      20885 !MCO:PRO:RC=1
      20887 !MCO:PRO:RC=1
      20889 !MCO:PRO:RC=1
      20891 !MCO:PRO:RC=1
      20893 !MCO:PRO:RC=1
      20895 !MCO:PRO:RC=1
      20897 !MCO:PRO:RC=1
      20899 !MCO:PRO:RC=1
      20901 !MCO:PRO:RC=1
      20903 !MCO:PRO:RC=1
      20908 !MCO:PRO:RC=1
      20910 !MCO:PRO:RC=1
      20912 !MCO:PRO:RC=1
      20914 !MCO:PRO:RC=1
      20916 !MCO:PRO:RC=1
      20918 !MCO:PRO:RC=1
      20920 !MCO:PRO:RC=1
      20922 !MCO:PRO:RC=1
      20924 !MCO:PRO:RC=1
      20926 !MCO:PRO:RC=1
      20928 !MCO:PRO:RC=1
      20932 !MCO:PRO:RC=1
      20934 !MCO:PRO:RC=1
      20936 !MCO:PRO:RC=1
      20938 !MCO:PRO:RC=1
      20940 !MCO:PRO:RC=1
      20942 !MCO:PRO:RC=1
      20944 !MCO:PRO:RC=1
      20946 !MCO:PRO:RC=1
      20948 !MCO:PRO:RC=1
      20951 !MCO:PRO:RC=1
      20953 !MCO:PRO:RC=1
      20957 !MCO:PRO:RC=1
      20959 !MCO:PRO:RC=1
      20961 !MCO:PRO:RC=1
      20963 !MCO:PRO:RC=1
      20965 !MCO:PRO:RC=1
      20967 !MCO:PRO:RC=1
      20969 !MCO:PRO:RC=1
      20971 !MCO:PRO:RC=1
      20973 !MCO:PRO:RC=1
      20975 !MCO:PRO:RC=1
      20979 !MCO:PRO:RC=1
      20981 !MCO:PRO:RC=1
      20983 !MCO:PRO:RC=1
      20985 !MCO:PRO:RC=1
      20987 !MCO:PRO:RC=1
      20989 !MCO:PRO:RC=1
      20992 !MCO:PRO:RC=1
      20994 !MCO:PRO:RC=1
      20996 !MCO:PRO:RC=1
      20998 !MCO:PRO:RC=1
      21000 !MCO:PRO:RC=1
      21004 !MCO:PRO:RC=1
      21006 !MCO:PRO:RC=1
      21008 !MCO:PRO:RC=1
      21010 !MCO:PRO:RC=1
      21012 !MCO:PRO:RC=1
      21014 !MCO:PRO:RC=1
      21016 !MCO:PRO:RC=1
      21018 !MCO:PRO:RC=1
      21020 !MCO:PRO:RC=1
      21022 !MCO:PRO:RC=1
      21024 !MCO:PRO:RC=1
      21028 !MCO:PRO:RC=1
      21030 !MCO:PRO:RC=1
      21032 !MCO:PRO:RC=1
      21035 !MCO:PRO:RC=1
      21037 !MCO:PRO:RC=1
      21039 !MCO:PRO:RC=1
      21041 !MCO:PRO:RC=1
      21043 !MCO:PRO:RC=1
      21045 !MCO:PRO:RC=1
      21047 !MCO:PRO:RC=1
      21051 !MCO:PRO:RC=1
      21053 !MCO:PRO:RC=1
      21055 !MCO:PRO:RC=1
      21057 !MCO:PRO:RC=1
      21059 !MCO:PRO:RC=1
      21061 !MCO:PRO:RC=1
      21063 !MCO:PRO:RC=1
      21065 !MCO:PRO:RC=1
      21067 !MCO:PRO:RC=1
      21069 !MCO:PRO:RC=1
      21071 !MCO:PRO:RC=1
      21075 !MCO:PRO:RC=1
      21078 !MCO:PRO:RC=1
      21080 !MCO:PRO:RC=1
      21082 !MCO:PRO:RC=1
      21084 !MCO:PRO:RC=1
      21086 !MCO:PRO:RC=1
      21088 !MCO:PRO:RC=1
      21090 !MCO:PRO:RC=1
      21092 !MCO:PRO:RC=1
      21094 !MCO:PRO:RC=1
      21096 !MCO:PRO:RC=1
      21100 !MCO:PRO:RC=1
      21102 !MCO:PRO:RC=1
      21104 !MCO:PRO:RC=1
      21106 !MCO:PRO:RC=1
      21108 !MCO:PRO:RC=1
      21110 !MCO:PRO:RC=1
      21112 !MCO:PRO:RC=1
      21114 !MCO:PRO:RC=1
      21116 !MCO:PRO:RC=1
      21118 !MCO:PRO:RC=1
      21123 !MCO:PRO:RC=1
      21125 !MCO:PRO:RC=1
      21127 !MCO:PRO:RC=1
      21129 !MCO:PRO:RC=1
      21131 !MCO:PRO:RC=1
      21133 !MCO:PRO:RC=1
      21135 !MCO:PRO:RC=1
      21137 !MCO:PRO:RC=1
      21139 !MCO:PRO:RC=1
      21141 !MCO:PRO:RC=1
      21143 !MCO:PRO:RC=1
      21147 !MCO:PRO:RC=1
      21149 !MCO:PRO:RC=1
      21151 !MCO:PRO:RC=1
      21153 !SGN:BND:TMR
      21161 TSF:MSG:READ,0-0-33,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      21168 SGN:SKP:MSG CMD=3,TYPE=15
      21170 SGN:PRE:SGN REQ,FROM=0
      21174 SGN:SKP:MSG CMD=3,TYPE=16
      22130 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      22136 !SGN:SGN:NCE REQ,TO=0 FAIL
      22140 !TSF:MSG:SIGN FAIL
      22142 SGN:SKP:MSG CMD=3,TYPE=16
      23193 !TSF:MSG:SEND,33-33-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=2,st=NACK:
      23199 !SGN:SGN:NCE REQ,TO=0 FAIL
      23203 !TSF:MSG:SIGN FAIL
      23205 !MCO:WAI:RC=1
      23207 !MCO:PRO:RC=1
      23212 !MCO:PRO:RC=1
      23214 !MCO:PRO:RC=1
      23216 !MCO:PRO:RC=1
      23218 !MCO:PRO:RC=1
      23220 !MCO:PRO:RC=1
      23222 !MCO:PRO:RC=1
      23224 !MCO:PRO:RC=1
      23226 !MCO:PRO:RC=1
      23228 !MCO:PRO:RC=1
      23230 !MCO:PRO:RC=1
      23234 !MCO:PRO:RC=1
      23236 !MCO:PRO:RC=1
      23238 !MCO:PRO:RC=1
      23240 !MCO:PRO:RC=1
      23242 !MCO:PRO:RC=1
      23244 !MCO:PRO:RC=1
      23246 !MCO:PRO:RC=1
      23248 !MCO:PRO:RC=1
      23250 !MCO:PRO:RC=1
      23252 !MCO:PRO:RC=1
      23255 !MCO:PRO:RC=1
      23259 !MCO:PRO:RC=1
      23261 !MCO:PRO:RC=1
      23263 !MCO:PRO:RC=1
      23265 !MCO:PRO:RC=1
      23267 !MCO:PRO:RC=1
      23269 !MCO:PRO:RC=1
      23271 !MCO:PRO:RC=1
      23273 !MCO:PRO:RC=1
      23275 !MCO:PRO:RC=1
      23277 !MCO:PRO:RC=1
      23279 !MCO:PRO:RC=1
      23283 !MCO:PRO:RC=1
      23285 !MCO:PRO:RC=1
      23287 !MCO:PRO:RC=1
      23289 !MCO:PRO:RC=1
      23291 !MCO:PRO:RC=1
      23293 !MCO:PRO:RC=1
      23296 !MCO:PRO:RC=1
      23298 !MCO:PRO:RC=1
      23300 !MCO:PRO:RC=1
      23302 !MCO:PRO:RC=1
      23306 !MCO:PRO:RC=1
      23308 !MCO:PRO:RC=1
      23310 !MCO:PRO:RC=1
      23312 !MCO:PRO:RC=1
      23314 !MCO:PRO:RC=1
      23316 !MCO:PRO:RC=1
      23318 !MCO:PRO:RC=1
      23320 !MCO:PRO:RC=1
      23322 !MCO:PRO:RC=1
      23324 !MCO:PRO:RC=1
      23326 !MCO:PRO:RC=1
      23330 !MCO:PRO:RC=1
      23332 !MCO:PRO:RC=1
      23334 !MCO:PRO:RC=1
      23336 !MCO:PRO:RC=1
      23339 !MCO:PRO:RC=1
      23341 !MCO:PRO:RC=1
      23343 !MCO:PRO:RC=1
      23345 !MCO:PRO:RC=1
      23347 !MCO:PRO:RC=1
      23349 !MCO:PRO:RC=1
      23353 !MCO:PRO:RC=1
      23355 !MCO:PRO:RC=1
      23357 !MCO:PRO:RC=1
      23359 !MCO:PRO:RC=1
      23361 !MCO:PRO:RC=1
      23363 !MCO:PRO:RC=1
      23365 !MCO:PRO:RC=1
      23367 !MCO:PRO:RC=1
      23369 !MCO:PRO:RC=1
      23371 !MCO:PRO:RC=1
      23373 !MCO:PRO:RC=1
      23377 !MCO:PRO:RC=1
      23379 !MCO:PRO:RC=1
      23382 !MCO:PRO:RC=1
      23384 !MCO:PRO:RC=1
      23386 !MCO:PRO:RC=1
      23388 !MCO:PRO:RC=1
      23390 !MCO:PRO:RC=1
      23392 !MCO:PRO:RC=1
      23394 !MCO:PRO:RC=1
      23396 !MCO:PRO:RC=1
      23398 !MCO:PRO:RC=1
      23402 !MCO:PRO:RC=1
      23404 !MCO:PRO:RC=1
      23406 !MCO:PRO:RC=1
      23408 !MCO:PRO:RC=1
      23410 !MCO:PRO:RC=1
      23412 !MCO:PRO:RC=1
      23414 !MCO:PRO:RC=1
      23416 !MCO:PRO:RC=1
      23418 !MCO:PRO:RC=1
      23420 !MCO:PRO:RC=1
      23425 !MCO:PRO:RC=1
      23427 !MCO:PRO:RC=1
      23429 !MCO:PRO:RC=1
      23431 !MCO:PRO:RC=1
      23433 !MCO:PRO:RC=1
      23435 !MCO:PRO:RC=1
      23437 !MCO:PRO:RC=1
      23439 !MCO:PRO:RC=1
      23441 !MCO:PRO:RC=1
      23443 !MCO:PRO:RC=1
      23445 !MCO:PRO:RC=1
      23449 !MCO:PRO:RC=1
      23451 !MCO:PRO:RC=1
      23453 !MCO:PRO:RC=1
      23455 !MCO:PRO:RC=1
      23457 !MCO:PRO:RC=1
      23459 !MCO:PRO:RC=1
      23461 !MCO:PRO:RC=1
      23463 !MCO:PRO:RC=1
      23465 !MCO:PRO:RC=1
      23468 !MCO:PRO:RC=1
      23470 !MCO:PRO:RC=1
      23474 !MCO:PRO:RC=1
      23476 !MCO:PRO:RC=1
      23478 !MCO:PRO:RC=1
      23480 !MCO:PRO:RC=1
      23482 !MCO:PRO:RC=1
      23484 !MCO:PRO:RC=1
      23486 !MCO:PRO:RC=1
      23488 !MCO:PRO:RC=1
      23490 !MCO:PRO:RC=1
      23492 !MCO:PRO:RC=1
      23496 !MCO:PRO:RC=1
      23498 !MCO:PRO:RC=1
      23500 !MCO:PRO:RC=1
      23502 !MCO:PRO:RC=1
      23504 !MCO:PRO:RC=1
      23506 !MCO:PRO:RC=1
      23508 !MCO:PRO:RC=1
      23511 !MCO:PRO:RC=1
      23513 !MCO:PRO:RC=1
      23517 !MCO:PRO:RC=1
      23519 !MCO:PRO:RC=1
      23521 !MCO:PRO:RC=1
      23523 !MCO:PRO:RC=1
      23525 !MCO:PRO:RC=1
      23527 !MCO:PRO:RC=1
      23529 !MCO:PRO:RC=1
      23531 !MCO:PRO:RC=1
      23533 !MCO:PRO:RC=1
      23535 !MCO:PRO:RC=1
      23537 !MCO:PRO:RC=1
      23541 !MCO:PRO:RC=1
      23543 !MCO:PRO:RC=1
      23545 !MCO:PRO:RC=1
      23547 !MCO:PRO:RC=1
      23549 !MCO:PRO:RC=1
      23552 !MCO:PRO:RC=1
      23554 !MCO:PRO:RC=1
      23556 !MCO:PRO:RC=1
      23558 !MCO:PRO:RC=1
      23560 !MCO:PRO:RC=1
      23564 !MCO:PRO:RC=1
      23566 !MCO:PRO:RC=1
      23568 !MCO:PRO:RC=1
      23570 !MCO:PRO:RC=1
      23572 !MCO:PRO:RC=1
      23574 !MCO:PRO:RC=1
      23576 !MCO:PRO:RC=1
      23578 !MCO:PRO:RC=1
      23580 !MCO:PRO:RC=1
      23582 !MCO:PRO:RC=1
      23584 !MCO:PRO:RC=1
      23588 !MCO:PRO:RC=1
      23590 !MCO:PRO:RC=1
      23592 !MCO:PRO:RC=1
      23595 !MCO:PRO:RC=1
      23597 !MCO:PRO:RC=1
      23599 !MCO:PRO:RC=1
      23601 !MCO:PRO:RC=1
      23603 !MCO:PRO:RC=1
      23605 !MCO:PRO:RC=1
      23607 !MCO:PRO:RC=1
      23611 !MCO:PRO:RC=1
      23613 !MCO:PRO:RC=1
      23615 !MCO:PRO:RC=1
      23617 !MCO:PRO:RC=1
      23619 !MCO:PRO:RC=1
      23621 !MCO:PRO:RC=1
      23623 !MCO:PRO:RC=1
      23625 !MCO:PRO:RC=1
      23627 !MCO:PRO:RC=1
      23629 !MCO:PRO:RC=1
      23631 !MCO:PRO:RC=1
      23635 !MCO:PRO:RC=1
      23638 !MCO:PRO:RC=1
      23640 !MCO:PRO:RC=1
      23642 !MCO:PRO:RC=1
      23644 !MCO:PRO:RC=1
      23646 !MCO:PRO:RC=1
      23648 !MCO:PRO:RC=1
      23650 !MCO:PRO:RC=1
      23652 !MCO:PRO:RC=1
      23654 !MCO:PRO:RC=1
      23656 !MCO:PRO:RC=1
      23660 !MCO:PRO:RC=1
      23662 !MCO:PRO:RC=1
      23664 !MCO:PRO:RC=1
      23666 !MCO:PRO:RC=1
      23668 !MCO:PRO:RC=1
      23670 !MCO:PRO:RC=1
      23672 !MCO:PRO:RC=1
      23674 !MCO:PRO:RC=1
      23676 !MCO:PRO:RC=1
      23678 !MCO:PRO:RC=1
      23683 !MCO:PRO:RC=1
      23685 !MCO:PRO:RC=1
      23687 !MCO:PRO:RC=1
      23689 !MCO:PRO:RC=1
      23691 !MCO:PRO:RC=1
      23693 !MCO:PRO:RC=1
      23695 !MCO:PRO:RC=1
      23697 !MCO:PRO:RC=1
      23699 !MCO:PRO:RC=1
      23701 !MCO:PRO:RC=1
      23703 !MCO:PRO:RC=1
      23707 !MCO:PRO:RC=1
      23709 !MCO:PRO:RC=1
      23711 !MCO:PRO:RC=1
      23713 !MCO:PRO:RC=1
      23715 !MCO:PRO:RC=1
      23717 !MCO:PRO:RC=1
      23719 !MCO:PRO:RC=1
      23721 !MCO:PRO:RC=1
      23724 !MCO:PRO:RC=1
      23726 !MCO:PRO:RC=1
      23730 !MCO:PRO:RC=1
      23732 !MCO:PRO:RC=1
      23734 !MCO:PRO:RC=1
      23736 !MCO:PRO:RC=1
      23738 !MCO:PRO:RC=1
      23740 !MCO:PRO:RC=1
      23742 !MCO:PRO:RC=1
      23744 !MCO:PRO:RC=1
      23746 !MCO:PRO:RC=1
      23748 !MCO:PRO:RC=1
      23750 !MCO:PRO:RC=1
      23754 !MCO:PRO:RC=1
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Anyone using Slimnode (RFM69) with MySensors 2.3.2?

      Indeed, this doesn't seem to be RAM related. It's a simple sketch that does nothing but presenting himself.

      RAM usage is 52%.

      Sketch uses 21402 bytes (66%) of program storage space. Maximum is 32256 bytes.
      Global variables use 1068 bytes (52%) of dynamic memory, leaving 980 bytes for local variables. Maximum is 2048 bytes.
      

      My issue here is that this is such a simple setup and somehow is failing.
      The bootloader was re burned fresh, the SHA024 is now well personalized, the RFM69's are soldered into the nrf2rfm69 modules (and I've tried 3 different so far), and the sketch is really basic. What am I missing here? ๐Ÿ™„

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Anyone using Slimnode (RFM69) with MySensors 2.3.2?

      Hi,

      Thanks for getting back.

      I didn't think it was related with signing. Before signing, I believe the node needs to ask for a parent, receive an answer and then starts the signing negotiations. In the logs there is no answer what so ever, so I suspect it is more radio (and maybe timing) related.

      Nevertheless, I've re-personalized a node so we can take that signing "tampered" out of the way.
      The signing startup is now fine, but the problem remains. Nothing is received.

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RPNNAA-X,FQ=8,REL=255,VER=2.3.2
      40 SGN:PER:OK
      69 SGN:INI:BND OK
      71 TSM:INIT
      71 TSF:WUR:MS=0
      75 TSM:INIT:TSP OK
      77 TSM:INIT:STATID=99
      79 TSF:SID:OK,ID=99
      81 TSM:FPAR
      83 SGN:SGN:NREQ=255
      108 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2117 !TSM:FPAR:NO REPLY
      2119 TSM:FPAR
      2121 SGN:SGN:NREQ=255
      2158 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4167 !TSM:FPAR:NO REPLY
      4169 TSM:FPAR
      4171 SGN:SGN:NREQ=255
      4179 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      6187 !TSM:FPAR:NO REPLY
      6189 TSM:FPAR
      6191 SGN:SGN:NREQ=255
      6197 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8206 !TSM:FPAR:FAIL
      8208 TSM:FAIL:CNT=1
      8210 TSM:FAIL:DIS
      8212 TSF:TDI:TSL
      18214 TSM:FAIL:RE-INIT
      18216 TSM:INIT
      18219 TSM:INIT:TSP OK
      18223 TSM:INIT:STATID=99
      18225 TSF:SID:OK,ID=99
      18227 TSM:FPAR
      18229 SGN:SGN:NREQ=255
      18241 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      20250 !TSM:FPAR:NO REPLY
      20252 TSM:FPAR
      20254 SGN:SGN:NREQ=255
      

      Since there is a warning from the creator that "There have been reported issues with MySensors 2.x freezing on SlimNodes running at 1MHz, which I've confirmed. Recommended solution when using MyS 2.x, is to use 8MHz (internal) instead." I'm using the 8MHz internal clock.

      And the MiniCore page has the following comment for 8MHz frequency: "You might experience upload issues when using the internal oscillator. It's factory calibrated but may be a little "off" depending on the calibration, ambient temperature and operating voltage." Not sure if this would also affect RFM69.

      Any idea?

      posted in Troubleshooting
      joaoabs
      joaoabs
    • Anyone using Slimnode (RFM69) with MySensors 2.3.2?

      Hi,

      I'm re-using some slim nodes I had laying around, but I'm not being able to make them "talk" with the MySensorsGW.
      I've re-burned the MiniCore bootloader to load and test successfully basic arduino sketches, but when it comes to MySensors communication it seems it's not working. Tried several slimnode boards and several RFM69 modules.

      Steps I've made:

      1. Install MiniCore bootlader with USBasp. Installed it as explained here.
        Parameters:

        Board: ATMega328
        Variant: 328p / 328pa
        Bootloader: Yes (UART0)
        EEPROM: EEPROM not retained
        BOD: BOD Disabled
        Clock: Internal 8MHz
        CompilerLTO: LTO Enabled

      avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"
      
               Using Port                    : usb
               Using Programmer              : usbasp
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : usbasp
               Description     : USBasp, http://www.fischl.de/usbasp/
      
      avrdude: auto set sck period (because given equals null)
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.01s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: erasing chip
      avrdude: auto set sck period (because given equals null)
      avrdude: reading input file "0x3f"
      avrdude: writing lock (1 bytes):
      
      C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\hardware\tools\avr/bin/avrdude -CC:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf -v -patmega328p -cusbasp -Pusb -Uflash:w:C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:i -Ulock:w:0x0f:m 
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x3f:
      avrdude: load data lock data from input file 0x3f:
      avrdude: input file 0x3f contains 1 bytes
      avrdude: reading on-chip lock data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lock verified
      avrdude: reading input file "0b11111111"
      avrdude: writing efuse (1 bytes):
      
      Writing | ################################################## | 100% 0.01s
      
      avrdude: 1 bytes of efuse written
      avrdude: verifying efuse memory against 0b11111111:
      avrdude: load data efuse data from input file 0b11111111:
      avrdude: input file 0b11111111 contains 1 bytes
      avrdude: reading on-chip efuse data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of efuse verified
      avrdude: reading input file "0b11011110"
      avrdude: writing hfuse (1 bytes):
      
      Writing | ################################################## | 100% 0.02s
      
      avrdude: 1 bytes of hfuse written
      avrdude: verifying hfuse memory against 0b11011110:
      avrdude: load data hfuse data from input file 0b11011110:
      avrdude: input file 0b11011110 contains 1 bytes
      avrdude: reading on-chip hfuse data:
      
      Reading | ################################################## | 100% 0.01s
      
      avrdude: verifying ...
      avrdude: 1 bytes of hfuse verified
      avrdude: reading input file "0xe2"
      avrdude: writing lfuse (1 bytes):
      
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 1 bytes of lfuse written
      avrdude: verifying lfuse memory against 0xe2:
      avrdude: load data lfuse data from input file 0xe2:
      avrdude: input file 0xe2 contains 1 bytes
      avrdude: reading on-chip lfuse data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lfuse verified
      
      avrdude done.  Thank you.
      
      
      avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"
      
               Using Port                    : usb
               Using Programmer              : usbasp
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : usbasp
               Description     : USBasp, http://www.fischl.de/usbasp/
      
      avrdude: auto set sck period (because given equals null)
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.01s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
               To disable this feature, specify the -D option.
      avrdude: erasing chip
      avrdude: auto set sck period (because given equals null)
      avrdude: reading input file "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex"
      avrdude: writing flash (32768 bytes):
      
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 32768 bytes of flash written
      avrdude: verifying flash memory against C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
      avrdude: load data flash data from input file C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex:
      avrdude: input file C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/bootloaders/optiboot_flash/bootloaders/atmega328p/8000000L/optiboot_flash_atmega328p_UART0_38400_8000000L_B5.hex contains 32768 bytes
      avrdude: reading on-chip flash data:
      
      Reading | ################################################## | 100% -0.00s
      
      avrdude: verifying ...
      avrdude: 32768 bytes of flash verified
      avrdude: reading input file "0x0f"
      avrdude: writing lock (1 bytes):
      
      Writing | ################################################## | 100% 0.02s
      
      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x0f:
      avrdude: load data lock data from input file 0x0f:
      avrdude: input file 0x0f contains 1 bytes
      avrdude: reading on-chip lock data:
      
      Reading | ################################################## | 100% 0.01s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lock verified
      
      avrdude done.  Thank you.
      
      1. Upload the ASCII example sketch with the AVRISP MKII programmer.
        The objective is to test if the bootloader was successfully installed and if the UART is working fine. I can see the ASCII chars in Serial monitor, so I assume everything is OK.
      avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "C:\Users\sepjsil\Google Drive\Skynet v2.3.2\arduino-1.8.0 (with APIM)\portable\packages\MiniCore\hardware\avr\2.0.8/avrdude.conf"
      
               Using Port                    : COM5
               Using Programmer              : arduino
               Overriding Baud Rate          : 38400
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : Arduino
               Description     : Arduino
               Hardware Version: 3
               Firmware Version: 8.0
               Vtarget         : 0.3 V
               Varef           : 0.3 V
               Oscillator      : 28.800 kHz
               SCK period      : 3.3 us
      
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: reading input file "C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex"
      avrdude: writing flash (1876 bytes):
      
      Writing | ################################################## | 100% 0.72s
      
      avrdude: 1876 bytes of flash written
      avrdude: verifying flash memory against C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex:
      avrdude: load data flash data from input file C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex:
      avrdude: input file C:\Users\sepjsil\AppData\Local\Temp\arduino_build_486510/ASCIITable.ino.hex contains 1876 bytes
      avrdude: reading on-chip flash data:
      
      Reading | ################################################## | 100% 0.60s
      
      avrdude: verifying ...
      avrdude: 1876 bytes of flash verified
      
      avrdude done.  Thank you.
      
      1. Load a simple MySensors test sketch to the node:
      // Encryption & Signing stuff - Testado e a funcionar
      #define MY_DEBUG
      #define MY_DEBUG_VERBOSE_SIGNING
      //#define MY_SIGNING_SOFT
      #define MY_SIGNING_ATSHA204
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      #ifndef MY_SIGNING_ATSHA204_PIN
      #define MY_SIGNING_ATSHA204_PIN 17  // D17=A3
      #endif
      #define MY_RADIO_RFM69  // Define for using RFM69 radio
      #define MY_RFM69_FREQUENCY RFM69_433MHZ 
      #define MY_RFM69_NEW_DRIVER
      #define MY_IS_RFM69HW  
      #define MY_RFM69_ENABLE_ENCRYPTION
      //#define MY_DEBUG_VERBOSE_RFM69
      
      #define MY_NODE_ID 99
      
      #include <MySensors.h>
      
      #define CHILD_ID_TEM 20 // Id of the sensor child for temperature (SHT21)
      #define CHILD_ID_DEW 21 // Id of the sensor child for dew point (SHT21)
      #define CHILD_ID_HUM 40 // Id of the sensor child for Humidity (SHT21)
      
      // Source of state change (used when printing debug information)
      #define CHANGE_STATE_SOURCE_RADIO 0
      #define CHANGE_STATE_SOURCE_SWITCH 1
      
      MyMessage msg_TEM(CHILD_ID_TEM, V_TEMP);
      MyMessage msg_HUM(CHILD_ID_HUM, V_HUM);
      MyMessage msg_DEW(CHILD_ID_DEW, V_TEMP);
      
      void presentation() {
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("TEST_SLIMNODE", "V1.1");
        // Register all sensors to gw (they will be created as child devices)
        present(CHILD_ID_TEM, S_TEMP);
        present(CHILD_ID_HUM, S_HUM);
        present(CHILD_ID_DEW, S_TEMP);
      
      #ifdef MY_DEBUG
      Serial.println("finished presentation");
      #endif
      }
      
      void setup()
      {
      //#ifdef MY_DEBUG
      Serial.println("finished setup ");
      //#endif
      }
      
      

      No answers from GW:

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RPNNAA-X,FQ=8,REL=255,VER=2.3.2
      40 !SGN:PER:TAMPERED
      143 !SGN:BND:INIT FAIL
      147 !SGN:INI:BND FAIL
      149 TSM:INIT
      149 TSF:WUR:MS=0
      153 TSM:INIT:TSP OK
      155 TSM:INIT:STATID=99
      157 TSF:SID:OK,ID=99
      159 TSM:FPAR
      161 SGN:SGN:NREQ=255
      2199 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4206 !TSM:FPAR:NO REPLY
      4208 TSM:FPAR
      4210 SGN:SGN:NREQ=255
      6258 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8265 !TSM:FPAR:NO REPLY
      8267 TSM:FPAR
      8269 SGN:SGN:NREQ=255
      10295 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      12302 !TSM:FPAR:NO REPLY
      12304 TSM:FPAR
      12306 SGN:SGN:NREQ=255
      14348 ?TSF:MSG:SEND,99-99-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      16355 !TSM:FPAR:FAIL
      16357 TSM:FAIL:CNT=1
      16359 TSM:FAIL:DIS
      16361 TSF:TDI:TSL
      

      Might be related with the 8MHz internal clock? What am I missing here? The RFM69's are soldered to the nrf2rfm69 modules, so I'm attaching it as a NRF24 would...
      Any idea?
      Thanks,

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Is MySensors RPI GW 32bit only?

      So I managed to successfully run MySensorsGW in a RPI4 with 64bit OS, based on the theoretical premise that a 32bit binary can run in a 64bit system.

      My project idea is to have a central device running my house automation. For that, I use and RPI4 4GB with IoT stack witch is a set of docker images each one with a specific function. This way, I'll be running MQTT Mosquito, NodeRed, zigbee2MQTT, inFluxDB and Graphana, each one in its own docker container. IoT stack also includes other images like transmission torrent, nextcloud, PiHole, etc. I might also use some of it later on.
      Anyway, all of this requires a lot of effort from the little RPI4 so it is important to be able to use all of its resources. Using a 64bit OS is one way to have a more performant system and to be able to address all the RAM (4GB in my case).

      So, having mysgw in this RPI was crucial to maintain a small footprint. It would be great to have the MySensors GW as a docker container as well, but for now this workaround would have to sufice.

      Compiling mswg in RPI 64bit OS is not working (as per the above), but compiling it in a 32bit RPI OS and then copying a couple of files to the RPI 64bit OS it works, at least in my case. My msgw is configured as a MQTT GW, so if yours is different, your millenage may vary.

      ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.2.180 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=MySensorsGW --my-transport=rfm69 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433 --my-is-rfm69hw --my-signing-debug --my-rfm69-encryption-enabled --my-mqtt-user=mysensorsuser --my-mqtt-password=mysensorspassword
      

      (Now I can change the --my-controller-ip-address to 127.0.0.1. This way, if for some reason I want to change the controller IP address, I'll not need to re-compile)

      Anyway, so the process is basically compiling everything in the 32bit RPI OS, (configure, make, sudo make install), configure the /etc/sensors.conf accordingly and then coping these files to the same path in the 64bit RPI OS:

      /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
      /etc/mysensors.conf
      /etc/systemd/system/mysgw.service
      /usr/local/bin/mysgw 
      

      Run it as normal:

      sudo systemctl start mysgw.service
      

      Enjoy ๐Ÿ™‚

      Dec 04 12:34:57 INFO  Starting gateway...
      Dec 04 12:34:57 INFO  Protocol version - 2.3.2
      Dec 04 12:34:57 DEBUG MCO:BGN:INIT GW,CP=RPNGLS-X,FQ=NA,REL=255,VER=2.3.2
      Dec 04 12:34:57 DEBUG SGN:PER:OK
      Dec 04 12:34:57 DEBUG SGN:INI:BND OK
      Dec 04 12:34:57 DEBUG TSF:LRT:OK
      Dec 04 12:34:57 DEBUG TSM:INIT
      Dec 04 12:34:57 DEBUG TSF:WUR:MS=0
      Dec 04 12:34:57 DEBUG TSM:INIT:TSP OK
      Dec 04 12:34:57 DEBUG TSM:INIT:GW MODE
      Dec 04 12:34:57 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
      Dec 04 12:34:57 DEBUG MCO:REG:NOT NEEDED
      Dec 04 12:34:57 DEBUG MCO:BGN:STP
      Dec 04 12:34:57 DEBUG MCO:BGN:INIT OK,TSP=1
      Dec 04 12:34:57 DEBUG GWT:RMQ:CONNECTING...
      Dec 04 12:34:57 DEBUG connected to 192.168.2.180
      Dec 04 12:34:57 DEBUG GWT:RMQ:OK
      Dec 04 12:34:57 DEBUG GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
      Dec 04 12:34:57 DEBUG TSM:READY:NWD REQ
      Dec 04 12:34:57 DEBUG SGN:SGN:NREQ=255
      Dec 04 12:34:57 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      Dec 04 12:44:37 DEBUG TSF:MSG:READ,80-80-255,s=255,c=3,t=7,pt=0,l=0,sg=1:
      Dec 04 12:44:37 DEBUG TSF:MSG:BC
      Dec 04 12:44:37 DEBUG TSF:MSG:FPAR REQ,ID=80
      Dec 04 12:44:37 DEBUG TSF:PNG:SEND,TO=0
      Dec 04 12:44:37 DEBUG TSF:CKU:OK
      Dec 04 12:44:37 DEBUG TSF:MSG:GWL OK
      Dec 04 12:44:37 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 04 12:44:38 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      Dec 04 12:44:41 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=24,pt=1,l=1,sg=1:1
      Dec 04 12:44:41 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
      Dec 04 12:44:41 DEBUG TSF:MSG:PINGED,ID=80,HP=1
      Dec 04 12:44:41 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
      Dec 04 12:44:41 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      Dec 04 12:45:40 DEBUG TSF:MSG:READ,80-80-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 04 12:45:40 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 04 12:45:40 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 04 12:45:41 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 04 12:45:41 DEBUG SGN:NCE:XMT,TO=0
      Dec 04 12:45:41 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
      Dec 04 12:45:41 DEBUG SGN:BND:NONCE=607CD378A13D593F9957DAC6077B64FEDC18063A8A3FC7EA50AAAAAAAAAAAAAA
      Dec 04 12:45:41 DEBUG SGN:BND:HMAC=F0DA2FBCD8AED09526D29E9C6AF7873076303A8E6F6F0FAB258BE29031DA29EB
      Dec 04 12:45:41 DEBUG SGN:VER:OK
      Dec 04 12:45:41 DEBUG GWT:TPS:TOPIC=mysensors-out/80/20/1/0/0,MSG SENT
      Dec 04 12:45:42 DEBUG TSF:MSG:READ,80-80-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Dec 04 12:45:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 04 12:45:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 04 12:45:42 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 04 12:45:42 DEBUG SGN:NCE:XMT,TO=0
      Dec 04 12:45:43 DEBUG TSF:MSG:READ,80-80-0,s=40,c=1,t=1,pt=7,l=5,sg=1:64.0
      Dec 04 12:45:43 DEBUG SGN:BND:NONCE=AB465A4A24BDDF89CC30C3F30F4F4B519ECDDC2843FF725874AAAAAAAAAAAAAA
      Dec 04 12:45:43 DEBUG SGN:BND:HMAC=62C90515061BA556B4CF4F7ECB3FE224E54BE1ED8A2522AB8E8A1FA192B738C4
      Dec 04 12:45:43 DEBUG SGN:VER:OK
      Dec 04 12:45:43 DEBUG GWT:TPS:TOPIC=mysensors-out/80/40/1/0/1,MSG SENT
      
      pi@raspberrypi:~/MySensors $ uname -a
      Linux raspberrypi 5.4.79-v8+ #1373 SMP PREEMPT Mon Nov 23 13:32:41 GMT 2020 aarch64 GNU/Linux
      

      Cheers

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: RFM69(HW) 433Mhz interference with other home devices?

      Well,

      After removing some counters cycles on a node, I can state I have the MySensors GW working non-stop for 24h now with 2 nodes without any noticeable issue. Both nodes are using Encryption and Signing.
      The nodes are simply reporting temperature and Humidity every minute or so. Will try now the behavior with actuator nodes (relay).

      In the log I can see it isn't perfect yet. There are quite a few signing failures. The node #80 is 6 meters away from the gateway with line-of-sight, which concerns me a bit because when I place the nodes in the final locations, I'm sure the radio path will not be better than this. I'm assuming that the signing is failing due to radio issues - I might be wrong.

      Dec 03 17:46:12 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
      Dec 03 17:46:12 DEBUG SGN:BND:NONCE=326B170BBDFD3CE66C91DE485E2C465D98434C6917C4D7269DAAAAAAAAAAAAAA
      Dec 03 17:46:12 DEBUG SGN:BND:HMAC=602409810E55FA10445022FEECCB08697878B9F0FD1652B9303FF9D543B240FD
      Dec 03 17:46:12 DEBUG SGN:VER:OK
      Dec 03 17:46:12 DEBUG GWT:TPS:TOPIC=mysensors-out/80/20/1/0/0,MSG SENT
      Dec 03 17:46:13 DEBUG TSF:MSG:READ,80-80-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Dec 03 17:46:13 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 03 17:46:13 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 03 17:46:13 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 03 17:46:13 DEBUG SGN:NCE:XMT,TO=0
      Dec 03 17:46:13 DEBUG TSF:MSG:READ,80-80-0,s=40,c=1,t=1,pt=7,l=5,sg=1:63.0
      Dec 03 17:46:13 DEBUG SGN:BND:NONCE=854FF116C7AA8566A8176AAA1A319BE95D90D8417AA92EDB3EAAAAAAAAAAAAAA
      Dec 03 17:46:13 DEBUG SGN:BND:HMAC=C54BAC9E3FE050E9170CEE17AB23836A98EA270ADFC089A4523E27610D587E88
      Dec 03 17:46:13 DEBUG SGN:VER:OK
      Dec 03 17:46:13 DEBUG GWT:TPS:TOPIC=mysensors-out/80/40/1/0/1,MSG SENT
      Dec 03 17:46:14 DEBUG TSF:MSG:READ,80-80-0,s=21,c=3,t=16,pt=0,l=0,sg=1:
      Dec 03 17:46:14 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 03 17:46:14 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 03 17:46:14 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 03 17:46:14 DEBUG SGN:NCE:XMT,TO=0
      Dec 03 17:46:14 DEBUG TSF:MSG:READ,80-80-0,s=21,c=1,t=0,pt=7,l=5,sg=1:8.0
      Dec 03 17:46:14 DEBUG SGN:BND:NONCE=BA1DABAF567A20CEABF5CFC35D638E7A1A3E5CF94204D96935AAAAAAAAAAAAAA
      Dec 03 17:46:14 DEBUG SGN:BND:HMAC=8735CDA75D1148784B3D73601E7A4199DB44CFD039C75584EBA9ADD24897355A
      Dec 03 17:46:14 DEBUG SGN:VER:OK
      Dec 03 17:46:14 DEBUG GWT:TPS:TOPIC=mysensors-out/80/21/1/0/0,MSG SENT
      Dec 03 17:47:15 DEBUG TSF:MSG:READ,80-80-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 03 17:47:15 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 03 17:47:15 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 03 17:47:16 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 03 17:47:16 DEBUG SGN:NCE:XMT,TO=0
      Dec 03 17:47:16 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
      Dec 03 17:47:16 DEBUG SGN:BND:NONCE=EF0F98582847EC766BDBC6FB13B7920FCB68CA984C600DA0FBAAAAAAAAAAAAAA
      Dec 03 17:47:16 DEBUG SGN:BND:HMAC=7AB74FA813953F8965393306FFF67FCA429DCE7F293E08357B9AAE4B0D33C5C1
      Dec 03 17:47:16 DEBUG SGN:VER:OK
      Dec 03 17:47:16 DEBUG GWT:TPS:TOPIC=mysensors-out/80/20/1/0/0,MSG SENT
      Dec 03 17:47:17 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
      Dec 03 17:47:17 DEBUG !SGN:BND:VER ONGOING
      Dec 03 17:47:17 DEBUG !SGN:VER:FAIL
      Dec 03 17:47:17 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 03 17:47:17 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
      Dec 03 17:47:17 DEBUG !SGN:BND:VER ONGOING
      Dec 03 17:47:17 DEBUG !SGN:VER:FAIL
      Dec 03 17:47:17 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 03 17:47:18 DEBUG TSF:MSG:READ,80-80-0,s=20,c=1,t=0,pt=7,l=5,sg=1:14.0
      Dec 03 17:47:18 DEBUG !SGN:BND:VER ONGOING
      Dec 03 17:47:18 DEBUG !SGN:VER:FAIL
      Dec 03 17:47:18 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      

      We can see in the log that the same node/child have both successful signing as well as failed signing.

      This signature failure isn't critical for temp/Humidity readings (even if it fails now, it will be fine in the next round), but for actuator nodes (where you really want something to be turned on/off) it will be a concern.

      I haven't noticed any other 433MHz interference (but only used the garage remote a couple of times during the day).

      It can be that a buggy node sketch makes the RFM69 unstable and jams the frequency. One of the side effects is that there are no entries in the GW log and therefore it seems is it down. Well, something to take into consideration when coding the nodes.

      My 2 cents

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Is MySensors RPI GW 32bit only?

      I admit I'm not a programmer neither a computing expert.

      But this article here says that "Generally speaking, 32-bit programs can run on a 64-bit system, but 64-bit programs will not run on a 32-bit system."

      My understanding is that if I compile MySensors GW in a 32bit RasPI OS and copy & run it on RasPI 64bit OS it will likely work (I'm guessing I'll also have to copy some libraries, so not so simple as copying the binary).
      This can be the option for those who want to use MySensors in 64bit RPIs like myself. I'll be using IoTStack on a RPI4 4GB 64bit with zigbee2MQTT and honestly wasn't happy with the idea of having a second RPI just for MySensors GW.

      I'll try it during the weekend and share results here.

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RFM69(HW) 433Mhz interference with other home devices?

      Hi,

      I'm currently testing a mysensors setup with:

      • RPI4 GW (32bit OS) with RFM69HW 433MHz, SW Signing and RFM69 encryption
      • Sensebender node with RFM69HW 433MHz, HW signing and RFM69 encryption and SHT21
      • Arduino mini pro-based node with RFM69 433MHz, HW signing, RFM69 encryption and SHT21

      So far, I was able to get the 2 nodes working, reporting basic temperature and humidity.
      It doesn't work flawlessly all the time, I must say. Sometimes it just stops working and I don't know why. After a reboot on the PI/nodes it gets back on track. I'm still trying to find some patterns.
      To know it is working, I simply "tail -f /tmp/mysensors.log" file. Not sure if it's the best way to do it, but it's the possible one so far because I don't have any northbound controller configured yet.
      [Edit] It seems that when MySensors GW "stops working" (or stops logging, to be more accurate) is when the other 433MHz devices don't work either. Nevertheless, it seems to recover by itself. May be a node that enters a faulty state and jams the frequency. I'll continue testing.

      Anyway, I've realized that my other 433MHz devices don't work anymore. For instance, the garage gate, that works with a normal 433MHz remote, simply stopped working. I'm also still trying to find some patterns, but it seems that if I reboot the nodes I can use the garage gate for a while. I'll be doing further testing and will report here.

      Meanwhile, I'd just like to ask around if this is a common phenomenon and if so, what can be done to overcome it.

      Summing up everything up: Is it common to have 433MHz interference with other home devices when having a Mysensors NW mesh based on RFM69(HW) 433MHz (with signing and/or encryption)? If so, how to overcome it?

      Cheers,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: MQTT GW with RFM69 on RPi

      Hi,

      I also have the same "!MCO:PRO:RC=1" behavior and have a very similar setup: Also running MySensors GW MQTT from a RPI4 with RFM96. The Mysensorg GW don't have any modifications and was obtained from master branch.

      My configuration command is this:

      ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.2.180 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=MySensorsGW --my-transport=rfm69 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433 --my-is-rfm69hw --my-signing-debug --my-rfm69-encryption-enabled --my-mqtt-user=mysensorsuser --my-mqtt-password=mysensorspassword
      

      I've this setup since the weekend, so not sure about long-term behaviour, but my RPI seems to be restarting from time to time. Could it be related?

      My log:

      Dec 02 17:51:14 INFO  Starting gateway...
      Dec 02 17:51:14 INFO  Protocol version - 2.3.2
      Dec 02 17:51:14 DEBUG MCO:BGN:INIT GW,CP=RPNGLS-X,FQ=NA,REL=255,VER=2.3.2
      Dec 02 17:51:14 DEBUG SGN:PER:OK
      Dec 02 17:51:14 DEBUG SGN:INI:BND OK
      Dec 02 17:51:14 DEBUG TSF:LRT:OK
      Dec 02 17:51:14 DEBUG TSM:INIT
      Dec 02 17:51:14 DEBUG TSF:WUR:MS=0
      Dec 02 17:51:14 DEBUG TSM:INIT:TSP OK
      Dec 02 17:51:14 DEBUG TSM:INIT:GW MODE
      Dec 02 17:51:14 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
      Dec 02 17:51:14 DEBUG MCO:REG:NOT NEEDED
      Dec 02 17:51:14 DEBUG MCO:BGN:STP
      Dec 02 17:51:14 DEBUG MCO:BGN:INIT OK,TSP=1
      Dec 02 17:51:14 DEBUG GWT:RMQ:CONNECTING...
      Dec 02 17:51:14 DEBUG connected to 192.168.2.180
      Dec 02 17:51:14 DEBUG GWT:RMQ:OK
      Dec 02 17:51:14 DEBUG GWT:TPS:TOPIC=mysensors-out/0/255/0/0/18,MSG SENT
      Dec 02 17:51:14 DEBUG TSM:READY:NWD REQ
      Dec 02 17:51:14 DEBUG SGN:SGN:NREQ=255
      Dec 02 17:51:14 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      Dec 02 18:06:14 DEBUG TSF:SAN:OK
      Dec 02 18:11:14 DEBUG TSM:READY:NWD REQ
      Dec 02 18:11:14 DEBUG SGN:SGN:NREQ=255
      Dec 02 18:11:14 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      Dec 02 18:15:09 DEBUG TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 02 18:15:09 DEBUG TSF:MSG:BC
      Dec 02 18:15:09 DEBUG TSF:MSG:FPAR REQ,ID=50
      Dec 02 18:15:09 DEBUG TSF:PNG:SEND,TO=0
      Dec 02 18:15:09 DEBUG TSF:CKU:OK
      Dec 02 18:15:09 DEBUG TSF:MSG:GWL OK
      Dec 02 18:15:09 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 02 18:15:13 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      Dec 02 18:15:14 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      Dec 02 18:15:14 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
      Dec 02 18:15:14 DEBUG TSF:MSG:PINGED,ID=50,HP=1
      Dec 02 18:15:14 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
      Dec 02 18:15:17 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
      Dec 02 18:15:18 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      Dec 02 18:15:18 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 02 18:15:18 DEBUG SGN:PRE:SGN REQ,FROM=50
      Dec 02 18:15:18 DEBUG SGN:PRE:SGN REQ,TO=50
      Dec 02 18:15:18 DEBUG SGN:PRE:WHI NREQ,TO=50
      Dec 02 18:15:18 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 02 18:15:21 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0101
      Dec 02 18:15:21 DEBUG !SGN:PRE:XMT,TO=50 FAIL
      Dec 02 18:15:22 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      Dec 02 18:15:22 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:22 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:15:25 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=NACK:<NONCE>
      Dec 02 18:15:25 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:15:26 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      Dec 02 18:15:26 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:26 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:15:27 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      Dec 02 18:15:27 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:15:31 DEBUG !SGN:BND:TMR
      Dec 02 18:15:31 DEBUG TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 02 18:15:31 DEBUG TSF:MSG:BC
      Dec 02 18:15:31 DEBUG TSF:MSG:FPAR REQ,ID=50
      Dec 02 18:15:31 DEBUG TSF:PNG:SEND,TO=0
      Dec 02 18:15:31 DEBUG TSF:CKU:OK
      Dec 02 18:15:31 DEBUG TSF:MSG:GWL OK
      Dec 02 18:15:31 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 02 18:15:33 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=NACK:0
      Dec 02 18:15:35 DEBUG TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 02 18:15:35 DEBUG TSF:MSG:BC
      Dec 02 18:15:35 DEBUG TSF:MSG:FPAR REQ,ID=50
      Dec 02 18:15:35 DEBUG TSF:CKU:OK,FCTRL
      Dec 02 18:15:35 DEBUG TSF:MSG:GWL OK
      Dec 02 18:15:36 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 02 18:15:36 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      Dec 02 18:15:38 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      Dec 02 18:15:38 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
      Dec 02 18:15:38 DEBUG TSF:MSG:PINGED,ID=50,HP=1
      Dec 02 18:15:38 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
      Dec 02 18:15:39 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      Dec 02 18:15:39 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      Dec 02 18:15:39 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 02 18:15:39 DEBUG SGN:PRE:SGN REQ,FROM=50
      Dec 02 18:15:39 DEBUG SGN:PRE:SGN REQ,TO=50
      Dec 02 18:15:39 DEBUG SGN:PRE:WHI NREQ,TO=50
      Dec 02 18:15:39 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 02 18:15:40 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      Dec 02 18:15:40 DEBUG SGN:PRE:XMT,TO=50
      Dec 02 18:15:40 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      Dec 02 18:15:40 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:40 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:15:41 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      Dec 02 18:15:41 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:15:42 DEBUG TSF:MSG:READ,50-50-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.3.2
      Dec 02 18:15:42 DEBUG SGN:BND:NONCE=B9AB7866E554F6B44039BD2DD1A8A222747B4E23A4B23B883BAAAAAAAAAAAAAA
      Dec 02 18:15:42 DEBUG SGN:BND:HMAC=339E6D7A45C0C70867AB03E724DCE7DEBD4BF750F1E288B05E46FA0FFB57CF4B
      Dec 02 18:15:42 DEBUG SGN:VER:OK
      Dec 02 18:15:42 DEBUG GWT:TPS:TOPIC=mysensors-out/50/255/0/0/17,MSG SENT
      Dec 02 18:15:42 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:15:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:15:43 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 02 18:15:43 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:15:44 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
      Dec 02 18:15:44 DEBUG SGN:BND:NONCE=EC09E7D125DDEC13FCD49CC5536102C512F1917419CC073D67AAAAAAAAAAAAAA
      Dec 02 18:15:44 DEBUG SGN:BND:HMAC=C2D4B378CCC38F5E9AF63668476F81BBE6CF6505AC51A1E2EDF5F8E8CDE1AFCD
      Dec 02 18:15:44 DEBUG SGN:VER:OK
      Dec 02 18:15:44 DEBUG GWT:TPS:TOPIC=mysensors-out/50/255/3/0/6,MSG SENT
      Dec 02 18:15:46 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:15:46 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:46 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:15:49 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:15:49 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:15:50 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:15:50 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:50 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:15:53 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:15:53 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:15:54 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=12,pt=0,l=9,sg=1:JS 2018V1
      Dec 02 18:15:54 DEBUG SGN:BND:NONCE=182B237ED9621FB9A1E781E4A148B2BA268A2F05D7F6B3FC28AAAAAAAAAAAAAA
      Dec 02 18:15:54 DEBUG SGN:BND:HMAC=A5093EA3A989D6F9FFEDDEBABF0FB0F879B7319799BA79996B55E3457D56458F
      Dec 02 18:15:54 DEBUG SGN:VER:OK
      Dec 02 18:15:54 DEBUG GWT:TPS:TOPIC=mysensors-out/50/255/3/0/12,MSG SENT
      Dec 02 18:15:56 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=12,pt=0,l=9,sg=1:JS 2018V1
      Dec 02 18:15:56 DEBUG !SGN:BND:VER ONGOING
      Dec 02 18:15:56 DEBUG !SGN:VER:FAIL
      Dec 02 18:15:56 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 02 18:15:57 DEBUG TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:15:57 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:15:57 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:00 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:16:00 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:16:01 DEBUG TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:16:01 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:01 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:02 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 02 18:16:02 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:16:02 DEBUG TSF:MSG:READ,50-50-0,s=40,c=0,t=7,pt=0,l=0,sg=1:
      Dec 02 18:16:02 DEBUG SGN:BND:NONCE=5712908BE02C29E1D93CE33EDB1BE6FFFF1BB453B6A970C679AAAAAAAAAAAAAA
      Dec 02 18:16:02 DEBUG SGN:BND:HMAC=1F143BBD8EB040F1733443251F5CF2CF282C64C287043851EE8AE7A3EAFC3068
      Dec 02 18:16:02 DEBUG SGN:VER:OK
      Dec 02 18:16:02 DEBUG GWT:TPS:TOPIC=mysensors-out/50/40/0/0/7,MSG SENT
      Dec 02 18:16:04 DEBUG TSF:MSG:READ,50-50-0,s=40,c=0,t=7,pt=0,l=0,sg=1:
      Dec 02 18:16:04 DEBUG !SGN:BND:VER ONGOING
      Dec 02 18:16:04 DEBUG !SGN:VER:FAIL
      Dec 02 18:16:04 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 02 18:16:05 DEBUG TSF:MSG:READ,50-50-0,s=40,c=0,t=7,pt=0,l=0,sg=1:
      Dec 02 18:16:05 DEBUG !SGN:BND:VER ONGOING
      Dec 02 18:16:05 DEBUG !SGN:VER:FAIL
      Dec 02 18:16:05 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 02 18:16:06 DEBUG TSF:MSG:READ,50-50-0,s=199,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:16:06 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:06 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:10 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:16:10 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:16:10 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
      Dec 02 18:16:10 DEBUG SGN:SKP:MSG CMD=3,TYPE=26
      Dec 02 18:16:10 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:12 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=NACK:
      Dec 02 18:16:12 DEBUG !SGN:SGN:NCE REQ,TO=50 FAIL
      Dec 02 18:16:12 DEBUG !TSF:MSG:SIGN FAIL
      Dec 02 18:16:12 DEBUG !SGN:BND:TMR
      Dec 02 18:16:12 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      Dec 02 18:16:12 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:12 DEBUG SGN:NCE:FROM=50
      Dec 02 18:16:12 DEBUG SGN:BND:NONCE=5CE4D0A8133FD9236FCDD14E5942DF2275139361A707364C6EAAAAAAAAAAAAAA
      Dec 02 18:16:12 DEBUG SGN:BND:HMAC=72E25B0399F24BD0673FE2631274C4F69E3940F9D52C99A752379708A8008699
      Dec 02 18:16:13 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
      Dec 02 18:16:13 DEBUG SGN:SKP:MSG CMD=3,TYPE=26
      Dec 02 18:16:13 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:13 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      Dec 02 18:16:13 DEBUG SGN:SGN:NCE REQ,TO=50
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:13 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:14 DEBUG !MCO:PRO:RC=1
      Dec 02 18:16:15 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      Dec 02 18:16:15 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:15 DEBUG SGN:NCE:FROM=50
      Dec 02 18:16:15 DEBUG SGN:BND:NONCE=43E1AFF0F305BD763984D88C5F49E8FF47831FDD21E3ECB549AAAAAAAAAAAAAA
      Dec 02 18:16:15 DEBUG SGN:BND:HMAC=05F3FF84848C38FD67CC257CB38BC16BE2F4D9DBC714C08846B9FE701F0CA224
      Dec 02 18:16:15 DEBUG SGN:SGN:SGN
      Dec 02 18:16:16 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=NACK:1
      Dec 02 18:16:17 DEBUG TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:16:17 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:17 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:17 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 02 18:16:17 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:16:18 DEBUG TSF:MSG:READ,50-50-0,s=20,c=1,t=0,pt=7,l=5,sg=1:19.5
      Dec 02 18:16:18 DEBUG SGN:BND:NONCE=1D8189E0C5B8E85A0A7E58B1DA5F02B2A0231B5560F810FB07AAAAAAAAAAAAAA
      Dec 02 18:16:18 DEBUG SGN:BND:HMAC=291F56D50D99E5070C360ABE46D0C6E24ACF2775A691FBA68ECDE62B58D8BBA2
      Dec 02 18:16:18 DEBUG SGN:VER:OK
      Dec 02 18:16:18 DEBUG GWT:TPS:TOPIC=mysensors-out/50/20/1/0/0,MSG SENT
      Dec 02 18:16:19 DEBUG TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:16:19 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:19 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:20 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:16:20 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:16:24 DEBUG TSF:MSG:READ,50-50-0,s=199,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:16:24 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:24 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:26 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:16:26 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:16:26 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:16:26 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:16:26 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:16:28 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:16:28 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:16:29 DEBUG TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 02 18:16:29 DEBUG TSF:MSG:BC
      Dec 02 18:16:29 DEBUG TSF:MSG:FPAR REQ,ID=50
      Dec 02 18:16:29 DEBUG TSF:PNG:SEND,TO=0
      Dec 02 18:16:29 DEBUG TSF:CKU:OK
      Dec 02 18:16:29 DEBUG TSF:MSG:GWL OK
      Dec 02 18:16:30 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 02 18:16:33 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=1,ft=0,st=NACK:0
      Dec 02 18:16:33 DEBUG !SGN:BND:TMR
      Dec 02 18:16:33 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      Dec 02 18:16:33 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
      Dec 02 18:16:33 DEBUG TSF:MSG:PINGED,ID=50,HP=1
      Dec 02 18:16:33 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
      Dec 02 18:16:37 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=25,pt=1,l=1,sg=1,ft=0,st=NACK:1
      Dec 02 18:17:27 DEBUG TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:17:27 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:17:27 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:17:30 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:17:30 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:17:31 DEBUG TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:17:31 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:17:31 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:17:33 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:17:33 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:17:45 DEBUG !SGN:BND:TMR
      Dec 02 18:17:45 DEBUG TSF:MSG:READ,80-80-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 02 18:17:45 DEBUG TSF:MSG:BC
      Dec 02 18:17:45 DEBUG TSF:MSG:FPAR REQ,ID=80
      Dec 02 18:17:45 DEBUG TSF:PNG:SEND,TO=0
      Dec 02 18:17:45 DEBUG TSF:CKU:OK
      Dec 02 18:17:45 DEBUG TSF:MSG:GWL OK
      Dec 02 18:17:45 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 02 18:17:45 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=8,pt=1,l=1,sg=1,ft=0,st=OK:0
      Dec 02 18:17:49 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      Dec 02 18:17:49 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
      Dec 02 18:17:49 DEBUG TSF:MSG:PINGED,ID=80,HP=1
      Dec 02 18:17:49 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
      Dec 02 18:17:51 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=25,pt=1,l=1,sg=1,ft=0,st=OK:1
      Dec 02 18:17:51 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      Dec 02 18:17:51 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 02 18:17:51 DEBUG SGN:PRE:SGN REQ,FROM=80
      Dec 02 18:17:51 DEBUG SGN:PRE:SGN REQ,TO=80
      Dec 02 18:17:51 DEBUG SGN:PRE:WHI NREQ,TO=80
      Dec 02 18:17:51 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 02 18:17:53 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      Dec 02 18:17:53 DEBUG SGN:PRE:XMT,TO=80
      Dec 02 18:17:53 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      Dec 02 18:17:53 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:17:53 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:17:54 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      Dec 02 18:17:54 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:17:55 DEBUG TSF:MSG:READ,80-80-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.3.2
      Dec 02 18:17:55 DEBUG SGN:BND:NONCE=AA53BD3EC4C43E31C0DD2CF59DAA4FEEE100CC72B338773F46AAAAAAAAAAAAAA
      Dec 02 18:17:55 DEBUG SGN:BND:HMAC=2665DDD335E2DE3EBC594585C69106A743ECDDC0784AA674BA118E7F1F83E39B
      Dec 02 18:17:55 DEBUG SGN:VER:OK
      Dec 02 18:17:55 DEBUG GWT:TPS:TOPIC=mysensors-out/80/255/0/0/17,MSG SENT
      Dec 02 18:17:55 DEBUG TSF:MSG:READ,80-80-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.3.2
      Dec 02 18:17:55 DEBUG !SGN:BND:VER ONGOING
      Dec 02 18:17:55 DEBUG !SGN:VER:FAIL
      Dec 02 18:17:55 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 02 18:17:56 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:17:56 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:17:56 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:17:56 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 02 18:17:56 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:17:57 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
      Dec 02 18:17:57 DEBUG SGN:BND:NONCE=E847B8BAFEC872B06EE6E5F9A5763963AB58CFE6396FCF4C43AAAAAAAAAAAAAA
      Dec 02 18:17:57 DEBUG SGN:BND:HMAC=72304FE2A42262DD6A02C39774D1BA3007D2FFFB775DBC5E5AE53728E6415214
      Dec 02 18:17:57 DEBUG SGN:VER:OK
      Dec 02 18:17:57 DEBUG GWT:TPS:TOPIC=mysensors-out/80/255/3/0/6,MSG SENT
      Dec 02 18:18:01 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:18:01 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:18:01 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:18:03 DEBUG !TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:18:03 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:18:03 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:18:03 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:18:03 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:18:06 DEBUG !TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:18:06 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:18:06 DEBUG TSF:MSG:READ,80-80-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:18:06 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:18:06 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:18:09 DEBUG !TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Dec 02 18:18:09 DEBUG !SGN:NCE:XMT,TO=0 FAIL
      Dec 02 18:18:09 DEBUG TSF:MSG:READ,80-80-0,s=21,c=3,t=16,pt=0,l=0,sg=1:
      Dec 02 18:18:09 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:18:09 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:18:10 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 02 18:18:10 DEBUG SGN:NCE:XMT,TO=0
      Dec 02 18:18:11 DEBUG TSF:MSG:READ,80-80-0,s=21,c=0,t=6,pt=0,l=0,sg=1:
      Dec 02 18:18:11 DEBUG SGN:BND:NONCE=859AB432BF7F3B7A36FEF9B2B25A95417590EDD7935DC61C42AAAAAAAAAAAAAA
      Dec 02 18:18:11 DEBUG SGN:BND:HMAC=8A526390C16A90E7B927720158F2809A48874D415DF8B447F9AE76ED5A61A29D
      Dec 02 18:18:11 DEBUG SGN:VER:OK
      Dec 02 18:18:11 DEBUG GWT:TPS:TOPIC=mysensors-out/80/21/0/0/6,MSG SENT
      Dec 02 18:18:11 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
      Dec 02 18:18:11 DEBUG SGN:SKP:MSG CMD=3,TYPE=26
      Dec 02 18:18:11 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 02 18:18:11 DEBUG TSF:MSG:SEND,0-0-80-80,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      Dec 02 18:18:11 DEBUG SGN:SGN:NCE REQ,TO=80
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:11 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG !MCO:PRO:RC=1
      Dec 02 18:18:12 DEBUG TSF:MSG:READ,80-80-0,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      Dec 02 18:18:12 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 02 18:18:12 DEBUG SGN:NCE:FROM=80
      
      
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • RPI GW - Including build flags somewhere for future reference

      Hi,

      During my intense troubleshooting with my RPI GW I had to recompile MySensors GW code dozens of times.
      There were some points where I didn't know what build options I had at that moment, so I had to rebuild again just to be sure.

      My suggestion for feature would be to include the build flags defined somewhere so the user could remember what was defined by the compilation time. This could be either pasted as a comment in the mysensors.conf file or a printout when a special flag is indicated.

      Something like:

      $sudo ./bin/mysgw
      Usage: mysgw [options]
      
      Options:
        -c, --config-file          Config file. [/etc/mysensors.conf]
        -h, --help                 Display a short summary of all program options.
        -q, --quiet                Quiet mode, disable log messages written to the terminal.
        --daemon                   Run as a daemon.
        --gen-soft-hmac-key        Generate and print a soft hmac key.
        --gen-soft-serial-key      Generate and print a soft serial key.
        --gen-aes-key              Generate and print an aes encryption key.
        --compiled-flags           Displays a short summary of the compiling flags when this binary was created
      $
      $sudo ./bin/mysgw --complied-options
      My Sensors GW for RPI compiled at 2020-12-02 with the following flags:
      --my-gateway=mqtt 
      --my-controller-ip-address=192.168.2.180 
      --my-mqtt-publish-topic-prefix=mysensors-out 
      --my-mqtt-subscribe-topic-prefix=mysensors-in 
      --my-mqtt-client-id=MySensorsGW 
      --my-transport=rfm69 
      --my-signing=software 
      --my-signing-request-signatures 
      --my-rfm69-frequency=433 
      --my-is-rfm69hw 
      --my-signing-debug 
      --my-rfm69-encryption-enabled 
      --my-mqtt-user=mysensorsuser 
      --my-mqtt-password=mysensorspassword
      (Other options were default. Consult documentation for further information)
      
      

      What do you think? Would it be useful? This could also be useful for OrangePI or any other *nix system.

      posted in Feature Requests
      joaoabs
      joaoabs
    • RE: [solved] Rebuilding a RPI GW - What do I need to get signing working again?

      Hi,

      Got it working!
      It was a strange mix of RFM69/RFM69HW devices (all soldered into the nrf2rfm69 board - so couldn't tell which type it was) and also a faulty RFM69. Also, it seems the signing consumes much processing power (and memory) to the little at328 chips. A sketch with more than 65% memory usage may fail some signatures, so not recommended to put many functionalities in the same node, specially when running my_debug.
      Simple sketches just with a sht21 sensor are working fine with signing and RFM69 encryption.

      Copying the correct HMAC, soft-serial and AES to the mysensors.conf file and with RPI reboots after each config/make/makeinstall cycle solved the problem.

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: [solved] Rebuilding a RPI GW - What do I need to get signing working again?

      @frits Thanks for replying back.

      Indeed the sha24 chips are locked since their personalization last year.
      I guess I don't need to re-personalize it, just need to copy something into the /etc/mysensors.conf in order to make them "talk" again. If I had a backup of my previous GW, I'd just copy the file, but since I don't I believe I just need to copy the HMAC, Soft-Serial and AES. Since this isn't working, I'm not sure if I'm using these values anymore, I'm looking in my backups folders for some notes I may have taken regarding this.
      If I find the correct HMAC, Soft-Serial and AES, it would be a matter of pasting it in the /etc/mysensors.conf file, right?
      These variables are common to the GW and nodes, right?

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • [solved] Rebuilding a RPI GW - What do I need to get signing working again?

      Hi,

      An year or so has passed since last time I worked with MySensors, so I might be missing something basic.

      Last year I had a working setup with a sensebender with SHA24 signing and RFM69 encryption working with a RPI GW. Meanwhile I've lost the GW config and I'm trying to make them talk again but without success. In order to troubleshoot, I've disabled the RMF69 encryption and currently focusing on signing.

      I've also updated the software with the latest MySensors version (arduino sketches and RPI GW - Stable).

      I'm doing a very basic GW configuration (for now just want to check the messages between gateway and node):

      ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rfm69 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433 --my-signing-debug
      

      In my notes, I have the HMAC, AES and SERIAL strings that are burned in the sha24 chips. I've just pasted it directly in /etc/mysensors.conf in the corresponding places (would it be that simple?). Also, not sure what to do with /etc/mysensors.eeprom.

      In the node side, the code for signing is:

      //CODE FOR SIGNING************************************************
      #define MY_SIGNING_ATSHA204                    
      #define MY_SIGNING_ATSHA204_PIN A3
      #define MY_SIGNING_REQUEST_SIGNATURES  
      #define MY_DEBUG_VERBOSE_SIGNING
      

      The GW and node are 30cm apart, so it shouldn't be a radio issue.

      In terms of radio, they are talking to each other, just the signing seems to be failing.

      Any idea of what I may be doing wrong?

      The log from the GW:

      Dec 01 16:18:14 INFO  Starting gateway...
      Dec 01 16:18:14 INFO  Protocol version - 2.3.2
      Dec 01 16:18:14 DEBUG MCO:BGN:INIT GW,CP=RPNGLS--,FQ=NA,REL=255,VER=2.3.2
      Dec 01 16:18:14 DEBUG SGN:PER:OK
      Dec 01 16:18:14 DEBUG SGN:INI:BND OK
      Dec 01 16:18:14 DEBUG TSF:LRT:OK
      Dec 01 16:18:14 DEBUG TSM:INIT
      Dec 01 16:18:14 DEBUG TSF:WUR:MS=0
      Dec 01 16:18:14 DEBUG TSM:INIT:TSP OK
      Dec 01 16:18:14 DEBUG TSM:INIT:GW MODE
      Dec 01 16:18:14 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
      Dec 01 16:18:14 DEBUG MCO:REG:NOT NEEDED
      Dec 01 16:18:14 DEBUG Listening for connections on @Lสพ:5003
      Dec 01 16:18:14 DEBUG MCO:BGN:STP
      Dec 01 16:18:14 DEBUG MCO:BGN:INIT OK,TSP=1
      Dec 01 16:18:14 DEBUG TSM:READY:NWD REQ
      Dec 01 16:18:14 DEBUG SGN:SGN:NREQ=255
      Dec 01 16:18:15 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      
      
      
      (...)
      
      
      
      Dec 01 16:18:34 DEBUG TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Dec 01 16:18:34 DEBUG TSF:MSG:BC
      Dec 01 16:18:34 DEBUG TSF:MSG:FPAR REQ,ID=50
      Dec 01 16:18:34 DEBUG TSF:PNG:SEND,TO=0
      Dec 01 16:18:34 DEBUG TSF:CKU:OK
      Dec 01 16:18:34 DEBUG TSF:MSG:GWL OK
      Dec 01 16:18:34 DEBUG SGN:SKP:MSG CMD=3,TYPE=8
      Dec 01 16:18:34 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      Dec 01 16:18:37 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      Dec 01 16:18:37 DEBUG SGN:SKP:MSG CMD=3,TYPE=24
      Dec 01 16:18:37 DEBUG TSF:MSG:PINGED,ID=50,HP=1
      Dec 01 16:18:37 DEBUG SGN:SKP:MSG CMD=3,TYPE=25
      Dec 01 16:18:37 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      Dec 01 16:18:37 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      Dec 01 16:18:37 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 01 16:18:37 DEBUG SGN:PRE:SGN REQ,FROM=50
      Dec 01 16:18:37 DEBUG SGN:PRE:SGN REQ,TO=50
      Dec 01 16:18:37 DEBUG SGN:PRE:WHI NREQ,TO=50
      Dec 01 16:18:37 DEBUG SGN:SKP:MSG CMD=3,TYPE=15
      Dec 01 16:18:38 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      Dec 01 16:18:38 DEBUG SGN:PRE:XMT,TO=50
      Dec 01 16:18:38 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      Dec 01 16:18:38 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 01 16:18:38 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 01 16:18:38 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      Dec 01 16:18:38 DEBUG SGN:NCE:XMT,TO=0
      Dec 01 16:18:38 DEBUG TSF:MSG:READ,50-50-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.3.2
      Dec 01 16:18:38 DEBUG SGN:BND:NONCE=B0800442A043FA40945B44F4CD8C790B5D7331B8650BB80E2AAAAAAAAAAAAAAA
      Dec 01 16:18:38 DEBUG SGN:BND:HMAC=7A44E2B4FC467386D048686A6E6C177D6E80C69642C08C3D45D5D199D3224502
      Dec 01 16:18:38 DEBUG !SGN:VER:FAIL
      Dec 01 16:18:38 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 01 16:18:38 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 01 16:18:38 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 01 16:18:38 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 01 16:18:39 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 01 16:18:39 DEBUG SGN:NCE:XMT,TO=0
      Dec 01 16:18:39 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
      Dec 01 16:18:39 DEBUG SGN:BND:NONCE=06CB361E2FD766A768055D605E9CD6163936C77BAF3EFC21DEAAAAAAAAAAAAAA
      Dec 01 16:18:39 DEBUG SGN:BND:HMAC=167F693013583C1DDD0DAE25499B0FA9A0B63EA7524B0297ACE62ED9B9435803
      Dec 01 16:18:39 DEBUG !SGN:VER:FAIL
      Dec 01 16:18:39 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 01 16:18:42 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 01 16:18:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 01 16:18:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 01 16:18:42 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 01 16:18:42 DEBUG SGN:NCE:XMT,TO=0
      Dec 01 16:18:42 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=11,pt=0,l=13,sg=1:SENSOR JANELA
      Dec 01 16:18:42 DEBUG SGN:BND:NONCE=6335F8A515382C4E83848699806982B402DCCCF58D532965D9AAAAAAAAAAAAAA
      Dec 01 16:18:42 DEBUG SGN:BND:HMAC=B8A6ACEA6CA9CE1753DEE8DA423B10E5AB446873C9F6514090753A66E88F6517
      Dec 01 16:18:42 DEBUG !SGN:VER:FAIL
      Dec 01 16:18:42 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 01 16:18:42 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Dec 01 16:18:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 01 16:18:42 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 01 16:18:42 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 01 16:18:42 DEBUG SGN:NCE:XMT,TO=0
      Dec 01 16:18:43 DEBUG TSF:MSG:READ,50-50-0,s=255,c=3,t=12,pt=0,l=9,sg=1:JS 2018V1
      Dec 01 16:18:43 DEBUG SGN:BND:NONCE=B43EC17F684DD2F835D8D2ABE68D9601E83F83E61BBE9CAFE2AAAAAAAAAAAAAA
      Dec 01 16:18:43 DEBUG SGN:BND:HMAC=F276A259C636186EDF2284D4098153E61BD26151C15C51597F528541B0D94959
      Dec 01 16:18:43 DEBUG !SGN:VER:FAIL
      Dec 01 16:18:43 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 01 16:18:43 DEBUG TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Dec 01 16:18:43 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 01 16:18:43 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 01 16:18:43 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 01 16:18:43 DEBUG SGN:NCE:XMT,TO=0
      Dec 01 16:18:44 DEBUG TSF:MSG:READ,50-50-0,s=20,c=0,t=6,pt=0,l=0,sg=1:
      Dec 01 16:18:44 DEBUG SGN:BND:NONCE=82BDEA6DA6BA558E2C9230D9220ED0BB69A36DEBE0B139E6DEAAAAAAAAAAAAAA
      Dec 01 16:18:44 DEBUG SGN:BND:HMAC=8918B2F585D08005CCED65EDD7B2C4421777E8E780CF0E656CA9967019BE9B01
      Dec 01 16:18:44 DEBUG !SGN:VER:FAIL
      Dec 01 16:18:44 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      Dec 01 16:18:44 DEBUG TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Dec 01 16:18:44 DEBUG SGN:SKP:MSG CMD=3,TYPE=16
      Dec 01 16:18:44 DEBUG SGN:SKP:MSG CMD=3,TYPE=17
      Dec 01 16:18:44 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Dec 01 16:18:44 DEBUG SGN:NCE:XMT,TO=0
      Dec 01 16:18:45 DEBUG TSF:MSG:READ,50-50-0,s=40,c=0,t=7,pt=0,l=0,sg=1:
      Dec 01 16:18:45 DEBUG SGN:BND:NONCE=566DCE39E272CA0F86065EEEAD3688566CB04C83BF4393199DAAAAAAAAAAAAAA
      Dec 01 16:18:45 DEBUG SGN:BND:HMAC=B4452251C4FEB6C60C24727AC318ABF6BA959CD59074ECA1C6BBA8C10A9C0615
      Dec 01 16:18:45 DEBUG !SGN:VER:FAIL
      Dec 01 16:18:45 DEBUG !TSF:MSG:SIGN VERIFY FAIL
      
      

      The node log:

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.2
      
      16 MCO:BGN:INIT NODE,CP=RPNNAA--,FQ=8,REL=255,VER=2.3.2
      40 SGN:PER:OK
      71 SGN:INI:BND OK
      73 TSM:INIT
      75 TSF:WUR:MS=0
      77 TSM:INIT:TSP OK
      79 TSM:INIT:STATID=50
      81 TSF:SID:OK,ID=50
      83 TSM:FPAR
      86 SGN:SGN:NREQ=255
      110 ?TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      786 TSF:MSG:READ,0-0-50,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      792 SGN:SKP:MSG CMD=3,TYPE=8
      794 TSF:MSG:FPAR OK,ID=0,D=1
      2119 TSM:FPAR:OK
      2119 TSM:ID
      2121 TSM:ID:OK
      2123 TSM:UPL
      2125 SGN:SKP:MSG CMD=3,TYPE=24
      3260 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      3334 TSF:MSG:READ,0-0-50,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      3340 SGN:SKP:MSG CMD=3,TYPE=25
      3344 TSF:MSG:PONG RECV,HP=1
      3346 TSM:UPL:OK
      3348 TSM:READY:ID=50,PAR=0,DIS=1
      3352 SGN:PRE:SGN REQ
      3354 SGN:PRE:WHI NREQ
      3356 SGN:SKP:MSG CMD=3,TYPE=15
      4579 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=NACK:0101
      4587 !SGN:PRE:XMT,TO=0 FAIL
      4589 SGN:PRE:WAIT GW
      4888 TSF:MSG:READ,0-0-50,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      4894 SGN:SKP:MSG CMD=3,TYPE=15
      4898 SGN:PRE:SGN REQ,FROM=0
      4900 SGN:SKP:MSG CMD=3,TYPE=16
      6156 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=NACK:
      6162 !SGN:SGN:NCE REQ,TO=0 FAIL
      6166 !TSF:MSG:SIGN FAIL
      6168 SGN:SKP:MSG CMD=3,TYPE=16
      7419 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=3,st=NACK:
      7426 !SGN:SGN:NCE REQ,TO=0 FAIL
      7430 !TSF:MSG:SIGN FAIL
      8263 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      8269 SGN:SKP:MSG CMD=3,TYPE=17
      8273 SGN:NCE:FROM=0
      8275 SGN:BND:NONCE=C2B17191C79E5E390332A289A9D223D92ABD74CFBAB16455C8AAAAAAAAAAAAAA
      8390 SGN:BND:HMAC=7F107682B7FF95FD5EFF76ECD055635D52AFD8E1044CB85ECC8EB11FB69E3CA5
      9433 SGN:SKP:MSG CMD=3,TYPE=16
      9672 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=5,st=OK:
      9680 SGN:SGN:NCE REQ,TO=0
      9981 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      9990 SGN:SKP:MSG CMD=3,TYPE=17
      9992 SGN:NCE:FROM=0
      9994 SGN:BND:NONCE=A201307ACA3E67769A52E67AB4ADE323D403EA1BD069BD1505AAAAAAAAAAAAAA
      10110 SGN:BND:HMAC=C72DB4CCC891F699551E07D97F2E2E83901B9F8E52B4603D42737385C2DC4DDC
      10119 SGN:SGN:SGN
      10328 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=11,pt=0,l=13,sg=1,ft=0,st=OK:SENSOR JANELA
      10336 SGN:SKP:MSG CMD=3,TYPE=16
      10489 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      10498 SGN:SGN:NCE REQ,TO=0
      11724 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      11730 SGN:SKP:MSG CMD=3,TYPE=17
      11735 SGN:NCE:FROM=0
      11737 SGN:BND:NONCE=DF9FE2AB38EF56530E612A0AD32480313CE6F6E5437536F055AAAAAAAAAAAAAA
      11853 SGN:BND:HMAC=932B6DEBCD0AC9008479E55CDE002E4BBB2121BF6F5FD8FCDD0F50009F75AA36
      11864 SGN:SGN:SGN
      12068 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=12,pt=0,l=9,sg=1,ft=0,st=OK:JS 2018V1
      12077 SGN:SKP:MSG CMD=3,TYPE=16
      12165 TSF:MSG:SEND,50-50-0-0,s=20,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      12173 SGN:SGN:NCE REQ,TO=0
      12855 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      12861 SGN:SKP:MSG CMD=3,TYPE=17
      12865 SGN:NCE:FROM=0
      12867 SGN:BND:NONCE=B5DC13AC6E39BF38758F11BE9520E61589A7ACF83530FFF0AEAAAAAAAAAAAAAA
      12984 SGN:BND:HMAC=E8A78E0C9759B7E6916BA40539605C3270FC136C3779A18B94AC595FBF82187D
      12994 SGN:SGN:SGN
      13051 TSF:MSG:SEND,50-50-0-0,s=20,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      13060 SGN:SKP:MSG CMD=3,TYPE=16
      14139 !TSF:MSG:SEND,50-50-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      14145 !SGN:SGN:NCE REQ,TO=0 FAIL
      14149 !TSF:MSG:SIGN FAIL
      14151 MCO:REG:REQ
      14153 SGN:SKP:MSG CMD=3,TYPE=26
      15341 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=2,st=NACK:2
      16388 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      16394 SGN:SKP:MSG CMD=3,TYPE=17
      16398 SGN:NCE:FROM=0
      16400 SGN:BND:NONCE=0ECBDE934D52D594A3D0CA3ACCFA295D5148AB29B47101D1CFAAAAAAAAAAAAAA
      16515 SGN:BND:HMAC=F80AD9A20CDDD690BC881B05BABD109345C45FED361BDA6BED0A1BECA00302AB
      17350 SGN:SKP:MSG CMD=3,TYPE=26
      18792 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=3,st=NACK:2
      19030 TSF:MSG:READ,0-0-50,s=255,c=3,t=16,pt=0,l=0,sg=1:
      19036 SGN:SKP:MSG CMD=3,TYPE=16
      19113 SGN:SKP:MSG CMD=3,TYPE=17
      20264 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=4,st=NACK:<NONCE>
      20273 !SGN:NCE:XMT,TO=50 FAIL
      20801 SGN:SKP:MSG CMD=3,TYPE=26
      21952 !TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=5,st=NACK:2
      21960 !TSM:READY:UPL FAIL,SNP
      21962 TSM:FPAR
      21964 SGN:SGN:NREQ=255
      21972 ?TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=6,st=OK:
      23961 !TSF:SND:TNR
      23982 !TSM:FPAR:NO REPLY
      23984 TSM:FPAR
      23986 SGN:SGN:NREQ=255
      24035 ?TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      24842 !SGN:BND:TMR
      24864 TSF:MSG:READ,0-0-50,s=255,c=3,t=8,pt=1,l=1,sg=1:0
      24870 SGN:SKP:MSG CMD=3,TYPE=8
      24872 TSF:MSG:FPAR OK,ID=0,D=1
      27965 TSM:FPAR:OK
      27967 TSM:ID
      27967 TSM:ID:OK
      

      Cheers,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • Error compiling for RPI4 64 bit: RFM69_MAX_PACKET_LEN

      Hi,

      Trying to compile MySensors MQTT GW for RPI4 64 bits.
      Overcame the initial error described here but now having a compiling error down the road.

      In file included from ./MySensors.h:377,
                       from examples_linux/mysgw.cpp:82:
      ./hal/transport/RFM69/driver/new/RFM69_new.cpp: In function โ€˜void RFM69_interruptHandling()โ€™:
      ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: error: no matching function for call to โ€˜min(long unsigned int, unsigned int)โ€™
                                                RFM69_MAX_PACKET_LEN);
                                                                    ^
      In file included from /usr/include/c++/8/algorithm:62,
                       from ./hal/architecture/Linux/drivers/core/Arduino.h:32,
                       from ./MySensors.h:39,
                       from examples_linux/mysgw.cpp:82:
      /usr/include/c++/8/bits/stl_algo.h:3456:5: note: candidate: โ€˜template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)โ€™
           min(initializer_list<_Tp> __l, _Compare __comp)
           ^~~
      /usr/include/c++/8/bits/stl_algo.h:3456:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:377,
                       from examples_linux/mysgw.cpp:82:
      ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   mismatched types โ€˜std::initializer_list<_Tp>โ€™ and โ€˜long unsigned intโ€™
                                                RFM69_MAX_PACKET_LEN);
                                                                    ^
      In file included from /usr/include/c++/8/algorithm:62,
                       from ./hal/architecture/Linux/drivers/core/Arduino.h:32,
                       from ./MySensors.h:39,
                       from examples_linux/mysgw.cpp:82:
      /usr/include/c++/8/bits/stl_algo.h:3450:5: note: candidate: โ€˜template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)โ€™
           min(initializer_list<_Tp> __l)
           ^~~
      /usr/include/c++/8/bits/stl_algo.h:3450:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:377,
                       from examples_linux/mysgw.cpp:82:
      ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   mismatched types โ€˜std::initializer_list<_Tp>โ€™ and โ€˜long unsigned intโ€™
                                                RFM69_MAX_PACKET_LEN);
                                                                    ^
      In file included from /usr/include/c++/8/bits/char_traits.h:39,
                       from /usr/include/c++/8/ios:40,
                       from /usr/include/c++/8/ostream:38,
                       from /usr/include/c++/8/iostream:39,
                       from examples_linux/mysgw.cpp:20:
      /usr/include/c++/8/bits/stl_algobase.h:243:5: note: candidate: โ€˜template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)โ€™
           min(const _Tp& __a, const _Tp& __b, _Compare __comp)
           ^~~
      /usr/include/c++/8/bits/stl_algobase.h:243:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:377,
                       from examples_linux/mysgw.cpp:82:
      ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   deduced conflicting types for parameter โ€˜const _Tpโ€™ (โ€˜long unsigned intโ€™ and โ€˜unsigned intโ€™)
                                                RFM69_MAX_PACKET_LEN);
                                                                    ^
      In file included from /usr/include/c++/8/bits/char_traits.h:39,
                       from /usr/include/c++/8/ios:40,
                       from /usr/include/c++/8/ostream:38,
                       from /usr/include/c++/8/iostream:39,
                       from examples_linux/mysgw.cpp:20:
      /usr/include/c++/8/bits/stl_algobase.h:195:5: note: candidate: โ€˜template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)โ€™
           min(const _Tp& __a, const _Tp& __b)
           ^~~
      /usr/include/c++/8/bits/stl_algobase.h:195:5: note:   template argument deduction/substitution failed:
      In file included from ./MySensors.h:377,
                       from examples_linux/mysgw.cpp:82:
      ./hal/transport/RFM69/driver/new/RFM69_new.cpp:282:62: note:   deduced conflicting types for parameter โ€˜const _Tpโ€™ (โ€˜long unsigned intโ€™ and โ€˜unsigned intโ€™)
                                                RFM69_MAX_PACKET_LEN);
                                                                    ^
      make: *** [Makefile:99: build/examples_linux/mysgw.o] Error 1
      
      

      My configure command is

      ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=MySensorsGW --my-transport=rfm69 --my-rfm69-cs-pin=24 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433 --my-is-rfm69hw --soc=BCM2711
      

      This error might be related wit the fact that I commented some flags in the configure file (I admit I blindly followed some instructions in an older post and I have no idea (neither knowledge) about what consequences may come from this). Maybe this error is related?

      [Edit] Tried the same compilation in a RPI3 with 32bit OS and went fine, so I'm guessing this might be related with the fact I'm compiling for 64bit. Maybe MySensors isn't yet ready for 64bit?

      Any suggestion?

      Cheers,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Rpi MQTT Gateway on Docker

      Hi,

      I was looking for this!
      How can I get this docker container?
      Cheers,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Is MySensors RPI GW 32bit only?

      Answering my own post with info from this post from 2018 and adjusting to my chipset (BCM2711), I commented the flags. Not sure what I'm doing, but at least the error is not the same anymore.

      function gcc_cpu_flags {
          local soc=$1
          case $soc in
          BCM2835)
              flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
              ;;
          BCM2836)
              flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
              ;;
          BCM2837)
              flags="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
              ;;
          BCM2711)
              flags=""
              #flags="-march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
              ;;
      
      

      Moving on to the next error.

      Cheers,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • Is MySensors RPI GW 32bit only?

      Apologies if this is a repeated thread.
      I've been trying to compile a MQTT GW for my 64bit RPI4 but I'm getting some errors that seem to be related with the 64bit arch I'm using.

      I'm currently preparing a RPI4 for a IOT stack with docker containers and I believe using the RPI4 64bit capability would be useful to have a performant system.
      (by the way, it would be great to have a forum topic teaching how to create a docker container with the MySensors GW, but that would be for another time).

      Anyway, back to my issue, below the steps I've taken. I've tried master and development branches. Is there any way of making this work in 64bits or am I doing something wrong?

      Cheers,

      pi@raspberrypi:~ $ git clone https://github.com/mysensors/MySensors.git --branch development
      Cloning into 'MySensors'...
      remote: Enumerating objects: 8, done.
      remote: Counting objects: 100% (8/8), done.
      remote: Compressing objects: 100% (8/8), done.
      remote: Total 17996 (delta 0), reused 2 (delta 0), pack-reused 17988
      Receiving objects: 100% (17996/17996), 28.13 MiB | 5.28 MiB/s, done.
      Resolving deltas: 100% (11015/11015), done.
      pi@raspberrypi:~ $ cd MySensors/
      pi@raspberrypi:~/MySensors $ ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=MySensorsGW --my-transport=rfm69 --my-rfm69-cs-pin=24 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=868 --my-is-rfm69hw
      [SECTION] Detecting target machine.
        [OK] machine detected: SoC=BCM2711, Type=rpi4, CPU=aarch64.
      [SECTION] Detecting SPI driver.
        [OK] SPI driver detected:BCM.
      [SECTION] Gateway configuration.
        [OK] Type: mqtt.
        [OK] Transport: rfm69.
        [OK] Signing: Enabled - Using key from config file.
        [OK] Encryption: Disabled.
        [OK] CPPFLAGS: -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RFM69 -DMY_RFM69_NEW_DRIVER -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_IS_RFM69HW -DMY_RFM69_FREQUENCY=RFM69_868MHZ -DMY_RFM69_CS_PIN=24 -DMY_MQTT_CLIENT_ID="MySensorsGW" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX="mysensors-in" -DMY_MQTT_PUBLISH_TOPIC_PREFIX="mysensors-out" -DMY_CONTROLLER_IP_ADDRESS=127,0,0,1
        [OK] CXXFLAGS:  -std=c++11
      [SECTION] Detecting init system.
        [OK] Init system detected: systemd.
      [SECTION] Saving configuration.
        [OK] Saved.
      [SECTION] Cleaning previous builds.
        [OK] Finished.
      pi@raspberrypi:~/MySensors $ make
      gcc -MT build/hal/architecture/Linux/drivers/core/log.o -MMD -MP -march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_SIGNING_REQUEST_SIGNATURES -DMY_SIGNING_SOFT -DMY_RADIO_RFM69 -DMY_RFM69_NEW_DRIVER -DMY_GATEWAY_LINUX -DMY_GATEWAY_MQTT_CLIENT -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_IS_RFM69HW -DMY_RFM69_FREQUENCY=RFM69_868MHZ -DMY_RFM69_CS_PIN=24 -DMY_MQTT_CLIENT_ID=\"MySensorsGW\" -DMY_MQTT_SUBSCRIBE_TOPIC_PREFIX=\"mysensors-in\" -DMY_MQTT_PUBLISH_TOPIC_PREFIX=\"mysensors-out\" -DMY_CONTROLLER_IP_ADDRESS=127,0,0,1  -Ofast -g -Wall -Wextra  -I. -I./core -I./hal/architecture/Linux/drivers/core -I./hal/architecture/Linux/drivers/BCM -c hal/architecture/Linux/drivers/core/log.c -o build/hal/architecture/Linux/drivers/core/log.o
      gcc: error: unrecognized command line option โ€˜-mfpu=neon-fp-armv8โ€™
      gcc: error: unrecognized command line option โ€˜-mfloat-abi=hardโ€™
      make: *** [Makefile:103: build/hal/architecture/Linux/drivers/core/log.o] Error 1
      pi@raspberrypi:~/MySensors $ uname -a
      Linux raspberrypi 5.4.79-v8+ #1373 SMP PREEMPT Mon Nov 23 13:32:41 GMT 2020 aarch64 GNU/Linux
      
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • Node personalizer sketch seems broken in MySensors 2.3.1

      Hi,

      My node personalizer is running fine as always if I use the 2.3.0 version of the library.
      However, when upgrading the library to the latest 2.3.1, it doesn't compile anymore.

      home/xxx/node-personaliser-signing/node-personaliser-signing.ino: In function 'void write_eeprom_checksum()':
      node-personaliser-signing:524: error: 'signerSha256Init' was not declared in this scope
           signerSha256Init();
                            ^
      node-personaliser-signing:526: error: 'signerSha256Update' was not declared in this scope
           signerSha256Update(buffer, 32);
                                        ^
      node-personaliser-signing:531: error: 'signerSha256Final' was not declared in this scope
           hash = signerSha256Final();
                                    ^
      exit status 1
      'signerSha256Init' was not declared in this scope
      

      Going back to version 2.3.0 overcomes the issue, but I guess it should be solved in 2.3.1, right?

      posted in Bug Reports
      joaoabs
      joaoabs
    • RE: Check Uplink fails - Using RFM69 with signing and encryption

      Doing further investigation, still no sucess....

      Got the logs from the working node, based on Sensebender and everything seems fine.
      Changed the radios, still the same problem.
      Took the basic relay example from my sensors and just added my radio/signing stuff: Still the same problem. The code doesn't even reach setup() function, so it must be something on the MySensors initialization, but if that was the case, why does it work fine with the Sensebender micro?

      Any idea?

      How common is it in mysensors community to have RFM69's with HW signing and encryption?

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.1
      
      16 MCO:BGN:INIT NODE,CP=RPNNAA-X,REL=255,VER=2.3.1
      67 TSM:INIT
      69 TSF:WUR:MS=0
      71 TSM:INIT:TSP OK
      73 TSM:INIT:STATID=50
      75 TSF:SID:OK,ID=50
      77 TSM:FPAR
      88 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      1017 TSF:MSG:READ,0-0-50,s=255,c=3,t=8,pt=1,l=1,sg=1:0
      1024 TSF:MSG:FPAR OK,ID=0,D=1
      2097 TSM:FPAR:OK
      2097 TSM:ID
      2099 TSM:ID:OK
      2101 TSM:UPL
      2119 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2340 TSF:MSG:READ,0-0-50,s=255,c=3,t=25,pt=1,l=1,sg=1:1
      2347 TSF:MSG:PONG RECV,HP=1
      2351 TSM:UPL:OK
      2353 TSM:READY:ID=50,PAR=0,DIS=1
      2367 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      2580 TSF:MSG:READ,0-0-50,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      2607 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      2824 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      2955 TSF:MSG:SEND,50-50-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.3.1
      2981 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3198 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3342 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
      3379 TSF:MSG:READ,0-0-50,s=255,c=3,t=16,pt=0,l=0,sg=1:
      3684 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      3713 TSF:MSG:READ,0-0-50,s=255,c=3,t=6,pt=0,l=1,sg=1:M
      3862 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      4098 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      4732 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=11,pt=0,l=13,sg=1,ft=0,st=OK:SENSOR JANELA
      5261 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5543 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6543 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=12,pt=0,l=9,sg=1,ft=0,st=OK:JS 2018V1
      6774 TSF:MSG:SEND,50-50-0-0,s=20,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      7067 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      7241 TSF:MSG:SEND,50-50-0-0,s=20,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      7411 TSF:MSG:SEND,50-50-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      7696 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      8173 TSF:MSG:SEND,50-50-0-0,s=40,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
      8701 TSF:MSG:SEND,50-50-0-0,s=199,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      9357 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      9549 TSF:MSG:SEND,50-50-0-0,s=199,c=0,t=13,pt=0,l=0,sg=1,ft=0,st=OK:
      9617 TSF:MSG:SEND,50-50-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      10022 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      10180 TSF:MSG:SEND,50-50-0-0,s=30,c=0,t=0,pt=0,l=8,sg=1,ft=0,st=OK:Persiana
      10188 MCO:REG:REQ
      11352 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
      11737 TSF:MSG:READ,0-0-50,s=255,c=3,t=16,pt=0,l=0,sg=1:
      12355 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      12548 TSF:MSG:READ,0-0-50,s=255,c=3,t=27,pt=1,l=1,sg=1:1
      12668 MCO:PIM:NODE REG=1
      12670 MCO:BGN:STP
      isMetric: 1
      TempDiff :122.35
      HumDiff  :150.00
      T: 22.35
      H: 50
      13742 TSF:MSG:SEND,50-50-0-0,s=20,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      14575 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      14753 TSF:MSG:SEND,50-50-0-0,s=20,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:22.4
      14862 TSF:MSG:SEND,50-50-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      15097 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      15362 TSF:MSG:SEND,50-50-0-0,s=40,c=1,t=1,pt=2,l=2,sg=1,ft=0,st=OK:50
      TempDiff :0.04
      HumDiff  :0.50
      T: 22.39
      H: 51
      15511 TSF:MSG:SEND,50-50-0-0,s=20,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      15804 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      16123 TSF:MSG:SEND,50-50-0-0,s=20,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:22.4
      16150 TSF:MSG:SEND,50-50-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      16467 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      16703 TSF:MSG:SEND,50-50-0-0,s=40,c=1,t=1,pt=2,l=2,sg=1,ft=0,st=OK:51
      16748 TSF:MSG:SEND,50-50-0-0,s=199,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      17057 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      17188 TSF:MSG:SEND,50-50-0-0,s=199,c=1,t=38,pt=7,l=5,sg=1,ft=0,st=OK:3.349
      17246 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      17465 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      17772 TSF:MSG:SEND,50-50-0-0,s=255,c=3,t=0,pt=1,l=1,sg=1,ft=0,st=OK:103
      17780 MCO:BGN:INIT OK,TSP=1
      LOOP
      17840 TSF:MSG:SEND,50-50-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      18063 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      18333 TSF:MSG:SEND,50-50-0-0,s=30,c=1,t=16,pt=2,l=2,sg=1,ft=0,st=OK:1
      TempDiff :0.06
      HumDiff  :0.00
      18360 MCO:SLP:MS=60000,SMS=0,I1=1,M1=1,I2=255,M2=255
      18366 TSF:TDI:TSL
      18370 MCO:SLP:WUP=-1
      18372 TSF:TRI:TSB
      LOOP
      TempDiff :0.72
      HumDiff  :0.50
      T: 21.67
      H: 52
      18452 TSF:MSG:SEND,50-50-0-0,s=20,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      18716 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      18962 TSF:MSG:SEND,50-50-0-0,s=20,c=1,t=0,pt=7,l=5,sg=1,ft=0,st=OK:21.7
      19048 TSF:MSG:SEND,50-50-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      19286 TSF:MSG:READ,0-0-50,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      19542 TSF:MSG:SEND,50-50-0-0,s=40,c=1,t=1,pt=2,l=2,sg=1,ft=0,st=OK:52
      19550 MCO:SLP:MS=60000,SMS=0,I1=1,M1=1,I2=255,M2=255
      19556 TSF:TDI:TSL
      
      

      Gateway:

      Jan  9 22:34:50 nettemp mysgw: TSF:MSG:READ,50-50-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Jan  9 22:34:50 nettemp mysgw: TSF:MSG:BC
      Jan  9 22:34:50 nettemp mysgw: TSF:MSG:FPAR REQ,ID=50
      Jan  9 22:34:50 nettemp mysgw: TSF:PNG:SEND,TO=0
      Jan  9 22:34:50 nettemp mysgw: TSF:CKU:OK
      Jan  9 22:34:50 nettemp mysgw: TSF:MSG:GWL OK
      Jan  9 22:34:51 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=8,pt=1,l=1,sg=1,ft=0,st=OK:0
      Jan  9 22:34:52 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:PINGED,ID=50,HP=1
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=25,pt=1,l=1,sg=1,ft=0,st=OK:1
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=0,t=17,pt=0,l=5,sg=1:2.3.1
      Jan  9 22:34:53 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:34:54 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:34:54 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
      Jan  9 22:34:54 nettemp mysgw: GWT:RFC:C=0,MSG=50;255;3;0;6;M
      Jan  9 22:34:54 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      Jan  9 22:34:54 nettemp mysgw: GWT:RFC:C=0,MSG=
      Jan  9 22:34:54 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      Jan  9 22:34:54 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=6,pt=0,l=1,sg=1,ft=0,st=OK:M
      Jan  9 22:34:54 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:34:55 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:34:55 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=11,pt=0,l=13,sg=1:SENSOR JANELA
      Jan  9 22:34:56 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:34:56 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:34:57 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=12,pt=0,l=9,sg=1:JS 2018V1
      Jan  9 22:34:57 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=12,pt=0,l=9,sg=1:JS 2018V1
      Jan  9 22:34:57 nettemp mysgw: !TSF:MSG:SIGN VERIFY FAIL
      Jan  9 22:34:57 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:34:58 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:34:58 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=0,t=6,pt=0,l=0,sg=1:
      Jan  9 22:34:58 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:34:58 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:34:59 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=0,t=7,pt=0,l=0,sg=1:
      Jan  9 22:34:59 nettemp mysgw: TSF:MSG:READ,50-50-0,s=199,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:00 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:00 nettemp mysgw: TSF:MSG:READ,50-50-0,s=199,c=0,t=13,pt=0,l=0,sg=1:
      Jan  9 22:35:00 nettemp mysgw: TSF:MSG:READ,50-50-0,s=30,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:01 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:01 nettemp mysgw: TSF:MSG:READ,50-50-0,s=30,c=0,t=0,pt=0,l=8,sg=1:Persiana
      Jan  9 22:35:01 nettemp mysgw: TSF:MSG:ACK REQ
      Jan  9 22:35:02 nettemp mysgw: !TSF:MSG:SEND,0-0-50-50,s=30,c=0,t=0,pt=0,l=8,sg=0,ft=0,st=NACK:Persiana
      Jan  9 22:35:02 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
      Jan  9 22:35:02 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      Jan  9 22:35:03 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      Jan  9 22:35:03 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
      Jan  9 22:35:04 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:05 nettemp mysgw: !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Jan  9 22:35:05 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:05 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:06 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=1,t=0,pt=7,l=5,sg=1:22.4
      Jan  9 22:35:06 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:06 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:06 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=1,t=1,pt=2,l=2,sg=1:50
      Jan  9 22:35:06 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:07 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:07 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=1,t=0,pt=7,l=5,sg=1:22.4
      Jan  9 22:35:07 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:07 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:08 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=1,t=1,pt=2,l=2,sg=1:51
      Jan  9 22:35:08 nettemp mysgw: TSF:MSG:READ,50-50-0,s=199,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:08 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:08 nettemp mysgw: TSF:MSG:READ,50-50-0,s=199,c=1,t=38,pt=7,l=5,sg=1:3.349
      Jan  9 22:35:08 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:08 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:09 nettemp mysgw: TSF:MSG:READ,50-50-0,s=255,c=3,t=0,pt=1,l=1,sg=1:103
      Jan  9 22:35:09 nettemp mysgw: TSF:MSG:READ,50-50-0,s=30,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:35:09 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:35:09 nettemp mysgw: TSF:MSG:READ,50-50-0,s=30,c=1,t=16,pt=2,l=2,sg=1:1
      Jan  9 22:36:09 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:36:09 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:36:09 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=1,t=0,pt=7,l=5,sg=1:21.7
      Jan  9 22:36:10 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:36:10 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:36:10 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=1,t=1,pt=2,l=2,sg=1:52
      Jan  9 22:36:28 nettemp mysgw: TSM:READY:NWD REQ
      Jan  9 22:36:28 nettemp mysgw: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      Jan  9 22:37:10 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:37:10 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:37:10 nettemp mysgw: TSF:MSG:READ,50-50-0,s=20,c=1,t=0,pt=7,l=5,sg=1:21.2
      Jan  9 22:37:10 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Jan  9 22:37:10 nettemp mysgw: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Jan  9 22:37:10 nettemp mysgw: TSF:MSG:READ,50-50-0,s=40,c=1,t=1,pt=2,l=2,sg=1:54
      
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • Check Uplink fails - Using RFM69 with signing and encryption

      Hello,

      I'm struggling for a few days with a new board I've made. It seems the code doesn't even reach to setup() neither presentation(). It gets stuck in the I_PING part. Tried the parser, but don't really understand whats going on...

      I'm using the latest MySensors library (2.3.1) in the node as well as in the RaspberryPI3 Gateway. I have a sensebender working fine with the same radio/signing setup.

      According to the log parser, "Message with command 3 and type 3 does not need to be signed", but this comment refers to a message that seems to be type 24: "2269 SGN:SKP:MSG CMD=3,TYPE=24"

      After this, the I get the message 5134 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1 and everything starts falling down....

      Any idea what I might be doing wrong?

      The startup from the node:

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.1
      
      16 MCO:BGN:INIT NODE,CP=RPNNAA-X,REL=255,VER=2.3.1
      40 SGN:PER:OK
      69 SGN:INI:BND OK
      71 TSM:INIT
      73 TSF:WUR:MS=0
      75 TSM:INIT:TSP OK
      77 TSM:INIT:STATID=71
      79 TSF:SID:OK,ID=71
      81 TSM:FPAR
      83 SGN:SKP:MSG CMD=3,TYPE=7
      360 TSF:MSG:SEND,71-71-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      1486 TSF:MSG:READ,0-0-71,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      1492 SGN:SKP:MSG CMD=3,TYPE=8
      1495 TSF:MSG:FPAR OK,ID=0,D=1
      2369 TSM:FPAR:OK
      2369 TSM:ID
      2371 TSM:ID:OK
      2373 TSM:UPL
      2375 SGN:SKP:MSG CMD=3,TYPE=24
      5828 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      7835 TSM:UPL
      7835 SGN:SKP:MSG CMD=3,TYPE=24
      11536 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
      13543 TSM:UPL
      13543 SGN:SKP:MSG CMD=3,TYPE=24
      16592 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=NACK:1
      18601 TSM:UPL
      18601 SGN:SKP:MSG CMD=3,TYPE=24
      20563 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=3,st=NACK:1
      22573 !TSM:UPL:FAIL
      22575 TSM:FPAR
      22575 SGN:SKP:MSG CMD=3,TYPE=7
      23083 TSF:MSG:SEND,71-71-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=4,st=OK:
      23779 TSF:MSG:READ,0-0-71,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      23785 SGN:SKP:MSG CMD=3,TYPE=8
      23787 TSF:MSG:FPAR OK,ID=0,D=1
      25092 TSM:FPAR:OK
      25094 TSM:ID
      25094 TSM:ID:OK
      25096 TSM:UPL
      25098 SGN:SKP:MSG CMD=3,TYPE=24
      28579 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
      30586 TSM:UPL
      30586 SGN:SKP:MSG CMD=3,TYPE=24
      33423 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
      35432 TSM:UPL
      35432 SGN:SKP:MSG CMD=3,TYPE=24
      38531 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=NACK:1
      40538 TSM:UPL
      40538 SGN:SKP:MSG CMD=3,TYPE=24
      42811 !TSF:MSG:SEND,71-71-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=3,st=NACK:1
      44820 !TSM:UPL:FAIL
      44822 TSM:FPAR
      44824 SGN:SKP:MSG CMD=3,TYPE=7
      45328 TSF:MSG:SEND,71-71-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=4,st=OK:
      

      What the Gateway reports:

      Jan  9 00:34:52 nettemp mysgw: TSF:MSG:READ,71-71-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Jan  9 00:34:52 nettemp mysgw: TSF:MSG:BC
      Jan  9 00:34:52 nettemp mysgw: TSF:MSG:FPAR REQ,ID=71
      Jan  9 00:34:52 nettemp mysgw: TSF:PNG:SEND,TO=0
      Jan  9 00:34:52 nettemp mysgw: TSF:CKU:OK
      Jan  9 00:34:52 nettemp mysgw: TSF:MSG:GWL OK
      Jan  9 00:34:53 nettemp mysgw: TSF:MSG:SEND,0-0-71-71,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      Jan  9 00:35:15 nettemp mysgw: TSF:MSG:READ,71-71-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      Jan  9 00:35:15 nettemp mysgw: TSF:MSG:BC
      Jan  9 00:35:15 nettemp mysgw: TSF:MSG:FPAR REQ,ID=71
      Jan  9 00:35:15 nettemp mysgw: TSF:PNG:SEND,TO=0
      Jan  9 00:35:15 nettemp mysgw: TSF:CKU:OK
      Jan  9 00:35:15 nettemp mysgw: TSF:MSG:GWL OK
      Jan  9 00:35:15 nettemp mysgw: TSF:MSG:SEND,0-0-71-71,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      

      My Radio configuration:

      #define MY_RADIO_RFM69  
      #define MY_RFM69_FREQUENCY RFM69_433MHZ 
      #define MY_RFM69_NEW_DRIVER
      #define MY_IS_RFM69HW  
      #define MY_RFM69_ENABLE_ENCRYPTION
      #define RF69_IRQ_PIN 3  
      #define MY_RF69_IRQ_NUM 1 
      

      My signing configuration:

      #define MY_SIGNING_ATSHA204           
      #define MY_SIGNING_ATSHA204_PIN 8
      #define MY_SIGNING_REQUEST_SIGNATURES 
      #define MY_DEBUG_VERBOSE_SIGNING
      

      My whole code:

      /**
       * 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.
       *
       *******************************
      /* MINICORE DEFINITIONS
       *  
       *  BOARD: ATMEGA328P
       *  Bootloader: YES
       *  Variant: 328P / 328PA
       *  BOD:2.7V
       *  Clock: 8Mhz Internal
       *  Compiler LTO: Disabled
       *  
       */
      
      
      
      //#define RELAY
      #define PIR
      
      
      #ifdef RELAY
      #define RELAY_PIN_1  A0  // Arduino Digital I/O pin number for relay 
      #define RELAY_PIN_2  A1
      #define RELAY_PIN_3  A2
      #define RELAY_PIN_4  A3
      #define CHILD_ID_RELAY_1 10 // Id of the sensor child for 1st relay
      #define CHILD_ID_RELAY_2 11 // Id of the sensor child for 2nd relay
      #define CHILD_ID_RELAY_3 12 // Id of the sensor child for 3rd relay
      #define CHILD_ID_RELAY_4 13 // Id of the sensor child for 4th relay
      // Relay status
      #define RELAY_ON 1
      #define RELAY_OFF 0
      bool state1;
      bool state2;
      bool state3;
      bool state4;
      #endif
      
      #ifdef PIR
      #define PIR_PIN_1 7  // Arduino digital input pin for PIR
      #define PIR_PIN_2 6  // Arduino digital input pin for PIR
      #define PIR_PIN_3 5  // Arduino digital input pin for PIR
      #define CHILD_ID_PIR_1 30 // Id of the sensor child for 1st PIR
      #define CHILD_ID_PIR_2 31 // Id of the sensor child for 2nd PIR
      #define CHILD_ID_PIR_3 32 // Id of the sensor child for 3rd PIR
      #endif
      
      // Enable debug prints
      #define MY_DEBUG
      
      // Source of state change (used when printing debug information)
      #define CHANGE_STATE_SOURCE_RADIO 0
      #define CHANGE_STATE_SOURCE_SWITCH 1
      
      //HW SIGNING
      #define MY_SIGNING_ATSHA204           
      #define MY_SIGNING_ATSHA204_PIN 8
      #define MY_SIGNING_REQUEST_SIGNATURES  // will inform the gateway that I expect it to sign all messages to me
      #define MY_DEBUG_VERBOSE_SIGNING
      
      
      // Enable and select radio type attached
      #define MY_RADIO_RFM69  // Define for using RFM69 radio
      #define MY_RFM69_FREQUENCY RFM69_433MHZ 
      #define MY_RFM69_NEW_DRIVER
      #define MY_IS_RFM69HW  // Mandatory if you radio module is the high power version (RFM69HW and RFM69HCW), Comment it if it's not the case
      #define MY_RFM69_ENABLE_ENCRYPTION
      
      //#define MY_RFM69_NETWORKID 100  // Default is 100 in lib. Uncomment it and set your preferred network id if needed
      #define RF69_IRQ_PIN 3  // Default in lib is using D2 for common Atmel 328p (mini pro, nano, uno etc.). Uncomment it and set the pin you're using. Note for Atmel 328p, Mysensors, and regarding Arduino core implementation D2 or D3 are only available. But for advanced mcus like Atmel SAMD (Arduino Zero etc.), Esp8266 you will need to set this define for the corresponding pin used for IRQ
      #define MY_RF69_IRQ_NUM 1 // Temporary define (will be removed in next radio driver revision). Needed if you want to change the IRQ pin your radio is connected. So, if your radio is connected to D3/INT1, value is 1 (INT1). For others mcu like Atmel SAMD, Esp8266, value is simply the same as your RF69_IRQ_PIN
      //#define MY_RF69_SPI_CS 15 // If using a different CS pin for the SPI bus. Use MY_RFM69_CS_PIN for the development branch.
      
      //#define MY_REPEATER_FEATURE
      
      
      #define MY_NODE_ID 71
      #include <MySensors.h>
      
      
      
      #ifdef RELAY
      MyMessage msg_relay1(CHILD_ID_RELAY_1, V_LIGHT);  // relay1
      MyMessage msg_relay2(CHILD_ID_RELAY_2, V_LIGHT);  // relay2
      MyMessage msg_relay3(CHILD_ID_RELAY_3, V_LIGHT);  // relay3
      MyMessage msg_relay4(CHILD_ID_RELAY_4, V_LIGHT);  // relay4
      #endif
      void setRelayState(byte relayPin, bool value);
      
      #ifdef PIR
      MyMessage msg_pir1(CHILD_ID_PIR_1,V_TRIPPED);  // PIR1
      MyMessage msg_pir2(CHILD_ID_PIR_2,V_TRIPPED);  // PIR2
      MyMessage msg_pir3(CHILD_ID_PIR_3,V_TRIPPED);  // PIR3
      #endif
      
      
      void setup()
      {
        #ifdef MY_DEBUG
        Serial.println("Starting setup **************");
        #endif
      
        #ifdef RELAY
        pinMode(RELAY_PIN_1, OUTPUT);      // sets the RELAY pin as output
        pinMode(RELAY_PIN_2, OUTPUT);      // sets the RELAY pin as output
        pinMode(RELAY_PIN_3, OUTPUT);      // sets the RELAY pin as output
        pinMode(RELAY_PIN_4, OUTPUT);      // sets the RELAY pin as output
        digitalWrite(RELAY_PIN_1, RELAY_OFF);
        digitalWrite(RELAY_PIN_2, RELAY_OFF);
        digitalWrite(RELAY_PIN_3, RELAY_OFF);
        digitalWrite(RELAY_PIN_4, RELAY_OFF);
        // Set relay to last known state (using eeprom storage)
        state1 = loadState(CHILD_ID_RELAY_1);
        setRelayState(RELAY_PIN_1, state1);
        state2 = loadState(CHILD_ID_RELAY_2);
        setRelayState(RELAY_PIN_2, state2);
        state3 = loadState(CHILD_ID_RELAY_3);
        setRelayState(RELAY_PIN_3, state3);
        state4 = loadState(CHILD_ID_RELAY_4);
        setRelayState(RELAY_PIN_4, state4);
        #endif
      
        #ifdef PIR
        pinMode(PIR_PIN_1, INPUT);      // sets the PIR pin as input
        pinMode(PIR_PIN_2, INPUT);      // sets the PIR pin as input
        pinMode(PIR_PIN_3, INPUT);      // sets the PIR pin as input
        #endif
        
      
        #ifdef MY_DEBUG
        Serial.println("finished setup **************");
        #endif
        
      }
      
      void presentation()
      {
        #ifdef MY_DEBUG
        Serial.println("Starting presentation **************");
        #endif
        
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("SOTAO_NODE", "1.0");
      
        // Register all sensors to gw (they will be created as child devices)
      
        #ifdef RELAY
        present(CHILD_ID_RELAY_1, S_LIGHT, "Relay_1", true);
        present(CHILD_ID_RELAY_2, S_LIGHT, "Relay_2", true);
        present(CHILD_ID_RELAY_3, S_LIGHT, "Relay_3", true);
        present(CHILD_ID_RELAY_4, S_LIGHT, "Relay_4", true);
        #endif
      
         #ifdef PIR
        present(CHILD_ID_PIR_1, S_MOTION, "TEXT_A", true);  // CHILD ID =  and forcing ack for this node's messages
        present(CHILD_ID_PIR_2, S_MOTION, "TEXT_B", true);  // CHILD ID =  and forcing ack for this node's messages
        present(CHILD_ID_PIR_3, S_MOTION, "TEXT_C", true);  // CHILD ID =  and forcing ack for this node's messages
        #endif
        
        #ifdef MY_DEBUG
        Serial.println("finished presentation **************");
        #endif
        
      }
      
      void loop()
      {
        #ifdef PIR
        // Read digital motion value from PIRs
        bool tripped1 = digitalRead(PIR_PIN_1) == HIGH;  
        #ifdef MY_DEBUG
        Serial.println(tripped1);
        #endif
        send(msg_pir1.set(tripped1?"1":"0"));  // Send tripped value to gw
      
        bool tripped2 = digitalRead(PIR_PIN_2) == HIGH;
        #ifdef MY_DEBUG
        Serial.println(tripped2);
        #endif
        send(msg_pir2.set(tripped2?"1":"0"));  // Send tripped value to gw
      
        bool tripped3 = digitalRead(PIR_PIN_3) == HIGH;
        #ifdef MY_DEBUG
        Serial.println(tripped3);
        #endif
        send(msg_pir3.set(tripped3?"1":"0"));  // Send tripped value to gw
        #endif
      
      }
      
      
      #ifdef RELAY
      void receive(const MyMessage &message) { 
      if (message.type == V_STATUS) {
       switch (message.sensor) {
        case CHILD_ID_RELAY_1:    
          state1 = message.getBool();          // Change relay state
          setRelayState(RELAY_PIN_1, state1);    
          saveState(CHILD_ID_RELAY_1, state1);        // Store state in eeprom
          // Write some debug info
          printStateChangedDebug(CHANGE_STATE_SOURCE_RADIO, CHILD_ID_RELAY_1, state1);
          break; 
        case CHILD_ID_RELAY_2:
          state2 = message.getBool();
          setRelayState(RELAY_PIN_2, state2);
          saveState(CHILD_ID_RELAY_2, state2);     // Store state in eeprom
          // Write some debug info
          printStateChangedDebug(CHANGE_STATE_SOURCE_RADIO, CHILD_ID_RELAY_2, state2);
          break;
         case CHILD_ID_RELAY_3:
          state3 = message.getBool();
          setRelayState(RELAY_PIN_3, state3);
          saveState(CHILD_ID_RELAY_3, state3);     // Store state in eeprom
          // Write some debug info
          printStateChangedDebug(CHANGE_STATE_SOURCE_RADIO, CHILD_ID_RELAY_3, state3);
          break;
         case CHILD_ID_RELAY_4:
          state4 = message.getBool();
          setRelayState(RELAY_PIN_4, state4);
          saveState(CHILD_ID_RELAY_4, state4);     // Store state in eeprom
          // Write some debug info
          printStateChangedDebug(CHANGE_STATE_SOURCE_RADIO, CHILD_ID_RELAY_4, state4);
          break;
         
        }
       }
      }
      
      // Set status of a relay pin
      void setRelayState(byte relayPin, bool value)
      {
        digitalWrite(relayPin, value ? RELAY_ON : RELAY_OFF);
      }
      
      #endif
      
      
      // Print debug info, centralized in one place to minimize memory usage and have only one #ifdef MY_DEBUG for all state change messages
      void printStateChangedDebug(int source, int sensorID, bool value) {
      #ifdef MY_DEBUG
        Serial.print(F("Sensor value changed, source="));
        Serial.print(source == CHANGE_STATE_SOURCE_RADIO ? F("Radio") : F("Physical switch"));
        Serial.print(F(", Sensor="));
        Serial.print(sensorID);
        Serial.print(F(", New status: "));
        Serial.println(value);
      #endif
      }
      
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • MySGW 2.3 log hangs frequently in RaspberryPi

      Hello,

      I have the latest MySensors Gateway in a raspberry PI3.
      Sometimes when I'm troubleshooting I have realized that the log hangs, and I thought it was the GW itself that was somehow hanging. However, when running the status command, the status is reported as fine and even the latest lines of the log are shown (and are more recent).

      Any idea how to solve this? With the log hanged, its difficult to troubleshoot....

      Printouts below.

      Thanks,
      Joaoabs

      pi@nettemp:~ $ date
      Sun Oct 14 11:06:32 WEST 2018
      pi@nettemp:~ $ tail -f /tmp/mysgw.log
      Oct 14 10:19:40 DEBUG TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Oct 14 10:19:41 DEBUG TSF:MSG:READ,50-50-0,s=40,c=1,t=1,pt=2,l=2,sg=1:66
      Oct 14 10:21:53 DEBUG TSF:SAN:OK
      Oct 14 10:26:52 DEBUG TSM:READY:NWD REQ
      Oct 14 10:26:52 DEBUG TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
      Oct 14 10:36:53 DEBUG TSF:SRT:OK
      Oct 14 10:36:53 DEBUG TSF:SAN:OK
      Oct 14 10:44:17 DEBUG TSF:MSG:READ,50-50-0,s=20,c=3,t=16,pt=0,l=0,sg=1:
      Oct 14 10:44:18 DEBUG !TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=NACK:<NONCE>
      Oct 14 10:44:18 DEBUG TSF:MSG:READ,50-50-0,s=
      ^C
      pi@nettemp:~ $ sudo systemctl status mysgw.service
      โ— mysgw.service - MySensors Gateway daemon
         Loaded: loaded (/etc/systemd/system/mysgw.service; enabled)
         Active: active (running) since Fri 2018-10-12 00:06:52 WEST; 2 days ago
       Main PID: 458 (mysgw)
         CGroup: /system.slice/mysgw.service
                 โ””โ”€458 /usr/local/bin/mysgw -q
      
      Oct 14 11:04:00 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=20,c=1,t=0,pt=7,l=5,sg=1:20.8
      Oct 14 11:04:00 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      Oct 14 11:04:00 nettemp mysgw[458]: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Oct 14 11:04:00 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=40,c=1,t=1,pt=2,l=2,sg=1:64
      Oct 14 11:04:00 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=199,c=3,t=16,pt=0,l=0,sg=1:
      Oct 14 11:04:00 nettemp mysgw[458]: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Oct 14 11:04:01 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=199,c=1,t=38,pt=7,l=5,sg=1:2.705
      Oct 14 11:04:01 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      Oct 14 11:04:01 nettemp mysgw[458]: TSF:MSG:SEND,0-0-50-50,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      Oct 14 11:04:01 nettemp mysgw[458]: TSF:MSG:READ,50-50-0,s=255,c=3,t=0,pt=1,l=1,sg=1:57
      Hint: Some lines were ellipsized, use -l to show in full.
      pi@nettemp:~ $ date
      Sun Oct 14 11:06:47 WEST 2018
      pi@nettemp:~ $ 
      pi@nettemp:~ $ head /tmp/mysgw.log
      Oct 12 00:06:52 INFO  Starting gateway...
      Oct 12 00:06:52 INFO  Protocol version - 2.3.0
      Oct 12 00:06:52 DEBUG MCO:BGN:INIT GW,CP=RPNGLS-X,VER=2.3.0
      Oct 12 00:06:52 DEBUG TSF:LRT:OK
      Oct 12 00:06:52 DEBUG TSM:INIT
      Oct 12 00:06:52 DEBUG TSF:WUR:MS=0
      Oct 12 00:06:52 DEBUG TSM:INIT:TSP OK
      Oct 12 00:06:52 DEBUG TSM:INIT:GW MODE
      Oct 12 00:06:52 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
      Oct 12 00:06:52 DEBUG MCO:REG:NOT NEEDED
      
      
      
      posted in Bug Reports
      joaoabs
      joaoabs
    • RE: [Solved] RFM69 and RaspberryPI GW

      Well, one of the problems when buying from china is that it takes so long to get the stuff that we sometimes forgot what we ordered ๐Ÿ™‚

      It seems my RFM69's are in fact RFM69HW (eventhough the chip has a "H").

      After reconfiguring the sensebender code and the raspberry configure command accordingly I got dialogue between them!

      Will now try encryption ๐Ÿ˜Ž

      Update: It seems it's not as simple as just adding the "#define MY_RFM69_ENABLE_ENCRYPTION" in the arduino code and "#define MY_RFM69_ENABLE_ENCRYPTION" in the ./configure command for the RPI GW... Will try to sort it out and if not able to make it work, will open a different thread.

      Update2: It seems it really is after all. Just needed a reboot, and the signing personalization will be re-used ๐Ÿ™‚

      posted in Troubleshooting
      joaoabs
      joaoabs
    • [Solved] RFM69 and RaspberryPI GW

      Hello,

      Since I wasn't been so successful with the NRF24+'s (lots of dropped packets because I'm using signing and it uses the whole frame, increasing the probability of failed transmissions) I bought a few 433MHz RFM69's and NRF2RFM69 adapters to test it.
      However, I'm even behind now because I can't get them to communicate. Maybe someone could point me towards the right direction?

      On the Raspberry PI I re-configured the gateway with the corresponding RFM69 commands:

      > ./configure --my-gateway=ethernet --my-port=5003 --my-transport=rfm69 --my-signing=software --my-signing-request-signatures --my-rfm69-frequency=433
      > make
      > sudo make install
      

      The signature part remains the same, as the config file remains identical.

      Rebooted it and it seems its OK in the logs:

      Aug 28 17:06:28 nettemp mysgw: Starting gateway...
      Aug 28 17:06:28 nettemp mysgw: Protocol version - 2.3.0
      Aug 28 17:06:28 nettemp mysgw: MCO:BGN:INIT GW,CP=RPNGLS--,VER=2.3.0
      Aug 28 17:06:28 nettemp mysgw: TSF:LRT:OK
      Aug 28 17:06:28 nettemp mysgw: TSM:INIT
      Aug 28 17:06:28 nettemp mysgw: TSF:WUR:MS=0
      Aug 28 17:06:28 nettemp mysgw: TSM:INIT:TSP OK
      Aug 28 17:06:28 nettemp mysgw: TSM:INIT:GW MODE
      Aug 28 17:06:28 nettemp mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      Aug 28 17:06:28 nettemp mysgw: MCO:REG:NOT NEEDED
      Aug 28 17:06:28 nettemp mysgw: Listening for connections on 0.0.0.0:5003
      Aug 28 17:06:28 nettemp mysgw: MCO:BGN:STP
      Aug 28 17:06:28 nettemp mysgw: MCO:BGN:INIT OK,TSP=1
      Aug 28 17:07:18 nettemp mysgw: New connection from 127.0.0.1
      Aug 28 17:07:18 nettemp mysgw: GWT:TSA:C=0,CONNECTED
      Aug 28 17:07:18 nettemp mysgw: GWT:RFC:C=0,MSG=0;0;3;0;2;
      Aug 28 17:07:18 nettemp mysgw: GWT:RFC:C=0,MSG=
      
      

      I initially started to do tests using the slim nodes, but after some failed tries and troubleshooting I realized that it doesn't have a connection to D2 pin, which seems to be required for RFM69 for interrupt purposes, so I took a sensebender micro, which should have.

      The main changes in the sensebender code were basically:

      #define MY_RADIO_RFM69  // Define for using RFM69 radio
      #define MY_RFM69_FREQUENCY RFM69_433MHZ 
      #define MY_RFM69_NEW_DRIVER
      
      

      However, it seems they don't communicate:

      __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.3.0
      
      16 MCO:BGN:INIT NODE,CP=RPNNAS--,VER=2.3.0
      71 SGN:PER:OK
      92 SGN:INI:BND OK
      94 TSM:INIT
      94 TSF:WUR:MS=0
      98 TSM:INIT:TSP OK
      100 TSM:INIT:STATID=50
      102 TSF:SID:OK,ID=50
      104 TSM:FPAR
      106 SGN:SGN:NREQ=255
      112 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2121 !TSM:FPAR:NO REPLY
      2123 TSM:FPAR
      2125 SGN:SGN:NREQ=255
      2131 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      4141 !TSM:FPAR:NO REPLY
      4143 TSM:FPAR
      4145 SGN:SGN:NREQ=255
      4151 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      6160 !TSM:FPAR:NO REPLY
      6162 TSM:FPAR
      6164 SGN:SGN:NREQ=255
      6170 TSF:MSG:SEND,50-50-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      8179 !TSM:FPAR:FAIL
      8181 TSM:FAIL:CNT=1
      8183 TSM:FAIL:DIS
      8185 TSF:TDI:TSL
      
      

      The node can't find a parent, and they are in the same room, at a 6m distance.
      I've tried swapping the radios, still no luck...

      I double-checked the wiring and it's OK (and if it wasn't, the TSP woudn't come up, right?).
      I've tried with and without the " #define MY_RFM69_NEW_DRIVER " declaration.
      I'm using the latest version of MySensors Library (2.3.0) on both GW and node.

      I'm short on ideas for the next step. Any suggestion?

      I'm posting the code just for reference (most of it commented so I could have space for debug info).

      /**
       * 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 - Thomas Bowman MC8rch
       * 
       * DESCRIPTION
       * Default sensor sketch for Sensebender Micro module
       * Act as a temperature / humidity sensor by default.
       *
       * If A0 is held low while powering on, it will enter testmode, which verifies all on-board peripherals
       *  
       * Battery voltage is as battery percentage (Internal message), and optionally as a sensor value (See defines below)
       *
       *
       * Version 1.3 - Thomas Bowman MC8rch
       * Improved transmission logic, eliminating spurious transmissions (when temperatuere / humidity fluctuates 1 up and down between measurements) 
       * Added OTA boot mode, need to hold A1 low while applying power. (uses slightly more power as it's waiting for bootloader messages)
       * 
       * Version 1.4 - Thomas Bowman MC8rch
       * 
       * Corrected division in the code deciding whether to transmit or not, that resulted in generating an integer. Now it's generating floats as expected.
       * Simplified detection for OTA bootloader, now detecting if MY_OTA_FIRMWARE_FEATURE is defined. If this is defined sensebender automaticly waits 300mS after each transmission
       * Moved Battery status messages, so they are transmitted together with normal sensor updates (but only every 60th minute)
       * 
       * 
       * 
       * MY STUFF:
       * NODE: Janela Norte - SALA  ID: 50
       * HW: SENSEBENDER MICRO
       * 
       * BATT_SENSOR    199   
       * DOOR           30      D3
       * TEMPERATURE    20      I2C
       * HUMIDITY       40      I2C
       * 
       *  * 
       */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      //#define DOOR
      //#define HUM
      //#define BAT
      //#define TEST_MODE
      
      
      //CODE FOR SIGNING************************************************
      //#define MY_SIGNING_WEAK_SECURITY 
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN A1
      #define MY_SIGNING_REQUEST_SIGNATURES  // will inform the gateway that I expect it to sign all messages to me
      #define MY_DEBUG_VERBOSE_SIGNING
      
      
      // Define a static node address, remove if you want auto address assignment
      #define MY_NODE_ID 50
      // Child sensor ID's
      #define CHILD_ID_TEMP  20
      #ifdef HUM
      #define CHILD_ID_HUM   40
      #endif
      #ifdef DOOR
      #define CHILD_ID_A 30   // DOOR
      #endif
      
      // Uncomment the line below, to transmit battery voltage as a normal sensor value
      #ifdef BAT
      #define BATT_SENSOR    199
      #endif
      
      
      // Enable and select radio type attached
      //#define MY_RADIO_NRF24
      #define MY_RADIO_RFM69  // Define for using RFM69 radio
      #define MY_RFM69_FREQUENCY RFM69_433MHZ 
      #define MY_RFM69_NEW_DRIVER
      
      
      //Enable to support OTA for this node (needs DualOptiBoot boot-loader to fully work)
      //#define MY_OTA_FIRMWARE_FEATURE
      
      #include <SPI.h>
      #include <MySensors.h>
      #include <Wire.h>
      #include <SI7021.h>
      #ifndef MY_OTA_FIRMWARE_FEATURE
      #include "drivers/SPIFlash/SPIFlash.cpp"
      #endif
      #include <EEPROM.h>  
      #include <sha204_lib_return_codes.h>
      #include <sha204_library.h>
      #include <RunningAverage.h>
      //#include <avr/power.h>
      
      
      #define RELEASE "JS 2018V1"
      
      #define AVERAGES 2
      
      
      // How many milli seconds between each measurement
      #define MEASURE_INTERVAL 60000
      
      // How many milli seconds should we wait for OTA?
      #define OTA_WAIT_PERIOD 300
      
      // FORCE_TRANSMIT_INTERVAL, this number of times of wakeup, the sensor is forced to report all values to the controller
      #define FORCE_TRANSMIT_INTERVAL 30 
      
      // When MEASURE_INTERVAL is 60000 and FORCE_TRANSMIT_INTERVAL is 30, we force a transmission every 30 minutes.
      // Between the forced transmissions a tranmission will only occur if the measured value differs from the previous measurement
      
      
      // HUMI_TRANSMIT_THRESHOLD tells how much the humidity should have changed since last time it was transmitted. Likewise with
      // TEMP_TRANSMIT_THRESHOLD for temperature threshold.
      #ifdef HUM
      #define HUMI_TRANSMIT_THRESHOLD 0.5
      #endif HUM
      #ifdef TEMP
      #define TEMP_TRANSMIT_THRESHOLD 0.5
      #endif
      
      // Pin definitions
      #define TEST_PIN       A0
      #define LED_PIN        A2
      #define ATSHA204_PIN   17 // A3
      
      
      //CODE OF DOOR SKETCH************************************************
      #ifdef DOOR
      #include <Bounce2.h>
      
      #define BUTTON_PIN_A  3  // Arduino Digital I/O pin for button/reed switch
      Bounce debouncer_a = Bounce(); 
      int oldValue_a=-1;
      // Change to V_LIGHT if you use S_LIGHT in presentation below
      MyMessage msg_door_a(CHILD_ID_A,V_TRIPPED);     // had to change the MyMessage var to avoid overlap
      #endif
      
      
      const int sha204Pin = ATSHA204_PIN;
      atsha204Class sha204(sha204Pin);
      
      SI7021 humiditySensor;
      SPIFlash flash(8, 0x1F65);
      
      // Sensor messages
      #ifdef HUM
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      #endif
      #ifdef TEMP
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      #endif
      
      #ifdef BATT_SENSOR
      MyMessage msgBatt(BATT_SENSOR, V_VOLTAGE);
      #endif
      
      // Global settings
      int measureCount = 0;
      int sendBattery = 0;
      boolean isMetric = true;
      boolean highfreq = true;
      boolean transmission_occured = false;
      
      // Storage of old measurements
      #ifdef TEMP
      float lastTemperature = -100;
      #endif
      #ifdef HUM
      int lastHumidity = -100;
      #endif
      #ifdef BAT
      long lastBattery = -100;
      #endif
      #ifdef HUM
      RunningAverage raHum(AVERAGES);
      #endif
      
      /****************************************************
       *
       * Setup code 
       *
       ****************************************************/
      void setup() {
      
        pinMode(LED_PIN, OUTPUT);
        digitalWrite(LED_PIN, LOW);
      
        Serial.begin(115200);
        Serial.print(F("Sensebender Micro FW "));
        Serial.print(RELEASE);
        Serial.flush();
      
        // First check if we should boot into test mode
      
        pinMode(TEST_PIN,INPUT);
        digitalWrite(TEST_PIN, HIGH); // Enable pullup
        #ifdef TEST_MODE
        if (!digitalRead(TEST_PIN)) testMode();
       #endif
      
        // Make sure that ATSHA204 is not floating
        pinMode(ATSHA204_PIN, INPUT);
        digitalWrite(ATSHA204_PIN, HIGH);
      
        digitalWrite(TEST_PIN,LOW);
      
        digitalWrite(LED_PIN, HIGH); 
      
        #ifdef HUM
        humiditySensor.begin();
        #endif
      
        digitalWrite(LED_PIN, LOW);
      
        Serial.flush();
        Serial.println(F(" - Online!"));
      
        isMetric = getControllerConfig().isMetric;
        Serial.print(F("isMetric: ")); Serial.println(isMetric);
        #ifdef HUM
        raHum.clear();
        #endif
        #ifdef HUM
        sendTempHumidityMeasurements(false);
        #endif
        #ifdef TEMP
        sendTempHumidityMeasurements(false);
        #endif
        #ifdef BAT
        sendBattLevel(false);
        #endif
        
      #ifdef MY_OTA_FIRMWARE_FEATURE  
        Serial.println("OTA FW update enabled");
      #endif
      
      //CODE OF DOOR SKETCH************************************************
      
      #ifdef DOOR
      // Define as input
      pinMode(BUTTON_PIN_A,INPUT);
      // Activate internal pull-up
      digitalWrite(BUTTON_PIN_A,HIGH);
      // After setting up the button, setup debouncer
      debouncer_a.attach(BUTTON_PIN_A);
      debouncer_a.interval(5);
      #endif
      
      }
      
      void presentation()  {
        sendSketchInfo("SENSOR JANELA", RELEASE);
      #ifdef TEMP
        present(CHILD_ID_TEMP,S_TEMP);
      #endif
      #ifdef HUM
        present(CHILD_ID_HUM,S_HUM);
      #endif
      
      #ifdef BATT_SENSOR
        present(BATT_SENSOR, S_POWER);
      #endif
      
      #ifdef DOOR
        present(CHILD_ID_A, S_DOOR, "Persiana", true);  // CHILD ID = 30 and forcing ack for this child's messages
      #endif
        
      }
      
      
      /***********************************************
       *
       *  Main loop function
       *
       ***********************************************/
      void loop() {
      
        Serial.println("LOOP");
      
        //CODE OF MOTION SKETCH************************************************
      
      #ifdef DOOR
       debouncer_a.update();
       // Get the update value
       // int value_a = debouncer_a.read();
      
      int value_a = digitalRead(BUTTON_PIN_A);
        Serial.print("old:");
        Serial.println(oldValue_a);
        Serial.print("new:");
        Serial.println(value_a);
        
      
        if (value_a != oldValue_a) {
           // Send in the new value
         //  send(msg_door_a.set(value_a==HIGH ? 1 : 0));
           send(msg_door_a.set(value_a==CHANGE ? 1 : 0));
           oldValue_a = value_a;
        }
      
      #endif
      
      
        measureCount ++;
        sendBattery ++;
        bool forceTransmit = false;
        transmission_occured = false;
      
        if (measureCount >= FORCE_TRANSMIT_INTERVAL) { // force a transmission
          forceTransmit = true; 
          measureCount = 0;
        }
        #ifdef HUM
        #ifdef TEMP
        sendTempHumidityMeasurements(forceTransmit);
      #endif
      #endif
        
      /*  if (sendBattery > 60) 
        {
           sendBattLevel(forceTransmit); // Not needed to send battery info that often
           sendBattery = 0;
        }*/
      #ifdef MY_OTA_FIRMWARE_FEATURE
        if (transmission_occured) {
            wait(OTA_WAIT_PERIOD);
        }
      
      
      
      
      
            sleep(digitalPinToInterrupt(BUTTON_PIN_A), CHANGE, MEASURE_INTERVAL);  
      #endif
      
        //sleep(MEASURE_INTERVAL);  
      }
      
      
      /*********************************************
       *
       * Sends temperature and humidity from Si7021 sensor
       *
       * Parameters
       * - force : Forces transmission of a value (even if it's the same as previous measurement)
       *
       *********************************************/
      
      #ifdef HUM
      #ifdef TEMP
      void sendTempHumidityMeasurements(bool force)
      {
        bool tx = force;
      
        si7021_env data = humiditySensor.getHumidityAndTemperature();
      
        raHum.addValue(data.humidityPercent);
      
        float diffTemp = abs(lastTemperature - (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths)/100.0);
        float diffHum = abs(lastHumidity - raHum.getAverage());
      
        Serial.print(F("TempDiff :"));Serial.println(diffTemp);
        Serial.print(F("HumDiff  :"));Serial.println(diffHum); 
      
        if (isnan(diffHum)) tx = true; 
        if (diffTemp >= TEMP_TRANSMIT_THRESHOLD) tx = true;
        if (diffHum >= HUMI_TRANSMIT_THRESHOLD) tx = true;
      
        if (tx) {
          measureCount = 0;
          float temperature = (isMetric ? data.celsiusHundredths : data.fahrenheitHundredths) / 100.0;
      
          int humidity = data.humidityPercent;
          Serial.print("T: ");Serial.println(temperature);
          Serial.print("H: ");Serial.println(humidity);
      
          send(msgTemp.set(temperature,1));
          send(msgHum.set(humidity));
          lastTemperature = temperature;
          lastHumidity = humidity;
          transmission_occured = true;
          if (sendBattery > 60) {
           sendBattLevel(true); // Not needed to send battery info that often
           sendBattery = 0;
          }
        }
      }
      #endif
      #endif
      
      
      /********************************************
       *
       * Sends battery information (battery percentage)
       *
       * Parameters
       * - force : Forces transmission of a value
       *
       *******************************************/
      #ifdef BAT
      void sendBattLevel(bool force)
      {
        if (force) lastBattery = -1;
        long vcc = readVcc();
        if (vcc != lastBattery) {
          lastBattery = vcc;
      
      #ifdef BATT_SENSOR
          float send_voltage = float(vcc)/1000.0f;
          send(msgBatt.set(send_voltage,3));
      #endif
      
          // Calculate percentage
      
          vcc = vcc - 1900; // subtract 1.9V from vcc, as this is the lowest voltage we will operate at
      
          long percent = vcc / 14.0;
          sendBatteryLevel(percent);
          transmission_occured = true;
        }
      }
      
      /*******************************************
       *
       * Internal battery ADC measuring 
       *
       *******************************************/
      long readVcc() {
        // Read 1.1V reference against AVcc
        // set the reference to Vcc and the measurement to the internal 1.1V reference
        #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
          ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
        #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
          ADMUX = _BV(MUX5) | _BV(MUX0);
        #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__)
          ADcdMUX = _BV(MUX3) | _BV(MUX2);
        #else
          ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
        #endif  
      
        delay(2); // Wait for Vref to settle
        ADCSRA |= _BV(ADSC); // Start conversion
        while (bit_is_set(ADCSRA,ADSC)); // measuring
      
        uint8_t low  = ADCL; // must read ADCL first - it then locks ADCH  
        uint8_t high = ADCH; // unlocks both
      
        long result = (high<<8) | low;
      
        result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000
        return result; // Vcc in millivolts
      
      }
      #endif
      
      /****************************************************
       *
       * Verify all peripherals, and signal via the LED if any problems.
       *
       ****************************************************/
       #ifdef TESTMODE
      void testMode()
      {
        uint8_t rx_buffer[SHA204_RSP_SIZE_MAX];
        uint8_t ret_code;
        byte tests = 0;
      
        digitalWrite(LED_PIN, HIGH); // Turn on LED.
        Serial.println(F(" - TestMode"));
        Serial.println(F("Testing peripherals!"));
        Serial.flush();
        Serial.print(F("-> SI7021 : ")); 
        Serial.flush();
      
        if (humiditySensor.begin()) 
        {
          Serial.println(F("ok!"));
          tests ++;
        }
        else
        {
          Serial.println(F("failed!"));
        }
        Serial.flush();
      
        Serial.print(F("-> Flash : "));
        Serial.flush();
        if (flash.initialize())
        {
          Serial.println(F("ok!"));
          tests ++;
        }
        else
        {
          Serial.println(F("failed!"));
        }
        Serial.flush();
      
      
        Serial.print(F("-> SHA204 : "));
        ret_code = sha204.sha204c_wakeup(rx_buffer);
        Serial.flush();
        if (ret_code != SHA204_SUCCESS)
        {
          Serial.print(F("Failed to wake device. Response: ")); Serial.println(ret_code, HEX);
        }
        Serial.flush();
        if (ret_code == SHA204_SUCCESS)
        {
          ret_code = sha204.getSerialNumber(rx_buffer);
          if (ret_code != SHA204_SUCCESS)
          {
            Serial.print(F("Failed to obtain device serial number. Response: ")); Serial.println(ret_code, HEX);
          }
          else
          {
            Serial.print(F("Ok (serial : "));
            for (int i=0; i<9; i++)
            {
              if (rx_buffer[i] < 0x10)
              {
                Serial.print('0'); // Because Serial.print does not 0-pad HEX
              }
              Serial.print(rx_buffer[i], HEX);
            }
            Serial.println(")");
            tests ++;
          }
      
        }
        Serial.flush();
      
        Serial.println(F("Test finished"));
      
        if (tests == 3) 
        {
          Serial.println(F("Selftest ok!"));
          while (1) // Blink OK pattern!
          {
            digitalWrite(LED_PIN, HIGH);
            delay(200);
            digitalWrite(LED_PIN, LOW);
            delay(200);
          }
        }
        else 
        {
          Serial.println(F("----> Selftest failed!"));
          while (1) // Blink FAILED pattern! Rappidly blinking..
          {
          }
        }  
      }
      #endif
      
      

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Connecting the Radio

      Hi, just to warn navigation that the above code for RFM69 seems to have a glitch:

      #define MY_RFM69_FREQUENCY RF69_433MHZ doesn't compile but changing it to #define MY_RFM69_FREQUENCY RFM69_433MHZ it does. (missing the "M" in RF69_433MHZ).

      posted in Announcements
      joaoabs
      joaoabs
    • Antenna for the RFM69

      Hi,

      I guess I'm lacking a bit of antenna theory...

      I'll be connecting a single core wire to act as an antenna to the RFM69 module. I could understand that it should be exactly 164.7mm long for 434Mhz. I could also understand that having the most accurate lenght makes all of the difference in the antenna efficiency.

      Now my question is: Since I'm going to solder it in the RFM69 hole, should I consider a few mm more, for the part that goes through the hole?
      In other words, is the 164.7mm the size from the PCB surface (and therefore needs a few mm extra to get into the hole), or what matters is having a 164.7mm wire soldered (and having some mm out in the other PCB surface).

      Thanks,
      Joaoabs

      posted in Hardware
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Security & Signing

      I have my network with NRF24+'s with HW signing. Now, due to performance limitations of the NRF's I'll move to RFM69's which supports encryption.
      How can I set encryption in Mysensors? Is it already available? Can I have both signing and Encryption?

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ NRF2RFM69

      What value should be the C1 SMD ? I don't have kicad, so I can't open the file. Just saw it the 3d sketch and realized I have to order some SMDs...

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: Introductions and Range Issues

      @sundberg84 I'm wondering if you use signing?
      I could understand from other threads is that the usage of signing afects the performance of the NRF's becasue it somehow "pushes it to the limit".

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Introductions and Range Issues

      @rozpruwacz said in Introductions and Range Issues:

      @titvs I also would recommend to go for rfm69. I had exactly same problems as you, and tried a lot of differenr nrf24 modules and still couldnt get a descent result. As soon as i switched to rfm69 all my problems disappeared ๐Ÿ™‚ after all i spent more money on nrf24 modules than i would spend on rfm69 if i would start with them. Use nrf24 to rfm69 adapter board for easy transition.

      Hi,

      I'm also experiencing some troubles with NRF24+'s, but I already have a considerable number of nodes with it. Most of them have the 2x4 pin header like the ac/dc ssd relay and the slim node.

      Is there any adapter that could easily adapt ( ! ) from the NRF24+ format to the RFM69?

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ AC-DC double solid state relay module

      Hi,
      Any particular reason for the values of the thermal cut-offs? (73ยบC, 10A)?
      This temperature (73ยบC) makes it difficult to solder, I've burned a couple when trying to solder it... And why 10A? Shouldn't we get a lower current? I know the other fuse is limiting the current to 0.2A, but if we have a lower current on this one we may get cheaper components... Wouldn't this one, for instance, do the same function? https://www.ebay.com/itm/10-Pcs-Fuji-Microtemp-Thermal-Fuse-115-TF-Cutoff-1A-250V-New/322657006381

      If the PCB is inside a box, without any lossen wires, couldn't we limit the temperature to a sliglhly higher value (115ยบC)?

      Thanks

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Sensebender Micro

      Hi,

      The slimnode original thread has a few (not sure anymore which example I'm using now because the thread is huge and I've lost track of it)
      Here is one example:
      https://forum.mysensors.org/topic/2067/my-slim-2aa-battery-node/306

      and other:
      https://forum.mysensors.org/topic/2067/my-slim-2aa-battery-node/116

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Sensebender Micro

      Hello,
      Coming back to the battery powering topic: I was checking some SlimNode code and it uses #include <Vcc.h> library to report battery level. I can see in that the example code above doesn't use it. Does anyone know what is the difference? Which is better?
      Thanks,

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: My Slim 2AA Battery Node

      Hi,

      Maybe a silly question, but where did you get the library for the Vcc.h ?

       #include <Vcc.h>
                       ^
      compilation terminated.
      exit status 1
      Error compiling for board ATmega328.
      
      

      I couldn't find any VCC in the MySensors library set and also doing a search for vcc in the Arduino Library Manager I can't find it either...

      [EDIT] : Found it in other thread. Leaving here for reference: https://github.com/Yveaux/arduino_vcc

      Thanks

      posted in My Project
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ My Slim 2AA Battery Node

      Hello,

      I'm sorry to insist on this one, but I'm a bit lost....

      I could understand that the recommended bootloader is MiniCore. I installed it in my Arduino IDE and after several tries-and-errors I believe I was able to burn the MiniCore bootloader by using an USBasp2 connected to the ICSP on the slim board:

      /home/jabss/Desktop/arduino-1.8.2/hardware/tools/avr/bin/avrdude -C/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3f:m -Uefuse:w:0xff:m -Uhfuse:w:0xd7:m -Ulfuse:w:0xe2:m 
      
      avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
               User configuration file is "/home/jabss/.avrduderc"
               User configuration file does not exist or is not a regular file, skipping
      
               Using Port                    : usb
               Using Programmer              : usbasp
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : usbasp
               Description     : USBasp, http://www.fischl.de/usbasp/
      
      avrdude: auto set sck period (because given equals null)
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: erasing chip
      avrdude: auto set sck period (because given equals null)
      avrdude: reading input file "0x3f"
      avrdude: writing lock (1 bytes):
      
      /home/jabss/Desktop/arduino-1.8.2/hardware/tools/avr/bin/avrdude -C/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf -v -patmega328p -cusbasp -Pusb -Uflash:w:/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex:i -Ulock:w:0x0f:m 
      
      avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
               User configuration file is "/home/jabss/.avrduderc"
               User configuration file does not exist or is not a regular file, skipping
      
               Using Port                    : usb
               Using Programmer              : usbasp
               AVR Part                      : ATmega328P
               Chip Erase delay              : 9000 us
               PAGEL                         : PD7
               BS2                           : PC2
               RESET disposition             : dedicated
               RETRY pulse                   : SCK
               serial program mode           : yes
               parallel program mode         : yes
               Timeout                       : 200
               StabDelay                     : 100
               CmdexeDelay                   : 25
               SyncLoops                     : 32
               ByteDelay                     : 0
               PollIndex                     : 3
               PollValue                     : 0x53
               Memory Detail                 :
      
                                        Block Poll               Page                       Polled
                 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
                 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
                 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
      
               Programmer Type : usbasp
               Description     : USBasp, http://www.fischl.de/usbasp/
      
      avrdude: auto set sck period (because given equals null)
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x3f:
      avrdude: load data lock data from input file 0x3f:
      avrdude: input file 0x3f contains 1 bytes
      avrdude: reading on-chip lock data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lock verified
      avrdude: reading input file "0xff"
      avrdude: writing efuse (1 bytes):
      
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 1 bytes of efuse written
      avrdude: verifying efuse memory against 0xff:
      avrdude: load data efuse data from input file 0xff:
      avrdude: input file 0xff contains 1 bytes
      avrdude: reading on-chip efuse data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of efuse verified
      avrdude: reading input file "0xd7"
      avrdude: writing hfuse (1 bytes):
      
      Writing | ################################################## | 100% 0.01s
      
      avrdude: 1 bytes of hfuse written
      avrdude: verifying hfuse memory against 0xd7:
      avrdude: load data hfuse data from input file 0xd7:
      avrdude: input file 0xd7 contains 1 bytes
      avrdude: reading on-chip hfuse data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of hfuse verified
      avrdude: reading input file "0xe2"
      avrdude: writing lfuse (1 bytes):
      
      Writing | ################################################## | 100% 0.00s
      
      avrdude: 1 bytes of lfuse written
      avrdude: verifying lfuse memory against 0xe2:
      avrdude: load data lfuse data from input file 0xe2:
      avrdude: input file 0xe2 contains 1 bytes
      avrdude: reading on-chip lfuse data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lfuse verified
      
      avrdude done.  Thank you.
      
      avrdude: AVR device initialized and ready to accept instructions
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: Device signature = 0x1e950f (probably m328p)
      avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
               To disable this feature, specify the -D option.
      avrdude: erasing chip
      avrdude: auto set sck period (because given equals null)
      avrdude: reading input file "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex"
      avrdude: writing flash (2 bytes):
      
      Writing | ################################################## | 100% 0.07s
      
      avrdude: 2 bytes of flash written
      avrdude: verifying flash memory against /root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex:
      avrdude: load data flash data from input file /root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex:
      avrdude: input file /root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/bootloaders/empty/empty.hex contains 2 bytes
      avrdude: reading on-chip flash data:
      
      Reading | ################################################## | 100% 0.04s
      
      avrdude: verifying ...
      avrdude: 2 bytes of flash verified
      avrdude: reading input file "0x0f"
      avrdude: writing lock (1 bytes):
      
      Writing | ################################################## | 100% 0.01s
      
      avrdude: 1 bytes of lock written
      avrdude: verifying lock memory against 0x0f:
      avrdude: load data lock data from input file 0x0f:
      avrdude: input file 0x0f contains 1 bytes
      avrdude: reading on-chip lock data:
      
      Reading | ################################################## | 100% 0.00s
      
      avrdude: verifying ...
      avrdude: 1 bytes of lock verified
      
      avrdude done.  Thank you.
      
      

      Just for reference, the parameters were:
      Board: Atmega328
      Bootloader: No (only worked this way, but still not sure what this means: If is already a bootloader on the chip, or if we want to write a bootloader)
      Variant: 328P
      BOD: Disabled
      Clock: 8Mhz internal (here I think its what we want to configure on the target chip - I wasn't sure what was about because it could also have been the clock frequency of the programmer)
      Compiler LTO: Disabled
      Programer: USBASP

      Anyway, after this supposed success message, I believe I have a MiniCore bootloader in the chip and now it should be able to be programed with the AVRISPMKII (with the usb/serial programing adapter I use to program my mini-pros).

      However, I'm not able to get it working. Maybe I'm choosing the wrong definitions in the arduino IDE.
      As board definition, I'm using the same as when burning the bootloader:

      Board: Atmega328 (from the minicore subset)
      Bootloader: Yes
      Variant: 328P
      BOD: Disabled
      Clock: 8Mhz internal
      Compiler LTO: Disabled
      Programer: AVRISPMKII

      For instance, to load the ascii table example (for testing purposes), I get this error:

      Insert Code Build options changed, rebuilding all
      Sketch uses 2330 bytes (7%) of program storage space. Maximum is 32256 bytes.
      Global variables use 308 bytes (15%) of dynamic memory, leaving 1740 bytes for local variables. Maximum is 2048 bytes.
      /home/jabss/Desktop/arduino-1.8.2/hardware/tools/avr/bin/avrdude -C/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b38400 -D -Uflash:w:/tmp/arduino_build_636369/ASCIITable.ino.hex:i 
      
      avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
               Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
               Copyright (c) 2007-2014 Joerg Wunsch
      
               System wide configuration file is "/root/.arduino15/packages/MiniCore/hardware/avr/2.0.1/avrdude.conf"
               User configuration file is "/home/jabss/.avrduderc"
               User configuration file does not exist or is not a regular file, skipping
      
               Using Port                    : /dev/ttyUSB0
               Using Programmer              : arduino
               Overriding Baud Rate          : 38400
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
      avrdude: stk500_recv(): programmer is not responding
      avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
      
      avrdude done.  Thank you.
      
      Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
      

      Any hint on what I may be doing wrong?
      Thanks,

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ My Slim 2AA Battery Node

      Hi,

      This board has an ICSP header. Does it mean that I can use it to burn the bootloader in a new ATMega328 chip?
      I've been trying to do burn the minicore in a board with all the required capacitors and resistor but without the NRF, but without success...
      Any idea?

      Thanks,

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Air Humidity Sensor - DHT

      Where are you reading this "NaN"?
      I sometimes also have it in my OpenHab controller webpage when the node doesn't communicate for a while... But when it does, it changes to the value it read from the sensor.

      Try to see in the GW if there is traffic comming from that node. Usualy you can read there the values.

      Good luck!

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      Hi,

      Is it normal to have frequently these errors in the RPI GW?

      May 11 00:43:54 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:43:54 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:43:56 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:43:56 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:43:58 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:43:58 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:44:00 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      May 11 00:44:00 nettemp mysgw: RF24: Recovered from a bad interrupt trigger.
      

      Thanks

      posted in Announcements
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      @tekka What debug flag should I activate for this?

      When I see the erratic behavior there isn't nothing appearing in the serial console, even with the MY_DEBUG on, so I guess there should be other that is of your interest...

      Thanks

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: Nordic or HopeRF radio

      I see this topic is about 2 years old.

      I'm wondering about improvements in the mentioned CONs of the RFM69.
      Security is a concern for myself, so I'm testing the NRFs with signing (that don't allow encription).

      Eventhough I'm a big fan of mysensors for over 3 years or so, I believe this is the year that I'm going to really implement it on my house!

      Aspects that I care are security, reliability (ack's & retransmits), and range.
      For instance, footprint isn't a concern for me.

      So my question is: Should I re-use the good-old NRFs I have lying around, or should I invest now in the RFM69's and therefore have an improved future-proofness?

      What would be the plan of mysensors initiative in the future? To focus on the RFM69's ?

      The listenmode feature seems great... Have it been included in mysensors already?

      Thanks,

      posted in Hardware
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Hi,

      Some more testing:
      I realised I was doing a rookie mistake: When testing, I changed PC and the default options to compile the mini-pro were 16MHz/5V on the new PC, while mine is 8MHz/3.3v.
      I guess this difference in the clock was messing up the timmings on the 1-W bus, hence the eractic behaviour.
      Now the sketch with the door/motion, relay and temp(DS18B20) seems to be more stable. Adding the DHT code, we get back to erratic behaviour, as the initial post, althought the used memory without "MY_DEBUG" is 70% used.

      I'll be doing more tests and report back.

      Thanks,

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Thanks Anticimex for replying back,

      I understand now the root cause is not related with the signing itself. It makes sense.
      I may have wrongly associated to it becasue I read somewhere that the radio communication can be affected by signing because the packets are full and therefore the probability to have a missed bit in the between is bigger.

      However, the RF link is the same in test 1 and test 2 (~6m with line of sight), and the result is totally different... It must be something on the code, not in the RF link, don't you think?

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Hi,

      Sorry for the delayed answer, I was making sure I had a better testing enviroment:

      Controller/Gateway: RPI3 with OpenHab2 and NRF24L01+ connected directly to the pin header. The NRF has a 4.7uF capacitor soldered to it and is the simple + model (not PA+NLA)

      Node: Arduino mini pro 3v 8MHz, in a prototype board with:

      • Hi-Link power supply (220AC to 5V DC)
      • 2200uF capactior to stabilize 5V (and also a pico range one to filter high frequencies)
      • 3.3V regulator
      • 100uf capacitor to stabilize 3.3V (and also a pico range one to filter high frequencies)
      • NRF24L01+ feed from the 3.3V regulator and with an additional 4.7uF capacitor
      • Connections made by wire around the board
      • The board is supposed to:
        • Interact with a 4-relay module
        • Read the temperature of several DS18B20's (only used 1 in the testing)
        • Detect presence in 3 motion sensors
        • Read temperature/Humidity from a DHT22
      • The node is ~6m away of the GW/Controller with line of sight
      • The pins and skecth options are in its own comments.
      • The " && transportSanityCheck());" patch was applied
      • Signing is activated

      Code:

      /**
       * 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/orlรงyovzwqi71234567890ll
       * 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 
       *
       * DESCRIPTION
       * Combined sketch with: 
       *      - NODE ID 44
       *      - Relay sketch, base sketch for all          - PIN 3,4,5,6  -   Child ID from 1,2,3,4
       *      - DOOR sketch (trip alarm), added code       - PIN A0,A1    -   Child ID 30,31
       *      - TEMP sketch (DS18B20), added code          - PIN 8        -   Child ID from 10 to 18  (defined 8 as MAX)
       *      - Hum sketch (DHT22), added code             - PIN A7       -   Child ID 50 (Temp) and 60 (Hum)
       *      - MOTION sketch, added code                  - PIN A6       -   Child ID 70
       *      
       *      
       * BOARD
       * 
       * D0 - RX (not used - but can be used with a plug on the programing header))
       * D1 - TX (not used - but can be used with a plug on the programing header))
       * D2 - NRF24 IRQ
       * D3 - RJ-45 (3)
       * D4 - 1-W (RJ-45 (4) & pin header)
       * D5 - Relay (5) (relay pin header has 6 pins where 6 is 5v and 1 is GND)
       * D6 - Relay (4)
       * D7 - Relay (3)
       * D8 - Relay (2)
       * D9 - NRF CE
       * D10- NRF CS
       * D11- NRF MOSI
       * D12- NRF MISO
       * D13- NRF SCK
       * A0 - RJ-45 (6)  (DOOR Sketch) 
       * A1 - RJ-45 (2)  (DOOR Sketch)
       * A2 - RJ-45 (1)
       * A3 - RJ-45 (4)
       * A4 - I2C
       * A5 - I2C
       * A6 - PIR (pin header)  (MOTION Sketch)
       * A7 - DHT (pin header)  
       * 
       *      
       *      
       *      
       *      
       * All sketches copied from http://www.mysensors.org
       *
       * signing "hidden" page: https://www.mysensors.org/apidocs-beta/group__MySigninggrpPub.html
       * 
       * 
       */
       
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Static node ID definition
      #define MY_NODE_ID 44
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      // Enable repeater functionality for this node
      //#define MY_REPEATER_FEATURE  
      
      //CODE FOR SIGNING************************************************
      //#define MY_SIGNING_WEAK_SECURITY 
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN A4
      #define MY_SIGNING_REQUEST_SIGNATURES  // will inform the gateway that I expect it to sign all messages to me
      //#define MY_DEBUG_VERBOSE_SIGNING
      
      #include <MySensors.h>
      
      //What features/Sketches to use?  ************************************************
      #define RELAY
      //#define DHTCODE
      #define DOOR
      #define MOTION
      //#define TEMP
      
      
      //CODE OF DOOR SKETCH************************************************
      #ifdef DOOR
      #include <Bounce2.h>
      #define CHILD_ID_A 30
      #define CHILD_ID_B 31
      #define BUTTON_PIN_A  A0  // Arduino Digital I/O pin for button/reed switch
      #define BUTTON_PIN_B  A1  // Arduino Digital I/O pin for button/reed switch
      
      Bounce debouncer_a = Bounce(); 
      Bounce debouncer_b = Bounce(); 
      int oldValue_a=-1;
      int oldValue_b=-1;
      // Change to V_LIGHT if you use S_LIGHT in presentation below
      MyMessage msg_door_a(CHILD_ID_A,V_TRIPPED);  
      MyMessage msg_door_b(CHILD_ID_B,V_TRIPPED);     
      #endif
      
      //CODE OF MOTION SKETCH************************************************
      #ifdef MOTION
      int oldMotion_a=-1;
      
      //uint32_t SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      #define DIGITAL_INPUT_SENSOR_MOTION_A A6   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define CHILD_ID_MOTION_A 70   // Id of the sensor child
      
      // Initialize motion message
      MyMessage msg_motion_a(CHILD_ID_MOTION_A, V_TRIPPED);
      #endif
      
      
      //CODE OF TEMP SKETCH************************************************
      #ifdef TEMP
      #include <MySensors.h>  
      #include <DallasTemperature.h>
      #include <OneWire.h>
      #define ONE_WIRE_BUS 4 // Pin where dallase sensor is connected 
      #define MAX_ATTACHED_DS18B20 10
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
      OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
      DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature. 
      float lastTemperature[MAX_ATTACHED_DS18B20];
      int numSensors=0;
      bool receivedConfig = false;
      bool metric = true;
      // Initialize temperature message
      MyMessage msg_temp(0,V_TEMP);
      #define COMPARE_TEMP 1 // Send temperature only if changed? 1 = Yes 0 = No
      #endif
      
      //CODE FOR LOOP************************************************
      long x = 327670;
      int y = 32767;
      
        
      //CODE OF RELAY SKETCH************************************************
      #ifdef RELAY
      #define RELAY_PIN 5  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      #define NUMBER_OF_RELAYS 4 // Total number of attached relays
      #define RELAY_ON 1  // GPIO value to write to turn on attached relay
      #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
      #endif
      
      //CODE OF DHT SKETCH************************************************
      #ifdef DHTCODE
      //#include "DHT.h"
      #include <DHT.h>
      
      // Set this to the pin you connected the DHT's data pin to
      #define DHT_DATA_PIN A7
      
      // Set this offset if the sensor has a permanent small offset to the real temperatures
      #define SENSOR_TEMP_OFFSET 0
      
      // Sleep time between sensor updates (in milliseconds)
      // Must be >1000ms for DHT22 and >2000ms for DHT11
      static const uint64_t UPDATE_INTERVAL = 60000;
      
      // Force sending an update of the temperature after n sensor reads, so a controller showing the
      // timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
      // the value didn't change since;
      // i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
      static const uint8_t FORCE_UPDATE_N_READS = 10;
      
      #define CHILD_ID_HUM 50
      #define CHILD_ID_TEMP 60
      
      float lastTempdht;
      float lastHumdht;
      uint8_t nNoUpdatesTempdht;
      uint8_t nNoUpdatesHumdht;
      //bool metric = true;
      
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      DHT dht;
      #endif
      
      void before()
      {
       
       //CODE OF RELAY SKETCH************************************************
       #ifdef RELAY
       for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
              // Then set relay pins in output mode
              pinMode(pin, OUTPUT);
              // Set relay to last known state (using eeprom storage)
              digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
       }
       #endif
      //CODE OF TEMP SKETCH************************************************
       #ifdef TEMP
       sensors.begin();
       #endif
      }
      
      void setup()
      {
      //CODE OF DOOR SKETCH************************************************
      #ifdef DOOR
        // Setup the button A
        pinMode(BUTTON_PIN_A,INPUT);
        // Activate internal pull-up
        digitalWrite(BUTTON_PIN_A,HIGH);
      
        // After setting up the button, setup debouncer
        debouncer_a.attach(BUTTON_PIN_A);
        debouncer_a.interval(5);
      
        // Setup the button B
        pinMode(BUTTON_PIN_B,INPUT);
        // Activate internal pull-up
        digitalWrite(BUTTON_PIN_B,HIGH);
      
        // After setting up the button, setup debouncer
        debouncer_b.attach(BUTTON_PIN_B);
        debouncer_b.interval(5);
      #endif
      
      
      //CODE OF MOTION SKETCH************************************************
      #ifdef MOTION
        pinMode(DIGITAL_INPUT_SENSOR_MOTION_A, INPUT);      // sets the motion sensor digital pin as input
      #endif
        
      
      //CODE OF TEMP SKETCH************************************************
      #ifdef TEMP
        sensors.setWaitForConversion(false);
      #endif
      
      //CODE OF DHT SKETCH************************************************
      #ifdef DHTCODE
        dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
        if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
          Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
        }
        // Sleep for the time of the minimum sampling period to give the sensor time to power up
        // (otherwise, timeout errors might occure for the first reading)
        sleep(dht.getMinimumSamplingPeriod());
       #endif
      }
      
      
      void presentation()
      {
      // Send the sketch version information to the gateway and Controller
         sendSketchInfo("MIXED JOAOABS SOTAO", "1.0");
         
      //CODE OF RELAY SKETCH************************************************
      //FOR RELAY: Child ID from 1 to 4
      #ifdef RELAY
         for (int sensor=1, pin=RELAY_PIN; sensor<=NUMBER_OF_RELAYS; sensor++, pin++) {
              // Register all sensors to gw (they will be created as child devices)
              //  present(sensor, S_BINARY);
               present(sensor, S_BINARY, "RELAYS", true);  // forcing ack for this child's messages
          }
      #endif
      
      //CODE OF DOOR SKETCH************************************************
      //FOR DOOR: Child ID 30
      #ifdef DOOR
       // present(CHILD_ID_A, S_DOOR);  
       // present(CHILD_ID_B, S_DOOR);  
        present(CHILD_ID_A, S_DOOR, "DOOR_A", true);  // CHILD ID = 30 and forcing ack for this child's messages
        present(CHILD_ID_B, S_DOOR, "DOOR_B", true);  // CHILD ID = 31 and forcing ack for this child's messages
      #endif
      
      //CODE OF MOTION SKETCH************************************************
      #ifdef MOTION
      present(CHILD_ID_MOTION_A, S_MOTION, "PIR", true); // CHILD ID =  70 and forcing ack for this child's messages
      #endif
      
      //CODE OF TEMP SKETCH************************************************
      //FOR TEMP: Child ID from 10 to 18  (defined 8 as MAX)
      // Fetch the number of attached temperature sensors  
      #ifdef TEMP
        numSensors = sensors.getDeviceCount();
      
        // Present all sensors to controller
           int a;
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {  
           a=i+10;  
           present(a, S_TEMP);   
        }
      #endif
      
      //CODE OF DHT SKETCH************************************************
      #ifdef DHTCODE
      //FOR DHT: Child ID 50 and 60
        // Register all sensors to gw (they will be created as child devices)
        present(CHILD_ID_HUM, S_HUM);
        present(CHILD_ID_TEMP, S_TEMP);
        metric = getControllerConfig().isMetric;
      #endif
      }
      
      void loop()
      {
      //CODE OF DOOR SKETCH************************************************
      #ifdef DOOR
      //For DOOR A
      debouncer_a.update();
        // Get the update value
        int value_a = debouncer_a.read();
      
        if (value_a != oldValue_a) {
           // Send in the new value
           send(msg_door_a.set(value_a==HIGH ? 1 : 0));
           oldValue_a = value_a;
        }
      
      //For DOOR B
      debouncer_b.update();
        // Get the update value
        int value_b = debouncer_b.read();
      
        if (value_b != oldValue_b) {
           // Send in the new value
           send(msg_door_b.set(value_b==HIGH ? 1 : 0));
           oldValue_b = value_b;
        }
      #endif
      
      #ifdef MOTION
          // Read digital motion value
          int valueMotion_a = digitalRead(DIGITAL_INPUT_SENSOR_MOTION_A);
          if (valueMotion_a != oldMotion_a)
          {
           #ifdef MY_DEBUG
           Serial.println(valueMotion_a);
           #endif MY_DEBUG
           send(msg_motion_a.set(valueMotion_a?"1":"0"));  // Send tripped value to gw
           oldMotion_a = valueMotion_a;
          }
      
      #endif
      
      //Loop Code ************************************************
      //Resets every 1-2 minutes
        if (x>0)
        {
          x=x-1;
        }
        else
        {
          y=y-1;
          if (x==0 && y==0)
          {
           #ifdef MY_DEBUG
        Serial.println("****** counters reached 0 **************");
           #endif
           x = 1600000;
           y = 32767;
      
      //CODE OF TEMP SKETCH************************************************
      // So Let's fetch temperatures from Dallas sensors
      #ifdef TEMP
        sensors.requestTemperatures();
      
        // query conversion time and sleep until conversion completed
        int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
        // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater)
        sleep(conversionTime);
      
        // Read temperatures and send them to controller 
        for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {
      
          // Fetch and round temperature to one decimal
          float temperature = static_cast<float>(static_cast<int>((getControllerConfig().isMetric?sensors.getTempCByIndex(i):sensors.getTempFByIndex(i)) * 10.)) / 10.;
      
       //   Serial.println("temperature:");
       //   Serial.println(temperature);
      
         // Only send data if temperature has changed and no error
          #if COMPARE_TEMP == 1
          if (lastTemperature[i] != temperature && temperature != -127.00 && temperature != 85.00) {
          #else
          if (temperature != -127.00 && temperature != 85.00) {
          #endif
           
           int a=i+10; 
            // Send in the new temperature
            send(msg_temp.setSensor(a).set(temperature,1));
            // Save new temperatures for next compare
            lastTemperature[i]=temperature;    
            
          }
         }    
         #endif
      
          #ifdef DHTCODE
          //CODE OF DHT SKETCH************************************************
          // Force reading sensor, so it works also after sleep()
          dht.readSensor(true);
          delay(2000);
          // Get temperature from DHT library
          float temperaturedht = dht.getTemperature();
          if (isnan(temperaturedht))
          {
           Serial.println("Failed reading temperature from DHT!");
          }
          else if (temperaturedht != lastTempdht || nNoUpdatesTempdht == FORCE_UPDATE_N_READS)
          {
           // Only send temperature if it changed since the last measurement or if we didn't send an update for n times
           lastTempdht = temperaturedht;
           if (!metric)
           {
            temperaturedht = dht.toFahrenheit(temperaturedht);
           }
           // Reset no updates counter
           nNoUpdatesTempdht = 0;
           temperaturedht += SENSOR_TEMP_OFFSET;
           send(msgTemp.set(temperaturedht, 1));
           #ifdef MY_DEBUG
           Serial.print("T: ");
           Serial.println(temperaturedht);
           #endif
          } 
          else 
          {
           // Increase no update counter if the temperature stayed the same
           nNoUpdatesTempdht++;
          }
      
          // Get humidity from DHT library
          float humiditydht = dht.getHumidity();
          if (isnan(humiditydht))
          {
           Serial.println("Failed reading humidity from DHT");
          } 
         else if (humiditydht != lastHumdht || nNoUpdatesHumdht == FORCE_UPDATE_N_READS) {
         // Only send humidity if it changed since the last measurement or if we didn't send an update for n times
         lastHumdht = humiditydht;
         // Reset no updates counter
         nNoUpdatesHumdht = 0;
         send(msgHum.set(humiditydht, 1));
      
         #ifdef MY_DEBUG
         Serial.print("H: ");
         Serial.println(humiditydht);
         #endif
         } 
         else
         {
          // Increase no update counter if the humidity stayed the same
          nNoUpdatesHumdht++;
         }
         #endif
        }
       }
      }
      
      
      void receive(const MyMessage &message)
      {
          //CODE OF RELAY SKETCH************************************************
          //THERE IS ONLY RECEIVE CODE for RELAY.  DOOR, TEMP and HUM are just sent periodically and not on-demand
          // We only expect one type of message from controller. But we better check anyway.
          if (message.type==V_STATUS) {
              // Change relay state
              digitalWrite(message.sensor-1+RELAY_PIN, message.getBool()?RELAY_ON:RELAY_OFF);
              // Store state in eeprom
              saveState(message.sensor, message.getBool());
              // Write some debug info
              Serial.print("Incoming change for sensor:");
              Serial.print(message.sensor);
              Serial.print(", New status: ");
              Serial.println(message.getBool());
          }
      }
      

      If we only choose the relay-related code, I can feel some reliability. Every command that is sent is executed.

      If I activate just the temperature code, I start having signature failures when trying to open/close relays. Not always, but often, so reliability is affected. Example of trying to change the relay 4 (44:4).

      May  3 18:31:32 nettemp mysgw: GWT:RFC:C=0,MSG=44;3;1;1;2;1
      May  3 18:31:32 nettemp mysgw: !TSF:MSG:SEND,0-0-44-44,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      May  3 18:31:32 nettemp mysgw: !TSF:MSG:SIGN FAIL
      May  3 18:31:32 nettemp mysgw: GWT:RFC:C=0,MSG=
      May  3 18:31:32 nettemp mysgw: GWT:RFC:C=0,MSG=44;3;1;1;2;1
      May  3 18:31:32 nettemp mysgw: !TSF:MSG:SEND,0-0-44-44,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      May  3 18:31:32 nettemp mysgw: !TSF:MSG:SIGN FAIL
      May  3 18:31:32 nettemp mysgw: GWT:RFC:C=0,MSG=
      May  3 18:31:32 nettemp mysgw: GWT:RFC:C=0,MSG=44;3;1;1;2;1
      May  3 18:31:32 nettemp mysgw: !TSF:MSG:SEND,0-0-44-44,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      May  3 18:31:32 nettemp mysgw: !TSF:MSG:SIGN FAIL
      May  3 18:31:32 nettemp mysgw: GWT:RFC:C=0,MSG=
      May  3 18:31:33 nettemp mysgw: GWT:RFC:C=0,MSG=44;3;1;1;2;1
      May  3 18:31:33 nettemp mysgw: !TSF:MSG:SEND,0-0-44-44,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      May  3 18:31:33 nettemp mysgw: !TSF:MSG:SIGN FAIL
      May  3 18:31:33 nettemp mysgw: GWT:RFC:C=0,MSG=
      May  3 18:31:34 nettemp mysgw: GWT:RFC:C=0,MSG=44;3;1;1;2;1
      May  3 18:31:34 nettemp mysgw: !TSF:MSG:SEND,0-0-44-44,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=NACK:
      May  3 18:31:34 nettemp mysgw: !TSF:MSG:SIGN FAIL
      May  3 18:31:34 nettemp mysgw: GWT:RFC:C=0,MSG=
      

      (nothing appears in the node log, as it haven't received anything).

       
       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.2.0
      
      16 MCO:BGN:INIT NODE,CP=RNNNAS--,VER=2.2.0
      25 MCO:BGN:BFR
      69 TSM:INIT
      70 TSF:WUR:MS=0
      77 TSM:INIT:TSP OK
      79 TSM:INIT:STATID=44
      81 TSF:SID:OK,ID=44
      82 TSM:FPAR
      102 TSF:MSG:SEND,44-44-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      159 TSF:MSG:READ,0-0-44,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      164 TSF:MSG:FPAR OK,ID=0,D=1
      2109 TSM:FPAR:OK
      2110 TSM:ID
      2111 TSM:ID:OK
      2113 TSM:UPL
      2115 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2122 TSF:MSG:READ,0-0-44,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2127 TSF:MSG:PONG RECV,HP=1
      2129 TSM:UPL:OK
      2131 TSM:READY:ID=44,PAR=0,DIS=1
      2136 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      2142 TSF:MSG:READ,0-0-44,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      2152 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      2158 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      2246 TSF:MSG:SEND,44-44-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.2.0
      2255 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2262 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2352 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
      2360 TSF:MSG:READ,0-0-44,s=255,c=3,t=16,pt=0,l=0,sg=1:
      2382 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      2397 TSF:MSG:READ,0-0-44,s=255,c=3,t=6,pt=0,l=1,sg=1:M
      2485 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2491 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2581 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=11,pt=0,l=19,sg=1,ft=0,st=OK:MIXED JOAOABS SOTAO
      2591 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2598 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2685 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
      2694 TSF:MSG:SEND,44-44-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2701 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2791 TSF:MSG:SEND,44-44-0-0,s=1,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      2801 TSF:MSG:SEND,44-44-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2807 TSF:MSG:READ,0-0-44,s=1,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      2812 TSF:MSG:ACK
      2814 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2904 TSF:MSG:SEND,44-44-0-0,s=2,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      2914 TSF:MSG:SEND,44-44-0-0,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2920 TSF:MSG:READ,0-0-44,s=2,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      2926 TSF:MSG:ACK
      2927 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3015 TSF:MSG:SEND,44-44-0-0,s=3,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      3024 TSF:MSG:SEND,44-44-0-0,s=4,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3031 TSF:MSG:READ,0-0-44,s=3,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      3036 TSF:MSG:ACK
      3038 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3125 TSF:MSG:SEND,44-44-0-0,s=4,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      3134 TSF:MSG:SEND,44-44-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3140 TSF:MSG:READ,0-0-44,s=4,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      3145 TSF:MSG:ACK
      3147 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3234 TSF:MSG:SEND,44-44-0-0,s=30,c=0,t=0,pt=0,l=6,sg=1,ft=0,st=OK:DOOR_A
      3244 TSF:MSG:SEND,44-44-0-0,s=31,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3250 TSF:MSG:READ,0-0-44,s=30,c=0,t=0,pt=0,l=6,sg=0:DOOR_A
      3256 TSF:MSG:ACK
      3257 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3344 TSF:MSG:SEND,44-44-0-0,s=31,c=0,t=0,pt=0,l=6,sg=1,ft=0,st=OK:DOOR_B
      3353 TSF:MSG:SEND,44-44-0-0,s=70,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3360 TSF:MSG:READ,0-0-44,s=31,c=0,t=0,pt=0,l=6,sg=0:DOOR_B
      3365 TSF:MSG:ACK
      3367 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3460 TSF:MSG:SEND,44-44-0-0,s=70,c=0,t=1,pt=0,l=3,sg=1,ft=0,st=OK:PIR
      3467 MCO:REG:REQ
      3470 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
      3476 TSF:MSG:READ,0-0-44,s=70,c=0,t=1,pt=0,l=3,sg=0:PIR
      3481 TSF:MSG:ACK
      3483 TSF:MSG:READ,0-0-44,s=255,c=3,t=16,pt=0,l=0,sg=1:
      3510 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      3524 TSF:MSG:READ,0-0-44,s=255,c=3,t=27,pt=1,l=1,sg=1:1
      3609 MCO:PIM:NODE REG=1
      3611 MCO:BGN:STP
      3613 MCO:BGN:INIT OK,TSP=1
      3619 TSF:MSG:SEND,44-44-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3627 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3714 TSF:MSG:SEND,44-44-0-0,s=30,c=1,t=16,pt=2,l=2,sg=1,ft=0,st=OK:1
      3722 TSF:MSG:SEND,44-44-0-0,s=31,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3734 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3822 TSF:MSG:SEND,44-44-0-0,s=31,c=1,t=16,pt=2,l=2,sg=1,ft=0,st=OK:1
      0
      3832 TSF:MSG:SEND,44-44-0-0,s=70,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      3844 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      3932 TSF:MSG:SEND,44-44-0-0,s=70,c=1,t=16,pt=0,l=1,sg=1,ft=0,st=OK:0
      26080 TSF:MSG:READ,0-0-44,s=1,c=3,t=16,pt=0,l=0,sg=1:
      26106 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      26120 TSF:MSG:READ,0-0-44,s=1,c=1,t=2,pt=0,l=1,sg=1:0
      26205 TSF:MSG:ACK REQ
      26209 TSF:MSG:SEND,44-44-0-0,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      Incoming change for sensor:1, New status: 0
      26216 TSF:MSG:READ,0-0-44,s=1,c=3,t=16,pt=0,l=0,sg=1:
      26240 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      26250 TSF:MSG:READ,0-0-44,s=1,c=1,t=2,pt=0,l=1,sg=1:0
      26334 TSF:MSG:ACK REQ
      26339 TSF:MSG:SEND,44-44-0-0,s=1,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      Incoming change for sensor:1, New status: 0
      29867 TSF:MSG:READ,0-0-44,s=2,c=3,t=16,pt=0,l=0,sg=1:
      29888 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      29902 TSF:MSG:READ,0-0-44,s=2,c=1,t=2,pt=0,l=1,sg=1:0
      29986 TSF:MSG:ACK REQ
      29991 TSF:MSG:SEND,44-44-0-0,s=2,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      Incoming change for sensor:2, New status: 0
      29999 TSF:MSG:READ,0-0-44,s=2,c=3,t=16,pt=0,l=0,sg=1:
      30022 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      30031 TSF:MSG:READ,0-0-44,s=2,c=1,t=2,pt=0,l=1,sg=1:0
      30116 TSF:MSG:ACK REQ
      30120 TSF:MSG:SEND,44-44-0-0,s=2,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      Incoming change for sensor:2, New status: 0
      31344 TSF:MSG:READ,0-0-44,s=3,c=3,t=16,pt=0,l=0,sg=1:
      31366 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      31373 TSF:MSG:READ,0-0-44,s=3,c=1,t=2,pt=0,l=1,sg=1:0
      31457 TSF:MSG:ACK REQ
      31464 TSF:MSG:SEND,44-44-0-0,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      Incoming change for sensor:3, New status: 0
      31471 TSF:MSG:READ,0-0-44,s=3,c=3,t=16,pt=0,l=0,sg=1:
      31498 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      31510 TSF:MSG:READ,0-0-44,s=3,c=1,t=2,pt=0,l=1,sg=1:0
      31594 TSF:MSG:ACK REQ
      31597 TSF:MSG:SEND,44-44-0-0,s=3,c=1,t=2,pt=0,l=1,sg=0,ft=0,st=OK:0
      Incoming change for sensor:3, New status: 0
      32621 TSF:MSG:READ,0-0-44,s=4,c=3,t=16,pt=0,l=0,sg=1:
      32643 TSF:MSG:SEND,44-44-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      32657 TSF:MSG:READ,0-0-44,s=4,c=1,t=2,pt=0,l=1,sg=1:0
      Incoming change for sensor:4, New status: 0
      32752 TSF:MSG:SEND,44-44-0-0,s=31,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      32758 TSF:MSG:READ,0-0-44,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      32845 TSF:MSG:SEND,44-44-0-0,s=31,c=1,t=16,pt=2,l=2,sg=1,ft=0,st=OK:0
      ****** counters reached 0 **************
      33015 MCO:SLP:MS=94,SMS=0,I1=255,M1=255,I2=255,M2=255
      33020 TSF:TDI:TSL
      33022 MCO:SLP:WUP=-1
      33025 TSF:TRI:TSB
      ****** counters reached 0 **************
      160429 MCO:SLP:MS=94,SMS=0,I1=255,M1=255,I2=255,M2=255
      160434 TSF:TDI:TSL
      160436 MCO:SLP:WUP=-1
      160438 TSF:TRI:TSB
      

      I'll keep doing some more tests and will report it here. Meanwhile if there is anything else you'd like me to try, do let me know.

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Sensebender Micro

      Sorry for the dummy question, but my SenseBender Micros came with a small white sticker on top of the Si7021 sensor (like in the pictures above). Is it supposed to be removed or to stay like that?

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Motion Sensor

      Hi,

      The code

      sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME); 
      

      doesn't need a ISR (Interrupt Service Routine) function? Should we assume that if no ISR is defined, the node will wake in the loop function?

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      Thanks for the replies.

      I've changed the PI from a PI1 to a PI3 and was able to make it working with signing. Its running smoothly, I guess the GW is chosen :).

      I'll now focus on the nodes, specially the SenseBender micros that are 2xAA battery powered and are consuming ~3% bat per day, but that will be for another post...

      Thanks!
      Joaoabs

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      I found that the configuration file is /etc/mysensors.conf but " The first time you start the gateway the configuration file will be created if it does not already exist.", so that's why I wasn't finding it.

      Anyway, the file states that:
      "Note: The gateway must have been built with signing support to use the options below."

      What flags should I include to have signing support?

      OK, found it: just run ./configure -h and there is a list of options. Leaving it here just for future reference

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Building a Raspberry Pi Gateway

      I'm currently compiling the code for connecting the NRF24l01+ directly to the Raspberry PI. Since I'm running the controller (on this case OpenHab) on the same Raspberry PI, would it be recommended the Ethernet or the serial flavor of it?
      In the case of ethernet, can I place the own machine IP (127.0.0.1)? This way, if I need to change the IP address of the PI it wouldn't affect the communication between the controller and the MySensors code, right?
      --my-gateway=ethernet --my-controller-url-address=127.0.0.1

      And by the way, for the signing configuration, it is mentioned in the documentation "Update the gateway config file with the generated keys/valeus", what file is that (name, path)?

      I should be able to re-use the keys I have defined before, right? So I just go to step 2 (no need to generate new keys).
      I'm refering to this link.

      Thanks,

      posted in Announcements
      joaoabs
      joaoabs
    • RE: How does the serial GW work after all?

      This is actually strange. Its the same sketch, the difference is just the commented debug flag.

      With the debug flag off, I reset the GW, wait for the startup and then I reset some nodes in order to force presentation, but all I get is this:

      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.2.0
      

      With the debug flag on, I don't even need to reset the nodes, I get "automagically" the communication from my 3 test nodes (4, 10 and 44).

      0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGA---,VER=2.2.0
      0;255;3;0;9;4 TSM:INIT
      0;255;3;0;9;6 TSF:WUR:MS=0
      0;255;3;0;9;14 TSM:INIT:TSP OK
      0;255;3;0;9;17 TSM:INIT:GW MODE
      0;255;3;0;9;20 TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;23 MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.2.0
      0;255;3;0;9;28 MCO:BGN:STP
      0;255;3;0;9;34 MCO:BGN:INIT OK,TSP=1
      0;255;3;0;9;1915 TSF:MSG:READ,4-4-0,s=1,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;4982 TSF:MSG:READ,44-44-0,s=3,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;6920 TSF:MSG:READ,4-4-0,s=2,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;10014 TSF:MSG:READ,44-44-0,s=4,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;11924 TSF:MSG:READ,4-4-0,s=70,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;15047 TSF:MSG:READ,44-44-0,s=30,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;16928 TSF:MSG:READ,4-4-0,s=71,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;20079 TSF:MSG:READ,44-44-0,s=31,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;21932 TSF:MSG:READ,4-4-0,s=10,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;25122 TSF:MSG:READ,44-44-0,s=70,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;26937 TSF:MSG:READ,4-4-0,s=50,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;30155 TSF:MSG:READ,44-44-0,s=10,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;31941 TSF:MSG:READ,4-4-0,s=60,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;35186 TSF:MSG:READ,44-44-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
      0;255;3;0;9;35194 TSF:MSG:SEND,0-0-44-44,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;35217 TSF:MSG:READ,44-44-0,s=30,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;36947 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
      0;255;3;0;9;36955 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;39106 TSF:MSG:READ,4-4-0,s=70,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;40248 TSF:MSG:READ,44-44-0,s=31,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;44111 TSF:MSG:READ,4-4-0,s=71,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;45270 TSF:MSG:READ,44-44-0,s=70,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;50302 TSF:MSG:READ,44-44-0,s=70,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;53968 TSF:MSG:READ,10-10-0,s=30,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;64184 TSF:MSG:READ,10-10-0,s=30,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;69276 TSF:MSG:READ,4-4-0,s=10,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;76290 TSF:MSG:READ,4-4-0,s=60,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;81298 TSF:MSG:READ,4-4-0,s=50,c=3,t=16,pt=0,l=0,sg=0:
      

      What should I see in the serial GW when the debug mode is off?

      My serial GW code is prety standard, I'd say:

      /**
      * 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 serial 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 any of the MY_DEFAULT_xx_LED_PINs
      * - RX (green) - blink fast on radio message received. In inclusion mode will blink fast only on presentation received
      * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
      * - ERR (red) - fast blink on error during transmission error or receive crc error
      *
      */
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_NRF5_ESB
      //#define MY_RADIO_RFM69
      //#define MY_RADIO_RFM95
      
      // 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 Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
      #if F_CPU == 8000000L
      #define MY_BAUD_RATE 38400
      #endif
      
      // 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 180
      // Digital pin used for inclusion mode button
      #define MY_INCLUSION_MODE_BUTTON_PIN  3
      
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Inverses the behavior of leds
      //#define MY_WITH_LEDS_BLINKING_INVERSE
      
      // Flash leds on rx/tx/err
      // 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 <MySensors.h>
      
      void setup()
      {
          // Setup locally attached sensors
      }
      
      void presentation()
      {
          // Present locally attached sensors
      }
      
      void loop()
      {
          // Send locally attached sensor data here
      }
      
      

      Thanks,

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: How does the serial GW work after all?

      Yes, I have tried the NRF directly in the PI some years ago and it raised its CPU usage to 100%.

      I guess the code today should be more stable, if I can't figure out what is the problem with the GW I'll probabily try it.

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: How does the serial GW work after all?

      Hi,

      I'm using the NRF24L01+ with a 4.7uF capacitor between 3.3v and GND on the GW and all nodes.

      If I turn debug mode on I can see all the presentations from the nodes (even with signing), so I guess the transport should be OK.

      Just for the sake of clarity, the serial port I should "listen" should be /dev/ttyUSBx, right?
      I'm asking this becasue I've seen in some places the default configuration of /dev/pts/x and this wouldn't make any sense to me becasue arduino is always conencted via USB, and therefore it should be /dev/ttyUSBx, right? Or would it somehow create some kind of virtual pts port and that should be what we should be listining to?

      At the moment I just have nanos, mini pros and a UNO. Trying an ethernet GW with SW signing on these nodes will be waste of time, right? (I've read they lack enough resources, so it would be better a more powerful arduino).

      I have also an arduino micro, but this doesn't work well with my sensors, right?

      Thanks,

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: How does the serial GW work after all?

      So, if I connect the Serial GW to my PC, run "serial monitor", and I restart a nearby node, I should "see" something comming from the serial port, even if the debug mode is off, right?

      If I don't see anything coming, should I assume something must be wrong with the GW?

      I've read somewhere in the forum that the GW sketch is made for Arduino nano, since I'm runing it on an UNO, would it make a difference?

      Thanks

      posted in Troubleshooting
      joaoabs
      joaoabs
    • How does the serial GW work after all?

      Hi,

      I'm doing my initial experiments in mysensors and I'm using a serial GW on an arduino UNO connected to a raspberry PI 1 with OpenHab.

      I reached a point where the sensors were automatically detected (appeared in OpenHab inbox magically) but the setup wasn't stable (the relays and door sensors weren't working 100% of the times). I associated it to the fact that when trying to make it work, I tried many things and installed two different versions of the binding and there could be some interference:

      org.openhab.binding.mysensors-2.2.0-SNAPSHOT.jar

      org.openhab.binding.mysensors-2.3.0-SNAPSHOT.jar

      I wasn't sure what was the problem, so I cleaned everything in OpenHab and re-compiled the GW, now with the debug flag set to off (in order to have more available resources). Then, to start from scratch, I followed these instructions.

      Now, although OpeHab seems to detect the gateway, no more sensors appear. I connected the GW to my PC and I just get the initial printout (GW setup complete) but nothing else appears, even if I restart the nodes.

      I also added an inclusion button (pin D3/GND) and uncomented the corresponding flags, but still no luck....

      The resources of the serial GW seem OK (~50% RAM free). Its basically the GW sketch example with signing and inclusion activated (by the way, the first time was working with signing, so I guess the failure now is not related with it).

      I have no idea what is going on, is it mandatory for the GW to have the debuging option so it could interact with a controller?

      Would it be the case that the GW caches the node IDs and doesn't present it to the controller because it believes he already knows about it?

      How does the inclusion mode work? After pressing the button, what should I do? Should I restart the nodes in order to force a presentation?

      Thanks

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Sensebender Micro

      For the battery powering voltage measuring do you mean that this is not needed after all? (https://www.mysensors.org/build/battery#measuring-and-reporting-battery-level)
      It would be just a matter of enabling the flag "#define BATT_SENSOR 199 " and no resistors needed?

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: OpenHAB 2.5 MySensors Serial Gateway - How to install

      Hi,

      The mysgw seems to be creating a link to the wrong TTY.
      When I connect the arduino gateway, I get the /dev/ttyUSB1 device.

      Insert Code Herepi@nettemp:~/MySensors $ ls /dev/tty*
      /dev/tty    /dev/tty15  /dev/tty22  /dev/tty3   /dev/tty37  /dev/tty44  /dev/tty51  /dev/tty59  /dev/tty9
      /dev/tty0   /dev/tty16  /dev/tty23  /dev/tty30  /dev/tty38  /dev/tty45  /dev/tty52  /dev/tty6   /dev/ttyAMA0
      /dev/tty1   /dev/tty17  /dev/tty24  /dev/tty31  /dev/tty39  /dev/tty46  /dev/tty53  /dev/tty60  /dev/ttyUSB0
      /dev/tty10  /dev/tty18  /dev/tty25  /dev/tty32  /dev/tty4   /dev/tty47  /dev/tty54  /dev/tty61  /dev/ttyUSB1
      /dev/tty11  /dev/tty19  /dev/tty26  /dev/tty33  /dev/tty40  /dev/tty48  /dev/tty55  /dev/tty62  /dev/ttyprintk
      /dev/tty12  /dev/tty2   /dev/tty27  /dev/tty34  /dev/tty41  /dev/tty49  /dev/tty56  /dev/tty63
      /dev/tty13  /dev/tty20  /dev/tty28  /dev/tty35  /dev/tty42  /dev/tty5   /dev/tty57  /dev/tty7
      /dev/tty14  /dev/tty21  /dev/tty29  /dev/tty36  /dev/tty43  /dev/tty50  /dev/tty58  /dev/tty8
      
      

      Then I start the mysgw and a new tty is created: "/dev/ttyMySensorsGateway", which looks nice. However, the mysgw returns lots of errors:

      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0
      mysgw: Serial port /dev/ttyMySensorsGateway (115200 baud) created
      mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0
      mysgw: TSF:LRT:OK
      mysgw: TSM:INIT
      mysgw: TSF:WUR:MS=0
      mysgw: !TSM:INIT:TSP FAIL
      mysgw: TSM:FAIL:CNT=1
      mysgw: TSM:FAIL:DIS
      mysgw: TSF:TDI:TSL
      mysgw: TSM:INIT
      mysgw: !TSM:INIT:TSP FAIL
      mysgw: TSM:FAIL:CNT=2
      mysgw: TSM:FAIL:DIS
      mysgw: TSF:TDI:TSL
      

      Then I go check what is wrong an I see the pointer wasn't created towards "/dev/ttyUSB1", but "/dev/pts/1":

      pi@nettemp:~/MySensors $ ls -larth /dev/ttyMySensorsGateway 
      lrwxrwxrwx 1 root root 10 Apr 26 18:27 /dev/ttyMySensorsGateway -> /dev/pts/1
      

      Taking a look into the /dev/ttyUSB1 directly I can see it is fine, the problem is the GW software on the Raspberry PI that is pointing towards the wrong tty:

      pi@nettemp:~ $ stty -F /dev/ttyUSB1 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
      pi@nettemp:~ $ cat /dev/ttyUSB1 
      0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0
      0;255;3;0;9;0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0
      0;255;3;0;9;26 SGN:PER:OK
      0;255;3;0;9;64 SGN:INI:BND OK
      0;255;3;0;9;67 TSM:INIT
      0;255;3;0;9;69 TSF:WUR:MS=0
      0;255;3;0;9;77 TSM:INIT:TSP OK
      0;255;3;0;9;79 TSM:INIT:GW MODE
      0;255;3;0;9;82 TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;87 MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.2.0
      0;255;3;0;9;91 MCO:BGN:STP
      0;255;3;0;9;98 MCO:BGN:INIT OK,TSP=1
      

      Any idea of how to make this work?

      Where can I see the alternatives for the "
      ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-rf24-channel=69 --my-transport=nrf24 --my-serial-groupname=tty --my-config-file=/etc/mysensors.dat" command?

      Thanks,

      posted in OpenHAB
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Sensebender Micro

      Hi,
      Three questions regarding SenseBender Micro:

      • What board should I configure in Arduino IDE in order to upload sketches? Would it be equivalent to Arduino mini pro, or is there any "board library" to load ?(Didn't find it, Woudn't it make sense to be included in the examples/Libraries pack?)...
        (Found it: https://github.com/mysensors/ArduinoBoards . If you look between the photos above there is a simple link lost in the between)
        MySensors Admins: Just a small suggestion: As it is now, - a simple link between photos is easily overlooked. Can't you place it near the specs where it should be more visible?

      • It has an I2C bus for the SI7021, but it seems the ATSHA204A (which I believe its I2C also) is connected to another pin (a3). Does this mean it has two I2C buses?

      • Can anyone confirm that the port that measures the battery voltage is A0?

      Thanks,
      Joaoabs

      posted in OpenHardware.io
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Thanks,

      The node is still sending periodic updates after 8h uptime. I guess I can considered it as stable.

      By the way, I have a couple of ATSHA204A-STUCZ-T ordered. I think I can easily migrate to HW signing as soon as I get them.
      Will the HW signing unload the AT328p?

      Thanks

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Hello,

      The GW sketch is the simplest possible. It is the SerialGateway.ino example just with the added flags for the signing.
      It seems to have enough resources

      Sketch uses 21440 bytes (66%) of program storage space. Maximum is 32256 bytes.
      Global variables use 1401 bytes (68%) of dynamic memory, leaving 647 bytes for local variables. Maximum is 2048 bytes.
      

      The node sketch is the Relay example sketch, where I then added, one by one, the code from other examples such as Door/Win/Button (tripwire), Temperature (DS18B20), Temp/Hum (DHT22) and Motion (HC-SR501).

      I have a pretty basic version control, so for each new sensor type I was adding I was just creating another file. Since all the signature process was done (and written in the eeprom), I went back to the basics (sketch with Relay + Door) with the signing flags enabled and could confirm it worked with signatures (so it must be something I added). I then went version-by-version, enabling the flags and confirmed it was still working as I was progressing.
      I've now reached a point where I just have the last sensor to add (Motion HC-SR501) but the available memory is concerning:

      Build options changed, rebuilding all
      Sketch uses 28030 bytes (91%) of program storage space. Maximum is 30720 bytes.
      Global variables use 1542 bytes (75%) of dynamic memory, leaving 506 bytes for local variables. Maximum is 2048 bytes.
      Low memory available, stability problems may occur.
      
      

      I'll leave as it is, (disabling the signing debug, the memory use drops to 71%). Just out of curiosity, I checked the memory use on the original node sketch (without signing debug) and it was 73%.

      Still not sure if it was an issue related with the memory or with the additional code I added for the Motion Sensor.
      However, the strange conclusion is that it was really on the node, and not on the gateway as we thought.

      I'll leave it on during the night in order to see if it hangs or something.

      Thanks for your help!
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      With an arduino UNO (same processor type: mega 328p) as GW the behaviour is the same.

      This is just the arduino board connected to a laptop, via an USB3 port (should have enough power). I've also added a 47uF capacitor between 5v and GND, but the behaviour is the same. (the NRFs already have their own 4.7uF capacitor)

      Any idea/suggestuin?

      Thanks,

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      both of them are nanos with atmega328

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Without the signing debug the memory in the GW is around 63%... and goes up to 69% when enabling it. Not sure if it would be that...
      I'll try with other arduino, it could be this one that has some defect. Its a cheap clone. Never had issues, but there is always a first time, right?

      And by the way, the gateway "hangs" but if I restart the node, the presentation process goes fine again without needing to restart the gateway, so not really an hang... It just stops responding!

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      @anticimex said in SW_Signing failing: !TSF:MSG:SIGN FAIL:

      MY_DEBUG_VERBOSE_SIGNING.

      Well, with the debug I can now understand that the signing is being used at the presentation, so the configuration is fine. We just need to find it out why it fails after a while. I've enabled the node as repeater to avoid sleep, but it keeps failing.

      I also thought it could be a eeprom overwrite (my sketch includes the relay code from my sensors that stores statuses in eeprom), but if that was the case, it wouldn't work after re-booting the arduino.

      Could it be as simple as a memory leak in the node? Its loaded and there is no much more left....
      But again, it's the gateway that stops responding...

      Not sure how to solve this one... Any ideas?

      Node:

      Sketch uses 28862 bytes (93%) of program storage space. Maximum is 30720 bytes.
      Global variables use 1585 bytes (77%) of dynamic memory, leaving 463 bytes for local variables. Maximum is 2048 bytes.Here
      
       
       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.2.0
      
      16 MCO:BGN:INIT REPEATER,CP=RNNRAS--,VER=2.2.0
      26 MCO:BGN:BFR
      143 SGN:PER:OK
      162 SGN:INI:BND OK
      164 TSM:INIT
      165 TSF:WUR:MS=0
      173 TSM:INIT:TSP OK
      175 TSF:SID:OK,ID=4
      176 TSM:FPAR
      178 SGN:SGN:NREQ=255
      215 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      742 TSF:MSG:READ,0-0-4,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      747 SGN:SKP:MSG CMD=3,TYPE=8
      750 TSF:MSG:FPAR OK,ID=0,D=1
      2222 TSM:FPAR:OK
      2223 TSM:ID
      2224 TSM:ID:OK
      2226 TSM:UPL
      2227 SGN:SKP:MSG CMD=3,TYPE=24
      2231 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2250 TSF:MSG:READ,0-0-4,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2255 SGN:SKP:MSG CMD=3,TYPE=25
      2257 TSF:MSG:PONG RECV,HP=1
      2260 TSM:UPL:OK
      2262 TSM:READY:ID=4,PAR=0,DIS=1
      2265 SGN:PRE:SGN REQ
      2267 SGN:PRE:WHI NREQ
      2269 SGN:SKP:MSG CMD=3,TYPE=15
      2274 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      2280 SGN:PRE:XMT,TO=0
      2282 SGN:PRE:WAIT GW
      2299 TSF:MSG:READ,0-0-4,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      2305 SGN:SKP:MSG CMD=3,TYPE=15
      2308 SGN:PRE:SGN REQ,FROM=0
      2311 SGN:SKP:MSG CMD=3,TYPE=16
      2315 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      2321 SGN:SGN:NCE REQ,TO=0
      2345 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      2351 SGN:SKP:MSG CMD=3,TYPE=17
      2354 SGN:NCE:FROM=0
      2356 SGN:BND:NONCE=7398A8658B1243BC9F3DA34CB0EA84C6CB438531CAD6DD7370AAAAAAAAAAAAAA
      2443 SGN:BND:HMAC=75D2449421089944417C6B732BC380240FDBF6B5C5E8B80A297BEC236A978815
      2450 SGN:SGN:SGN
      2455 TSF:MSG:SEND,4-4-0-0,s=255,c=0,t=18,pt=0,l=5,sg=1,ft=0,st=OK:2.2.0
      2461 SGN:SKP:MSG CMD=3,TYPE=16
      2466 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2472 SGN:SGN:NCE REQ,TO=0
      2592 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2598 SGN:SKP:MSG CMD=3,TYPE=17
      2600 SGN:NCE:FROM=0
      2603 SGN:BND:NONCE=85FEA439ECA14C2904AAA21BE1D0E2B4D2FFDED742E39995FBAAAAAAAAAAAAAA
      2691 SGN:BND:HMAC=E460F110EAFC254FFC3B2D945D74A83493CE694C73211FBF762C9B8003A52D9B
      2698 SGN:SGN:SGN
      2702 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
      4708 SGN:SKP:MSG CMD=3,TYPE=16
      4713 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      4719 SGN:SGN:NCE REQ,TO=0
      4743 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      4749 SGN:SKP:MSG CMD=3,TYPE=17
      4752 SGN:NCE:FROM=0
      4754 SGN:BND:NONCE=EC873D0763BCF3F0A36F908806B0C96B0251C6B67F9928AC84AAAAAAAAAAAAAA
      4841 SGN:BND:HMAC=33845AD9A94FA682AB917198182D5C39E5FD562D7CA4A01B9D756640F61E6973
      4848 SGN:SGN:SGN
      4852 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=11,pt=0,l=13,sg=1,ft=0,st=OK:MIXED JOAOABS
      4860 SGN:SKP:MSG CMD=3,TYPE=16
      4866 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      4872 SGN:SGN:NCE REQ,TO=0
      4992 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      4998 SGN:SKP:MSG CMD=3,TYPE=17
      5001 SGN:NCE:FROM=0
      5003 SGN:BND:NONCE=F66A97005E51062331505AA96168CAF9538AC869C886C99310AAAAAAAAAAAAAA
      5090 SGN:BND:HMAC=4E6C5B7463F3CB02247BC05B41BA4BC0D05DAB965514C6737154EDC3F23127A4
      5097 SGN:SGN:SGN
      5101 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
      5107 SGN:SKP:MSG CMD=3,TYPE=16
      5113 TSF:MSG:SEND,4-4-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5118 SGN:SGN:NCE REQ,TO=0
      5238 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5244 SGN:SKP:MSG CMD=3,TYPE=17
      5246 SGN:NCE:FROM=0
      5249 SGN:BND:NONCE=EF58BA2F93398D09F1C29AD294E5E390B93C7F73D9316B09B1AAAAAAAAAAAAAA
      5337 SGN:BND:HMAC=B55F0C06D850255761EB532B2A5B27271379107EE11A84F0C993F9F08B53EF33
      5344 SGN:SGN:SGN
      5348 TSF:MSG:SEND,4-4-0-0,s=1,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5354 SGN:SKP:MSG CMD=3,TYPE=16
      5360 TSF:MSG:SEND,4-4-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5365 SGN:SGN:NCE REQ,TO=0
      5462 TSF:MSG:READ,0-0-4,s=1,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5467 SGN:SKP:ACK CMD=0,TYPE=3
      5470 TSF:MSG:ACK
      5501 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5507 SGN:SKP:MSG CMD=3,TYPE=17
      5510 SGN:NCE:FROM=0
      5512 SGN:BND:NONCE=46BE373F406494B4011BC61D6EF12BC8BB12F5727A7765CBA9AAAAAAAAAAAAAA
      5599 SGN:BND:HMAC=43EA678DDAEBBFA364BF162AF5E6B564534DF2BBA27342C82DB7786FAE1C839C
      5607 SGN:SGN:SGN
      5611 TSF:MSG:SEND,4-4-0-0,s=2,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5617 SGN:SKP:MSG CMD=3,TYPE=16
      5622 TSF:MSG:SEND,4-4-0-0,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5628 SGN:SGN:NCE REQ,TO=0
      5725 TSF:MSG:READ,0-0-4,s=2,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5730 SGN:SKP:ACK CMD=0,TYPE=3
      5733 TSF:MSG:ACK
      5765 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5770 SGN:SKP:MSG CMD=3,TYPE=17
      5773 SGN:NCE:FROM=0
      5775 SGN:BND:NONCE=72CDF777DED84D899075FD474FE01055A98F4F598E688E3073AAAAAAAAAAAAAA
      5862 SGN:BND:HMAC=2DF8B15EC5D7285BFC26BDA1F715DD0FC0069C26B99575BEB56B10DD2F914F13
      5869 SGN:SGN:SGN
      5873 TSF:MSG:SEND,4-4-0-0,s=3,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5880 SGN:SKP:MSG CMD=3,TYPE=16
      5885 TSF:MSG:SEND,4-4-0-0,s=4,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5892 SGN:SGN:NCE REQ,TO=0
      5988 TSF:MSG:READ,0-0-4,s=3,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5993 SGN:SKP:ACK CMD=0,TYPE=3
      5995 TSF:MSG:ACK
      6027 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6033 SGN:SKP:MSG CMD=3,TYPE=17
      6036 SGN:NCE:FROM=0
      6038 SGN:BND:NONCE=DF6D753F198443500BE633B6D3FAE7C466F79404C8910BA55FAAAAAAAAAAAAAA
      6125 SGN:BND:HMAC=CFA92CD5B0558F1C4DD8447444CFB2FB8C034940A4B5F3C32A6E5A6F4CA59453
      6132 SGN:SGN:SGN
      6136 TSF:MSG:SEND,4-4-0-0,s=4,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      6142 SGN:SKP:MSG CMD=3,TYPE=16
      6149 TSF:MSG:SEND,4-4-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6155 SGN:SGN:NCE REQ,TO=0
      6250 TSF:MSG:READ,0-0-4,s=4,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      6255 SGN:SKP:ACK CMD=0,TYPE=3
      6258 TSF:MSG:ACK
      6290 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6296 SGN:SKP:MSG CMD=3,TYPE=17
      6298 SGN:NCE:FROM=0
      6300 SGN:BND:NONCE=0B1D83A00F89B8AEDDE0CC1A17B6CABDC028901EC0A6EAB13EAAAAAAAAAAAAAA
      6388 SGN:BND:HMAC=8862DDB7FDF1794F50C06676C2F838E71A8468EC22726B49E506B6D320A3009A
      6395 SGN:SGN:SGN
      6400 TSF:MSG:SEND,4-4-0-0,s=30,c=0,t=0,pt=0,l=6,sg=1,ft=0,st=OK:POENTE
      6406 SGN:SKP:MSG CMD=3,TYPE=16
      6412 TSF:MSG:SEND,4-4-0-0,s=31,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6418 SGN:SGN:NCE REQ,TO=0
      6513 TSF:MSG:READ,0-0-4,s=30,c=0,t=0,pt=0,l=6,sg=0:POENTE
      6519 SGN:SKP:ACK CMD=0,TYPE=0
      6521 TSF:MSG:ACK
      6553 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6559 SGN:SKP:MSG CMD=3,TYPE=17
      6562 SGN:NCE:FROM=0
      6564 SGN:BND:NONCE=F0D039920909FDE780B2EC61713AE3B357471C95B66D501751AAAAAAAAAAAAAA
      6651 SGN:BND:HMAC=FE0162A68ADB100C40363582C95207DE14694124C487CAD706B326B255B1234B
      6659 SGN:SGN:SGN
      6663 TSF:MSG:SEND,4-4-0-0,s=31,c=0,t=0,pt=0,l=8,sg=1,ft=0,st=OK:NASCENTE
      6670 SGN:SKP:MSG CMD=3,TYPE=16
      6675 TSF:MSG:SEND,4-4-0-0,s=10,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6681 SGN:SGN:NCE REQ,TO=0
      6777 TSF:MSG:READ,0-0-4,s=31,c=0,t=0,pt=0,l=8,sg=0:NASCENTE
      6782 SGN:SKP:ACK CMD=0,TYPE=0
      6786 TSF:MSG:ACK
      6817 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6822 SGN:SKP:MSG CMD=3,TYPE=17
      6825 SGN:NCE:FROM=0
      6828 SGN:BND:NONCE=501756E2817E643A3E517CEC1D16461B471DB2E600BCD878B7AAAAAAAAAAAAAA
      6915 SGN:BND:HMAC=9DA69C9ABD8A32677FD13F37DA542D07030EA626B3337CC4D384EC44D70CEF20
      6923 SGN:SGN:SGN
      6927 TSF:MSG:SEND,4-4-0-0,s=10,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      6933 SGN:SKP:MSG CMD=3,TYPE=16
      6938 TSF:MSG:SEND,4-4-0-0,s=11,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6944 SGN:SGN:NCE REQ,TO=0
      7063 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      7069 SGN:SKP:MSG CMD=3,TYPE=17
      7071 SGN:NCE:FROM=0
      7073 SGN:BND:NONCE=ED83EED6A2E7E85EB1AEEE2DED74C058B89C3D6A43E2CC30C4AAAAAAAAAAAAAA
      7161 SGN:BND:HMAC=A2AC5D78A004DDB476DABACE267DCF06ACE0689D9443849974F0FC198FD2015D
      7169 SGN:SGN:SGN
      7173 TSF:MSG:SEND,4-4-0-0,s=11,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      7179 SGN:SKP:MSG CMD=3,TYPE=16
      7184 TSF:MSG:SEND,4-4-0-0,s=50,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      7190 SGN:SGN:NCE REQ,TO=0
      7309 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      7315 SGN:SKP:MSG CMD=3,TYPE=17
      7317 SGN:NCE:FROM=0
      7319 SGN:BND:NONCE=C95888EBF76AB6923853908CC55D06D5BF9146B3933F65378FAAAAAAAAAAAAAA
      7407 SGN:BND:HMAC=AD23837E2FA717DC58F1CA64D37EBEB14B0887329D194389705DA32A6B0837B3
      7414 SGN:SGN:SGN
      7418 TSF:MSG:SEND,4-4-0-0,s=50,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
      7425 SGN:SKP:MSG CMD=3,TYPE=16
      7430 TSF:MSG:SEND,4-4-0-0,s=60,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      7436 SGN:SGN:NCE REQ,TO=0
      7555 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      7561 SGN:SKP:MSG CMD=3,TYPE=17
      7564 SGN:NCE:FROM=0
      7566 SGN:BND:NONCE=AD9D69D1BDEC7D1893E350501EB91FDFE177202A768C8EE1B9AAAAAAAAAAAAAA
      7653 SGN:BND:HMAC=77F996E81C6AFD34CDB4207AD79AC93B681DF93F3FD2C1A115F236D23556CF63
      7660 SGN:SGN:SGN
      7664 TSF:MSG:SEND,4-4-0-0,s=60,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      7670 SGN:SKP:MSG CMD=3,TYPE=16
      7675 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      7682 SGN:SGN:NCE REQ,TO=0
      7800 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      7806 SGN:SKP:MSG CMD=3,TYPE=17
      7810 SGN:NCE:FROM=0
      7812 SGN:BND:NONCE=5A51EDE317B07AB430EA6A605F5D16B1A1D5B459A17AAA8BDAAAAAAAAAAAAAAA
      7899 SGN:BND:HMAC=6C6F971EE3BA968ABE5EF2A6D1B44CA1C38BC8EA83D76A204BF4C8B232826A89
      7906 SGN:SGN:SGN
      7910 TSF:MSG:SEND,4-4-0-0,s=40,c=0,t=1,pt=0,l=3,sg=1,ft=0,st=OK:PIR
      7916 MCO:REG:REQ
      7918 SGN:SKP:MSG CMD=3,TYPE=26
      7923 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
      8024 TSF:MSG:READ,0-0-4,s=40,c=0,t=1,pt=0,l=3,sg=0:PIR
      8029 SGN:SKP:ACK CMD=0,TYPE=1
      8032 TSF:MSG:ACK
      8048 TSF:MSG:READ,0-0-4,s=255,c=3,t=16,pt=0,l=0,sg=0:
      8053 SGN:SKP:MSG CMD=3,TYPE=16
      8070 SGN:SKP:MSG CMD=3,TYPE=17
      8076 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      8082 SGN:NCE:XMT,TO=4
      8190 TSF:MSG:READ,0-0-4,s=255,c=3,t=27,pt=1,l=1,sg=1:1
      8196 SGN:BND:NONCE=BA5601AC14E5860AD182906737D95484017AC13DBAFC9F8E32AAAAAAAAAAAAAA
      8284 SGN:BND:HMAC=7A6EA5CA7E3C880F77BAEEB6BCF45386AA5ACA908B709FC63E25E3C218CF07F1
      8291 SGN:VER:OK
      8292 MCO:PIM:NODE REG=1
      8294 MCO:BGN:STP
      8301 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
      8306 !MCO:SLP:REP
      10307 MCO:BGN:INIT OK,TSP=1
      10309 SGN:SKP:MSG CMD=3,TYPE=16
      10313 TSF:MSG:SEND,4-4-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      10319 SGN:SGN:NCE REQ,TO=0
      15321 !SGN:SGN:SGN FAIL
      15323 !TSF:MSG:SIGN FAIL
      15325 SGN:SKP:MSG CMD=3,TYPE=16
      15328 TSF:MSG:SEND,4-4-0-0,s=31,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      15334 SGN:SGN:NCE REQ,TO=0
      20337 !SGN:SGN:SGN FAIL
      20339 !TSF:MSG:SIGN FAIL
      0
      20341 SGN:SKP:MSG CMD=3,TYPE=16
      20345 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      20350 SGN:SGN:NCE REQ,TO=0
      25354 !SGN:SGN:SGN FAIL
      25356 !TSF:MSG:SIGN FAIL
      0
      25358 SGN:SKP:MSG CMD=3,TYPE=16
      25362 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      25368 SGN:SGN:NCE REQ,TO=0
      30370 !SGN:SGN:SGN FAIL
      30372 !TSF:MSG:SIGN FAIL
      0
      30374 SGN:SKP:MSG CMD=3,TYPE=16
      30379 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      30385 SGN:SGN:NCE REQ,TO=0
      35387 !SGN:SGN:SGN FAIL
      35389 !TSF:MSG:SIGN FAIL
      0
      35391 SGN:SKP:MSG CMD=3,TYPE=16
      35395 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      35401 SGN:SGN:NCE REQ,TO=0```
      

      Gateway:

      Sketch uses 21440 bytes (69%) of program storage space. Maximum is 30720 bytes.```
      
      
      0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0
      0;255;3;0;9;26 SGN:PER:OK
      0;255;3;0;9;48 SGN:INI:BND OK
      0;255;3;0;9;51 TSM:INIT
      0;255;3;0;9;53 TSF:WUR:MS=0
      0;255;3;0;9;61 TSM:INIT:TSP OK
      0;255;3;0;9;64 TSM:INIT:GW MODE
      0;255;3;0;9;67 TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;71 MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.2.0
      0;255;3;0;9;75 MCO:BGN:STP
      0;255;3;0;9;81 MCO:BGN:INIT OK,TSP=1
      0;255;3;0;9;20994 TSF:MSG:READ,4-4-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;21000 TSF:MSG:BC
      0;255;3;0;9;21003 TSF:MSG:FPAR REQ,ID=4
      0;255;3;0;9;21006 TSF:PNG:SEND,TO=0
      0;255;3;0;9;21009 TSF:CKU:OK
      0;255;3;0;9;21012 TSF:MSG:GWL OK
      0;255;3;0;9;21550 SGN:SKP:MSG CMD=3,TYPE=8
      0;255;3;0;9;21556 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      0;255;3;0;9;23044 TSF:MSG:READ,4-4-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      0;255;3;0;9;23050 SGN:SKP:MSG CMD=3,TYPE=24
      0;255;3;0;9;23053 TSF:MSG:PINGED,ID=4,HP=1
      0;255;3;0;9;23057 SGN:SKP:MSG CMD=3,TYPE=25
      0;255;3;0;9;23063 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;23086 TSF:MSG:READ,4-4-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      0;255;3;0;9;23092 SGN:SKP:MSG CMD=3,TYPE=15
      0;255;3;0;9;23096 SGN:PRE:SGN REQ,FROM=4
      0;255;3;0;9;23100 SGN:PRE:SGN REQ,TO=4
      0;255;3;0;9;23103 SGN:PRE:WHI NREQ,TO=4
      0;255;3;0;9;23107 SGN:SKP:MSG CMD=3,TYPE=15
      0;255;3;0;9;23112 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      0;255;3;0;9;23119 SGN:PRE:XMT,TO=4
      0;255;3;0;9;23127 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;23133 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;23151 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;23158 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      0;255;3;0;9;23165 SGN:NCE:XMT,TO=0
      0;255;3;0;9;23267 TSF:MSG:READ,4-4-0,s=255,c=0,t=18,pt=0,l=5,sg=1:2.2.0
      0;255;3;0;9;23273 SGN:BND:NONCE=7398A8658B1243BC9F3DA34CB0EA84C6CB438531CAD6DD7370AAAAAAAAAAAAAA
      0;255;3;0;9;23361 SGN:BND:HMAC=75D2449421089944417C6B732BC380240FDBF6B5C5E8B80A297BEC236A978815
      0;255;3;0;9;23370 SGN:VER:OK
      4;255;0;0;18;2.2.0
      0;255;3;0;9;23373 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;23380 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;23399 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;23405 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;23412 SGN:NCE:XMT,TO=0
      0;255;3;0;9;23514 TSF:MSG:READ,4-4-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
      0;255;3;0;9;23520 SGN:BND:NONCE=85FEA439ECA14C2904AAA21BE1D0E2B4D2FFDED742E39995FBAAAAAAAAAAAAAA
      0;255;3;0;9;23608 SGN:BND:HMAC=E460F110EAFC254FFC3B2D945D74A83493CE694C73211FBF762C9B8003A52D9B
      0;255;3;0;9;23617 SGN:VER:OK
      4;255;3;0;6;0
      0;255;3;0;9;25525 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;25530 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;25548 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;25555 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;25563 SGN:NCE:XMT,TO=0
      0;255;3;0;9;25664 TSF:MSG:READ,4-4-0,s=255,c=3,t=11,pt=0,l=13,sg=1:MIXED JOAOABS
      0;255;3;0;9;25671 SGN:BND:NONCE=EC873D0763BCF3F0A36F908806B0C96B0251C6B67F9928AC84AAAAAAAAAAAAAA
      0;255;3;0;9;25759 SGN:BND:HMAC=33845AD9A94FA682AB917198182D5C39E5FD562D7CA4A01B9D756640F61E6973
      0;255;3;0;9;25767 SGN:VER:OK
      4;255;3;0;11;MIXED JOAOABS
      0;255;3;0;9;25772 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;25779 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;25797 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;25803 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;25811 SGN:NCE:XMT,TO=0
      0;255;3;0;9;25913 TSF:MSG:READ,4-4-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.0
      0;255;3;0;9;25919 SGN:BND:NONCE=F66A97005E51062331505AA96168CAF9538AC869C886C99310AAAAAAAAAAAAAA
      0;255;3;0;9;26007 SGN:BND:HMAC=4E6C5B7463F3CB02247BC05B41BA4BC0D05DAB965514C6737154EDC3F23127A4
      0;255;3;0;9;26015 SGN:VER:OK
      4;255;3;0;12;1.0
      0;255;3;0;9;26019 TSF:MSG:READ,4-4-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;26025 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;26044 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;26050 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;26058 SGN:NCE:XMT,TO=0
      0;255;3;0;9;26160 TSF:MSG:READ,4-4-0,s=1,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;26166 SGN:BND:NONCE=EF58BA2F93398D09F1C29AD294E5E390B93C7F73D9316B09B1AAAAAAAAAAAAAA
      0;255;3;0;9;26254 SGN:BND:HMAC=B55F0C06D850255761EB532B2A5B27271379107EE11A84F0C993F9F08B53EF33
      0;255;3;0;9;26262 SGN:VER:OK
      0;255;3;0;9;26265 TSF:MSG:ACK REQ
      0;255;3;0;9;26268 SGN:SKP:ACK CMD=0,TYPE=3
      0;255;3;0;9;26273 TSF:MSG:SEND,0-0-4-4,s=1,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;1;0;0;3;RELAYS
      0;255;3;0;9;26281 TSF:MSG:READ,4-4-0,s=2,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;26289 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;26307 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;26313 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;26320 SGN:NCE:XMT,TO=0
      0;255;3;0;9;26422 TSF:MSG:READ,4-4-0,s=2,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;26428 SGN:BND:NONCE=46BE373F406494B4011BC61D6EF12BC8BB12F5727A7765CBA9AAAAAAAAAAAAAA
      0;255;3;0;9;26517 SGN:BND:HMAC=43EA678DDAEBBFA364BF162AF5E6B564534DF2BBA27342C82DB7786FAE1C839C
      0;255;3;0;9;26525 SGN:VER:OK
      0;255;3;0;9;26527 TSF:MSG:ACK REQ
      0;255;3;0;9;26530 SGN:SKP:ACK CMD=0,TYPE=3
      0;255;3;0;9;26536 TSF:MSG:SEND,0-0-4-4,s=2,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;2;0;0;3;RELAYS
      0;255;3;0;9;26545 TSF:MSG:READ,4-4-0,s=3,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;26551 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;26569 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;26576 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;26584 SGN:NCE:XMT,TO=0
      0;255;3;0;9;26685 TSF:MSG:READ,4-4-0,s=3,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;26691 SGN:BND:NONCE=72CDF777DED84D899075FD474FE01055A98F4F598E688E3073AAAAAAAAAAAAAA
      0;255;3;0;9;26779 SGN:BND:HMAC=2DF8B15EC5D7285BFC26BDA1F715DD0FC0069C26B99575BEB56B10DD2F914F13
      0;255;3;0;9;26787 SGN:VER:OK
      0;255;3;0;9;26790 TSF:MSG:ACK REQ
      0;255;3;0;9;26793 SGN:SKP:ACK CMD=0,TYPE=3
      0;255;3;0;9;26800 TSF:MSG:SEND,0-0-4-4,s=3,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;3;0;0;3;RELAYS
      0;255;3;0;9;26808 TSF:MSG:READ,4-4-0,s=4,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;26814 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;26832 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;26839 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;26847 SGN:NCE:XMT,TO=0
      0;255;3;0;9;26947 TSF:MSG:READ,4-4-0,s=4,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;26954 SGN:BND:NONCE=DF6D753F198443500BE633B6D3FAE7C466F79404C8910BA55FAAAAAAAAAAAAAA
      0;255;3;0;9;27042 SGN:BND:HMAC=CFA92CD5B0558F1C4DD8447444CFB2FB8C034940A4B5F3C32A6E5A6F4CA59453
      0;255;3;0;9;27051 SGN:VER:OK
      0;255;3;0;9;27054 TSF:MSG:ACK REQ
      0;255;3;0;9;27057 SGN:SKP:ACK CMD=0,TYPE=3
      0;255;3;0;9;27062 TSF:MSG:SEND,0-0-4-4,s=4,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;4;0;0;3;RELAYS
      0;255;3;0;9;27070 TSF:MSG:READ,4-4-0,s=30,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;27077 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;27096 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;27102 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;27110 SGN:NCE:XMT,TO=0
      0;255;3;0;9;27210 TSF:MSG:READ,4-4-0,s=30,c=0,t=0,pt=0,l=6,sg=1:POENTE
      0;255;3;0;9;27217 SGN:BND:NONCE=0B1D83A00F89B8AEDDE0CC1A17B6CABDC028901EC0A6EAB13EAAAAAAAAAAAAAA
      0;255;3;0;9;27305 SGN:BND:HMAC=8862DDB7FDF1794F50C06676C2F838E71A8468EC22726B49E506B6D320A3009A
      0;255;3;0;9;27314 SGN:VER:OK
      0;255;3;0;9;27317 TSF:MSG:ACK REQ
      0;255;3;0;9;27320 SGN:SKP:ACK CMD=0,TYPE=0
      0;255;3;0;9;27325 TSF:MSG:SEND,0-0-4-4,s=30,c=0,t=0,pt=0,l=6,sg=0,ft=0,st=OK:POENTE
      4;30;0;0;0;POENTE
      0;255;3;0;9;27333 TSF:MSG:READ,4-4-0,s=31,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;27340 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;27359 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;27365 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;27373 SGN:NCE:XMT,TO=0
      0;255;3;0;9;27473 TSF:MSG:READ,4-4-0,s=31,c=0,t=0,pt=0,l=8,sg=1:NASCENTE
      0;255;3;0;9;27481 SGN:BND:NONCE=F0D039920909FDE780B2EC61713AE3B357471C95B66D501751AAAAAAAAAAAAAA
      0;255;3;0;9;27569 SGN:BND:HMAC=FE0162A68ADB100C40363582C95207DE14694124C487CAD706B326B255B1234B
      0;255;3;0;9;27577 SGN:VER:OK
      0;255;3;0;9;27580 TSF:MSG:ACK REQ
      0;255;3;0;9;27583 SGN:SKP:ACK CMD=0,TYPE=0
      0;255;3;0;9;27589 TSF:MSG:SEND,0-0-4-4,s=31,c=0,t=0,pt=0,l=8,sg=0,ft=0,st=OK:NASCENTE
      4;31;0;0;0;NASCENTE
      0;255;3;0;9;27597 TSF:MSG:READ,4-4-0,s=10,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;27603 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;27622 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;27629 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;27636 SGN:NCE:XMT,TO=0
      0;255;3;0;9;27738 TSF:MSG:READ,4-4-0,s=10,c=0,t=6,pt=0,l=0,sg=1:
      0;255;3;0;9;27744 SGN:BND:NONCE=501756E2817E643A3E517CEC1D16461B471DB2E600BCD878B7AAAAAAAAAAAAAA
      0;255;3;0;9;27832 SGN:BND:HMAC=9DA69C9ABD8A32677FD13F37DA542D07030EA626B3337CC4D384EC44D70CEF20
      0;255;3;0;9;27840 SGN:VER:OK
      4;10;0;0;6;
      0;255;3;0;9;27843 TSF:MSG:READ,4-4-0,s=11,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;27849 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;27868 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;27875 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;27882 SGN:NCE:XMT,TO=0
      0;255;3;0;9;27983 TSF:MSG:READ,4-4-0,s=11,c=0,t=6,pt=0,l=0,sg=1:
      0;255;3;0;9;27990 SGN:BND:NONCE=ED83EED6A2E7E85EB1AEEE2DED74C058B89C3D6A43E2CC30C4AAAAAAAAAAAAAA
      0;255;3;0;9;28078 SGN:BND:HMAC=A2AC5D78A004DDB476DABACE267DCF06ACE0689D9443849974F0FC198FD2015D
      0;255;3;0;9;28086 SGN:VER:OK
      4;11;0;0;6;
      0;255;3;0;9;28089 TSF:MSG:READ,4-4-0,s=50,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28095 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;28113 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;28121 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;28128 SGN:NCE:XMT,TO=0
      0;255;3;0;9;28229 TSF:MSG:READ,4-4-0,s=50,c=0,t=7,pt=0,l=0,sg=1:
      0;255;3;0;9;28235 SGN:BND:NONCE=C95888EBF76AB6923853908CC55D06D5BF9146B3933F65378FAAAAAAAAAAAAAA
      0;255;3;0;9;28323 SGN:BND:HMAC=AD23837E2FA717DC58F1CA64D37EBEB14B0887329D194389705DA32A6B0837B3
      0;255;3;0;9;28332 SGN:VER:OK
      4;50;0;0;7;
      0;255;3;0;9;28335 TSF:MSG:READ,4-4-0,s=60,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28342 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;28359 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;28366 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;28374 SGN:NCE:XMT,TO=0
      0;255;3;0;9;28475 TSF:MSG:READ,4-4-0,s=60,c=0,t=6,pt=0,l=0,sg=1:
      0;255;3;0;9;28481 SGN:BND:NONCE=AD9D69D1BDEC7D1893E350501EB91FDFE177202A768C8EE1B9AAAAAAAAAAAAAA
      0;255;3;0;9;28569 SGN:BND:HMAC=77F996E81C6AFD34CDB4207AD79AC93B681DF93F3FD2C1A115F236D23556CF63
      0;255;3;0;9;28577 SGN:VER:OK
      4;60;0;0;6;
      0;255;3;0;9;28580 TSF:MSG:READ,4-4-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28588 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;28606 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;28612 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;28619 SGN:NCE:XMT,TO=0
      0;255;3;0;9;28721 TSF:MSG:READ,4-4-0,s=40,c=0,t=1,pt=0,l=3,sg=1:PIR
      0;255;3;0;9;28727 SGN:BND:NONCE=5A51EDE317B07AB430EA6A605F5D16B1A1D5B459A17AAA8BDAAAAAAAAAAAAAAA
      0;255;3;0;9;28815 SGN:BND:HMAC=6C6F971EE3BA968ABE5EF2A6D1B44CA1C38BC8EA83D76A204BF4C8B232826A89
      0;255;3;0;9;28824 SGN:VER:OK
      0;255;3;0;9;28826 TSF:MSG:ACK REQ
      0;255;3;0;9;28829 SGN:SKP:ACK CMD=0,TYPE=1
      0;255;3;0;9;28835 TSF:MSG:SEND,0-0-4-4,s=40,c=0,t=1,pt=0,l=3,sg=0,ft=0,st=OK:PIR
      4;40;0;0;1;PIR
      0;255;3;0;9;28843 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
      0;255;3;0;9;28850 SGN:SKP:MSG CMD=3,TYPE=26
      0;255;3;0;9;28854 SGN:SKP:MSG CMD=3,TYPE=16
      0;255;3;0;9;28859 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      0;255;3;0;9;28866 SGN:SGN:NCE REQ,TO=4
      0;255;3;0;9;28887 TSF:MSG:READ,4-4-0,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      0;255;3;0;9;28893 SGN:SKP:MSG CMD=3,TYPE=17
      0;255;3;0;9;28897 SGN:NCE:FROM=4
      0;255;3;0;9;28900 SGN:BND:NONCE=BA5601AC14E5860AD182906737D95484017AC13DBAFC9F8E32AAAAAAAAAAAAAA
      0;255;3;0;9;28988 SGN:BND:HMAC=7A6EA5CA7E3C880F77BAEEB6BCF45386AA5ACA908B709FC63E25E3C218CF07F1
      0;255;3;0;9;28996 SGN:SGN:SGN
      0;255;3;0;9;29002 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
      
      posted in Troubleshooting
      joaoabs
      joaoabs
    • RE: SW_Signing failing: !TSF:MSG:SIGN FAIL

      Hi Anticimex,

      Yes, I can confirm its the GW that isn't answering.
      It just stops:

      0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.2.0
      0;255;3;0;9;48 TSM:INIT
      0;255;3;0;9;50 TSF:WUR:MS=0
      0;255;3;0;9;58 TSM:INIT:TSP OK
      0;255;3;0;9;61 TSM:INIT:GW MODE
      0;255;3;0;9;64 TSM:READY:ID=0,PAR=0,DIS=0
      0;255;3;0;9;68 MCO:REG:NOT NEEDED
      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;18;2.2.0
      0;255;3;0;9;72 MCO:BGN:STP
      0;255;3;0;9;78 MCO:BGN:INIT OK,TSP=1
      0;255;3;0;9;23922 TSF:MSG:READ,4-4-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
      0;255;3;0;9;23928 TSF:MSG:BC
      0;255;3;0;9;23931 TSF:MSG:FPAR REQ,ID=4
      0;255;3;0;9;23936 TSF:PNG:SEND,TO=0
      0;255;3;0;9;23939 TSF:CKU:OK
      0;255;3;0;9;23941 TSF:MSG:GWL OK
      0;255;3;0;9;24338 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
      0;255;3;0;9;25970 TSF:MSG:READ,4-4-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
      0;255;3;0;9;25976 TSF:MSG:PINGED,ID=4,HP=1
      0;255;3;0;9;25981 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
      0;255;3;0;9;25995 TSF:MSG:READ,4-4-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      0;255;3;0;9;26003 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      0;255;3;0;9;26010 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=0:
      0;255;3;0;9;26034 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=0,ft=0,st=OK:<NONCE>
      0;255;3;0;9;26121 TSF:MSG:READ,4-4-0,s=255,c=0,t=18,pt=0,l=5,sg=1:2.2.0
      4;255;0;0;18;2.2.0
      0;255;3;0;9;26208 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;26231 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;26319 TSF:MSG:READ,4-4-0,s=255,c=3,t=6,pt=1,l=1,sg=1:0
      4;255;3;0;6;0
      0;255;3;0;9;28326 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28349 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;28437 TSF:MSG:READ,4-4-0,s=255,c=3,t=11,pt=0,l=13,sg=1:MIXED JOAOABS
      4;255;3;0;11;MIXED JOAOABS
      0;255;3;0;9;28524 TSF:MSG:READ,4-4-0,s=255,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28549 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;28637 TSF:MSG:READ,4-4-0,s=255,c=3,t=12,pt=0,l=3,sg=1:1.0
      4;255;3;0;12;1.0
      0;255;3;0;9;28723 TSF:MSG:READ,4-4-0,s=1,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28746 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;28833 TSF:MSG:READ,4-4-0,s=1,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;28919 TSF:MSG:ACK REQ
      0;255;3;0;9;28924 TSF:MSG:SEND,0-0-4-4,s=1,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;1;0;0;3;RELAYS
      0;255;3;0;9;28933 TSF:MSG:READ,4-4-0,s=2,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;28956 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;29043 TSF:MSG:READ,4-4-0,s=2,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;29129 TSF:MSG:ACK REQ
      0;255;3;0;9;29134 TSF:MSG:SEND,0-0-4-4,s=2,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;2;0;0;3;RELAYS
      0;255;3;0;9;29143 TSF:MSG:READ,4-4-0,s=3,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;29166 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;29253 TSF:MSG:READ,4-4-0,s=3,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;29339 TSF:MSG:ACK REQ
      0;255;3;0;9;29344 TSF:MSG:SEND,0-0-4-4,s=3,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;3;0;0;3;RELAYS
      0;255;3;0;9;29352 TSF:MSG:READ,4-4-0,s=4,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;29376 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;29463 TSF:MSG:READ,4-4-0,s=4,c=0,t=3,pt=0,l=6,sg=1:RELAYS
      0;255;3;0;9;29549 TSF:MSG:ACK REQ
      0;255;3;0;9;29554 TSF:MSG:SEND,0-0-4-4,s=4,c=0,t=3,pt=0,l=6,sg=0,ft=0,st=OK:RELAYS
      4;4;0;0;3;RELAYS
      0;255;3;0;9;29562 TSF:MSG:READ,4-4-0,s=30,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;29586 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;29673 TSF:MSG:READ,4-4-0,s=30,c=0,t=0,pt=0,l=6,sg=1:POENTE
      0;255;3;0;9;29759 TSF:MSG:ACK REQ
      0;255;3;0;9;29764 TSF:MSG:SEND,0-0-4-4,s=30,c=0,t=0,pt=0,l=6,sg=0,ft=0,st=OK:POENTE
      4;30;0;0;0;POENTE
      0;255;3;0;9;29772 TSF:MSG:READ,4-4-0,s=31,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;29796 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;29883 TSF:MSG:READ,4-4-0,s=31,c=0,t=0,pt=0,l=8,sg=1:NASCENTE
      0;255;3;0;9;29970 TSF:MSG:ACK REQ
      0;255;3;0;9;29975 TSF:MSG:SEND,0-0-4-4,s=31,c=0,t=0,pt=0,l=8,sg=0,ft=0,st=OK:NASCENTE
      4;31;0;0;0;NASCENTE
      0;255;3;0;9;29983 TSF:MSG:READ,4-4-0,s=10,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;30007 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;30094 TSF:MSG:READ,4-4-0,s=10,c=0,t=6,pt=0,l=0,sg=1:
      4;10;0;0;6;
      0;255;3;0;9;30180 TSF:MSG:READ,4-4-0,s=11,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;30203 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;30290 TSF:MSG:READ,4-4-0,s=11,c=0,t=6,pt=0,l=0,sg=1:
      4;11;0;0;6;
      0;255;3;0;9;30376 TSF:MSG:READ,4-4-0,s=50,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;30400 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;30487 TSF:MSG:READ,4-4-0,s=50,c=0,t=7,pt=0,l=0,sg=1:
      4;50;0;0;7;
      0;255;3;0;9;30574 TSF:MSG:READ,4-4-0,s=60,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;30597 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;30685 TSF:MSG:READ,4-4-0,s=60,c=0,t=6,pt=0,l=0,sg=1:
      4;60;0;0;6;
      0;255;3;0;9;30771 TSF:MSG:READ,4-4-0,s=40,c=3,t=16,pt=0,l=0,sg=1:
      0;255;3;0;9;30793 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      0;255;3;0;9;30881 TSF:MSG:READ,4-4-0,s=40,c=0,t=1,pt=0,l=3,sg=1:PIR
      0;255;3;0;9;30966 TSF:MSG:ACK REQ
      0;255;3;0;9;30971 TSF:MSG:SEND,0-0-4-4,s=40,c=0,t=1,pt=0,l=3,sg=0,ft=0,st=OK:PIR
      4;40;0;0;1;PIR
      0;255;3;0;9;30980 TSF:MSG:READ,4-4-0,s=255,c=3,t=26,pt=1,l=1,sg=1:2
      0;255;3;0;9;30988 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      0;255;3;0;9;31009 TSF:MSG:READ,4-4-0,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      0;255;3;0;9;31097 TSF:MSG:SEND,0-0-4-4,s=255,c=3,t=27,pt=1,l=1,sg=1,ft=0,st=OK:1
      
      

      How can I enable the signing debug? And should I enable it in both or just in the GW?

      And by the way, I'm not a native english speaker.... What is a "nonce" in the mysensors scope?

      Thanks!
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • SW_Signing failing: !TSF:MSG:SIGN FAIL

      Hi,
      I'm trying to get SW signing working, but with no luck...
      Not sure if the signing is just supposed to work after initialization/presentation, because everything seems to go well, and then there is some sort of sleep message and from that point onwards, I get the "!TSF:MSG:SIGN FAIL" message.

      GW: Arduino nano with pin D7 unconnected

      // SIGNING STUFF ***************************************************
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
      #define MY_SIGNING_REQUEST_SIGNATURES
      
      #include <MySensors.h>
      

      Node: Arduino nano with pin A1 unconnected

      //CODE FOR SIGNING************************************************
      #define MY_SIGNING_SOFT
      #define MY_SIGNING_SOFT_RANDOMSEED_PIN A1
      #define MY_SIGNING_REQUEST_SIGNATURES 
      

      According to the documentation:
      1st step: Decide the back-end.
      I decided to implement the signing by software (#define MY_SIGNING_SOFT) in both GW and node.

      2nd step: "verify configuration" - Basically I understood it as identifying a non-connected pin
      Identified in both GW and node.

      3rd step: Personalize nodes
      Used the security personalizer.

      First, uncommented the GENERATE_KEYS_SOFT in order to generate some keys and ran on the node:

      +------------------------------------------------------------------------------------+
      |                           MySensors security personalizer                          |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                               Configuration settings                               |
      +------------------------------------------------------------------------------------+
      | * Guided key generation for EEPROM using software                                  |
      | * Software based personalization (no ATSHA204A usage whatsoever)                   |
      | * Will not require any UART confirmations                                          |
      | * Will generate HMAC key using software                                            |
      | * Will generate AES key using software                                             |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                           Hardware security peripherals                            |
      +--------------+--------------+--------------+------------------------------+--------+
      | Device       | Status       | Revision     | Serial number                | Locked |
      +--------------+--------------+--------------+------------------------------+--------+
      | AVR          | DETECTED     | N/A          | N/A (generation required)    | N/A    |
      +--------------+--------------+--------------+------------------------------+--------+
      
      +------------------------------------------------------------------------------------+
      |                                   Key generation                                   |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | EFD9AF67B3F939FC663B17F2E644BCD7AED0C6820CC9D5454D05BDF282E567BA |
      | AES    | OK     | 4EA43132406FC4C4344E4A0E4589B506                                 |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  Key copy section                                  |
      +------------------------------------------------------------------------------------+
      #define MY_HMAC_KEY 0xEF,0xD9,0xAF,0x67,0xB3,0xF9,0x39,0xFC,0x66,0x3B,0x17,0xF2,0xE6,0x44,0xBC,0xD7,0xAE,0xD0,0xC6,0x82,0x0C,0xC9,0xD5,0x45,0x4D,0x05,0xBD,0xF2,0x82,0xE5,0x67,0xBA
      #define MY_AES_KEY 0x4E,0xA4,0x31,0x32,0x40,0x6F,0xC4,0xC4,0x34,0x4E,0x4A,0x0E,0x45,0x89,0xB5,0x06
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                       EEPROM                                       |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | RESET  | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
      | AES    | RESET  | FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF                                 |
      | SERIAL | RESET  | FFFFFFFFFFFFFFFFFF                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                      This nodes whitelist entry on other nodes                     |
      +------------------------------------------------------------------------------------+
      {.nodeId = <ID of this node>,.serial = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}}
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  WHAT TO DO NEXT?                                  |
      +------------------------------------------------------------------------------------+
      | To proceed with the personalization, copy the keys shown in the Key copy section,  |
      | and replace the corresponding definitions in the top of the sketch, then disable   |
      | GENERATE_KEYS_SOFT and enable PERSONALIZE_SOFT or PERSONALIZE_SOFT_RANDOM_SERIAL.  |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  Execution result                                  |
      +------------------------------------------------------------------------------------+
      | SUCCESS                                                                            |
      +------------------------------------------------------------------------------------+
      
      

      Then copied those keys and HW ID back to the same sketch. These were:

      
      
      #define MY_HMAC_KEY 0xEF,0xD9,0xAF,0x67,0xB3,0xF9,0x39,0xFC,0x66,0x3B,0x17,0xF2,0xE6,0x44,0xBC,0xD7,0xAE,0xD0,0xC6,0x82,0x0C,0xC9,0xD5,0x45,0x4D,0x05,0xBD,0xF2,0x82,0xE5,0x67,0xBA
      #define MY_AES_KEY 0x4E,0xA4,0x31,0x32,0x40,0x6F,0xC4,0xC4,0x34,0x4E,0x4A,0x0E,0x45,0x89,0xB5,0x06
      #define MY_SOFT_SERIAL 0x69,0x2F,0x9D,0x05,0x0D,0x20,0x17,0xB2,0xC6  
      

      Commented back the GENERATE_KEYS_SOFT and uncommented the PERSONALIZE_SOFT_RANDOM_SERIAL. Ran it again:

      +------------------------------------------------------------------------------------+
      |                           MySensors security personalizer                          |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                               Configuration settings                               |
      +------------------------------------------------------------------------------------+
      | * Guided personalization/storage of keys in EEPROM                                 |
      | * Guided storage and generation of random serial in EEPROM                         |
      | * Software based personalization (no ATSHA204A usage whatsoever)                   |
      | * Will not require any UART confirmations                                          |
      | * Will store HMAC key to EEPROM                                                    |
      | * Will store AES key to EEPROM                                                     |
      | * Will generate soft serial using software                                         |
      | * Will store soft serial to EEPROM                                                 |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                           Hardware security peripherals                            |
      +--------------+--------------+--------------+------------------------------+--------+
      | Device       | Status       | Revision     | Serial number                | Locked |
      +--------------+--------------+--------------+------------------------------+--------+
      | AVR          | DETECTED     | N/A          | N/A (generation required)    | N/A    |
      +--------------+--------------+--------------+------------------------------+--------+
      
      +------------------------------------------------------------------------------------+
      |                                   Key generation                                   |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | SERIAL | OK     | 692F9D050D2017B2C6                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                    Key storage                                     |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | EFD9AF67B3F939FC663B17F2E644BCD7AED0C6820CC9D5454D05BDF282E567BA |
      | AES    | OK     | 4EA43132406FC4C4344E4A0E4589B506                                 |
      | SERIAL | OK     | 692F9D050D2017B2C6                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                       EEPROM                                       |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | EFD9AF67B3F939FC663B17F2E644BCD7AED0C6820CC9D5454D05BDF282E567BA |
      | AES    | OK     | 4EA43132406FC4C4344E4A0E4589B506                                 |
      | SERIAL | OK     | 692F9D050D2017B2C6                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                      This nodes whitelist entry on other nodes                     |
      +------------------------------------------------------------------------------------+
      {.nodeId = <ID of this node>,.serial = {0x69,0x2F,0x9D,0x05,0x0D,0x20,0x17,0xB2,0xC6}}
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  WHAT TO DO NEXT?                                  |
      +------------------------------------------------------------------------------------+
      | This device has now been personalized. Run this sketch with its current settings   |
      | on all the devices in your network that have security enabled.                     |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  Execution result                                  |
      +------------------------------------------------------------------------------------+
      | SUCCESS                                                                            |
      +------------------------------------------------------------------------------------+
      

      Now, just changed the MY_SOFT_SERIAL with another value and ran it in the GW node:

      +-------------------------------+------------------------------------------------------------------------------------+
      |                           MySensors security personalizer                          |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                               Configuration settings                               |
      +------------------------------------------------------------------------------------+
      | * Guided personalization/storage of keys in EEPROM                                 |
      | * Guided storage and generation of random serial in EEPROM                         |
      | * Software based personalization (no ATSHA204A usage whatsoever)                   |
      | * Will not require any UART confirmations                                          |
      | * Will store HMAC key to EEPROM                                                    |
      | * Will store AES key to EEPROM                                                     |
      | * Will generate soft serial using software                                         |
      | * Will store soft serial to EEPROM                                                 |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                           Hardware security peripherals                            |
      +--------------+--------------+--------------+------------------------------+--------+
      | Device       | Status       | Revision     | Serial number                | Locked |
      +--------------+--------------+--------------+------------------------------+--------+
      | AVR          | DETECTED     | N/A          | N/A (generation required)    | N/A    |
      +--------------+--------------+--------------+------------------------------+--------+
      
      +------------------------------------------------------------------------------------+
      |                                   Key generation                                   |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | SERIAL | OK     | 160022F33241EA8DF2                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                    Key storage                                     |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | EFD9AF67B3F939FC663B17F2E644BCD7AED0C6820CC9D5454D05BDF282E567BA |
      | AES    | OK     | 4EA43132406FC4C4344E4A0E4589B506                                 |
      | SERIAL | OK     | 160022F33241EA8DF2                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                       EEPROM                                       |
      +--------+--------+------------------------------------------------------------------+
      | Key ID | Status | Key                                                              |
      +--------+--------+------------------------------------------------------------------+
      | HMAC   | OK     | EFD9AF67B3F939FC663B17F2E644BCD7AED0C6820CC9D5454D05BDF282E567BA |
      | AES    | OK     | 4EA43132406FC4C4344E4A0E4589B506                                 |
      | SERIAL | OK     | 160022F33241EA8DF2                                               |
      +--------+--------+------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                      This nodes whitelist entry on other nodes                     |
      +------------------------------------------------------------------------------------+
      {.nodeId = <ID of this node>,.serial = {0x16,0x00,0x22,0xF3,0x32,0x41,0xEA,0x8D,0xF2}}
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  WHAT TO DO NEXT?                                  |
      +------------------------------------------------------------------------------------+
      | This device has now been personalized. Run this sketch with its current settings   |
      | on all the devices in your network that have security enabled.                     |
      +------------------------------------------------------------------------------------+
      
      +------------------------------------------------------------------------------------+
      |                                  Execution result                                  |
      +------------------------------------------------------------------------------------+
      | SUCCESS                                                                            |
      +------------------------------------------------------------------------------------+
      

      And I thought this would be enough..... However, the GW and node don't seem to be communicating well because I'm getting a lot of "!TSF:MSG:SIGN FAIL" messages (although in the boot of the node the presentation looks good):

       __  __       ____
      |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
      | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
      | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
      |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
              |___/                      2.2.0
      
      16 MCO:BGN:INIT NODE,CP=RNNNAS--,VER=2.2.0
      25 MCO:BGN:BFR
      171 TSM:INIT
      173 TSF:WUR:MS=0
      180 TSM:INIT:TSP OK
      182 TSF:SID:OK,ID=4
      183 TSM:FPAR
      220 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      766 TSF:MSG:READ,0-0-4,s=255,c=3,t=8,pt=1,l=1,sg=0:0
      772 TSF:MSG:FPAR OK,ID=0,D=1
      2227 TSM:FPAR:OK
      2228 TSM:ID
      2229 TSM:ID:OK
      2231 TSM:UPL
      2234 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2245 TSF:MSG:READ,0-0-4,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2250 TSF:MSG:PONG RECV,HP=1
      2252 TSM:UPL:OK
      2254 TSM:READY:ID=4,PAR=0,DIS=1
      2258 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0101
      2266 TSF:MSG:READ,0-0-4,s=255,c=3,t=15,pt=6,l=2,sg=0:0101
      2273 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=0,ft=0,st=OK:
      2297 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=0:<NONCE>
      2385 TSF:MSG:SEND,4-4-0-0,s=255,c=0,t=17,pt=0,l=5,sg=1,ft=0,st=OK:2.2.0
      2395 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      2496 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      2583 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=6,pt=1,l=1,sg=1,ft=0,st=OK:0
      4591 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      4614 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      4702 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=11,pt=0,l=13,sg=1,ft=0,st=OK:MIXED JOAOABS
      4712 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      4813 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      4901 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=12,pt=0,l=3,sg=1,ft=0,st=OK:1.0
      4911 TSF:MSG:SEND,4-4-0-0,s=1,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5012 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5100 TSF:MSG:SEND,4-4-0-0,s=1,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5108 TSF:MSG:SEND,4-4-0-0,s=2,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5190 TSF:MSG:READ,0-0-4,s=1,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5195 TSF:MSG:ACK
      5222 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5310 TSF:MSG:SEND,4-4-0-0,s=2,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5319 TSF:MSG:SEND,4-4-0-0,s=3,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5401 TSF:MSG:READ,0-0-4,s=2,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5406 TSF:MSG:ACK
      5433 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5521 TSF:MSG:SEND,4-4-0-0,s=3,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5530 TSF:MSG:SEND,4-4-0-0,s=4,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5612 TSF:MSG:READ,0-0-4,s=3,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5617 TSF:MSG:ACK
      5644 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5732 TSF:MSG:SEND,4-4-0-0,s=4,c=0,t=3,pt=0,l=6,sg=1,ft=0,st=OK:RELAYS
      5741 TSF:MSG:SEND,4-4-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      5822 TSF:MSG:READ,0-0-4,s=4,c=0,t=3,pt=0,l=6,sg=0:RELAYS
      5827 TSF:MSG:ACK
      5855 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      5943 TSF:MSG:SEND,4-4-0-0,s=30,c=0,t=0,pt=0,l=6,sg=1,ft=0,st=OK:POENTE
      5951 TSF:MSG:SEND,4-4-0-0,s=31,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6033 TSF:MSG:READ,0-0-4,s=30,c=0,t=0,pt=0,l=6,sg=0:POENTE
      6038 TSF:MSG:ACK
      6066 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6154 TSF:MSG:SEND,4-4-0-0,s=31,c=0,t=0,pt=0,l=8,sg=1,ft=0,st=OK:NASCENTE
      6163 TSF:MSG:SEND,4-4-0-0,s=10,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6245 TSF:MSG:READ,0-0-4,s=31,c=0,t=0,pt=0,l=8,sg=0:NASCENTE
      6250 TSF:MSG:ACK
      6277 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6365 TSF:MSG:SEND,4-4-0-0,s=10,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      6374 TSF:MSG:SEND,4-4-0-0,s=11,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6474 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6562 TSF:MSG:SEND,4-4-0-0,s=11,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      6571 TSF:MSG:SEND,4-4-0-0,s=50,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6671 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6759 TSF:MSG:SEND,4-4-0-0,s=50,c=0,t=7,pt=0,l=0,sg=1,ft=0,st=OK:
      6768 TSF:MSG:SEND,4-4-0-0,s=60,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      6868 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      6957 TSF:MSG:SEND,4-4-0-0,s=60,c=0,t=6,pt=0,l=0,sg=1,ft=0,st=OK:
      6965 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      7065 TSF:MSG:READ,0-0-4,s=255,c=3,t=17,pt=6,l=25,sg=1:<NONCE>
      7153 TSF:MSG:SEND,4-4-0-0,s=40,c=0,t=1,pt=0,l=3,sg=1,ft=0,st=OK:PIR
      7159 MCO:REG:REQ
      7163 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=1,ft=0,st=OK:2
      7243 TSF:MSG:READ,0-0-4,s=40,c=0,t=1,pt=0,l=3,sg=0:PIR
      7248 TSF:MSG:ACK
      7262 TSF:MSG:READ,0-0-4,s=255,c=3,t=16,pt=0,l=0,sg=1:
      7283 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=17,pt=6,l=25,sg=1,ft=0,st=OK:<NONCE>
      7372 TSF:MSG:READ,0-0-4,s=255,c=3,t=27,pt=1,l=1,sg=1:1
      7456 MCO:PIM:NODE REG=1
      7458 MCO:BGN:STP
      7465 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
      7471 TSF:TDI:TSL
      7473 MCO:SLP:WUP=-1
      7475 TSF:TRI:TSB
      7476 MCO:BGN:INIT OK,TSP=1
      7479 TSF:MSG:SEND,4-4-0-0,s=30,c=3,t=16,pt=0,l=0,sg=1,ft=0,st=OK:
      12485 !TSF:MSG:SIGN FAIL
      12487 TSF:MSG:SEND,4-4-0-0,s=31,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      17494 !TSF:MSG:SIGN FAIL
      0
      17496 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      22502 !TSF:MSG:SIGN FAIL
      0
      22505 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      27511 !TSF:MSG:SIGN FAIL
      0
      27514 TSF:MSG:SEND,4-4-0-0,s=40,c=3,t=16,pt=0,l=0,sg=0,ft=1,st=OK:
      

      By the way, at the moment, I'm not using any controller: I'm just in testing phase with each node connected to a different computer and checking its messages on the serial ports.

      Any idea of where did I failed in the procedure?

      Thanks,
      Joaoabs

      posted in Troubleshooting
      joaoabs
      joaoabs
    • Eastrom SDM120 with RS485

      Hi,

      I have an Eastrom SDM120 (power meter) connected to a Raspberry PI via a RS485 module.
      I can see all of the power units with a single script:

      pi@nettemp:~ $ sdm120c -a 1 -P N -S 2 -j 20 -z 1 /dev/ttyUSB0
      Voltage: 231.80 V
      Current: 0.93 A
      Power: -148.00 W
      Active Apparent Power: 218.27 VA
      Reactive Apparent Power: -160.30 VAR
      Power Factor: -0.68
      Phase Angle: 0.00 Degree
      Frequency: 50.04 Hz
      Import Active Energy: 7625036 Wh
      Export Active Energy: 144644 Wh
      Total Active Energy: 7769680 Wh
      Import Reactive Energy: 242763 VARh
      Export Reactive Energy: 1121995 VARh
      Total Reactive Energy: 1364758 VARh
      OK
      pi@nettemp:~ $
      

      (Yes, my power consumption at this moment is negative because my solar panels are producing more than what my house is consuming).

      Anyway, I wonder if it would be possible to create a mysensors node which each unit (voltage, current, etc) would be a child. I'm thinking about two possibilities:

      • Making the Raspberry PI a mysensors node (adding it a radio and make it behaving like a node)
      • Making a mysensors node (arduino based) with RS485 module code and "standard" mysensors code

      I have seen other posts regarding this SDM120, but I'd like to log specific units such as Import/Export active energy, and not limiting myself to the pulses.

      Anyone tried it? Any suggestion or comment?

      Thanks,

      posted in Hardware
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Building a MQTT Gateway

      I'd like to have a very simple (intra-home) web page in my raspberry PI that would be updated with all of my nodes information and that could also turn on/off nodes with actuators (basically I don't want to have a fancy controller).
      If I understood correctly, with this MQTT Ethernet Gateway I could implement this by running Mosquito that would subscribe information from each node, through this MQTT gateway.
      Does this mean I can avoid having a controller?
      Cheers,

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Air Humidity Sensor - DHT

      Here is the set of libraries where you can find the DHT.h: https://github.com/mysensors/MySensorsArduinoExamples/archive/master.zip

      posted in Announcements
      joaoabs
      joaoabs
    • RE: ๐Ÿ’ฌ Air Humidity Sensor - DHT

      For the ones looking for a library that makes this DHT sketch work, mysensors have compiled a set of libraries that include this DHT.h and many others. Just go to https://www.mysensors.org/about/arduino#optional---install-external-mysensors-examples (yes, the name is not intuitive, maybe the keyword library would make it more obvious?), or jump directly to here and follow the standard library instructions. It took me two hours to find this, hope it saves time for future followers of mysensors like myself.

      Good luck!

      posted in Announcements
      joaoabs
      joaoabs
    • RE: Can't compile Humidity sketch 2.0 .. What DHT library do I need?

      I really like mysensors.org, but I've always had difficulties with the site organization. In my opinion, is not intuitive at all, although it has a great and appealing theme.

      Well, maybe it shouldn't, but this sets me back when trying to build anything... I know this excellent initiative for a couple of years now, and from time to time I try to do something but I end up de-motivated because it takes too long to find simple answers/solutions. At the moment, I have nothing built although I have all the equipment I need, including SenserBenders. Yes, frustrating like r-nox commented 2 years ago.

      Anyway, my point is: For the ones looking for a library that makes this DHT sketch work, mysensors have compiled a set of libraries that include this DHT.h and many others. Just go to https://www.mysensors.org/about/arduino#optional---install-external-mysensors-examples (yes, the name is not intuitive, maybe the keyword library would make it more obvious?), or jump directly to here and follow the standard library instructions. It took me two hours to find this, hope it saves time for future followers of mysensors like myself.

      Good luck!

      posted in General Discussion
      joaoabs
      joaoabs
    • Dual mode for battery powered sensors

      If we consider the scenarios where the sensor nodes are battery powered, youโ€™d agree that all details matter.
      I realized that in some cases, the sensor nodes may be working normally, reporting its stuff, but the information being reported is not relevant.
      For instance, if you have a PIR sensor in your living room, every time it detects presence, will send that info to the controller no matter if itโ€™s you (or your family), thus drawing precious battery. Basically the idea here would be just to report information to the controller whenever relevant.

      Therefore, I thought that maybe we could implement the option of a dual mode for sensor nodes. Something like:

      1. Sleep mode. Constant sleeping, where every X minutes, wakes up, contacts the controller and says/asks: โ€œI am here/should I change mode?โ€ If not, continues like that, if yes, changes to mode 2. Even if the sensors are triggered, there is no message sent to the controller, thus saving battery (actually the sensors may be powered off).

      2. Waken mode. Active (or sleeping until interrupt generated by sensor) and reporting the corresponding event to the controller. The nodes reaches this state after waking up in the state 1 and the controller told him to change state. In this state, it can receive a message from the controller that orders him to mode 1.

      Rational:
      I guess most people would only activate their alarm during part of the day (usually by night), so why having the nodes reporting events during all the time (even when they are not relevant)?.
      I also think that most of the people wouldnโ€™t bother that the sensor node wouldnโ€™t be immediately active after its request for activation in the controller. If we know that will be active in X minutes, it will be acceptable in most cases.

      Use case:
      Letโ€™s imagine that the sleeping period is 15 minutes. When going to bed at night, I would activate the alarm, knowing that at the most, in 15m the sensor node will be activated. Would this delay be a real problem? How likely would be a burglar to try to get in in this period?
      Considering that could extend significantly the battery duration, I would say it would be a good compromise.

      What do you think? Would this make sense?

      Thanks for your opinions,
      Joao

      posted in Feature Requests
      joaoabs
      joaoabs
    • Is anyone using senserbender with HC-SR501 PIR ?

      Hello,

      Anyone using the MySensors senserbender with a HC-SR501 PIR ?
      If so, how did you connected it? With a step-up (3v --> 5v) or just removed the 3.3v regulator on the PIR?

      Is it working fine (no fake positives)? How long do the batteries last?

      Thanks,
      Joao

      posted in General Discussion
      joaoabs
      joaoabs
    • RE: Multisensor node using Ceech board

      Thanks for the feedback.

      I think the key here is in the potentiomenters, so I looked around for some guidance:

      The two trimmer potentiometers are used to determine the current for both the input side - to better match the internal resistance of the solar cell - and for the battery charge current. At shipping they are both set to around half the value ( 2.5kOhm), which set both currents to about 75mA.
      

      I don't know how to measure the internal resistance of the solar cell (shouldn't be as simple as measuring it with a ohmmeter, right?), but I'm assuming that if 75mA is half the value, the maximum should be 150mA. Since my panels in parallel can supply (theoretically) up to 200mA, I'll rotate the potentiomenter to its maximum. Now, wich potentiomenter is it (not identified in the board), and what to tune in the other potentiometer (should be the same mA, what does it depend on)?

      @Ceech, Any guidance on how to overcome this not-charging problem?

      Thanks,
      Joao

      posted in My Project
      joaoabs
      joaoabs
    • RE: Managing interrupts from several sources

      Hello,

      Fresh update:

      With 5k1 pull-down resistors the reel switches work as expected (with the diode "OR"), so I can keep the original plan and use the MySensors sleep methods. Thanks for that tip! And by the way, is it possible to configure the MySensors interrupts on the rising edge, or is it just limited to change?

      However, with the PIR (modified to work at 3.3V) the maximum voltage it reaches with a 5k1 pull-down resistor is 2.2V, witch is still not enough to activate the interrupt.

      I kept increasing the pull-down resistor up to 20k, but then the behaviour gets erratic: It starts activating/deactivating without any sense.
      Was anyone been able to use a modified HC-SR501 PIR (initial diode and 3.3v voltage regulator bypassed) successfully, or the step up to 5V is really needed? (Its a shame to step up 3.3v to 5v so then step it down again to 3.3v, but if there is no other way...).

      Anyone willing to share the experience with HC-SR501 PIR's in mysensors framework?

      Thanks,
      Joao

      posted in Development
      joaoabs
      joaoabs
    • RE: Managing interrupts from several sources

      Thanks for the reply.

      How can I change this:

      #define INTERRUPT 3-2  // dont know why, but somehow works
      
      gw.sleep(INTERRUPT,CHANGE, SLEEP_TIME);
      

      Into something that can define the interrupts?

      Thanks,
      Joao

      posted in Development
      joaoabs
      joaoabs
    • RE: Multisensor node using Ceech board

      Hi,

      It works great! Thanks!
      Did you tune the potentiometers, or left as they were?

      I'm using 2x 6v, 100mA solar panels in parallel and one 5000mAh Li-ion battery.

      EDIT:
      Now in a sunny day, it seems something is missing (probably some tuning in the potentiometers). Somehow the battery is not charging:

      Batt: 3.73V ; 1.30mA 
      Solar: 6.64V ; 0.00 mA; charge: No
      BattPct: 33% 
      send: 19-19-0-0 s=10,c=1,t=38,pt=7,l=5,st=ok:3.732
      send: 19-19-0-0 s=10,c=1,t=39,pt=7,l=5,st=ok:1.298047
      send: 19-19-0-0 s=11,c=1,t=38,pt=7,l=5,st=ok:6.640
      send: 19-19-0-0 s=11,c=1,t=39,pt=7,l=5,st=ok:0.000000
      send: 19-19-0-0 s=255,c=3,t=0,pt=1,l=1,st=ok:33
      

      ceech.jpg

      Any idea/suggestion?

      Thanks!
      Joao

      posted in My Project
      joaoabs
      joaoabs
    • Managing interrupts from several sources

      Hello,

      I'm trying to build a mysensors node with several inputs (PIR sensors, reel switches, analogue humidity, etc.) and I would like to have it sleeping for most of the time except when some activity is detected (and every 15m or so, just to have a keep-alive). I'm using an arduino mini pro, at328, 8mhz, 3v.

      Anyway, since D2 is reserved for mysensors future use of the NRF module, I just have the D3 to deal with interrupts.
      I was thinking in performing a "logical OR" between all the sensor outputs and connect it to the D3, and then if any is activated, I can check all the other pins, one, by one. The simplest way of doing a "logical OR" is with diodes.

      My circuit is like this:
      Arduino.jpg

      However this is not working, and I'm not so sure why. I've checked the code and it seems fine. Also the electric circuit should be theoretically correct, although I suspect something might be wrong there...

      Whenever I activate one reed switch, an interrupt is raised, but when reading the ports, both are high.
      I tested with a multimeter:
      a) When in operation, if I activate one reed switch (to HIGH), the other gets also HIGH.
      b) When in power-off, there is no continuity between the reed switch ports, so no apparent reason for that

      The diodes are schottky and the resistor is 1k.

      Also, the PIR signal pin is behaving strangely.
      The PIR module is modified to work at 3.3V (initial diode and 3.3v regulator bypassed).
      If the PIR pin signal is not connected, it will go up to 3.3v when detecting presence. However, if connected to the arduino, it will never go beyond ~1.17v. This means that it will never be able to raise an interrupt and that the corresponding value in the arduino is always 0.

      Any idea why am I having this behaviour? My code below.

      Thanks,
      Joao

      #include <SPI.h>
      #include <MySensor.h>  
      
      #define MOIST_SENSOR_A_ANALOG_PIN A1
      #define MOIST_SENSOR_B_ANALOG_PIN A2
      
      #define INTERRUPT 3-2  // dont know why, but somehow works
      #define DEBUG_SWITCH 4
      #define DOOR_OPEN 5
      #define PIR_SENSOR 6            
      #define TURN_ON_SWITCH 7
      
      #define CHILD_ID_MOIST_SENSOR_A 1
      #define CHILD_ID_MOIST_SENSOR_B 2
      #define CHILD_ID_PIR_SENSOR 3
      #define CHILD_ID_DOOR_OPEN_SENSOR 4
      #define CHILD_ID_DEBUG_SWITCH 5
      #define CHILD_ID_TEMP 6
      #define CHILD_ID_HUM 7
      
      
      unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
       
      MySensor gw;
      MyMessage msg_MOIST_SENSOR_A(CHILD_ID_MOIST_SENSOR_A, V_HUM);
      MyMessage msg_MOIST_SENSOR_B(CHILD_ID_MOIST_SENSOR_B, V_HUM);
      MyMessage msg_PIR_SENSOR(CHILD_ID_PIR_SENSOR, V_TRIPPED);
      MyMessage msg_DOOR_OPEN_SENSOR(CHILD_ID_DOOR_OPEN_SENSOR, V_TRIPPED);
      MyMessage msg_DEBUG_SWITCH(CHILD_ID_DEBUG_SWITCH, V_TRIPPED);
      //
      
      int lastHumLevel_A;
      int lastHumLevel_B;
      
      //BATTERY STUFF
      int BATTERY_SENSE_PIN = 0;  // select the input pin for the battery sense point
      int oldBatteryPcnt = 0;
      
      
      void setup()  
      { 
           // use the 1.1 V internal reference
      #if defined(__AVR_ATmega2560__)
         analogReference(INTERNAL1V1);
      #else
         analogReference(INTERNAL);
      #endif
      
        gw.begin();
        gw.sendSketchInfo("Nova placa", "1.0");
        gw.present(CHILD_ID_MOIST_SENSOR_A, S_HUM, "HUM_A");
        gw.present(CHILD_ID_MOIST_SENSOR_B, S_HUM, "HUM_B");
        gw.present(CHILD_ID_PIR_SENSOR, S_MOTION, "PIR", true);
        gw.present(CHILD_ID_DOOR_OPEN_SENSOR, S_DOOR, "DOOR", true);
        gw.present(CHILD_ID_DEBUG_SWITCH, S_DOOR, "SWITCH", true);
      
        pinMode(INTERRUPT, INPUT);
        //digitalWrite(INT_PIN, HIGH);  // turn on pullup resistor
        
        pinMode(DOOR_OPEN, INPUT);
        //digitalWrite(DOOR_OPEN, HIGH);  // turn on pullup resistor
        
        pinMode(DEBUG_SWITCH, INPUT);
        //digitalWrite(DEBUG_SWITCH, HIGH);  // turn on pullup resistor
      
        pinMode(PIR_SENSOR, INPUT);      // sets the motion sensor digital pin as input
        //digitalWrite(PIR_SENSOR, HIGH);  // turn on pullup resistor
        
        pinMode(TURN_ON_SWITCH, OUTPUT);
        
      
      }
      
      void loop()      
      { 
        digitalWrite(TURN_ON_SWITCH, HIGH);   // TURN ON I2C devices (Future use)
        boolean tripped = digitalRead(PIR_SENSOR) == HIGH; 
        boolean opened = digitalRead(DOOR_OPEN) == HIGH; 
        boolean activated = digitalRead(DEBUG_SWITCH) == HIGH; 
      
        Serial.println("\n----Starting loop----\n");
        Serial.println("PIR value");
        Serial.println(tripped);
        gw.send(msg_PIR_SENSOR.set(tripped?"1":"0"), true);  // Send tripped value to gw 
        Serial.println("\nDOOR_OPEN value:");
        Serial.println(opened);
        gw.send(msg_DOOR_OPEN_SENSOR.set(opened?"1":"0"), true);  // Send tripped value to gw 
        Serial.println("\nDEBUG_SWITCH value:");
        Serial.println(activated);
        gw.send(msg_DEBUG_SWITCH.set(activated?"1":"0"), true);  // Send tripped value to gw 
       
        int HumLevel_A = (1023-analogRead(MOIST_SENSOR_A_ANALOG_PIN))/7.5; 
        Serial.print("\nHumidade_A: ");
        Serial.println(HumLevel_A);
        if (HumLevel_A != lastHumLevel_A) {
            gw.send(msg_MOIST_SENSOR_A.set(HumLevel_A));
            lastHumLevel_A = HumLevel_A;
        }
      
        int HumLevel_B = (1023-analogRead(MOIST_SENSOR_B_ANALOG_PIN))/7.5; 
        Serial.print("\nHumidade_B: ");
        Serial.println(HumLevel_B);
        if (HumLevel_B != lastHumLevel_B) {
            gw.send(msg_MOIST_SENSOR_B.set(HumLevel_B));
            lastHumLevel_B = HumLevel_B;
        }
        
         //BATTERY STUFF        
         // 1.2M, 121K divider across battery and using internal ADC ref of 1.1V
         // Sense point is bypassed with 0.1 uF cap to reduce noise at that point
         // ((1.2M+121k)/121k)*1.1 = Vmax = 12.00 Volts
         // 12/1023 = = Volts per bit = 0.011730205
         
         int sensorValue = analogRead(BATTERY_SENSE_PIN);
         float batteryV  = sensorValue * 0.011730205;
         int batteryPcnt = sensorValue / 10;
      
         Serial.print("\nBatery: ");
         Serial.print(sensorValue);
         Serial.println(" units (whatever they are)");
         Serial.print("Battery Voltage: ");
         Serial.print(batteryV);
         Serial.println(" V");
         Serial.print("Battery percent: ");
         Serial.print(batteryPcnt);
         Serial.println(" %");
      
         if (oldBatteryPcnt != batteryPcnt) {
           gw.sendBatteryLevel(batteryPcnt);
           oldBatteryPcnt = batteryPcnt;
         }
       
         Serial.println("\n---Ending loop----\n");
         digitalWrite(TURN_ON_SWITCH, LOW);   // TURN OFF I2C devices (Future use)
         gw.sleep(INTERRUPT,CHANGE, SLEEP_TIME);
      }
      
      
      posted in Development
      joaoabs
      joaoabs
    • RE: Multisensor node using Ceech board

      Great stuff!

      I'll test it during the weekend!

      Thanks!

      posted in My Project
      joaoabs
      joaoabs
    • RE: Use of ack sending messages

      Thanks TheoL,

      I'm amazed how simple that was... I guess I was overcomplicating...

      I added the TRUE statement in the sensor presentation and also when sending the message. It compiled successfully. The changes were:

      From:

      MyMessage msg(CHILD_ID_MOTION, V_TRIPPED);
      gw.present(CHILD_ID_MOTION, S_MOTION);
      gw.send(msg.set(tripped?"1":"0"));  
      

      to:

      MyMessage msg(CHILD_ID_MOTION, V_TRIPPED);
      gw.present(CHILD_ID_MOTION, S_MOTION, "PIR", true);
      gw.send(msg.set(tripped?"1":"0"), true);  
      

      Looking good, will do some more tests.
      Thanks,
      Joao

      posted in Development
      joaoabs
      joaoabs
    • RE: Multisensor node using Ceech board

      Hi,

      Nice work indeed. Could you please share the code?
      I also have a ceech board, and this could be the use for it.

      Thanks,
      Joao

      posted in My Project
      joaoabs
      joaoabs
    • Use of ack sending messages

      Hello,

      I'm taking my first steps with MySensors and using a couple of Arduino nanos and the "home Assistant" controller in a Raspberry PI 2 (with a nano acting as serial gateway).

      Anyway, I sometimes have the feeling that not all the messages arrive form the nodes to the gateway.

      For instance, I have a PIR sensor that detects some presence and sends the corresponding message to the gateway (sensor =1). The Home assistant shows it as "on", but sometimes keeps it for long time, until other presence is detected and then timed-out (sensor = 0). What I believe it may be happening is that first the "sensor = 0" message wasn't received, so the controller still believes the sensor is ON, until it gets a off (but from a post event).

      Having this in mind, I was thinking in using the ack flag in the send function, so the node would keep retrying the message send until it gets a confirmation it got there. However, it seems its not as simple as adding the "bool ack" in the message function. (sorry, my C programming skills are not the best, I know ๐Ÿ™‚ )

      Anyone have any example of the ack usage? Would this be the correct usage for ack?

      Thanks,
      Joao

      posted in Development
      joaoabs
      joaoabs
    • RE: [Tutorial] Raspberry Pi NRF24l01 direct connection

      @Andreas-Maurer

      Do you mean you don't have any problems with the fact the CPU is at 100% or you simply don't have the same sympthom?

      Thanks for replying,
      Joaoabs

      posted in Controllers
      joaoabs
      joaoabs
    • RE: [Tutorial] Raspberry Pi NRF24l01 direct connection

      @Sweebee

      Same here. I'm afraid that with the PI at 100% there is no much use of this code becasue we can't do anything else...

      Strange that the PI that is much powerfull than an arduino gets so high CPU for something that an arduino nano can do...

      Could it be something that could be improved?

      Cheers,
      Joaoabs

      posted in Controllers
      joaoabs
      joaoabs
    • How can I tell if my arduino mini pro is 3.3V or 5v?

      Hello all,

      I already did some tests with arduino nanos, and so far it has been very sucessfull, thanks to this excellent page!

      Now I'd like to try some of arduinos mini pro I have lying around, but I'm not sure which type they are. I don't want to risk burning my sensors...

      Is there any way to tell the difference?

      Thanks in advance,
      Joaoabs

      posted in Hardware
      joaoabs
      joaoabs