• Adafruit IoT Monthly - April 2019

    Welcome to the Adafruit IoT Monthly for the month of April. This newsletter (in blog form) highlights projects and updates about Adafruit IO – our Internet-of-Things Service for makers, news, stories, and advances in the world of IoT.

    Adafruit IO News: Features, Stats, and Updates

    IO News highlights what’s new on Adafruit IO, our internet-of-things service for makers.

    IO Stats

    Adafruit.io has over 15,760+ active users in the last 30 days and over 500+ Adafruit IO Plus subscribers. Sign up for Adafruit IO (for free!) by clicking this link. Ready to upgrade? Click here to read more about Adafruit IO+, our subscription-based service. We don’t have investors and we’re not going to sell your data. When you sign up for Adafruit IO+ you’re supporting the same Adafruit Industries whose hardware and software you already know and love. You help make sure we’re not going anywhere by letting us know we’re on the right track.

    Sneak Peek: New Adafruit IO API Docs!

    https://www.youtube.com/watch?v=DZOPQXRH9RI&feature=youtu.be

    While our current API documentation works, we’ve been brainstorming ideas to make it better and easier-to-use. Here’s a small list of the features we’re planning on adding: * Easy to Contribute to: While our pre-existing API is public on GitHub, it is not the easiest to contribute to (the v2 HTTP API sits at just over 4000 lines of JSON). The new documentation will be easier to contribute to - it’s all in everyone’s favorite formatting syntax - Markdown! * You can access Adafruit IO’s API over either MQTT or HTTP - we’re adding dedicated documentation pages for both the MQTT and the HTTP APIs. * Writing some code and not sure how to get the last known data value of your feed? Don’t want to read through lines of example code - just need the code? We’ll be including code-snippets for CuRL, Arduino CPP, Python, CircuitPython, and Ruby.

    Read more…

    Adafruit IO’s Zapier Integration is now in Early Access!

    The Adafruit IO Zapier integration is now a public Zapier integration (currently in early-access)! While we’ve made a lot of Adafruit IO projects which use Zapier, people would need to enter a special “invite” URL as we did not have enough people actively using the service and Adafruit IO together. As of today, the “invite” URL is replaced by an official Zapier integrations URL and landing page - https://zapier.com/apps/adafruit-io/integrations.

    Read more…

    All The Internet of Things Episode 4, Adafruit IO

    https://www.youtube.com/watch?v=yRqazWCtSgI Want to learn more about Adafruit IO? We’ve released an episode of All The Internet of Things episode featuring Adafruit IO.

    Hello, and welcome to episode 4 of Adafruit and Digi-Key’s “All the Internet of Things”! A six-part series that covers everything you need to know about IoT. In the previous episode, we discussed services –services are what you use to route events to and from your IoT devices, coordinate real-time communication between multiple devices, and record, process and visualize the data that your “things” are producing. We also talked about some large cloud services such as Amazon AWS IoT, Google Cloud IoT, and Microsoft Azure IoT Suite. You might find that although these services provide robust security and sophisticated deployment tools, getting started with using their comprehensive technology is intimidating. If only there were some IoT service that proved easy to understand and implement…maybe with high quality documentation with examples, learning guides, and community support…and, maybe just maybe, an IoT service that provided opens source solutions with a low to no-cost point of entry… Well, on today’s episode, we’re happy to do a formal introduction to just that – our very own Adafruit IO!

    We have an interactive learn guide here with accompanying clips and text from the video!

    Powered by Adafruit IO: Projects from the Community

    Each month, we select our favorite projects from around the internet which use Adafruit IO. Here are some of our favorites:

    Monitor Your Garage Door with #FeatherHuzzah #AdafruitIO and a Pi Zero W

    There are lots of garage door monitor projects on hackster.io and other Maker sites. Many are single-purpose solutions. I wanted a project that would be extensible, to build on the skills learned for future IOT projects. In fact, I already had a project in mind, a general notification platform called the Kinetic Courier. That project could include a garage door monitor as an example notification trigger. Also, I wanted a platform that was well-documented and well-supported. Adafruit’s cloud service for Makers, adafruit.io, fit the requirements. In addition, I was motivated by personal need. My nice neighbors had, once too often, called late at night to remind me the garage door was open 😉

    Read more…

    IOT Office Door Sign using PyPortal

    Mike Renfro designed a custom office door sign using the PyPortal to display his current status and the status of his university’s high-performance-computing clusters

    Blood Glucose on a PyPortal

    Scott Hanselman is displaying his blood glucose levels in real-time from a nightscout software on a PyPortal

    Google Assistant Based Home Appliance Control using ESP32 and Adafruit IO

    If you have a home appliance which you want control over the internet and don’t want to shell out the cost of a smart-plug – this tutorial may be the right choice. Using an ESP32 module, a relay module and Adafruit IO – you can control any AC home appliance over the internet. This tutorial walks you through the process of wiring the ESP32, setting up Adafruit IO, and creating a dashboard. But, instead of flipping a digital switch – what about controlling the lights using your voice? The guide also walks through the process of connecting to Google Assistant using IFTTT (a supported Adafruit IO Integration) and sending voice commands to the light switch.

    Read more…

    Adafruit IO-Powered PowerPoint Slide Controller

    James Bulpin “was looking for a really simple solution to bounce messages via the cloud without all the complexity of a full IoT hub solution” and discovered Adafruit IO. He quickly built a mobile PowerPoint slide controller. If you’re not counting his phone’s web browser displaying an Adafruit IO dashboard, it uses no extra electronics. Instead, he’s running a .NET MQTT client on the same computer to send events to Microsoft Powerpoint. To send data to his computer, he built a drag-and-drop dashboard on Adafruit IO to interact with MQTT feeds.

    Read more…

    Meeting forecast? Glance at this CircuitPython-Powered PyPortal!

    Ronhiltz got his PyPortal up and running – but what to display on the 3.2″ 320 x 240 color TFT internet-connected display? Ron converted a picture of his office into a BMP, created a feed on Adafruit IO, and is using a PyPortal to show how their office is meeting forecast. Great work! With the PyPortal and the CircuitPython Adafruit IO library – it’s never been easier or quicker to create an Internet-connected project!

    Read more…

    Sending Data to the Cloud – ESP8266 Arduino Tutorial, Part 3

    Alexander has been writing a large ESP8266 tutorial series on HackADay.io about the versatile ESP8266. In the third installation of his guide, he walks through the process of sending data from sensors connected to an ESP to an REST API – Adafruit IO.

    Read more… Are you working on a project which uses Adafruit IO and want to show it off? Add the #adafruitio hashtag to your tweets, join our Discord channel (http://adafru.it/discord, #help-with-adafruit-io), or join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

    New Adafruit Learning System Guides

    Have you heard about making, cosplay and electronics, but don’t know where to start? Visit the Adafruit Learning System for over 1500 tutorials for electronics projects, ideas and techniques! We’ve selected a few of our favorite internet-of-things-based guides from the learning system:

    IoT Motion and Temperature Logger with the Analog Devices ADXL343 + ADT7410 Sensor FeatherWing and Adafruit IO

    If you’re looking to for a way to monitor and send precise motion and temperature data to the cloud, check out this new guide. Analog Devices, known for their reliable and well-documented sensor chips – has a high precision and high resolution temperature sensor – the ADT710 – and a triple-axis accelerometer – the ADT7410. We made a FeatherWing to make these sensors easier to use together. Even better? We can easily bring the FeatherWing online using a Feather ESP8266 HUZZAH and Adafruit IO.

    Read more…

    PyPortal Email Display with Zapier and Adafruit IO

    Want to write a message to your PyPortal’s display? Perhaps you’d like to easily add and change text on your PyPortal’s display to use it as a smart sticky-note, or have people email it directly! Using Zapier, you will set up a Zap to receive email via a custom Zapier email address at zapiermail.com and forward it to an Adafruit IO Feed. With some CircuitPython Code, your PyPortal will be obtaining the current value of an Adafruit IO Feed and updating the display with the email sender address and the subject line.

    Read more…

    NEW GUIDE: PyPortal Bitcoin Display

    Keep up to date on the current value of Bitcoin or your total wallet value with the PyPortal Bitcoin Display! The simple version of this project will display the current value of Bitcoin in one of three currencies — USD, Euros, or GBP. The slightly more complex version uses a text transform to present the total value of your Bitcoin wallet based upon the current Bitcoin value and number of coins owned. All made in CircuitPython running on the PyPortal accessing the Coindesk API wirelessly!

    Read more… Join us in the forum or on Discord in the help-with-adafruit-io channel with questions, comments, or suggestions. We’d love to hear from you!

  • Adafruit IO Sneak Peek: New Adafruit IO API Docs! #API #HTTP #MQTT @adafruitio

    [![youtube still](/blog/images/2019-03-28-yt-still.png)](https://www.youtube.com/watch?v=DZOPQXRH9RI&feature=youtu.be)

    The Adafruit IO team is in the middle of building out a shiny new API documentation website. While updating a website for documentation doesn’t sound exciting - we have a feeling you’ll like what’s coming soon. While our current API documentation is functional, we’ve been brainstorming ideas to make it better and easier-to-use.

    Here’s a small list of the features we’re planning on adding: * Easy to Contribute to: While our pre-existing API is public on GitHub, it is not the easiest to contribute to (the v2 HTTP API sits at just over 4000 lines of JSON). The new documentation will be easier to contribute to - it’s all in everyone’s favorite formatting syntax - Markdown! * You can access Adafruit IO’s API over either MQTT or HTTP - we’re adding dedicated documentation pages for both the MQTT and the HTTP APIs. * Writing some code and not sure how to get the last known data value of your feed? Don’t want to read through lines of example code - just need the code? We’ll be including code-snippets for CuRL, Arduino CPP, Python, CircuitPython, and Ruby.

    Are you excited for the next version of the Adafruit IO API Documentation? Have features or suggestions to propose? Post up on the forum topic for this here or leave a comment below!

    Join us in the forum or on Discord in the adafruit-io channel with questions, comments, or suggestions. We’d love to hear from you!

  • Adafruit IO Update: New Line Chart and Gauge Rendering

    Hello Adafruit IO community!

    In order to reduce the amount of Javascript we send to your browser every time you visit Adafruit IO and in order to fix an annoying memory leak bug, we’ve replaced the rendering engines for the gauge and line charts you see on your Adafruit IO dashboards and feed pages. They’re low-level updates to the Adafruit IO website you all use. For the most part the changes should be invisible, but we wanted to at least mention it in case they take you by surprise.

    New gauge and line charts on an Adafruit IO dashboard

    The question you may have, then, is why fix what isn’t (obviously) broken? I’m glad you asked! We made this update for two big reasons and one small one.

    First, we’ve known for a loooong time that we have a big memory leak problem with line charts. If you’ve tried to keep a dashboard open with a line chart for more than a day, you might have noticed that you eventually came back to a frozen browser tab. If you’re unlucky, you might’ve found a crashed browser. :( Even after long hours of debugging in multiple browsers, tracing live code, and rewriting parts of the chart rendering pipeline, it’s still not clear where the problem was. It could’ve been the library we were using–an SVG based renderer–or code we wrote on top of it, but we were pushing some part of the system beyond what it could handle. By replacing the old SVG based system with a canvas based charting library we eliminate the type of memory leak we were encountering. The bonus with choosing a charting library with more options for chart types is that we’ll soon be able to introduce those to you on the dashboards. Look for that in the next few months.

    Second, our old gauges and line charts used a lot of code behind the scenes–the immensely powerful d3 library–to do just a little bit of work. We have intentionally kept our charts simple and clean, visually, but we included ~200 extra KB of uncompressed javascript code to do it. By replacing the gauge with a much smaller, hand built canvas-based plugin and line charts with a simpler library (even though it’s still powerful), we cut that code out of the bundle we have to ship to your browser. We’re sending 800KB+ of compressed/gziped, too much in our opinion, but we’re working on it :D

    Small changes that hopefully produce benefits long into the future.


    Let us know if our updates aren’t working for you or are otherwise affecting your quality of life. Join us in the forum or on Discord in the adafruit-io channel with questions, comments, or suggestions. We’d love to hear from you!

  • Adafruit IO New Feature: Interactive Dashboard Guide @adafruitio #IoT

    If you’ve logged into our internet of things service - Adafruit IO - recently, you may have noticed a new question mark icon on your dashboards.

    Click this button to launch an interactive dashboard guide.

    You’ll add a block

    Connect a feed

    Edit the block

    Make the dashboard look just right, and then save your work once everything looks the way you want it to To get started, click the blue question mark icon on an existing Adafruit IO dashboard.

    Don’t have an Adafruit IO account? You can link your Adafruit IO username - and signing up is free.

  • Adafruit IO Internals: Pagination

    Attempting to access the data points on your Adafruit IO feed and only receiving 1000 data points back? kevinljxljx on the Adafruit IO Forum was running into the same issue:

    I am trying to use the data from adafruit.io with my project, but no matter what I try, adafruit.io only gives 1000 data points to my javascript program. ( I am using XMLHttpRequest). I tried to set limit to 2000 but without luck. ( I have 1200 or so data points under my feed). Is the maximum data points I can get is 1000? or am I missing something?

    Adafruit IO’s API only returns 1000 data points at a time. To get the rest of the data (if your feed is over 1000 data points), you’ll need to “paginate” the data.

    What does this mean?

    When you perform a data query, the results are always sorted newest-to-oldest and include *x-pagination-** headers. For example:

    X-Pagination-Limit: 1000
    X-Pagination-Total: 84548
    X-Pagination-Start: 2019-02-11T22:52:18.103+0000
    X-Pagination-End: 2019-02-12T16:03:00.694+0000
    X-Pagination-Count: 1000
    

    Limit (X-Pagination-Limit) is either the requested limit or 1000, whichever is less; Total (X-Pagination-Total) is the total number of data points in the feed. Note, this value may be up to 5 minutes behind real time.

    Start (X-Pagination-Start) is the timestamp on the oldest value; End ( X-Pagination-End) is the timestamp on the newest value; and Count ( X-Pagination-Count) is the number of data points in the current request.

    Whenever Limit and Count are both 1000 and Total is more than 1000, that’s evidence that more data is available.

    You can get the next 1000 data points by using the X-Pagination-Start value OR the created_at value of the oldest data point in the API response as the end_time parameter in your next request to the data API.

    When visualized on a timeline, the concept of pagination looks like this: api-pagination.png

    Note that long running, frequently updated feeds could have more than a hundred “pages” of data. If you make requests without a delay in between, you could hit a rate limit. To avoid this, watch for 429 HTTP error responses and handle them in code by adding a 30 second timeout between requests.

    Regarding the data storage and feed history, storage size in this instance is the per-data point value size limit.

    With history on, meaning we preserve every data point, each data point value can be at most 1KB. With history off, meaning we only preserve the most recent data point, each value can be at most 100KB.

    Post originally written by AdamB on the Adafruit IO Forum, read the entire thread here…