Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • Code is required for 16-relays shift register actuator

    5
    0 Votes
    5 Posts
    2k Views
    T
    @helmchen81 I recently soldered a modile [image: data-0.27:26449551045:2114286&pb=U2FsdGVkX19t47lstvSpEik4o51-3Hwdyo95vTAH6F4RYFlwnIi-aZeJp1ikb0dyE6R171--ILHJJMz6cINJfibJvbl72I_b92cCKzr-IDE=] .... but couldn't win the sketch. Since I am just a gynecologist, not a programmer and I do not understand with the code for 16 relay module using SN74HC595. :) On this site are a lot of professionals for whom this is not the problem, the code may soon emerge. I use just 3 separate Arduinos for my 16 channel relay. [image: rFxpY24ho5RqMdZGkY0GYV_z9pF6Z8qjrosLhCzC5nBtUQMAD50LQrCSfof592ndNwrM5j-2N7kFR-hh16qGKw%3D%3D?uid=49487926&filename=2017-01-05%2016-25-16.JPG&disposition=inline&hash=&limit=0&content_type=image%2Fjpeg&tknv=v2&size=1163x542]
  • Disable node ACK

    14
    0 Votes
    14 Posts
    4k Views
    M
    Thank you, but right now everything's working as expected. My only concern is that the tweak you told me about should not be so obscure but way more visible and easy to toggle. I'd like to have the input of a senior developer of MySensors because I may be mistaking but if not I don't know why no one considered this yet.
  • [Solved] W5100 Ethernet Gateway with NRF24 stable MySensors 2.1.0 problem

    5
    0 Votes
    5 Posts
    3k Views
    macieiksM
    @tboha Yes I got it, Thank you very much for help! :)
  • Newbie problems - node not working

    3
    0 Votes
    3 Posts
    1k Views
    pgvP
    Thanks @TimO much appreciated. All working OK now! It's easy when you know where to look! Just missing a few packets but I will work on that. Thanks again
  • More then one MAX6675 in one node? ...smoking meat and fish...

    12
    0 Votes
    12 Posts
    3k Views
    jonehrJ
    @mfalkvidd I'm very grateful...thank you! works fine. As you said, the code could be cleaner but I'm fully satisfied. When I get the time I'll do some basic coding studies.
  • NRF24L01+PA+LNA distance problem

    25
    1 Votes
    25 Posts
    10k Views
    yd kimY
    @gloob Arduino doesn't matter up to 5V so I don't mind for arduino. If I feed same power to arduino, I need bigger LDO and also less efficiency.
  • Radio FAIL after ~3 weeks [SOLVED]

    61
    0 Votes
    61 Posts
    17k Views
    T
    @Reza: I tried to reproduce the errors shown by your log. Part of the errors could be reproduced. So if you are leaving range of stable connections, node will try to get an new parent (within range). So broadcasting for new parent is "normal". As long as there is no valid connection node will reject sending messages because "Transport Not Ready". So this is "normal", too. Leaving range resulted in one or two NACK, then connection died quietly. I never got this amount of NACK you got. I could not reproduce !TSF:MSG:LEN:0!=8 or something similar. This means the message has been crippled (possibly). Reviewing logs and testing on my configuration revealed no clue to defective Chips (in regard to NRF24L01). Chips could be fake though, but at least software functions seem to be ok. Fake NRF modules are reported to have very varying (worse) connection distances, sometimes down to a few (possibly only one) meter(s). Maybe -- may be not. There are two major differences between our setups. I am currently not working with ACKs, I will test this tomorrow. Second - I got no actual relays connected (only LEDs). You reported transmission break down simultaneously to pressing switches at higher rate. Are you supplying DC for relays from Arduino or from separate DC-supply? Have you made any arrangement preventing inductive spikes (ferrite rings, self-induction recuperation diode etc) ? If you simply unhook your relays and try again - you get better results? (since your non-inductive sensors work well). If this will turnout true - you may give Solid-State-Relais a try.
  • MYSController problem

    13
    0 Votes
    13 Posts
    3k Views
    R
    @tekka said: Issue created SUPER! :smiley:
  • Soldering question

    4
    0 Votes
    4 Posts
    1k Views
    YveauxY
    @Maurice-Krijtenberg or mount them upside down, so the pins will stick out above the arduino. This way you don't have to clip them and you can even still connect jumper wires to them.
  • Unable to register new node

    1
    1 Votes
    1 Posts
    624 Views
    No one has replied
  • Uno R3 + W5100 Shield + NRF24L01+

    5
    0 Votes
    5 Posts
    2k Views
    gohanG
    I bought 2 of these -> http://www.gearbest.com/transmitters-receivers-module/pp_453011.html But so far I haven't been able to establish a communication between the 2. Also I have some a mixed situation with a UNO and a Mega that for what I have read requires different pins to be connected (hopefully I should have understood that :D )
  • Not getting correct value from BH1750

    3
    0 Votes
    3 Posts
    875 Views
    iotearoaI
    Thanks @Nca78 ! That worked!
  • Invalid version found: 1.04

    3
    0 Votes
    3 Posts
    5k Views
    co_bikerC
    Thanks for the reply... I'm guessing from the reply the error message doesn't matter? I actually loaded an older version of Arduino that I had been using previously and now I no longer get the error message. Thanks!!
  • is "isTransportOK()" function obsolete in 2.1.0 ?

    3
    0 Votes
    3 Posts
    2k Views
    ileneken3I
    @tekka OK, I changed it to isTransportReady() and it compiles fine. Thank you!
  • ESP8266 - new WiFi settings

    15
    0 Votes
    15 Posts
    10k Views
    YveauxY
    @kalle that probably won't work as it will only erase the mysensors part of the eeprom (simulated in flash) while this issue is about esp caching it's wifi settings internally. But, feel free to try :satisfied:
  • im brand new to MySensor and its not going well

    6
    0 Votes
    6 Posts
    3k Views
    CoffeesnobC
    @mfalkvidd Thanks again for your reply, I greatly appreciate your efforts. So, I have made some good progress and now I think we are getting close. I discovered a bit of an anomaly in the way things are described on the website which doesn’t make it easy to understand how to connect things up when your first crack at this. It is probably worthwhile clarifying on this page https://www.mysensors.org/build/ethernet_gateway. So what I have discovered is that the page linked to above describes setting the NRF24L01 on pins A2,A1,SCK,CSN,CE however it also goes on to talk about potential conflicts with SPI, and to use alternative pins, however, it doesn’t really make it very clear how to do that. So here is what I did. I found a library called NRF24L01_h which was provided to me by Device.bit when I was looking at using their approach. By reading this I was able to get a much clearer understanding of how the SPI works and as you can see this file maps the NRF24L01 pins to 30,28,26,24,22 and 32 as the IRQ. #ifndef NRF24L01_h #define NRF24L01_h #include "API.h" //--------------------------------------------- #define TX_ADR_WIDTH 5 // 5 unsigned chars TX(RX) address width #define TX_PLOAD_WIDTH 1 // 20 unsigned chars TX payload //--------------------------------------------- #define CE 22 // CE_BIT: Digital Input Chip Enable Activates RX or TX mode #define CSN 24 // CSN BIT: Digital Input SPI Chip Select #define SCK_PIN 26 // SCK BIT: Digital Input SPI Clock #define MOSI_PIN 28 // MOSI BIT: Digital Input SPI Slave Data Input #define MISO_PIN 30 // MISO BIT: Digital Output SPI Slave Data Output, with tri-state option #define IRQ 32 // IRQ BIT: Digital Output Maskable interrupt pin //********************************************* #endif So I started to re-write the example code to user this but in doing so I discovered these lines of code in the example script and then the penny dropped. #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD) #define MY_SOFTSPI #define MY_SOFT_SPI_SCK_PIN 14 #define MY_SOFT_SPI_MISO_PIN 16 #define MY_SOFT_SPI_MOSI_PIN 15 #endif // When W5100 is connected we have to move CE/CSN pins for NRF radio #ifndef MY_RF24_CE_PIN #define MY_RF24_CE_PIN 5 #endif #ifndef MY_RF24_CS_PIN #define MY_RF24_CS_PIN 6 #endif 0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0) 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSM:RADIO:OK 0;255;3;0;9;TSM:GW MODE 0;255;3;0;9;TSM:READY IP: x.x.20.12 So we are away. The radio is working and now I am starting to understand how the code works a little better….however!!!! In the Ethernet code there is a line #define MY_PORT 5003 which is what mynode will connect to. Only issue now is this port doesn’t seem to be open or it is in the wrong mode somewhere deeper in the code. If I load the example code for Chat server. And set the port to 5003 then my node can connect to the Mega no problem. So I know it's not firewall or hardware or in fact network related. Can you point me in the right direction to troubleshoot this please. i suspect the issue will be in one of the libraries further down the line.
  • what is related this error ?

    11
    0 Votes
    11 Posts
    2k Views
    martinhjelmareM
    @Reza You seem to be getting help with the same problem in the other thread, so I'll stop here.
  • Do repeater nodes increase message delay?

    3
    0 Votes
    3 Posts
    797 Views
    hekH
    1-2 seconds sounds really long. You would have to look at the logs to determine where the delay is introduced. Delays is often the result of a slow controller.
  • ESP-8266 gateway with sensor can't communicate with controller

    5
    0 Votes
    5 Posts
    1k Views
    mfalkviddM
    Great work @Senne-Vande-Sompele, thanks for reporting back!
  • fail converting 1.5 sketch to 2.0

    2
    0 Votes
    2 Posts
    1k Views
    DIYProjectsD
    Hi Carmelo42. Here your sketch modified. You need to define all MySensors parameters before to include the library. I add 2 variables (BATT_IN_PIN, BATT_VCC_PIN). You need to set Pins. I think, it'll run now. I don't check if the measure of the temperature is correct. // avec mesure de la batterie avec Vcc.h // ok avec pile CR2032 et docATmega328 8Mhz MYSBootloader et efuse 0x07 // pour DS18B20 SANS resistance // nécessite la lib OneWire : OneWireNoResistor-master.zip // // boards.txt : //proMYSBL.name=docATmega328 8Mhz MYSBootloader //proMYSBL.upload.tool=avrdude //proMYSBL.upload.protocol=arduino //proMYSBL.upload.maximum_size=30720 //proMYSBL.upload.maximum_data_size=2048 //proMYSBL.upload.speed=115200 //proMYSBL.bootloader.tool=avrdude //proMYSBL.bootloader.low_fuses=0xE2 //proMYSBL.bootloader.high_fuses=0xDA //proMYSBL.bootloader.extended_fuses=0x07 //proMYSBL.bootloader.unlock_bits=0x3F //proMYSBL.bootloader.lock_bits=0x0F //proMYSBL.bootloader.file=MySBootloader/MYSBootloader.hex //proMYSBL.build.mcu=atmega328p //proMYSBL.build.f_cpu=8000000L //proMYSBL.build.board=AVR_UNO //proMYSBL.build.core=arduino:arduino //proMYSBL.build.variant=arduino:standard #define MY_NODE_ID 123 #define MY_RADIO_NRF24 #include <SPI.h> #include <MySensors.h> #include <DallasTemperature.h> #include <OneWire.h> #include <Vcc.h> #define ONE_WIRE_BUS 4 // Pin where dallase sensor is connected #define ONE_WIRE_GND 5 #define ONE_WIRE_VCC 3 #define ID_BatPcnt 1 #define ID_Bat 2 #define BATT_IN_PIN 1 #define BATT_VCC_PIN 2 #define MAX_ATTACHED_DS18B20 16 // 60000 = 1 minute // 12000 = 2 minutes // 300000 = 5 minutes // 600000 = 10 minutes #define SLEEP_TIME 300000 // Sleep time between reads (in milliseconds) const float VccMin = 2.3; // Vcc mini attendu, en Volts. const float VccMax = 3; // Vcc Maximum attendu, en Volts (2 piles AA neuves) const float VccCorrection = 2.52/2.6; // calibration : Vcc mesuré au multimètre / Vcc mesuré par l'Arduino par vcc.Read_Volts() dans sketch 1/2 Vcc vcc(VccCorrection); OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); //MySensor gw; MyMessage msgBAT_PCNT(ID_BatPcnt,V_VAR1); // on utilise le type V_VAR1 pour le % de charge des piles MyMessage msgBAT(ID_Bat,V_VAR2); // on utilise le type V_VAR2 pour la tension des piles float lastTemperature[MAX_ATTACHED_DS18B20]; uint8_t numSensors = 0; boolean receivedConfig = false; boolean metric = true; // Initialize temperature message MyMessage msg(0, V_TEMP); int oldvalue = 0; void before() { // Startup up the OneWire library sensors.begin(); } void setup() { // Startup OneWire #ifdef ONE_WIRE_VCC pinMode(ONE_WIRE_VCC, OUTPUT); digitalWrite(ONE_WIRE_VCC, HIGH); #endif #ifdef ONE_WIRE_GND pinMode(ONE_WIRE_GND, OUTPUT); digitalWrite(ONE_WIRE_GND, LOW); #endif analogReference(INTERNAL); pinMode(BATT_IN_PIN, INPUT); pinMode(BATT_VCC_PIN, OUTPUT); digitalWrite(BATT_VCC_PIN, LOW); } void presentation() { // Startup and initialize MySensors library. Set callback for incoming messages. // gw.begin(); //gw.begin(NULL, node_id, true); // Send the sketch version information to the gateway and Controller sendSketchInfo("TS sR batt", "2.0"); // Fetch the number of attached temperature sensors numSensors = sensors.getDeviceCount(); sensors.setWaitForConversion(false);//saves a few mAs per read :-) to debug // Present all sensors to controller present(ID_BatPcnt, S_CUSTOM); // type S_CUSTOM pour le capteur "% de charge" present(ID_Bat, S_CUSTOM); // type S_CUSTOM pour le capteur "tension" for (int i = 0; i < numSensors && i < MAX_ATTACHED_DS18B20; i++) { present(i, S_TEMP); } } void loop() { // Process incoming messages (like config from server) //gw.process(); // mesure de Vcc float v = vcc.Read_Volts(); // calcul du % de charge batterie float p = 100 * ((v - VccMin) / (VccMax - VccMin)); // On envoie les données des capteurs et de l'état de la batterie au Gateway //gw.sendBatteryLevel(p); // Inutile... send(msgBAT_PCNT.set(p, 1)); // 1 décimale send(msgBAT.set(v, 3)); // 2 décimales // Fetch temperatures from Dallas sensors // Fetch temperatures from Dallas sensors sensors.requestTemperatures(); sleep(750);//wait for conversion in sleep mode // Read temperatures and send them to controller for (int i = 0; i < numSensors && i < MAX_ATTACHED_DS18B20; i++) { // Fetch and round temperature to one decimal float temperature = static_cast<float>(static_cast<int>((getConfig().isMetric ? sensors.getTempCByIndex(i) : sensors.getTempFByIndex(i)) * 10.)) / 10.; // Only send data if temperature has changed and no error send(msg.setSensor(i).set(temperature, 1)); lastTemperature[i] = temperature; //if (lastTemperature[i] != temperature && temperature != -127.00) { // Send in the new temperature //} } sleep(SLEEP_TIME);//wake on interrupt or after sleep-time } If you need more info : http://www.diyprojects.io/mysensors-v2-discover-news-migrate-old-sketchs/ (or http://www.projetsdiy.fr/mysensors-version2-decouverte-nouveautes-convertir-sketch/ in french)

21

Online

11.7k

Users

11.2k

Topics

113.1k

Posts