Adafruit-io

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
rodrigob
Posts: 15
Joined: Sun Aug 30, 2015 7:41 am

Adafruit-io

Post by rodrigob » Sun Feb 07, 2016 8:39 pm

Has anyone tried using micropython to communicate with the new adafriut-io service ?

https://learn.adafruit.com/adafruit-io?view=all
https://github.com/adafruit/io-client-python

Is it there around a micropython-compatible library ?

Thanks for your input.

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: Adafruit-io

Post by platforma » Mon Feb 08, 2016 12:16 pm

This looks quite interesting, lots of similar services exist though. But I think adafruit one will grow faster than others.
The python client looks reasonably simple to port with standard modules: json, requests, collections/namedtuple. I don't think we have the last two in micropython-lib. But the data model doesn't have to be based on namedtuple so can be rewritten any other way. MQTT client, of course, needs an mqtt library.

The service is still in Beta, and I don't think writing a micropython lib in parallel is a good idea. The API will grow and a bunch of stuff will change and improve, but one could start doing the work now. Even reading comments in code (model.py)

Code: Select all

# Depending on how people use the
# client it might be prudent to revisit this decision and consider making these
# full fledged classes that are mutable.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: Adafruit-io

Post by pfalcon » Wed Feb 10, 2016 9:45 am

json, requests, collections/namedtuple. I don't think we have the last two in micropython-lib.
What do you mean? namedtuple is part of core MicroPython. I started to code urequests (micro requests), but that was put on hold, as entire priority now on running ESP8266 KS campaign and coding for it.

Generally, the best bet to have good progress on this is the campaign, http://forum.micropython.org/viewtopic.php?f=8&t=1338 . There's actually an intrigue whether to go for some cloud service integration as the next stretch goal ;-). But you know, we're realistic guys, and not talking about more stretch goals before current are met ;-). (And indeed, there're many such services, and even deciding which one to support is a lot of time/effort (to review alternatives), and that conflicts with development).
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
platforma
Posts: 258
Joined: Thu May 28, 2015 5:08 pm
Location: Japan

Re: Adafruit-io

Post by platforma » Wed Feb 10, 2016 1:38 pm

pfalcon wrote:What do you mean? namedtuple is part of core MicroPython.
Didn't know that, apologies! And urequests sounds very exciting. Of course, the KS campaign will take off the majority of yours and Damiens time, as we all appreciate. Since there is a plethora of such platforms that provide cloud data collection and analysis, I don't think aiming to support one particular service is advantageous. Certainly our own platform would be amazing, but priorities are set right. Anyone else is free to write a library for any other cloud service that's out there, but with all the maintenance and transitions from upstream beta and any API changes should be taken into account.

Post Reply