Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • Humidity Sensor Sketch too big for Arduino ProMini?

    8
    0 Votes
    8 Posts
    3k Views
    mfalkviddM
    Try commenting out all Serial.println. By doing that, I got the sketch from Sketch uses 14,350 bytes (100%) of program storage space. Maximum is 14,336 bytes. to Sketch uses 12,920 bytes (90%) of program storage space. Maximum is 14,336 bytes. Troubleshooting without the debug output will be a real pain though. You can also try the development branch of MySensors. It consumes less flash space than 1.5.
  • How to compile the developer esp8266 gateway

    1
    0 Votes
    1 Posts
    622 Views
    No one has replied
  • Set node id. How?

    3
    0 Votes
    3 Posts
    1k Views
    T
    Did you send a newline at the end?
  • 0 Votes
    10 Posts
    3k Views
    M
    Guys, I found a solution for my problem! I tried everything from soldering the two GND pins of the Arduino together to an additional small condenser but nothing worked. So just for the heck of it I connected my buck converter to the RAW pin of the Arduino and adjusted it to something between 3,5 and 4V. Now my stepper driver and the transceiver both are supplied with power from the Arduino VCC pin and it works 100% reliable. So my conclusion is that the Step down converter of the Arduino conditions the 3.3V better than the buck Converter and this solved all my receiving problems. I don't like that I now have an additional conversion step in my power supply but honestly at this moment I don't bother anymore because I'm just happy to have it finally working. I thank you all very much for your Input!
  • Relay node delays

    1
    0 Votes
    1 Posts
    659 Views
    No one has replied
  • 0 Votes
    10 Posts
    3k Views
    B
    @martinhjelmare Great, thanks. The sketch now works as it should. Below is the finished sketch. I also added a counter so that after 10 consecutive interrupts from the motion sensor, the temp and hum get read and transmited. (motion-on generates an interrupt and motion-off generates an interrupt, so it's actually 5 motion triggers) Otherwise if there is a lot of movement during a certain timeframe (mornings), hum and temp won't be measured. Later I will edit the sketch to have all transmits together to save more battery power. Here's the sketch: /** * 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 - Henrik EKblad * * DESCRIPTION * This sketch provides an example how to implement a humidity/temperature * sensor using DHT11/DHT-22 * http://www.mysensors.org/build/humidity */ #include <SPI.h> #include <MySensor.h> #include <DHT.h> #define DIGITAL_INPUT_MOTION 3 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define INTERRUPT DIGITAL_INPUT_MOTION-2 // Usually the interrupt = pin -2 (on uno/nano anyway) #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_MOT 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 4 unsigned long SLEEP_TIME = 150000; // Sleep time between reads (in milliseconds) MySensor gw; DHT dht; float lastTemp; float lastHum; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msgMot(CHILD_ID_MOT, V_TRIPPED); int node_id = 20; boolean lastTripped = false ; int wake = 0; int motionCount = 0; void setup() { gw.begin(); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Humidity and motion", "1.1"); pinMode(DIGITAL_INPUT_MOTION, INPUT); // sets the motion sensor digital pin as input // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); gw.present(CHILD_ID_MOT, S_MOTION); metric = gw.getConfig().isMetric; } void loop() { Serial.println(wake); if (wake == 1 && motionCount <= 10) { Serial.println("wake by motion"); Serial.println("reading motion"); motion(); motionCount = motionCount + 1; Serial.println(motionCount); } else { Serial.println("wake by timer"); Serial.println("reading motion"); motion(); Serial.println("reading temp/hum"); humTemp(); motionCount = 0; Serial.println("motionCount is reset"); } Serial.println("going to sleep now."); wake = gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME); } void motion() { // Read digital motion value boolean tripped = digitalRead(DIGITAL_INPUT_MOTION); Serial.println(tripped); if (lastTripped != tripped) { gw.send(msgMot.set(tripped ? "1" : "0")); // Send tripped value to gw lastTripped = tripped; } } void humTemp() { gw.wait(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTemp) { lastTemp = temperature; if (!metric) { temperature = dht.toFahrenheit(temperature); } gw.send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum) { lastHum = humidity; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } }
  • Controlling Relay Actuator

    17
    0 Votes
    17 Posts
    7k Views
    sundberg84S
    @BartE, @martinhjelmare - this is sometime we should work with in the standard sketch. I have one relay on the edge and sometimes its having really hard to get that ack back from the controller and it never changes. It would be good if the relay made the switch, send the on/off to controller and waited for the ack. If you dont recieve it you send again and tries for some times.
  • [SOLVED] No message after few hours

    7
    0 Votes
    7 Posts
    2k Views
    mfalkviddM
    Yes not using capacitors usually causes problems. Great that you got it working. Thanks for reporting back!
  • Compiling Problems

    15
    0 Votes
    15 Posts
    11k Views
    B
    This thread helped me as well when I installed Arduino IDE 1.6.7. I still had an old version of the MySensors library kicking around in my Sketch Book (if it isn't broke, don't fix it). I just want to keep this thread alive for awhile. :)
  • problem with manual node_id

    2
    0 Votes
    2 Posts
    907 Views
    A
    ok i think its solved. well sort of... i tried clearing the eeprom of the board and uploading again ( with (NULL , 3) modification) but still i didnt get any siganl on domoticz and again the radio started getting hot. so switched to another board (chinese NANO) with original sketch with gw.begin() and it worked. i dont know if its the board replacment or the sketch replacement that did the trick but for now its working.
  • Kitchen Node .. Messy Code..

    3
    0 Votes
    3 Posts
    1k Views
    DwaltD
    @mrcage Do your temp sensors show up at all (as child devices) to your controller or are they just not sending data? You changed one define: int numSensors=3; I don't know if it is necessary, you call for a device count later in setup. What hardware are you using? Mega? You have typical 'interrupt' driven devices, door and motion...but you have your one wire bus on pin3 (interrupt 1) and define your motion interrupt as interrupt 2 (pin 4 minus 2 is 2)? I would suggest putting door and motion on pins 2 & 3, set up as interrupt functions and don't poll them continuously in the loop. I would also remove the sleep function since you are expecting incoming messages for your RGB strip and use millis to establish how often you check the Dallas sensors.
  • nRF24L01+ will not start

    6
    0 Votes
    6 Posts
    3k Views
    ahmedadelhosniA
    @Yveaux Thanks. That was totally new to me :)
  • Esp8266-07 problem

    2
    0 Votes
    2 Posts
    920 Views
    mfalkviddM
    (Moved to separate thread from http://forum.mysensors.org/topic/1870/esp8266-wifi-gateway-port-for-mysensors/243 )
  • how to connect a valve operated by a motor to an IR sensor?

    1
    0 Votes
    1 Posts
    507 Views
    No one has replied
  • Strange problems / behaviour on a project ? List of checkpoints :

    1
    1 Votes
    1 Posts
    670 Views
    No one has replied
  • No serial debug

    3
    0 Votes
    3 Posts
    1k Views
    L
    thank you!! It's working now !!
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    19 Views
    No one has replied
  • Mysensor hang on gw.send.... (and possibly roasting radios)

    4
    0 Votes
    4 Posts
    2k Views
    stevebusS
    @BartE - thanks for the tips. are you suggesting these may fix my hanging issue? or just generally good mysensors coding practices and can't hurt? :-) @mfalkvidd - Certainly could be my problem. Pulling power doesn't reset the radio, but I've only tried that after the radio won't re-initialize with the reset. So maybe I should always restart by power cycling? Any way to 'recover' the bad radios, they don't work even after a power cycle. Has anyone added the code to properly re-initialize the radio yet?
  • Mysensors 1.5 and NRF24L01 without +

    radio init without + nrf24l01
    5
    0 Votes
    5 Posts
    2k Views
    F
    Yes its for an Sony Product, because i tested around a bit. The IP is unique and the mac was also tested with DE:AD:BE:EF:FE:ED with no results :(
  • 0 Votes
    3 Posts
    4k Views
    O
    Thank you, that was it... There are other issues with the code I see now.. But I will persue them tonight.. Thanks

11

Online

11.7k

Users

11.2k

Topics

113.1k

Posts