Skip to content

Bug Reports

Found a bug in the MySensors library? Let us know here.
171 Topics 1.3k Posts
  • Node not working very well when MY_DEBUG not defined

    11
    0 Votes
    11 Posts
    1k Views
    SnyfirS
    @berkseo said in Node not working very well when MY_DEBUG not defined: My problem is temporarily solved(nrf5). Delivery confirmation to the controller come steadily if the file MyTransport.ccp (line 723) add: #if !defined(MY_DEBUG) wait(5); #endif based on: https://github.com/mysensors-rus/MySensors/commit/06f8083b785237b8d1b430a142fe3d9a3cd6f7ff The bug will be fix in the 2.3.2 release i suppose so
  • gpio leds for rx/tx/err on Rpi2b not being set in /sys/class/gpio

    1
    0 Votes
    1 Posts
    277 Views
    No one has replied
  • Sensebender does not compile with MY_DEBUG

    1
    0 Votes
    1 Posts
    418 Views
    No one has replied
  • Gouldn't register with a Google account

    website
    1
    0 Votes
    1 Posts
    400 Views
    No one has replied
  • MQTT Gateway floods logfile if broker is not reachable

    5
    0 Votes
    5 Posts
    1k Views
    mfalkviddM
    Thanks @cvdenzen Adding reference link in case someone needs to check it later: https://github.com/mysensors/MySensors/commit/98355b2d0b68190a87c3ac76698014adb58fc882#diff-407bf395289c3cbd3d7728909c25b3adR186
  • Node personalizer sketch seems broken in MySensors 2.3.1

    3
    0 Votes
    3 Posts
    601 Views
    tekkaT
    Bingo! This is a backwards incompatibility :triumph: - thanks for reporting! @joaoabs You should be able to fix this by using the SecurityPersonalizer example from the 2.3.1 lib and copy/paste the settings section from your current sketch to the example sketch. @Anticimex issue originates from replacing all signerSHA256xyz() functions in the cryptoHAL
  • Rgb leds lights not working normally

    3
    0 Votes
    3 Posts
    494 Views
    YveauxY
    @ッanteroッ this forum deals with MySensors, while your question does not seem to be related to MySensors at all. There are likely better forums to post such questions. My impression is you received a faulty LED strip, with bad connections making some parts light with a different color than expected. I suggest you take it back to the shop.
  • MySGW 2.3 log hangs frequently in RaspberryPi

    1
    0 Votes
    1 Posts
    492 Views
    No one has replied
  • sendBatteryLevel is not published to MQTT

    7
    0 Votes
    7 Posts
    1k Views
    mfalkviddM
    @michał-kozak well done. I think you are correct that the first message is affected. See https://forum.mysensors.org/topic/9655/delay-after-tsf-tri-tsb/14 for a solution.
  • [SOLVED] Gateway RS485

    22
    0 Votes
    22 Posts
    3k Views
    K
    @philippe-57 And why wait 3 weeks for new PCB? Simply cut bad connections on PCB a and make correct connection with wire. And four RS485 connectors on gateway? RS 485 is bus - from one node to next, all in one line. Not star topology. If you plan connect four nodes with 20 m of cable to those connectors - you will be in troubles. Gateway must be connected like other normal nodes. Only sw is different.
  • Wrong date in Eindhoven

    2
    0 Votes
    2 Posts
    537 Views
    YveauxY
    @lasp Hi there and welcome to this forum! There will be a Maker Faire in Eindhoven this year, on September 29 & 30, but mySensors will not host a booth there! We hosted one last year and although it was a huge success the core team has insufficient resources to repeat this year. Where's the wrong date mentioned you're referrring to in your post?
  • Lazy loading makes forum pretty much unusable for casual browsing

    5
    6 Votes
    5 Posts
    1k Views
    NeverDieN
    @thomasloven I 100% agree with the OP. It's hard to find even my own posts when I need to refer back to them.
  • Software ack reponse too quick on nRF24

    2
    3 Votes
    2 Posts
    735 Views
    YveauxY
    @technovation Good find en well described! :+1: This seems serious enough to enter a bug report for it, so I did: https://github.com/mysensors/MySensors/issues/1134
  • Possible Bug version 2.2.0

    38
    0 Votes
    38 Posts
    4k Views
    M
    Test if this reduces your memory consumption. This is what I have added Disable the splash screen with: #define MY_SPLASH_SCREEN_DISABLED // This saves a couple of bytes Then for every serial.print I have embedded those with #ifdef MY_DEBUG/#endif There is no need to serial print when running in silent mode. I have also embedded the missing serial.print with the F("string") function. This saves memory by storing strings in flash instead of memory. I could not get the code to compile as I don't have the proper DHT library. // ---- - Stazione Meteo Francy Ver 1 - ---- // Enable debug prints // #define MY_DEBUG #define MY_SPLASH_SCREEN_DISABLED // This saves a couple of bytes // Enable and select radio type attached #define MY_RADIO_NRF24 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_RF24_CHANNEL 84 #define MY_SIGNING_SOFT #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7 #define MY_SIGNING_REQUEST_SIGNATURES // Definisco il Nodo #define MY_NODE_ID 66 // Nomino i figli del Nodo #define CHILD_ID_TEMP 1 #define CHILD_ID_aaaa 2 #define CHILD_ID_HUMI 3 #define CHILD_ID_bbbb 4 #define CHILD_ID_BARO 5 #define CHILD_ID_LIGHT 6 #define LIGHT_SENSOR_ANALOG_PIN 0 const float ALTITUDE = 335; //----------------------------- Pressione //float pressione = 1017; //int forecast = 4; const char *weather[] = { "stable", "sunny", "cloudy", "unstable", "thunderstorm", "unknown" }; enum FORECAST { STABLE = 0, // "Stable Weather Pattern" SUNNY = 1, // "Slowly rising Good Weather", "Clear/Sunny " CLOUDY = 2, // "Slowly falling L-Pressure ", "Cloudy/Rain " UNSTABLE = 3, // "Quickly rising H-Press", "Not Stable" THUNDERSTORM = 4, // "Quickly falling L-Press", "Thunderstorm" UNKNOWN = 5 // "Unknown (More Time needed) }; //----------------------------------------- #include <SPI.h> #include <MySensors.h> #include <DHT.h> #include <Wire.h> #include <Adafruit_BMP085.h> DHT dht; //----------------------------- Adafruit_BMP085 bmp = Adafruit_BMP085(); // Digital Pressure Sensor float lastPressure = -1; float lastTemp = -1; int lastForecast = -1; const int LAST_SAMPLES_COUNT = 5; float lastPressureSamples[LAST_SAMPLES_COUNT]; // this CONVERSION_FACTOR is used to convert from Pa to kPa in forecast algorithm // get kPa/h be dividing hPa by 10 #define CONVERSION_FACTOR (1.0/10.0) int minuteCount = 0; bool firstRound = true; // average value is used in forecast algorithm. float pressureAvg; // average after 2 hours is used as reference value for the next iteration. float pressureAvg2; float dP_dt; bool metric; //----------------------------- //Dichiarazioni per pause dei diversi blocchi unsigned long int time; unsigned long int lettura_Press; unsigned long int lettura_Temp; unsigned long int letturaluce_time; //------------------------------ int lastLightLevel; //Dichiarazione Luminosita float temperatureDTH2; void presentation() { sendSketchInfo("Temp e Umidita", "3"); present(CHILD_ID_TEMP, S_TEMP); present(CHILD_ID_aaaa, S_LIGHT); present(CHILD_ID_HUMI, S_HUM); present(CHILD_ID_bbbb, S_LIGHT); present(CHILD_ID_BARO, S_BARO); present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); } MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgaaaa(CHILD_ID_HUMI, V_LIGHT); MyMessage msgHumi(CHILD_ID_HUMI, V_HUM); MyMessage msgbbbb(CHILD_ID_HUMI, V_LIGHT); MyMessage msgPres(CHILD_ID_BARO, V_PRESSURE); MyMessage msgForecast(CHILD_ID_BARO, V_FORECAST); MyMessage msg4(CHILD_ID_LIGHT, V_LIGHT_LEVEL); void setup() { // Setto il Pin dove e collegato il sensore di Temperatura DHT22 dht.setup(3); #ifdef MY_DEBUG //Settaggi del BMP180 if (!bmp.begin()) { Serial.println(F("Could not find a valid BMP085 sensor, check wiring!")); while (1) {} } #endif metric = getControllerConfig().isMetric; //Fine settaggi BMP180 //-- Setup Variabili MILLIS per sensore di Pressione time=millis(); lettura_Press = millis(); lettura_Temp = millis(); letturaluce_time = millis(); } void loop() { //Attivo Time MILLIS time=millis(); //----------- Inizio DHT22 ------------------------ if(time>lettura_Temp+12000){ delay(dht.getMinimumSamplingPeriod()); #ifdef MY_DEBUG Serial.println(F("--- Temperatura --- ")); #endif float temperatureDTH; float humidity = dht.getHumidity(); float temperatureDHT = dht.getTemperature(); temperatureDTH2 = temperatureDTH; //Invio la lettura della Temperatura send(msgTemp.set(temperatureDHT, 1)); //delay(6000); // Faccio una pausa ed invio altra lettura //Invio lettura Umidita send(msgHumi.set(humidity, 1)); //delay(4000); lettura_Temp=millis(); } //---------- Inizio Pressione --------------------------- if(time>lettura_Press+11000){ #ifdef MY_DEBUG Serial.println(F("--- Tempo passato lego la Pressione--- ")); #endif float temperatureDHT2; float pressure = bmp.readSealevelPressure(ALTITUDE) / 100.0; float temperature = temperatureDHT2; if (!metric) { // Convert to fahrenheit temperature = temperature * 9.0 / 5.0 + 32.0; } int forecast = sample(pressure); #ifdef MY_DEBUG Serial.print(F("Pressione = ")); Serial.print(pressure); Serial.println(F(" hPa")); Serial.print(F("Forecast = ")); Serial.println(weather[forecast]); #endif if (pressure != lastPressure) { send(msgPres.set(pressure, 0)); lastPressure = pressure; } if (forecast != lastForecast) { send(msgForecast.set(weather[forecast])); lastForecast = forecast; } lettura_Press=millis(); } //-------------- Inizio Luminosita -------------------------- if(time>letturaluce_time+10000){ #ifdef MY_DEBUG Serial.print(F("Tempo passato lego la Luce: ")); #endif int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; #ifdef MY_DEBUG Serial.println(lightLevel); #endif //delay(1000); if (lightLevel != lastLightLevel) { if(lightLevel > lastLightLevel + 7 || lightLevel < lastLightLevel - 7){ send(msg4.set(lightLevel)); #ifdef MY_DEBUG Serial.print(F("Invio nuova lettura LUX: ")); Serial.println(lightLevel); #endif lastLightLevel = lightLevel; } } letturaluce_time=millis(); } //Fine Luminosita //--------- Eventuale 4 Modulo ------------------------- // Chiusura Loop } //------------ Aggiuntivo Previsione del Barometro --------------------- float getLastPressureSamplesAverage() { float lastPressureSamplesAverage = 0; for (int i = 0; i < LAST_SAMPLES_COUNT; i++) { lastPressureSamplesAverage += lastPressureSamples[i]; } lastPressureSamplesAverage /= LAST_SAMPLES_COUNT; return lastPressureSamplesAverage; } // Algorithm found here // http://www.freescale.com/files/sensors/doc/app_note/AN3914.pdf // Pressure in hPa --> forecast done by calculating kPa/h int sample(float pressure) { // Calculate the average of the last n minutes. int index = minuteCount % LAST_SAMPLES_COUNT; lastPressureSamples[index] = pressure; minuteCount++; if (minuteCount > 185) { minuteCount = 6; } if (minuteCount == 5) { pressureAvg = getLastPressureSamplesAverage(); } else if (minuteCount == 35) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change * 2; // note this is for t = 0.5hour } else { dP_dt = change / 1.5; // divide by 1.5 as this is the difference in time from 0 value. } } else if (minuteCount == 65) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) //first time initial 3 hour { dP_dt = change; //note this is for t = 1 hour } else { dP_dt = change / 2; //divide by 2 as this is the difference in time from 0 value } } else if (minuteCount == 95) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 1.5; // note this is for t = 1.5 hour } else { dP_dt = change / 2.5; // divide by 2.5 as this is the difference in time from 0 value } } else if (minuteCount == 125) { float lastPressureAvg = getLastPressureSamplesAverage(); pressureAvg2 = lastPressureAvg; // store for later use. float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 2; // note this is for t = 2 hour } else { dP_dt = change / 3; // divide by 3 as this is the difference in time from 0 value } } else if (minuteCount == 155) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 2.5; // note this is for t = 2.5 hour } else { dP_dt = change / 3.5; // divide by 3.5 as this is the difference in time from 0 value } } else if (minuteCount == 185) { float lastPressureAvg = getLastPressureSamplesAverage(); float change = (lastPressureAvg - pressureAvg) * CONVERSION_FACTOR; if (firstRound) // first time initial 3 hour { dP_dt = change / 3; // note this is for t = 3 hour } else { dP_dt = change / 4; // divide by 4 as this is the difference in time from 0 value } pressureAvg = pressureAvg2; // Equating the pressure at 0 to the pressure at 2 hour after 3 hours have past. firstRound = false; // flag to let you know that this is on the past 3 hour mark. Initialized to 0 outside main loop. } int forecast = UNKNOWN; if (minuteCount < 35 && firstRound) //if time is less than 35 min on the first 3 hour interval. { forecast = UNKNOWN; } else if (dP_dt < (-0.25)) { forecast = THUNDERSTORM; } else if (dP_dt > 0.25) { forecast = UNSTABLE; } else if ((dP_dt > (-0.25)) && (dP_dt < (-0.05))) { forecast = CLOUDY; } else if ((dP_dt > 0.05) && (dP_dt < 0.25)) { forecast = SUNNY; } else if ((dP_dt >(-0.05)) && (dP_dt < 0.05)) { forecast = STABLE; } else { forecast = UNKNOWN; } // uncomment when debugging #ifdef MY_DEBUG Serial.print(F("Forecast at minute ")); Serial.print(minuteCount); Serial.print(F(" dP/dt = ")); Serial.print(dP_dt); Serial.print(F("kPa/h --> ")); Serial.println(weather[forecast]); #endif return forecast; }```
  • New compile error for Pro Mini 3.3v 168

    10
    0 Votes
    10 Posts
    3k Views
    mfalkviddM
    @rolandow You can up/downgrade using the Library Manager in the Arduino IDE if you like. It is OK to mix nodes with different 2.x versions in the same network, so you can use 2.1.1 for your atmega168 nodes and 2.2.0 on your other nodes. Personally I use git to switch between different MySensors versions. I clone MySensors into the library folder and just switch branches.
  • Potential Problem Reading VCC on NodeMCU

    1
    0 Votes
    1 Posts
    748 Views
    No one has replied
  • SPLASH_SCREEN with MY_DEBUGDEVICE

    3
    1 Votes
    3 Posts
    846 Views
    gohanG
    Well... actually it would make sense as the splash screen is not a debug info :D :sweat_smile:
  • errors in 'Mysensors'

    2
    0 Votes
    2 Posts
    632 Views
    mfalkviddM
    @d-dow welcome to the MySensors community! see https://forum.mysensors.org/post/64477 and https://forum.mysensors.org/post/57240 and https://forum.mysensors.org/post/59833
  • Repeater does not accept V_VAR1

    3
    0 Votes
    3 Posts
    792 Views
    Peter F. von FehmarnP
    Thank you very much :-) I'm using an 22uF capacitor on the RFM69HW (MY_RFM69_TX_POWER_DBM 20) between Gnd an 3.3V. Is it to small ?
  • Raspberry Pi stability problem

    18
    1 Votes
    18 Posts
    3k Views
    mfalkviddM
    Excellent work. Thanks everyone!

17

Online

11.7k

Users

11.2k

Topics

113.1k

Posts