Post by lewishollow on May 22, 2016 22:34:07 GMT
TL;DR - if your nodes are only sometimes succeeding when sending, try removing your southbound commands.
I just wasted a lot of time and energy debugging something, and I wanted to post about my experience in case anyone else runs into this...
I have a node on the gate to my front yard to let me know if the gate is open and also send back environmental data. Fairly straightforward except that it runs off of four AA batteries that are charged via solar panels during the day, so I had to write a lot of code to try to make it go to sleep and only wake up to send when absolutely necessary. All of that seemed to be working fine, except sometimes the state of the indicator about the gate state and the actual gate state would get out of sync (eg front gate is closed, indicator says it's open).
I brought the outdoor node inside and started debugging it. It appeared that sometimes it would send fine, but sometimes it would not be able to send its state and eventually fail.
I started with the easy stuff - resetting the components, checking all connections, no dice. I assumed I must have messed something up on the outdoor circuit and some solders were shorted or something.
I spent hours taking it apart and back together again. Still nothing.
I tried reprogramming my gateway node to make sure I had the w5100.h fixes. In doing so, I somehow bricked nearly all of my Unos and burned a couple of days trying to bring them back to life to no avail. I still have no idea what I did wrong there...
I finally got an Uno to take the updated code, and it STILL wasn't working reliably.
At the end of my rope, I started writing more complicated code to try to work around the issue so that, even if it got delayed, the message WOULD be sent. Not ideal, but I didn't think I had anything else I could debug... until I looked at the lights on my gateway node.
I noticed that the Tx light was on constantly. I looked at my openhab code - I was having it send WAY more southbound commands than I needed it to. I didn't thinks this should matter, though, since the ethernet shield should be full duplex. Once I removed all southbound sends, the gate node worked perfectly. I felt like an idiot. I was congesting the network.
I'm now in the process of slowly adding back nodes and checking the send status to make sure I'm not causing too much traffic.
I'm surprised, actually, since the full duplex indicator is on on the ethernet shield, so it should be able to send both ways just fine. At some point, I'll debug through the gateway node more now that I know what I'm looking for.
ragoth - every time I sat down to work on this project, this is what I was working on. I get very little time to work on this stuff, so this literally took weeks to get through. Now that I've figured this out, I'll have more time to get to your questions. I'm sorry about the delays.
I just wasted a lot of time and energy debugging something, and I wanted to post about my experience in case anyone else runs into this...
I have a node on the gate to my front yard to let me know if the gate is open and also send back environmental data. Fairly straightforward except that it runs off of four AA batteries that are charged via solar panels during the day, so I had to write a lot of code to try to make it go to sleep and only wake up to send when absolutely necessary. All of that seemed to be working fine, except sometimes the state of the indicator about the gate state and the actual gate state would get out of sync (eg front gate is closed, indicator says it's open).
I brought the outdoor node inside and started debugging it. It appeared that sometimes it would send fine, but sometimes it would not be able to send its state and eventually fail.
I started with the easy stuff - resetting the components, checking all connections, no dice. I assumed I must have messed something up on the outdoor circuit and some solders were shorted or something.
I spent hours taking it apart and back together again. Still nothing.
I tried reprogramming my gateway node to make sure I had the w5100.h fixes. In doing so, I somehow bricked nearly all of my Unos and burned a couple of days trying to bring them back to life to no avail. I still have no idea what I did wrong there...
I finally got an Uno to take the updated code, and it STILL wasn't working reliably.
At the end of my rope, I started writing more complicated code to try to work around the issue so that, even if it got delayed, the message WOULD be sent. Not ideal, but I didn't think I had anything else I could debug... until I looked at the lights on my gateway node.
I noticed that the Tx light was on constantly. I looked at my openhab code - I was having it send WAY more southbound commands than I needed it to. I didn't thinks this should matter, though, since the ethernet shield should be full duplex. Once I removed all southbound sends, the gate node worked perfectly. I felt like an idiot. I was congesting the network.
I'm now in the process of slowly adding back nodes and checking the send status to make sure I'm not causing too much traffic.
I'm surprised, actually, since the full duplex indicator is on on the ethernet shield, so it should be able to send both ways just fine. At some point, I'll debug through the gateway node more now that I know what I'm looking for.
ragoth - every time I sat down to work on this project, this is what I was working on. I get very little time to work on this stuff, so this literally took weeks to get through. Now that I've figured this out, I'll have more time to get to your questions. I'm sorry about the delays.