Arduino Remote Home #8
I’m such an dummy! A few posts ago I said my number of posts was off by one. Well that was true but I didn’t realize that comments count as posts. I’m learning.
While waiting for it to warm up so I could show you the garage control box, I ran across a very peculiar problem. I’m blogging today because I believe I have some resolve for it.
So let me describe the problem. In short, my Arduino Ethernet Shield would randomly stop sending the requested page. That is to say, that either when refreshing or connecting to the web server, I wouldn’t receive anything, just a blank page. In order to get it working again I had to go to the Arduino and press the reset button. Then randomly it would happen again. After Googling this issue, the information out there didn’t sit well with me. The general consensus, as I understood, was basically, no one knows why this happens, so to bad. I’m generally not one who settles for “Oh well”. The other common response was “ It’s your code”. Well I hadn’t made any changes to the code that worked for months, so how could it be my code? In fact to the best of my memory the code worked for three months. That is just about the right amount of time for the millis rollover to take place. I thought I was on to something, so I decided to wright down on my calendar every time I had to do a reset. A pattern quickly emerged. Seams I had to reset it about every 7 days. Apparently not the millis timer. Then I had to reset two days in a row. What the heck is going on?
As hard as it was, I was forced to admit it may be my code. As you know I have boasted that “my code may not be clean or elegant, but it works.” So before I started dissecting it, I thought I’d take a long and hard look at when and what changes were made. For some time I was incrementally adding different rooms of the house to the code. Then a few days, a week would go by and I would add some more. Unwittingly, by the nature of things, “resetting” each time I uploaded the new, long version of the same basic code. Then it hit me. Not sure exactly when I added/modified, the code to include the “Admin” page. It sure felt like months. But it was the most recent large change that was effectively different than just extending the previous version. This addition was to give me more choices of how the exterior plugs would be controlled. Wether they would be set to only work by the wall switches or would they be controlled automatically with either the photo cell, the Wemo or in conjuntion with other outlets. Its a good thing I had kept all the previous versions of the code both on the SD card, the HTML files, and in the Arduino sketchbook. So I reverted back to the version just before the admin change, a week ago, and so far so good, no manual resets. If it stays online for a month or so I’ll have to face the fact that there is a really disruptive bug in that version. But until such a time, I’ll put tearing into that code on the back burner. Because if it does go offline then something else is going on. In the meantime, it would be nice to hear if any of you have experienced similar issues with the Arduino web server, and what if anything you were able to do to correct it.
While I was dealing with the server issue I studied up a bit on making videos in hopes of delivering better content for you. I feel the need to say, that although people take lots of time and effort to make fantastic intro and ending segments, they’re just not for me. I’d rather use your viewing time for something more informative. I value my time and yours. So my pledge is to never do that.
In closing I would like to say we had an awful, late, April Fool’s joke played on us, snow and cold. Now that the weather has finally broke I can get back to where I left off on the Remote Home project, the garage control box. An explaination of all those goodies, along with a comprehensive video should be posted in the next day or two.
Thanks for hanging in there with me. I didn’t forget you all, just side tracked.
As always, I’m glad to answer any questions.
I like this project you have going on! I'm scrolling through your blog and I see that it's been a while since you posted so I'm glad you're back! I followed you. I do electronics too (obviously). Perhaps we can swap posts and votes and such. I look forward to the rest of this automation series and whatever other projects you bring to Steemit. Let's do thing with microchips! Yes!
So glad you reached out. I must say I’m more of a hardware guy, than a programer. But yes I would like to swap votes and what not. I just started following you. Can’t wait to learn something.
ha forgot to upvote your post! Yup, I do the hardware too. I have some fantastic tutorials planned for the arduino and also some perf board stuff. I look forward to your posts as well! Are you on discord?
Yes. However I don’t go there very often, TMI, If you know what I mean.
When I signed up I didn’t want to use electricswine, so I decided on
“Master of the Obvious”. Maybe I should spend some time figuring out how to optimize using it.
It's where everyone is. :)
Join our Discord Channel to connect with us and nominate your own or somebody else's posts in our review channel.
Help us to reward you for making it ! Join our voting trail or delegate steem power to the community account.
Your post is also presented on the community website www.steemmakers.com where you can find other selected content.
If you like our work, please consider upvoting this comment to support the growth of our community. Thank you.