Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • Trying to build a ethernet gateway but cant set an ip address

    8
    1 Votes
    8 Posts
    76 Views
    mfalkviddM
    @hoggin I don't know.
  • NACK after Core initialized, transport status 1

    8
    0 Votes
    8 Posts
    67 Views
    T
    Hi There, Still investigating.... I refresh my nodemanager repo, but still same behavior. Thus I downgraded MySensors library from 2.4.0 Alpha to 2.3.2 for the nodemanager, still the same. Which is very strange to me as I have a nodemanager, SensorLatchingRelay2Pins, working perfectly over NRF24 with a serial gateway. I introduced some Serial.println in receive(const MyMessage &message), but looks like never called. Here is my code, maybe I wrote a mistake: /* * 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-2017 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. */ /************************** Template This sketch can be used as a template since containing the most relevant MySensors library configuration settings, NodeManager's settings, all its the supported sensors commented out and a sketch structure fully functional to operate with NodeManager. Just uncomment the settings you need and the sensors you want to add and configure the sensors in before() */ /********************************** * MySensors node configuration */ // General settings #define SKETCH_NAME "NodeManagerRelay" #define SKETCH_VERSION "1.0" #define MY_DEBUG //#define MY_NODE_ID 99 // NRF24 radio settings //#define MY_RADIO_RF24 //#define MY_RF24_ENABLE_ENCRYPTION //#define MY_RF24_CHANNEL 125 //#define MY_RF24_PA_LEVEL RF24_PA_HIGH //#define MY_DEBUG_VERBOSE_RF24 //#define MY_RF24_DATARATE RF24_250KBPS // RFM69 radio settings #define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RFM69_868MHZ #define MY_IS_RFM69HW #define MY_RFM69_NEW_DRIVER //#define MY_RFM69_ENABLE_ENCRYPTION //#define MY_RFM69_NETWORKID 100 #define MY_DEBUG_VERBOSE_RFM69 #define MY_RFM69_IRQ_PIN 2 //#define MY_RFM69_IRQ_NUM MY_RFM69_IRQ_PIN #define MY_RFM69_CS_PIN 10 //#define MY_RF69_SPI_CS D2 //#define MY_RFM69_ATC_MODE_DISABLED // Advanced settings #define MY_BAUD_RATE 9600 //#define MY_SMART_SLEEP_WAIT_DURATION_MS 500 //#define MY_SPLASH_SCREEN_DISABLED //#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE //#define MY_SIGNAL_REPORT_ENABLED // Optimizations when running on 2032 Coin Cell. Also set nodeManager.setSleepBetweenSend(500) and run the board at 1Mhz //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED //#define MY_TRANSPORT_WAIT_READY_MS 5000 //#define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS 2000 //#define MY_PARENT_NODE_ID 0 //#define MY_PARENT_NODE_IS_STATIC /********************************** * MySensors gateway configuration */ // Common gateway settings #define MY_REPEATER_FEATURE /*********************************** * NodeManager configuration */ #define NODEMANAGER_DEBUG ON #define NODEMANAGER_INTERRUPTS ON #define NODEMANAGER_SLEEP OFF #define NODEMANAGER_RECEIVE ON #define NODEMANAGER_DEBUG_VERBOSE ON #define NODEMANAGER_POWER_MANAGER OFF #define NODEMANAGER_CONDITIONAL_REPORT OFF #define NODEMANAGER_EEPROM OFF #define NODEMANAGER_TIME OFF #define NODEMANAGER_RTC OFF #define NODEMANAGER_SD OFF #define NODEMANAGER_HOOKING OFF #define NODEMANAGER_OTA_CONFIGURATION OFF #define NODEMANAGER_SERIAL_INPUT OFF // import NodeManager library (a nodeManager object will be then made available) #include <MySensors_NodeManager.h> /*********************************** * Add your sensors */ #include <sensors/SensorRelay.h> SensorRelay relay(6); /*********************************** * Main Sketch */ // before void before() { /*********************************** * Configure your sensors */ // call NodeManager before routine nodeManager.before(); } // presentation void presentation() { // call NodeManager presentation routine nodeManager.presentation(); } // setup void setup() { // call NodeManager setup routine nodeManager.setup(); } // loop void loop() { // call NodeManager loop routine nodeManager.loop(); } //#if NODEMANAGER_RECEIVE == ON // receive void receive(const MyMessage &message) { Serial.println("********* In receive ************"); if (message.isAck()) { Serial.println("************** This is an ack from gateway ******************"); } // call NodeManager receive routine nodeManager.receive(message); } //#endif #if NODEMANAGER_TIME == ON // receiveTime void receiveTime(unsigned long ts) { // call NodeManager receiveTime routine nodeManager.receiveTime(ts); } #endif So the detailed issue would be: A nodemanager doesn't receive ACK anymore after the INIT from the gateway (MQTT with TLS) over RFM69. Looks like receive(const MyMessage &message) is never called. An extract from the node logs to illustrate: 11:26:28.397 -> 7487 RFM69:SWR:ACK,FROM=0,SEQ=13,RSSI=-55 11:26:28.462 -> 7532 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 11:26:28.850 -> 7933 RFM69:SAC:SEND ACK,TO=0,RSSI=-44 11:26:28.882 -> 7974 RFM69:CSMA:RSSI=-100 11:26:28.914 -> 8003 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1 11:26:28.978 -> 8060 MCO:PIM:NODE REG=1 11:26:29.010 -> 8087 MCO:BGN:STP 11:26:29.047 -> 8105 NM:STP:ID=2 M=1 11:26:29.047 -> 8128 NM:LOOP:RELAY(1):SET t=2 v=0 11:26:29.717 -> 8235 NM:STP:HW V=3329 F=8 M=1116 11:26:29.749 -> 8269 MCO:BGN:INIT OK,TSP=1 11:26:29.782 -> 8298 NM:MSG:SEND(1) t=2 p=0 11:26:29.815 -> 8327 RFM69:SWR:SEND,TO=0,SEQ=14,RETRY=0 11:26:29.847 -> 8370 RFM69:CSMA:RSSI=-105 11:26:32.071 -> 10600 !RFM69:SWR:NACK I guess I can open an issue in the nodemanager github. Reg Eric.
  • Weird voltage output - MQ2 sensor

    5
    0 Votes
    5 Posts
    65 Views
    S
    Hello again. I tested everything again and i couldn't see any problem with connections or missing ground to the GND pins. On the breadboard voltage it's stable after a while and oscilating around 360-380mV. But the same MQ2 sensor on the PCB oscilating around 400, 800, 1100 mV and it's not stable at all :D I dont really get it. I've tried to use it with and without connecting to the USB (i thought that it's some GND missing and it could be stable after connecting USB cos the socket is a next GND, but no, still the same) Maybe the ESP32 wroom 32 needs additional connection to GND apart from the GND and VIN on the board? But the documentation says that: VIN to 5V and GND nothing more. I double checked the 5V regulator and it's regulated the 12V to stable 5V. I'm using thick wire to provide 5V and GND, maybe it's an issue? Should i use thinner one? But the other hand all voltage at the MQ2 or temperature sensor shows correct 5V. Even the ESP from the VIN shows correct voltage. Only output from MQ2 shows floating voltage and i dont know why because on the breadboard it's perfectly fine. :V its frustrating. I'm bet i missing something but i dont know what.
  • 0 Votes
    5 Posts
    48 Views
    P
    @electrik Tested and worked as well. I think this is preferable over the first solution (forward function declaration) as it gives a reference where the functions are defined. Thank you!
  • NRF24 Weather Station Issues

    2
    0 Votes
    2 Posts
    39 Views
    I
    Looks like the image didn’t come through. Let’s try again… [image: 1665499241428-2022-10-10_20-12-06.jpg]
  • Find Parent (yeah, I know)

    11
    0 Votes
    11 Posts
    104 Views
    qqlapralineQ
    You are right, @NeverDie. Actually, my power supply is coming from a french power meter, that means a lot of noise - as I'm DC from a 50Khz AC :). So, I did two things. Adding a 330 pF capacitor at the entry point of my board and a 47µF right next to the NRF24. Finally, I've upgrade my design to add a tantalium capacitor right next to the smd pads. Global view: [image: 1665309563478-img_1911-resized.jpg] Zooming the back with the polarized capacity (old fashion): [image: 1665309647156-img_1912-resized.jpg] Front view: [image: 1665309661635-img_1913-resized.jpg] New design: [image: 1665309671958-b602470d-a44b-4657-a992-0abecbc15cf9-image.png] Cheers, QQ
  • [SOLVED] Ethernet MQTT Gateway Slow to connect

    11
    0 Votes
    11 Posts
    2k Views
    L
    Hi @Guillermo-Schimmel, I know it's closed but just noticed this issue, you most probably had STP (Spanning Tree Protocol) enabled on that port, which is normal for ent switch, and while it waits for a loop it blocks trafic from that port. Disabling that feature should solve this problem.
  • MySensors GW on rpi3

    gateway
    20
    0 Votes
    20 Posts
    116 Views
    mfalkviddM
    Nice work @Kurtsejr, thanks for reporting back
  • error compiling

    2
    0 Votes
    2 Posts
    29 Views
    mfalkviddM
    @alexsh1 https://github.com/arduino/ArduinoCore-avr/issues/158 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040 suggests it is a bug in gcc. It seems to have been resolved a long time ago though.
  • Raspberry Pi 3 (RPI 3) + MQTT gateway NACK and triple messages

    4
    0 Votes
    4 Posts
    50 Views
    OumuamuaO
    Thanks @mfalkvidd @OldSurferDude ! The problem really was the antenna. I was using the helical antenna below and I welded in the "wrong" part of it the first time. The second I welded it on the "right" place and it work. The RSSI is still below that the old and good wire... am I welding it on the really right place? [image: 1662842053028-screenshot-from-2022-09-10-17-28-57.png] Are helical antennas good? Thanks again for the great support you provide.
  • NRF5 Receive Challenges

    5
    1
    0 Votes
    5 Posts
    75 Views
    mfalkviddM
    Nice work @nagelc, thanks for reporting back.
  • Gateway sends NACK to node

    gateway
    15
    0 Votes
    15 Posts
    155 Views
    M
    Aah ok that makes sense. My application is for rural use and I need the max distance possible. The slow response will not be a problem as the sensors don't send a lot of data at all. So maybe I will stay with the SF4096 for now but I will do some experimenting with the settings. Just to understand them a bit better.
  • Gateway doesn't receive any message from node

    25
    1 Votes
    25 Posts
    212 Views
    C
    @mfalkvidd multimeter
  • Raspberry Pi 3 (RPI 3) gateway initialization loop

    6
    0 Votes
    6 Posts
    49 Views
    OumuamuaO
    Problem solved: I was using as --my-mqtt-client-id the same name as my previous broker. Thanks for your help all!
  • Gateway on RPi zero config.h:39: first defined here

    2
    0 Votes
    2 Posts
    38 Views
    OldSurferDudeO
    I found the answer here. In config.c two lines have to be added and in config.h, one line is modified and two added
  • ESP8266Wifi Gateway won't connect

    33
    0 Votes
    33 Posts
    241 Views
    OldSurferDudeO
    @mfalkvidd Yes, totally forgot about that link you put there. Thanks for reminding me. :)
  • VL53L0X with water tanks

    7
    0 Votes
    7 Posts
    181 Views
    OldSurferDudeO
    @johnnyfp When first read this I was wondering if the signal would be reflected accurately off the surface. Apparently not. I'm currently using float sensors which gives me full and empty. I would like to get a level sensor that was accurate to a centimeter so that I could measure the rate of fill, too. My current endeavor is to take this tank gauge put eight magnetic switches around it, and a magnet on the wheel inside. The magnetic switches would be connected to an Arduino nano and I could tell where the wheel is. Alas, other projects have higher priority.
  • Question with regards to NRF24 antenna folding

    11
    0 Votes
    11 Posts
    95 Views
    N
    @iguaan I have it wrapped as you mentioned and soldered to the ground. Curiously enough I have the PA set to HIGH (had it set to LOW), but from my understanding, by setting it to HIGH the "power" of the antena is better no?, hence the reception should be better. or what am I missing? Thanks for the feedback as well :-)
  • RFM69 waking up MCU with IRQ

    3
    1 Votes
    3 Posts
    31 Views
    nagelcN
    This seems to be a fairly common problem with PIR motion sensors. One trick is to add a short sleep statement before your final one to let all the voltages settle: // Short sleep to let voltages settle (change duration as needed) sleep(500); // Sleep until interrupt comes in on motion sensor. Send update every ten seconds for testing. sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, 10000); code_text
  • Trouble with the JSN SR04T

    23
    0 Votes
    23 Posts
    3k Views
    Papari DasP
    @Sundeep-Goel did u face any issues due to water vapours or water in general?

23

Online

11.7k

Users

11.2k

Topics

113.1k

Posts