Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • Combine DimmableLEDActuator sketch with RelayActuator Sketch

    10
    0 Votes
    10 Posts
    2k Views
    BartEB
    @rsaeful better use gw.wait() i.s.o. of delay. during the gw.wait() you are still receiving and sending MyS messages. delay is blocking So the function will look like this void fadeToLevel( int toLevel ) { int delta = ( toLevel - currentLevel ) < 0 ? -1 : 1; while ( currentLevel != toLevel ) { currentLevel += delta; analogWrite( LED_PIN, (int)(currentLevel * 2.55)); gw.wait( FADE_DELAY ); } }
  • Binary_switch_sleep_sensor sketch does not work

    4
    0 Votes
    4 Posts
    920 Views
    mfalkviddM
    It will work, and as long as the project just need little functionality it should be manageable. Managing a lot of functionality will be a pain though, since you won't have as nice development and debug tools available (compared to using a real controller on linux or windows machine). You will need to hard-code node IDs for all nodes (except the gateway which always has ID 0) though, just as you have already done with #define MY_NODE_ID 123. I mention it because a lot of people have tried to get auto ID from a gateway, but that won't work since the ID assignment is done by the controller.
  • How to connect USBASP to a bare atmega328p

    6
    0 Votes
    6 Posts
    3k Views
    scalzS
    and perhaps some parts of this howto can help you too. not the same bootloader but I use usbasp. Yes you need to use your icsp conenctor or the spi port + rst pins if you want. https://forum.mysensors.org/topic/3503/sensebender-dualoptiboot-ota-howto-in-mysensors/18
  • [SOLVED] ESP8266 - RFM69W - Are they talking??

    Locked
    8
    0 Votes
    8 Posts
    3k Views
    DinnocD
    All working now, thanks Chrille!! For anyone else trying to get RFM69W working with ESP8266 I have MISO -> GPIO12 MOSI -> GPIO13 SCK -> GPIO14 NSS - > GPIO16 DIO0 ->GPIO15 (Which is also pulled down with a 10k resistor) ANA -> antenna (to be honest i eyeballed 9cm but haven't measured it (was going to trim afterwards)) VCC -> 3.3V GND -> GND I also soldered a 4.7uf cap over the power and ground of the RFM69W directly on the RFM69W PCB For the power supply i have a 5V USB supply (old phone charger) with a 1000uf cap over the +ve and -ve. then and LD1117 to feed 3.3V to the ESP and the RFM69. Should probably also have 47uf cap somewhere on the 3.3V side as well. I saw people talking about them being too close as well. I tested most of mine about 50cm apart with no major issues. I made the following mods to get either the gateway or node sketch working #define MY_RF69_IRQ_PIN 15 #define MY_RF69_SPI_CS 16 All makes for a pretty cheap gateway. I was planning on using the ESP for nodes as well but is seems its power consumption is far greater than the arduino mini pro, so i ordered a few of them for nothing and will build my nodes based on those.
  • Function repeater not working 2

    4
    0 Votes
    4 Posts
    1k Views
    D
    How can I get a log with GW if Serial?
  • Can not compile serial gateway on codebender or ide

    14
    0 Votes
    14 Posts
    2k Views
    F
    @mugs Nice, no problem.
  • serial gateway V2 not visible to Vera

    2
    0 Votes
    2 Posts
    742 Views
    R
    I have the same problem. I remember having to set the baud rate somewhere but I can't seem to find it. Please give us some help here. Thanks.
  • [Solved] Ethernet Gateway 2.0 LEDs don't Blink

    11
    0 Votes
    11 Posts
    3k Views
    YveauxY
    @d-smes the whole concept of having default led pins based on platform (e. g. Avr or esp) instead of board (e.g. Uno or NodeMcu) is wrong IMHO. Within the core team we're discussing how to handle this. Will come back to the topic as soon as things become clear.
  • 0 Votes
    3 Posts
    2k Views
    DinnocD
    Thanks i actually just reinstalled arduino from version 1.6.4 to current version 1.6.9 i think and it seemed to fix the issue. I do still have an error with the mymocksensors example sketch though that it doesnt compile with a series of 'function xx is ambiguous' looks like a duplicate reference somewhere. Ill generate the error and post the information Cheers James
  • Library 2.0 - No Humidity sketch

    8
    0 Votes
    8 Posts
    1k Views
    Tagore.PDET
    // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 //Including nescessary libraries #include <SPI.h> #include <MySensors.h> #include <DHT.h> #define HUMIDITY 1 #define TEMPERATURE 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 DHT dht; float lastTempValue; float lastHumValue; boolean metric = true; unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)(30 seconds) #define MESSAGEWAIT 500 MyMessage msgHum(HUMIDITY, V_HUM); MyMessage msgTemp(TEMPERATURE, V_TEMP); void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("XXXX", "XX"); wait(MESSAGEWAIT); // Register all sensors to gateway (they will be created as child devices) present(HUMIDITY, S_HUM); wait(MESSAGEWAIT); present(TEMPERATURE, S_TEMP); wait(MESSAGEWAIT); } void setup() { dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); } void loop() { delay(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTempValue) { send(msgTemp.set(temperature, 1)); lastTempValue = temperature; Serial.print("Temp: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHumValue) { send(msgHum.set(humidity, 1)); lastHumValue = humidity; Serial.print("Hum: "); Serial.println(humidity); } sleep(SLEEP_TIME); }
  • How to disable default node registration to the GW?

    Locked
    19
    0 Votes
    19 Posts
    7k Views
    TheoLT
    So since no one has accomplished the goal of bypassing MySensors bootup function. I suggest I'll leave this topic open for a little while. But will be closing it. You can contact each other through the chat function. And if you succeed in your quest, you can start a new topic.
  • Arduino Not Responding -- NEWBIE Help

    7
    0 Votes
    7 Posts
    4k Views
    JonnyDev13J
    I got a test circuit wired up yesterday afternoon with one temperature sensor and the arduino. It didn't work. I got out the multimeter and there was not voltage coming through the wire connected (through the breadboard) to the VCC contact in the arduino, even though there was voltage if I touched it to the arduino contact directly. Apparently something I'm doing with the headers is not quite right. I'll research and try to figure it out, but I'd be happy if anybody here has suggestions.
  • Door sensor Radio OK !TSM:FAILURE

    19
    0 Votes
    19 Posts
    6k Views
    TheoLT
    @sincze I've got some buck converters that regulate 12V to 3.3V without any pain. I use it for my gesture controlled lamp. Works like a charm. Well I'm by far any export on this field. But I'm working on a node which I couldn't get stable. The Node crashed after 6, 8 sometimes 12 hours. I've added a watchdog, which works great, but after the watchdog did it's work some sensors on the node just couldn't work. Although I've powered them externally. To make this story shorter ;-). I found out that it's better to always power the radio externally. For some kind of reason it consumes more power than my ProMini 3.3V can provide. This symptom occurs when you add multiple sensors to an Arduino. It took me a long time to investigate what the problem was. But my conclusion is, just don't power anything from the Arduino and use an external power adapter if possible. Except for dedicated Arduino's that can be found on openhardware. My sensebender has been running for 4 month on the same batteries without any problems.
  • [SOLVED] Can't get Nano to show up in Device Manager

    Locked
    5
    0 Votes
    5 Posts
    1k Views
    TheoLT
    @spectral_ranger glad to hear that you we're able to solve it
  • Flickering problem with RGB leds and a simple solution

    3
    5 Votes
    3 Posts
    2k Views
    n8falkeN
    Some background, why the solution works without changing the timer prescale: The default prescale of all timers are 64, so they should work the same, but the default mode is different: Timer 0: Fast PWM mode = 0..255,0..255,... (timer is used for internal calculations millis() / delay() /..., so this setting is required) Timer 2: Phase-correct mode = 0..255..0..255... Timer 1 is 16 bit and the pins are blocked by the radio, so I'll leave them out here. The frequency of the timer is comparable to a timer round trip (values are calculated with a 16 MHz IO-frequency like with ATmega168 or ATmega328 used in nano): Timer 0: 16 MHz / 64 / 256 = 976.5625 Hz Timer 2: 16 MHz / 64 / 510 = 490.1961 Hz Fast PWM uses 0..255 = 256 for a round trip. Phase-corrected mode uses 0..255,254..1 = 256 + 254 = 510 (all numbers are double except 0 and 255!) NOW the command: TCCR2A |= _BV(WGM21); Switches timer 2 to fast PWM mode (mode from 1 to 3). In addition to the links above, here I found the default settings: http://playground.arduino.cc/Main/TimerPWMCheatsheet
  • [Solved]UPL:Fail

    47
    0 Votes
    47 Posts
    15k Views
    Pictor LallemandP
    @tekka yes my radio module operates on 3.3V ams1117 I use the regulator to reduce the voltage 3.3V
  • [Solved] Manually setting node-id does not work

    Locked
    5
    0 Votes
    5 Posts
    5k Views
    siodS
    @tekka said: That's it :) Nothing more to add, but Thank you! :bouquet:
  • Ethernet Gateway 2.0 not working - reboots

    4
    0 Votes
    4 Posts
    1k Views
    YveauxY
    @Boots33 said: 1.6.10 https://www.google.nl/search?q=1.6.10+site%3Amysensors.org&oq=1.6.10+site%3Amysensors.org&aqs=chrome..69i57.7175j0j7&sourceid=chrome&ie=UTF-8
  • Questions about power and repeater

    11
    0 Votes
    11 Posts
    3k Views
    hekH
    Ok, but it's gone in 2.0.
  • (Relay) node asks for parent. Gateway forwards (!)

    6
    0 Votes
    6 Posts
    1k Views
    E
    Hmm.. basically, this node works if signing is disabled. If it's enabled, all the nonce requests fail to transmit (with st=NACK). Disabling signing, it has greater success in transferring its data. So I guess it's yet another problem with the radio. I suspected this. This is an NRF24L01+PA+LNA module. I have: Tried multiple radio modules to rule out a faulty one. Put the radio module on a dedicated 3.3V power regulator. Tried both high and low PA level. Same thing on gateway - NRF24L01+PA+LNA, on dedicated 3.3V power regulator. It seems to succeed in most cases, at least when it's sending just a set request. Presentations and others do not work. It's like it's having trouble transmitting longer messages. Odd. The code in this sketch is using an interrupt handler to count pulsess on my energy meter. Could this be related? Some debug output from the node, with signing disabled: MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.0.1-beta TSM:INIT TSM:INIT:TSP OK TSF:ASID:OK,ID=4 TSM:FPAR TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc: TSF:MSG:READ,0-0-4,s=255,c=3,t=8,pt=1,l=1,sg=0:0 TSF:MSG:FPAR RES,ID=0,D=0 TSF:MSG:FPAR OK,ID=0,D=1 TSM:FPAR:OK TSM:ID TSM:ID:OK,ID=4 TSM:UPL TSF:PING:SEND,TO=0 TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1 TSF:MSG:READ,0-0-4,s=255,c=3,t=25,pt=1,l=1,sg=0:1 TSF:MSG:PONG RECV,HP=1 TSF:CHKUPL:OK TSM:UPL:OK TSM:READY TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100 !TSF:MSG:SEND,4-4-0-0,s=255,c=0,t=18,pt=0,l=10,sg=0,ft=0,st=NACK:2.0.1-beta TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=1,st=OK:0 TSF:MSG:READ,0-0-4,s=255,c=3,t=15,pt=6,l=2,sg=0:0100 TSF:MSG:READ,0-0-4,s=255,c=3,t=6,pt=0,l=1,sg=0:M !TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=NACK:Energy Meter TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=1,st=OK:1.1 TSF:MSG:SEND,4-4-0-0,s=4,c=0,t=13,pt=0,l=0,sg=0,ft=0,st=OK: MCO:REG:REQ TSF:MSG:SEND,4-4-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2 TSF:MSG:READ,0-0-4,s=255,c=3,t=27,pt=1,l=1,sg=0:1 MCO:PIM:NODE REG=1 setup(). Radio Channel is 42 TSF:MSG:SEND,4-4-0-0,s=4,c=2,t=24,pt=0,l=0,sg=0,ft=0,st=OK: MCO:BGN:INIT OK,ID=4,PAR=0,DIS=1,REG=1 TSF:MSG:READ,0-0-4,s=4,c=1,t=24,pt=0,l=7,sg=0:7418044 Received last pulse count from gw:7418044 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:3169 Watt:3169 !TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=NACK:7418088 !TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=1,st=NACK:741.8089 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=2,st=OK:3156 Watt:3156 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:7418132 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:741.8133 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:3169 Watt:3169 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:7418177 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:741.8177 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=17,pt=5,l=4,sg=0,ft=0,st=OK:7311 Watt:7241 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=24,pt=5,l=4,sg=0,ft=0,st=OK:7418249 TSF:MSG:SEND,4-4-0-0,s=4,c=1,t=18,pt=7,l=5,sg=0,ft=0,st=OK:741.8249```

26

Online

11.7k

Users

11.2k

Topics

113.1k

Posts