5 ms·
I love seeing stuff like this but I have to wonder - why aren't esp8266/Arduino/etc considered more often for these applications? I understand the Raspberry Pi
by kkielhofner 10y ago
I love seeing stuff like this but I have to wonder - why aren't esp8266/Arduino/etc considered more often for these applications? I understand the Raspberry Pi seems obvious (and often is) but these kinds of solutions seem much less awesome when you realize the latest OpenSSL (or whatever) update applies to the full blown Linux installation controlling your blinds. Sure Arduino and others almost certainly have plenty of issues with their software stack but the attack surface is substantially smaller and lower cost and reduced power usage are benefits as well.
- rickyc091 10y agoI'd imagine it comes down to accessibility. Many people probably have spare Raspberry Pis lying around as opposed to an Arduino with a wifi shield. Arduino would end up costing more and the processing capabilities isn't as powerful as the Pi. Not that the processing is important, but what if you wanted to tack on more functionality like adding a web cam, etc. The other part probably has to do with language. Being that it's running on linux, you can program with a variety of languages versus just arduino language.
- kkielhofner 10y agoThis is very true - at this point what self-respecting hacker doesn't have a Pi or two lying around to be re-purposed? That said one of my favorite side projects last year was eliminating all of the Pis I had doing stuff like this. I used a NodeMCU ($9 Amazon Prime) and the Arduino SDK to replace my Raspberry Pi garage door opener (integrated with Home Assistant). Complete with magnetic door switch and no prior experience, I'd replaced the Pi after about two hours of hacking. Not worrying about `apt-get upgrade` is nice but the real bonus was noticing how much more robust the esp8266 wifi was compared to the Pi. In my garage door use case the difference was night and day. Between this example and others around the house, I've noticed the Arduino ecosystem and community is actually much better for this kind of stuff. Once you really dig into things like GPIO, PWM, etc on the Pi it's clear they're second class citizens to community efforts surrounding video/HDMI (as one example). It's actually pretty incredible the same $35 board can control a stepper motor for your blinds or decode H.264 at 1080p while running Kodi in your living room!
- stevekemp 10y agoMy goal for 2017 is to start doing this kind of random hacking - I've slowly completed most of the guides in the Arduino starter-kit, and I've a bunch of esp8266 (D1 minis) on-order from China. So far the process has been very refreshing, and as a long-time sysadmin working with these parts is a lot less frustrating than having to deal with distros on a pi.
- sujay_m 10y agoTrue. Like rickyc091 pointed out, pis lying around and programming language would be a major plus for choosing it. An alternative for this problem would be https://www.kickstarter.com/projects/onion/omega2-5-iot-computer-with-wi-fi-powered-by-linux https://www.kickstarter.com/projects/onion/omega2-5-iot-comp... Onion Omega 2 is more awesomer than esp8266( atleast according to the kickstarter video ).. $5 and runs linux out of the box, has wifi module built into it and has mods if we need them.. like pi zero.. I'll be getting mine in a week.. worth checking out..
- wolfgang42 10y agoA 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 https://www.arduino.cc/en/Main/ArduinoBoardEthernet
- stevekemp 10y agoToo 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.
- manyxcxi 10y agoThe biggest thing with Arduinos specifically is that the cheap ones don't really have the capacity to negotiate proper web services. They can't handle HTTPS, you are not going to be deserializing JSON in RAM, etc. By the time you pay for something like a Yun, you've spent more than a Pi. Also (prior to esp* WiFi breakouts) WiFi integration used up most of your I/O and cost 30+ dollars. I've been playing around with a couple of CHIPs[0] that are cheaper than most Arduinos and come with Bluetooth, WiFi and USB built in, a bunch of memory, and run ARM Debian. They use NAND for storage so you don't need a SD card for the OS, and the forums are pretty active for a pretty recent hardware platform. Other than still trying to get some SPI stuff integrated I've had no problem doing stuff I wouldn't want to use a Pi on and could not really use an Arduino on. I believe they're of better specs than anything but the latest Pi, maybe that as well. For $9, I've been very happy with it, but I can't compare it to the ESP as I have a few laying around and haven't used them yet. [0] https://getchip.com https://getchip.com
- bschwindHN 10y agoThe ESP, especially the esp32, can easily do HTTPS, WiFi, Bluetooth, JSON deserialization, and more with room to spare. All for less than $10 (less than $3 if you use an esp8266)