• 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…

  • Adafruit IO Update: Quick Help

    Need help getting started with Adafruit IO? Not sure what feeds are? Need a place to ask questions, but there are too many links on the internet? The Adafruit IO Team has added a new help menu directly into Adafruit IO with mini-guides designed to help you through any questions you could have about Adafruit IO, such as… How do I get started with Python? Follow the new Getting Started with Adafruit IO Python mini-guide… or “What is metadata, and how does it relate to my Adafruit IO Project?” Still have more questions? Having an issue with your code? We’ve also added links to our Discord Chatroom and the Adafruit IO Forum to the Quick Help menu - no googling necessary!

    To check it out, log into Adafruit IO (if you don’t have an account, create one - it’s free!) and click the Get Help button on the sidebar.

    Want to see anything else added to the Quick Help box? Let us know in the comments below!

  • adafruit.io – ” super easy, just works, no fuss, super fast to get a device online…” @hackaday @adafruit #iot #cloud

    Adafruit 2019 1369

    Hackaday posted up about a beta for a new cloud service, which at this time requires Arduino-only hardware: MKR1000 or MKR WiFi 1010. There’s a “passionate” debate in the comments about this direction, & the MKR1000 is “non-commercial” etc… more choices, the better, it’s a great time to make things and do IoT projects… Anyway, we saw a really nice mini-review of our adafruit.io service that can be used with any device…

    “I gave adafruit IO a try recently – super easy, just works, no fuss, super fast to get a device online, compatible with generic devices, open standards and protocols such as MQTT, working example code – nothing locked-in or proprietary.” - Luke.

    That’s why we made adafruit.io - We play nice with any device. The internet of things for everyone. The easiest way to stream, log, and interact with your data. We have, and will always have, a free version which can be used by any hardware, and we have a plus version for folks who want to run a biz and more on it, also - any hardware. In the last 30 days there are 12,459 makers, hackers, artists, and engineers, making something on adafruit.io - try it out today!

    Adafruit 2019 1367

    Tons of guides to get you started with the Internet of Things - learn.adafruit.com

    Adafruit 2019 1368 Adafruit IO ToS: No spam, no mining your personal data, easy to read and understand terms of service/use, etc.

    2016-09-12-Settings

    Want to export the Data from your account ASAP? It’s your data.

    940 Lrg-1 An Internet of Things Bill of Rights - Adafruit.

    Adafruit 2019 1370

    Adafruit’s blog of all the projects, resources, and community projects, tagged with #adafruitio & the adafruit.io changelog’ blog’

    Adafruit 10000 Discord Hero

    Join us on Discord for the adafruit.io channel!


    Built from the ground up to be easy to use. We do the hard work so you can focus on the fun stuff. Powerful API The same API that drives our user interface is available to you. We provide documentation so you can build a library in your favorite language to talk to IO, or use one of ours. It’s Your Data The data you store with IO is yours to manage and control. You can download it all anytime and we will never sell or give it away to another company. We feel strongly enough about this that we put it in our IoT Bill of Rights. Beautiful Dashboards Data won’t help you make better decisions or understand the world you’re living in unless you can see it. Charts, graphs, gauges, logging, and more are availble from anywhere in our carefully designed web-based dashboards. Private & Secure We won’t share your account information with anyone without your permission and everything you store on Adafruit IO is private by default, whether you’re a paying customer or not. Documentation We’ve written a lot more about Adafruit IO than just our web API. Teaching is at the heart of Adafruit, and our Learning Systemhas all the projects and guides you need to get started or to level up! Triggers Keep yourself and your systems up to date by automatically responding to changes. Triggers monitor your data to notify you when your temperature sensor gets too hot or when your DIY security system goes offline. Hardware We have been building Internet of Things devices and kits since long before Adafruit IO ever existed. Start your project with the right equipment or pick up the one last thing you need to finish. We’ve got hardware for all types of makers. Amazing Community We Love Makers! Join us on the forums, on our Discord chat server, stop by the weekly Show and Tell live stream to share your project, and subscribe to our YouTube channel to see what we’re up to.