Hacker News new | past | comments | ask | show | jobs | submit login

A friend of mine has in their house a full fire alarm system, with pullboxes and flashers and everything. (No good reason for this, he thought it was cool and likes running wires.) He wanted to add to this system a way of sending emails when the fire alarm went off; the standard addons for his system to do this weren't readily available on eBay so he asked me if I could build something. "Easy," I said, "I'll just rig up an Arduino Ethernet[1] and grab an SMTP library."

This turned out to be a mistake. Problems encountered included:

- I don't know C++ all that well (for example, I was returning pointers to memory allocated on the stack). This is mainly an issue because you can't just attach GDB to a microcontroller, so debugging becomes guess-and-check.

- With the Ethernet and SMTP libraries initialized, I had barely enough RAM for the rest of the program, and wound up having to do some contortions to get everything to fit.

- Whenever there was a minor network hiccup the entire thing would freeze for twenty seconds. I had to rework the UI to disable itself before network operations, so it wouldn't freeze in the middle of a beep and screech loudly for the duration.

- GMail doesn't support non-SSL SMTP connections, and the Arduino isn't powerful enough to handle SSL. We had to install an SMTP service on a local server to act as a gateway.

After all this effort I finally got the whole thing to work, and installed it in his house. A year later something stopped working (I don't remember what, I think it was something about the SMTP server) and he asked me to fix it. I decided that it would be easier to redo the whole thing instead of trying to patch this new issue. I built an addon board for a Pi that had the same connector as the original Arduino shield I had built so it was a drop-in replacement (they even both run off the same 5v USB power supply!) The effort required to develop the Pi-based replacement was about a quarter of the original. This included getting rid of the separate SMTP server and adding some extra features like a web UI. To top it all off, the original Arduino Ethernet cost $65, whereas the Raspberry Pi that replaced it cost only $35.

On the other hand, the ESP8266 might start to tip this balance back in the other direction, especially with NodeMCU which provides a Lua environment.

[1]: https://www.arduino.cc/en/Main/ArduinoBoardEthernet




Too late now, but I suspect the simplest thing to have done would have been to have the arduino hit a remote URL to trigger the email-delivery, rather than doing it entirely standalone.


Actually, now that you mention it I think that's what we did in the end: I wound up building a "private cloud" (really more of a pileus than a full cloud) just for this one thing, whereas the Pi let me put it all in one self-contained box that I haven't had to touch since.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: