It’s no secret that I rather enjoy connecting things to the Internet for fun and profit. One of the tricks I’ve learned along the way is to spin up simple APIs that can be used when prototyping a project. It’s easy to do, and simple to understand so I’m happy to share what has worked for me, using Web2Py as the example (with guest appearances from ESP8266 and NodeMCU).
Barring the times I’m just being silly, there are two reasons I might do this. Most commonly I’ll need to collect data from a device, typically to be stored for later analysis but occasionally to trigger some action on a server in the cloud. Less commonly, I’ll need a device to change its behavior based on instructions received via the Internet.
In the former case, my first option has always been to use IoT frameworks like Thingsboard or Ubidots to receive and display data. They have the advantage of being easy to use, and have rich features. They can even react to data and send instruction back to devices. In the latter case, I usually find myself using an application programming interface (API) – some service open on the Internet that my device can easily request data from, for example the weather, blockchain transactions, or new email notifications.
Occasionally, I end up with a type of data that requires processing or is not well structured for storage on these services, or else I need a device to request data that is private or that no one is presently offering. Most commonly, I need to change some parameter in a few connected devices without the trouble of finding them, opening all the cases, and reprogramming them all.
At these times it’s useful to be able to build simple, short-lived services that fill in these gaps during prototyping. Far from being a secure or consumer-ready product, we just need something we can try out to see if an idea is worth developing further. There are many valid ways to do this, but my first choice is Web2Py, a relatively easy to use open-source framework for developing web applications in Python. It supports both Python 2.7 and 3.0, although we’ll be using Python 3 today.
We love seeing hardware and software from bygone eras getting a new lease on life through modern hacks, as longtime readers can surely attest to. Why leave this stuff to rot in a closet somewhere when it can be pushed into service today? Granted it might not always be the most efficient way to accomplish a task in the 21st century, but at least you’ll net some precious Internet Points for originality.
As a perfect example, take a look at this project which lets you read Slack messages through a Super Nintendo game. If your first thought was that such a thing would involve an unreasonable amount of effort and hoop jumping…then you would be correct. [Bertrand Fan] really had to think outside the box to make this one happen, and even admits a bit of imagination is required on the part of the end-user to use it. But it’s undeniably an original approach, so we hereby bestow the customary Internet Points unto him.
So how does this work, and where do the satellites come in? The key is in a fairly obscure Japanese SNES peripheral called the Satellaview, one of Nintendo’s early attempts at creating an online content delivery system for their consoles. Games designed with Satellaview support would be able to pull down new content from regular satellite broadcasts, not too bad for 1995. This means that if you have the hardware, and happen to own a satellite, you can push your own content into an unmodified SNES. No problem, right?
Alright, [Bertrand] didn’t really use a Satellaview modem plugged into an actual SNES. Plus we’re fairly sure he doesn’t have his own satellite network to broadcast Slack messages with anyway. But it turns out some SNES emulators have support for a virtual Satellaview modem, and there’s even software out there that will let you create new content “downloads” for the system’s included game: BS-X: The Story of The Town Whose Name Was Stolen. All he had to do was connect the dots.
[Bertrand] started by stripping the user interface out of SatellaWave, an open source tool for creating Satellaview content, so that it only need to be provided with an XML file of the content to be “downloaded” by the virtual satellite modem. Using the Slack API, he then came up with way to pull the last 10 messages from a server and push them into his modified version of SatellaWave. Each time somebody posts a new message his software kicks in to produce a new satellite download which automatically gets picked up by the SNES emulator and pops up in the game.
It’s often said that necessity of the mother of invention, but as a large portion of the projects we cover here at Hackaday can attest, curiosity has to at least be its step-mother. Not every project starts with a need, sometimes it’s just about understanding how something works. That desire we’ve all felt from time to time, when we’ve looked at some obscure piece of hardware or technology and decided that the world would be a slightly better place if we cracked it open and looked at what spilled out.
That’s precisely the feeling Eric O’Callaghan had when he looked out the window of his Philadelphia apartment a few years back and saw something unusual. Seemingly overnight, they had built an automated Indego bike sharing station right across the street. Seeing the row of light blue bicycles sitting in their electronic docks, he wondered how the system worked, and what kind of data they might be collecting. He didn’t need to rent a bike, he hadn’t even ridden one in years, but he suddenly had a strong urge to go across the street and learn as much as he could about this system.
He recently presented those findings during FOSSCON 2018 at the International House in Philadelphia, in the hopes that others might be interested in getting involved. Currently Eric is one of the only people who’s investigating the public data Indego offers, and as his personal MySQL database has now surpassed 15 million rows of data, he’s hoping to get some developers with big data experience into the fray. His approach to making this data useful is an interesting one which I’ll dive into after the break.
There’s little doubt about the charms of a split-flap display. Watching a display build up a clear, legible message by flipping cards can be mesmerizing, whether on a retro clock radio from the 70s or as part of a big arrival and departure display at an airport or train station. But a weather station with a split-flap display? That’s something you don’t see often.
We usually see projects using split-flap units harvested from some kind of commercial display, but [gabbapeople] decided to go custom and build these displays from the ground up. The frame and mechanicals for each display are made from laser-cut acrylic, as are the flip-card halves. Each cell can display a full alphanumeric character set on 36 cards, with each display driven by its own stepper. An Arduino fetches current conditions from a weather API and translates the description of the weather into a four-character code. The codes shown in the video below seem a little cryptic, but the abbreviation list posted with the project makes things a bit clearer. Bonus points if you can figure out what “HMOO” is without looking at the list.
We like the look and feel of this, but we wonder if split-flap icons might be a neat way to display weather too. It seems like it would be easy enough to do with [gabbapeople]’s detailed instructions. Or you could always look at one of the many other custom split-flap displays we’ve featured for more inspiration.
With Google’s near-monopoly on the internet, it can be difficult to get around in cyberspace without encountering at least some aspect of this monolithic, data-gathering giant. It usually takes a concerted effort, but it is technically possible to do. While [Mat] is still using some Google products, he has at least figured out a way to get Google Home to work with location data without actually sharing that data with Google, which is a step in the right direction.
[Mat]’s goal was to use Google’s location sharing features through Google Home, but without the creepiness factor of Google knowing everything about his life, and also without the hassle of having to use Google Maps. He’s using a few things to pull this off, including a NodeRED server running on a Raspberry Pi Zero, a free account from If This Then That (IFTTT), Tasker with AutoRemote plugin, and the Google Maps API key. With all of that put together, and some configuration of IFTTT he can ask his Google assistant (or Google Home) for location data, all without sharing that data with Google.
This project is a great implementation of Google’s tools and a powerful use of IFTTT. And, as a bonus, it gets around some of the creepiness factor that Google tends to incorporate in their quest to know all the data.
Blockchains claim to be public, distributed, effectively immutable ledgers. Unfortunately, they also tend to get a little bit huge – presently the Bitcoin blockchain is 194GB and Ethereum weighs in at 444GB. That poses quite an inconvenience for me, as I was looking at making some fun ‘Ethereum blockchain aware’ gadgets and that’s several orders of magnitude too much data to deal with on a microcontroller, not to mention the bandwidth cost if using 3G.
Having imagined a thin device that I could integrate into my mobile phone cover (or perhaps… a wallet?) dealing with the whole blockchain was clearly not a possibility. I could use a VPS or router to efficiently download the necessary data and respond to queries, but even that seemed like a lot of overhead, so I investigated available APIs.
As it turns out, several blockchain explorers offer APIs that do what I want. My efforts get an ESP8266 involved with the blockchain began with two of the available APIs: Ethplorer and Etherscan.
For most people, a Post-It note or dry-erase board suffices to ensure that household consumables are replenished when they’re used up. But hackers aren’t like most people, so this surplus barcode scanner turned kitchen inventory manager comes as little surprise. After all, if something is worth doing, it’s worth overdoing.
[Brian Carrigan]’s project began with a chance discovery of an old barcode scanner in his local scrap store. Questions as to why we can never find bargains like a $500 scanner for six bucks aside, [Brian] took the scanner home for a bit of reverse engineering. He knew it used RS-232 but it had been unceremoniously ripped from its connectors, so identifying pins took some detective work. With power and data worked out and the scanner talking to a Raspberry Pi, [Brian] set about integrating it into Wunderlist, a cloud-based list management app. Now when someone eats the last Twinkie, a quick scan of the package looks up the product name via an API call to the UPC database and posts it to Wunderlist. And we’ll bet the red laser beams bouncing around the kitchen make a great nightlight too.