Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • stm32f103c8 problem at compilation

    12
    0 Votes
    12 Posts
    1k Views
    P
    I haven't tried this yet, but "mtiutiu" replied to the issue on GitHub, and suggested a script that would basically automatically add the __attribute__ ((weak)) during the compile. Sounds like a promising temporary workaround :)
  • ES8266 Wemos D1 with DHT22 - no sleep WUP -2

    2
    1 Votes
    2 Posts
    328 Views
    mfalkviddM
    @babajun no, it is because the esp8266 has no sleep mode that is useful. Esp8266 requires a full restart after sleeping. Use wait() instead.
  • Report Relay state to GW

    7
    0 Votes
    7 Posts
    1k Views
    rejoe2R
    Asking the controller at startup: issue a request, see https://www.mysensors.org/download/sensor_api_20#requesting-data, imo you should as for V_STATUS. Then your controller should respond, the response is handled by the receive()-function (=no action needed), but to get this to work, your node should not sleep (you sketch seems to be incomplete wrt. that). But you should first switch off everyhing to have it in a defined state and avoid loading values from the EEPROM. Wrt. to regular status info: If that's necessary, you should try to use a so called "non blocking loop", use g**gle or similar for that. Imo, it's not necessary to update the value as it doesn't change. Better use the heartbeat funcionality instead (dependend on your controller).
  • 0 Votes
    6 Posts
    385 Views
    C
    I am use switching DC-DC the same as you to get 5V from 12V and LDO XC6206 to power NRF24 module - all work good. [image: alarm_2.jpg]
  • Decagon Leaf moisture sensor

    5
    2
    0 Votes
    5 Posts
    2k Views
    M
    Hi Eduard, I know the topic is about 2 years old now. But since I am about to start a project and I plan to buy a decagon leaf wetness sensor I really wondered if you managed to get it running on the Arduino. Thank you very much Best regards Mathias
  • 1.2 MPa pressure transducer

    9
    1
    0 Votes
    9 Posts
    594 Views
    S
    @zboblamont said in 1.2 MPa pressure transducer: In industry we used to use them atop valves to not only permit servicing but an air pocket acted as a buffer. Thanks, i'll try the pipe / buffer method and see if that helps. Will use a PVC pipe to rule out any EMC reaching the sensor.
  • Raspberry Gateway

    1
    0 Votes
    1 Posts
    210 Views
    No one has replied
  • P1 not working when using Mysensors ?

    10
    0 Votes
    10 Posts
    566 Views
    T
    @mfalkvidd Thank you so much :D Finnaly it is working as it should do! #define MY_DEBUG #define MY_RS485 #define MY_RS485_DE_PIN 2 #define MY_RS485_BAUD_RATE 19200 #define MY_RS485_HWSERIAL Serial #define MY_NODE_ID 3 #include <AltSoftSerial.h> #include <SPI.h> #include <MySensors.h> AltSoftSerial altSerial; int msg[1]; const uint64_t pipe = 0xE8E8F0F0E1LL; const int requestPin = 4; char input; // incoming serial data (byte) bool readnextLine = false; #define BUFSIZE 500 #define CHILD_ID_WATT 0 #define CHILD_ID_KWH_LOW 1 #define CHILD_ID_KWH_HIGH 2 #define CHILD_ID_GAS 3 #define CHILD_ID_CURRENT 4 char buffer[BUFSIZE]; //Buffer for serial data to find \n . int bufpos = 0; long mEVLT = 0; //Meter reading Electrics - consumption low tariff long mEVHT = 0; //Meter reading Electrics - consumption high tariff long mEAV = 0; //Meter reading Electrics - Actual consumption long mEAT = 0; //Meter reading Electrics - Actual generated electricity (Solar panels) long mG = 0; //Meter reading Gas MyMessage msgWatt(CHILD_ID_WATT, V_WATT); MyMessage msgKwhLow(CHILD_ID_KWH_LOW, V_KWH); //Was V_KWH MyMessage msgKwhHigh(CHILD_ID_KWH_HIGH, V_KWH); //Was V_KWH MyMessage msgGas(CHILD_ID_GAS, V_VOLUME); void setup() { // Serial.begin(19200); // delay(1000); altSerial.begin(9600); delay(1000); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Node", "1.0"); present(CHILD_ID_WATT, S_POWER); present(CHILD_ID_KWH_LOW, S_POWER); present(CHILD_ID_KWH_HIGH, S_POWER); present(CHILD_ID_GAS, S_GAS); } void loop() { long tl = 0; long tld =0; if (altSerial.available()) { char input = altSerial.read(); buffer[bufpos] = input&127; bufpos++; if (input == '\n') { // We received a new line (data up to \n) // 1-0:1.8.2 = Electricity consumption high tariff (DSMR v4.0) if (sscanf(buffer,"1-0:1.8.2(%ld.%ld" , &tl, &tld) >0 ) { tl *= 1000; tl += tld; mEVHT = tl; //mEVHT = tl * 1000 + tld; if (mEVHT > 0) { //mEVHT = 0; } } if (sscanf(buffer,"1-0:1.8.1(%ld.%ld" ,&tl, &tld)==2){ tl *= 1000; tl += tld; mEVLT = tl; if (mEVLT > 0) { } } // 1-0:1.7.0 = Electricity consumption actual usage (DSMR v4.0) if (sscanf(buffer,"1-0:1.7.0(%ld.%ld" ,&tl , &tld) == 2) { mEAV = (tl*1000)+tld*10; if (mEAV > 0) { } } //Gastand uitlezen if (sscanf(buffer,"(%ld.%ld" , &tl, &tld)==2 ) { mG = (tl*1000.0)+tld; mG = mG; } // Empty buffer again (whole array) for (int i=0; i<500; i++) { buffer[i] = 0; } bufpos = 0; } if (input == '!') { //uitroepteken geeft einde van telegram aan, dus we gaan data versturen #ifdef DEBUG printData(); #endif send(msgWatt.set(mEAV)); send(msgKwhLow.set(mEVLT / 1000.0, 3)); send(msgKwhHigh.set(mEVHT / 1000.0, 3)); send(msgGas.set(mG / 1000.0, 3)); mEVHT=0; mEVLT = 0; mEAV = 0; mG = 0; //client.stop(); } //Einde vraagteken detectie } } And here an picture how it is showing up in domoticz: [image: 1568053520608-cc789582-9497-47ae-a278-d906a1b3a0fd-image-resized.png]
  • Problem with BananaPI M2U and RFM69HW

    7
    0 Votes
    7 Posts
    498 Views
    F
    @lood29 Thanks for you reply ! I think too it's the SPI implementation on the BPI. I will add a Arduino nano on serial GPIO pin. Or buy a real raspberry pi.
  • Auto resend on NACK

    23
    0 Votes
    23 Posts
    2k Views
    electrikE
    You will get multiple messages, if the message arrives correctly but the hardware ACK doesn't. Do you have a repeater in between the sender and gateway? It could be that the repeater does receive the initial message (and the sensor gets a hardware ACK), but that never reaches the gateway because of a transmission error between the repeater and the gateway.
  • Neato D6 red solid battery ligth

    3
    0 Votes
    3 Posts
    214 Views
    P
    @Nca78 I'm also guessing this isn't the vacuum cleaner troubleshooting forum (unless I misidentified the the Neato D6)? :laughing:
  • Problem with BME280 Hum value

    5
    0 Votes
    5 Posts
    375 Views
    M
    The wait(100) worked thanks. I`m using an 10uF so far.
  • PlatformIO not longer working with MySensors

    6
    0 Votes
    6 Posts
    1k Views
    L
    Dropping this here for future searchers: I'm seeing this with the platformio framework-arduinoststm32-maple framework as well. The problem appears to be multiple definitions of premain() and main(). I suspect one should be marked with the "weak" attribute to allow the other to override as needed. Though the question is which one? (NOTE: I'm not sure if the Arduino compiler/linker know/care about "weak") I'm new to the platformio so am having trouble sorting out what is coming from where in order to know who to ask about this. I'm suspecting its the stm32duino folks. Take a look at this forum comment where I've shown the syntax for the "weak" attribute if interested in going this route.
  • mysgw.service fails with SEGV if ontroller connects

    8
    0 Votes
    8 Posts
    610 Views
    R
    Have added log + strace output to the issue on Github as well: https://github.com/mysensors/MySensors/issues/1342 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3503, ...}) = 0 write(4, "Sep 05 09:03:46 DEBUG GWT:RFC:C="..., 51) = 51 write(2, "Sep 05 09:03:46 \33[36mDEBUG\33[0m ", 31Sep 05 09:03:46 DEBUG ) = 31 write(2, "GWT:RFC:C=0,MSG=0;255;3;0;2;\n", 29GWT:RFC:C=0,MSG=0;255;3;0;2; ) = 29 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} --- +++ killed by SIGSEGV +++ Segmentation fault
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • 3 DHT22 recieving NAN reading from Arduino ATMEGA 2560

    9
    0 Votes
    9 Posts
    2k Views
    L
    First of all, I think some of your code is wrong: h3 = dht3.readHumidity(); // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor) t3 = dht3.readTemperature(); // Read temperature as Celsius (the default) // Read temperature as Fahrenheit (isFahrenheit = true) f3 = dht3.readTemperature(true); if (isnan(h) || isnan(t) || isnan(f)) { Serial.println(F("Failed to read from DHT sensor 3!")); return; } It needs to be changed to if(isnan(h3) || isnan(t3) || isnan(f3)) to detect if the third sensor returns NAN. Secondly, have you checked your wiring and the code is exactly the same as the first sensor and the second? Third, is this situation due to insufficient power supply? I think you can check the circuit information of the DHT22.
  • PI gateway + rfm69 - unable to connect door switch

    1
    0 Votes
    1 Posts
    194 Views
    No one has replied
  • Raspberry as mysensors gateway connection refused

    2
    0 Votes
    2 Posts
    307 Views
    T
    Ok. Sorry. Working --my-transport=rf24 --my-gateway=ethernet --my-port=5003 --my-gateway=ethernet
  • [SOLVED] Transport device initialization failed - Mqqt gateway

    4
    0 Votes
    4 Posts
    399 Views
    YveauxY
    @taserface987 no worries, glad I could help!
  • Ethernet gateway and receive function

    7
    0 Votes
    7 Posts
    513 Views
    D
    This is the full code, in my previous message I tried simplifing it and I missed a variable declaration: #define MY_DEBUG //#define MY_DEBUG_DETAIL #define MY_GATEWAY_W5100 #define MY_RF24_CS_PIN 3 #define MY_RF24_IRQ_PIN 2 #define MY_RX_MESSAGE_BUFFER_FEATURE 6 #define MY_IP_ADDRESS 192,168,1,20 #define MY_IP_GATEWAY_ADDRESS 192,168,1,1 #define MY_IP_SUBNET_ADDRESS 255,255,255,0 #define MY_PORT 5003 #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED #if defined(MY_USE_UDP) #include <EthernetUdp.h> #endif #include <Ethernet.h> #define CHILD_ID_LIGHT 1 #include <MyRF24_P2_GW.h> #include <MySensors.h> MyMessage msgLIGHT(CHILD_ID_LIGHT, V_STATUS); #define BUTTON_UP A4 #define BUTTON_DW A5 #include <Bounce2.h> Bounce debounceUp = Bounce(); Bounce debounceDw = Bounce(); bool statoLuci = 1; const byte numReed = 4; const byte pinReed[numReed] = {A0,A1,A2,A3}; const byte pinRelay[numReed] = {5,6,7,8}; bool statoReed[numReed]; void setup() { // request(CHILD_ID_LIGHT, V_STATUS); debounceUp.attach(BUTTON_UP, INPUT_PULLUP); debounceUp.interval(5); debounceDw.attach(BUTTON_DW, INPUT_PULLUP); debounceDw.interval(5); for (int i=0; i<numReed; i++){ pinMode(pinReed[i], INPUT_PULLUP); statoReed[i] = 0; pinMode(pinRelay[i], OUTPUT); } } void presentation() { present(CHILD_ID_LIGHT, S_BINARY, "P2 Luci Armadio"); } void loop() { debounceUp.update(); debounceDw.update(); if ( debounceUp.fell() ) { Serial.println("UP"); } if ( debounceDw.fell() ) { Serial.println("DOWN"); } for (int i=0; i<numReed; i++){ if (statoLuci){ statoReed[i] = digitalRead(pinReed[i]); digitalWrite(pinRelay[i], statoReed[i]); } else digitalWrite(pinRelay[i], 0); #ifdef MY_DEBUG_DETAIL Serial.print("Reed "); Serial.print(i); Serial.print(" : "); Serial.println(statoReed[i]); #endif } #ifdef MY_DEBUG_DETAIL Serial.println("****************"); wait(1000); #endif } /* void receive(const MyMessage &message) { if (message.destination == 0 && message.type == V_STATUS && message.sensor == CHILD_ID_LIGHT && !message.isAck()) { #ifdef MY_DEBUG Serial.println("*** Receiving ***"); #endif statoLuci = message.getBool(); } } */ MyRF24_2_GW.h contains simply some common defines I use for all the nodes connected to this GW: #define MY_RADIO_NRF24 #define MY_RF24_DATARATE RF24_250KBPS #define MY_RF24_CHANNEL 115 #ifndef MY_RF24_PA_LEVEL #define MY_RF24_PA_LEVEL RF24_PA_HIGH #endif #ifndef MY_PARENT_NODE_ID #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #endif

19

Online

11.7k

Users

11.2k

Topics

113.1k

Posts