Back at this post I briefly described a seeming failure with the power monitor. I wasn't able to get enough information at the time to truly isolate the cause so I just made a repair that might help to see if the problem would go away. Today, it happened again. This time I gathered some data and think I have it figured out.
The power monitor is not failing, the House Controller isn't decoding the XBee data fast enough to handle the asynchronous data coming in. OK, that's not correct either. What appears to be happening is that the data isn't getting off the XBee board quickly enough and is getting messed up. When I set up an XBee and monitored the traffic at 9600 baud, I got data from the various devices, but they were intermixed with each other such that no single line of data was correct. What was happening was that the House Clock and the Power Monitor were sending so close to each other they were messing each other up. I changed the baud rate on the XBee I was using to 57600 and each line was distinct and there were no problems any more.
Best I can tell from the XBee documentation, this isn't supposed to happen. Collisions can happen, but they would get retried. Don't have a clue what is actually going on. However, setting the House Controller baud rate for the XBee port to 57600 eliminated the problem. Of course, I had to reprogram the XBee for 57600 baud as well. Not too hard a change, but annoying since it (apparently) shouldn't have happened in the first place. I also noticed that the firmware version on my XBee was out of date and there have been three updates. I went through the release notes on the updates and there were a ton of changes to store-forward and comm port communications. Any of these kinds of things could be causing the problem I'm seeing. So, I now have a fully updated XBee module in the Controller.
So, as usual, I have changed a number of things and don't really know if the problem is fixed. I'll just have to wait a couple of weeks to see if it comes back. I didn't update all the XBees I have running, just the one in the controller since that is the collection point and the device that was having trouble. As I update the other devices over time, I'll update their firmware as well.
Update, it failed again. Details here.
Post a Comment