Arduino Remote Home #14
Some time ago I said I was having trouble with my web-server and I was going to dig deep into the code for answers. Well I did. But before I blabber on about that, I would like to brief you in on some of my Steemit activities.
If you’ve been following you know I’ve said from the beginning that I intended to blog about my home-automation project, in the hope that someone may find something useful. Since that time I have posted things that aren’t even remotely related. So I subjected you to things that I’m sure didn’t interest you. To stay on track I’ve purchased a second Steem account, @dydosoar. There I’ll be inter-acting with the community at large. If you’re interested, I’ll be posting how I did it over there. Please understand I have never been a social media type guy. Oh sure I’ve dabbled a bit, mostly just reading up on stuff, trying to make sure my kids didn’t get bullied, but never really jump in and posted or commented a bunch, like I have here. So I apologize for allowing myself to stray. With that said, I wish to be as forthright as I can, and maintain, the high level of integrity that I was raised with. For that reason I will no longer waste your limited time on things outside the scope of Arduino, Home-automation, DIY or anything else not tech related. I felt compelled to be open and honest. Please forgive my digression.
As for my server issues I’m pretty sure I accidentally discovered the cause of my problem. I believe I mentioned that the server had been working for quite some time, then randomly stopped responding. So, as lead to believe, I triple checked the code. Line by line, I checked each and every character until I was quite sure, that the code was not the issue. I did find that I had assigned two different output actions to a single input action, but that wouldn’t crash the server. It would only give me the first output and would never reach the part to execute the second output. It would have really screwed with my mind, but never would it stop the server from responding.
So my discovery happened late last night when I was reviewing the data being output on the Arduino serial monitor. I opened it to check the AJAX request, response text being sent back to the browser. It should have been a long text string. But because I downloaded an earlier version of my code, one where I used the serial println() to print the actual headers of the HTTP requests being made, it showed several requests I wasn’t expecting. This fortunate accident revealed, requests for a favicon jpg, or some derivative of that. I guess this is what is called a spider or a port scanner attack. Either way what I believe is happening is that these, seemingly random connections, are not releasing the server and is locking it up. The Arduino ethernet client/server information I have read, states that the ethernet shield can only have four concurrent connections. This, if it is what is actually happening, explains everything. I’m so happy. After hours spent searching for answers, I finally stumble across a possible cause!
My father always says “The harder the problem, the simpler the solution “. Not that fixing it will be simple for me. At this point I could set up a date logger to the SD card but I really don’t care who, or when these requests/connections are made. I need to, if not prevent them, at least end the connection as quickly as possible. Sounding like I need to setup some security. Maybe a log in option. Not entirely sure what that will entail but once I figure it out I’ll be sure and fill you in. If anyone has thoughts on this, I certainly would appreciate a comment on it.
As for any progress on the project, nothing to update you on other than I’m taking two weeks off in July to work on it. I’ll be getting down and dirty installing the second floor control box.
Also hoping to tidy up some other bits as well. Like this mess.
All those wires will connect laundry room lights, master bedroom lights and fan, first floor bathroom lights and first hallway lights.
Until next time,
Congratulations @electricswine! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of upvotes
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - Brazil vs Belgium
Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes
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.
Congratulations @electricswine! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of posts published
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
To support your work, I also upvoted your post!
Do not miss the last post from @steemitboard!
Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes