Skip to content

Troubleshooting

Help! Everything just falls apart
2.7k Topics 21.5k Posts
  • How to send MQTT message from controller to Node?

    4
    0 Votes
    4 Posts
    3k Views
    siodS
    This the code I got so far, which does not work :( #define MY_RADIO_NRF24 //MySensor Library auf NRF24 Funkmodul einstellen, muss vor MySensor.h Initialisierung geschehen // Define Node ID #define MY_NODE_ID 5 //#define MY_PARENT_NODE_ID 50 //Repeater Node 1! //#define MY_PARENT_NODE_IS_STATIC #include <MySensors.h> #include <SPI.h> #include <IRremote.h> #define CHILD_ID 1 // Id of the sensor child IRsend irsend; // Initialize motion message MyMessage msg(CHILD_ID, V_IR_SEND); void setup() { Serial.begin(9600); } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("LED Licht TV Steuerung", "1.0"); // Register all sensors to gw (they will be created as child devices) present(CHILD_ID, S_IR); } void loop() { } void receive(const MyMessage &message) { // We only expect one type of message from controller. But we better check anyway. if (message.type == V_IR_SEND) { // Send command to Turn LEDs On if (message.getString() == "FF02FD") { // ??? for (int i = 0; i < 3; i++) { irsend.sendNEC(0xFF02FD, 32); Serial.println(message.getString()); Serial.println("Message sent"); delay(40); } } } } edit: from the serial monitor I see that the node receives the "FF02FD" String, but it does not enter this part if (message.getString() == "FF02FD") { // ??? for (int i = 0; i < 3; i++) { irsend.sendNEC(0xFF02FD, 32); Serial.println(message.getString()); Serial.println("Message sent"); delay(40); } } edit2: This is what I am sending from openhab over MQTT: mygateway1-in/5/1/1/0/32 edit3: Ok, now I see where it fails: message.getString() contains FF02FD but when I say if (message.getString() == "FF02FD") it does not recognise the FF02FD. But I don´t understand why edit4: Ok, I got it, finally...: message.getString("FF02FD"); :astonished: :facepunch:
  • Cannot get serial gateway to work

    13
    0 Votes
    13 Posts
    3k Views
    henninneH
    Ok, so I added more capacitors, but still the same printout in the serial monitor. Any more ideas? 0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;!TSM:INIT:TSP FAIL 0;255;3;0;9;TSM:FAIL:CNT=1 0;255;3;0;9;TSM:FAIL:PDT 0;255;3;0;9;TSM:FAIL:RE-INIT 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.1.1 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0: 0;255;3;0;9;!TSF:MSG:LEN,0!=7 0;255;3;0;9;TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:```
  • Issue with Arduino + NRF24L01 + Raspberry when current in home goes "low"

    7
    0 Votes
    7 Posts
    1k Views
    S
    @sundberg84 said in Issue with Arduino + NRF24L01 + Raspberry when current in home goes "low": @sineverba - what @gohan said. There is something called a watchdog which can either be in the software or you can have a external component that is connected to the arduino reset pin. The arduino needs to ping the timer and if the arduino hangs and stops pinging the timer it will send a signal and reset the arduino. I did try to introduce Watchdog in my script. But... Arduino is not re-booted, if I use a function with wait inside. Is it normal? This is the function that prevent watchdog to reset the board.... /** * Light the LED status * * @since 2.0 */ void lightLedStatus() { int k = 0; for ( k = 0; k < WAIT_LOOPS; k++) { digitalWrite(PIN_LED_STATUS,HIGH); wait(10); // 5 * 1000 millisends = 5 seconds; digitalWrite(PIN_LED_STATUS,LOW); wait(4990); } }
  • mysgw: bind: Address already in use

    7
    0 Votes
    7 Posts
    4k Views
    J
    @mfalkvidd Thank You for the answer. @mfalkvidd said in mysgw: bind: Address already in use: As mentioned in the troubleshooting section, look in /var/log/syslog to see the gateway output of the existing instance. Don't start a new one. Ohh... Thats a lot more clear now... I thought command "sudo ./bin/mysgw -d" is not a service start, but just something like output mirror. Like "tail". Could I somehow use tail for watching real time output on ./bin/mysgw -d ? Also, it seems your sudo key has gotten stuck :( If you missed that not every command is preceeded by sudo in the build instructions, maybe it is worth considering that you missed something else? Sorry for dumb questions, but how I make that sudo key stuck? It's becose of that I start a few mysgw services? Another silly question, becose I'm very "advanced user" in UNIX, my best friend is called desktop there, and I know basically just install, nano, cp, rm commands, I need to ask :) Is there should be difference if I will use "make" instead of "sudo make". Sudo means that I run this command by root user, but does it make difference between "make" or "sudo make"? And if I remember clearly if I run only "make" - raspberry pi starts to swearing, but with sudo, it's ok. When I install the gateway by command "sudo make install" I can see that installing was successful, there is info that if I want to run this on boot I need to run two lines: sudo systemctl enable mysgw.service sudo systemctl start mysgw.service But now, I guess, I do not need them both, because start on boot is described in "sudo make install"?
  • Some issues about uplink available or no

    3
    0 Votes
    3 Posts
    743 Views
    S
    Thank you... But isTransportReady seems true also if I leave the Arduino Gateway with reset pushed forever. ONly get false when I disconnect the power from Arduino. I'm thinking to use the receiveTime method. But, if controller (and gateway) are down, what the value returned from receivedTime? On another words, how can I check if time is returning? Because with gateway shutdown on Serial I did not read nothing from that function (instead of time). Thank you!
  • 0 Votes
    6 Posts
    1k Views
    S
    Okay i found my problems. One of my nrf24 board seems to have an defect. It does not send anything but receive works.# After i've changed my nrf24 board, the node appeared just after burning the bootloader at my gateway. Flashing via ethernet gateway (Arduino uno and w5100 board) was not possible. I figured out, that lot of people have trouble with this, because the arduino reboots very often. After updating to mysensors lib 2.2.0-beta this was better, but mostly my ethernet connection was lost during ota firmware update. -There are lot of interesing things, that problmes came up with avr board revision 1.6.8. Also some problems are there with an resistor. I've no idea if the resistor problem occures only with newer board revisions. I got my ethernet problems solved, with removing the sd card from the ethernet shield. I did not used it, it was there from an older project. No really idea, whats up with that sd card, but without an sd card connected, i was able to update my sketches. I also used the bootloader from MySensorsBootloaderRF24-development and figured out that this one is needed to reassign the id.
  • MySensors capabilities deciphering

    8
    6 Votes
    8 Posts
    2k Views
    ahmedadelhosniA
    @mfalkvidd Yes ofcourse ;) It works very well
  • RFM69HW 433 communication problem

    34
    0 Votes
    34 Posts
    6k Views
    sundberg84S
    I guess this isnt in question anymore but I just wanted to comfirm I have tested node and it works with HW version as well. I use the code above and just added #define MY_IS_RFM69HW // Mandatory if you radio module is the high power version (RFM69HW and RFM69HCW), Comment it if it's not the case
  • monostable button with relay

    3
    0 Votes
    3 Posts
    1k Views
    pihomeP
    thank you, that worked :+1:
  • 0 Votes
    5 Posts
    2k Views
    dbemowskD
    @pndgt0 Always glad to help.
  • Multithreading with Arduino

    8
    0 Votes
    8 Posts
    3k Views
    SushukkaS
    Hehe, took couple of hours but now have four led sequences running "in parallel" on Wemos D1 Mini. Three fades with random intervals and one flickering led with random intervals imitating noise in electric net. Also couple of static leds running on same board. Seems that MySensors have no problem to get its slice of the cake so I'm happy now. Btw, these leds are implemented in this: http://www.billingboats.com/da/22/2/boats/advanced-beginner/P-bb474-cux-87.html For a perfectionist took terrible amount of time to build, but looks pretty awesome now. :)
  • radio failure ?

    4
    0 Votes
    4 Posts
    1k Views
    gohanG
    you could setup a secondary gateway with lib 2.2 and do a node by node upgrade :)
  • Problem requesting data from Domoticz

    4
    0 Votes
    4 Posts
    1k Views
    N
    I wanted to make sure this thread is correct. After a day of debugging I found the problem I was having. My sketch used the following: request(Data1_ID, V_TEXT, 1); The last variable (1) I believe is used to request an ack from the controller. Using MysController I was able to determine the 1 prevented MySensors from sending the request message somehow. When I changed it to 0, the requests were sent. Not sure if this is a bug, or intended. Also, I am using the current STABLE version of Domoticz, V3.8153, and it works fine in responding to the requests once I made the change above. Lastly, at least in the tab I was looking at in MysController, it never showed the response message going back from the controller to the node. Perhaps I did not look in the right place, or that is the way MysController is intended to operate. In either case the response messages were seen by the node.
  • Mysensor gateway node is not connecting to Domoticz

    5
    1
    0 Votes
    5 Posts
    2k Views
    M
    @mfalkvidd Thank you.....if forgot to upload the gateway software. I thought flashing the NodeMCU was enough. And of-coarse i had to update in the gateway software also the router information. That was the step i forgot :-(
  • No Sleep is driving me crazy!

    11
    0 Votes
    11 Posts
    2k Views
    mfalkviddM
    @skywatch I think you are confusing "secret" with "unknown".
  • What are the best settings for MY_RF24_PA_LEVEL?

    9
    0 Votes
    9 Posts
    7k Views
    skywatchS
    I realise this is an old thread but the topic is still valid today. I would advise to set all nodes to MIN to start with and see how it goes. Then increase one step at a time until you get good communications. Don't forget interference from microwave ovens, wifi, bluetooth. That's why you should allow a few days between tries to get the best solid communication with the least power. If you have a lot of highest power ones you are creating an electronic 'smog' that can affect other devices and possibly your health.
  • NRF24L01 differences

    nrf24l01+ nrf24l01
    2
    0 Votes
    2 Posts
    1k Views
    gohanG
    It depends if you want to use an antenna with some gain or not
  • keep getting child_id 8 already exists in children of node

    7
    0 Votes
    7 Posts
    3k Views
    Mark69M
    Thanks all for the advice. I cleared the eeprom and pushed the sketch again. The arduino does get a new device_id so that worked. After unplugging it from power and putting it back on I got the same message however and no readings. I found however that another sensor I have that is working and sending readings also gives a 'child_id already exists warning' when I powercycle it. So now I am thinking that the warning is normal behaviour when an already registered sensor comes back online. Than I compared the serial output in de log parser (amazing what a handy thing that is) with output from a working sensor. I noticed that everything looks the same upto the the line Callback setup() My not working sensor gave no more output after that but the working sensor continued by sending a reading and going to sleep. So I suspect there is something wrong with the sensor or sketch causing it to never correctly initialize.
  • Momentary button to control lights

    29
    0 Votes
    29 Posts
    7k Views
    dbemowskD
    My gateway is a serial gateway built with an easy newbie PCB and a pro mini. What I did when I upgraded my 1.4 setup to 2.0, I pulled my pro mini that I had flashed with the 1.4 setup and put a new pro mini in that had 2.0. That way if there were any problems, I could easily swap the 1.4 pro mini back in to easily be back where I started. Likewise when replacing your library, pull the MySensors folder out of your arduino libraries folder to keep as a backup until you know things will work. That way if you have to revert back, you can easily swap back the old MySensors folder. You have to completely remove it from the libraries folder though, you can't just rename it to something else.
  • MQTT Epic Fail

    4
    0 Votes
    4 Posts
    955 Views
    gohanG
    well, if you are willing to make your alarm system to use Mysensors we would be very happy to help and learn from other people experience :)

24

Online

11.7k

Users

11.2k

Topics

113.1k

Posts