#help-with-wippersnapper-and-adafruitio
100 messages · Page 1 of 1 (latest)
Brent will be online tomorrow
Ah, well in that case congratulations on your success!
So I do have an operational wippersnapper on the fruitjam at this time and it has been rock steady for hours.
What was the original application/firmware that returned when you tried to use the nina update uf2? I'd like to try replicating that tomorrow too.
yeah, If I did a load of Adafruit_Fruit_Jam_Factory_Reset.uf2, then after loading the nin-fw-upgrade the factory reset rainbow would still be on there.
I did a picotool erase and loaded the nina-fw-upgrade and after reset it booted to the boot rom.
ah, so it never booted the updater (unless it's meant to do that after finishing?)
yeah, never. after reset it went back to boot rom as well. It seemed that nina-fw-upgrade never actually burnt to the flash,
Fascinating! It's amazing that we manage to wrangle these electro-pixies into doing anything at all some days...
Thanks for the initial feedback, I'm sure Brent will have more questions, and serious thanks for being the first test pilot!
Sure, let me know if there are any other tests you want me to try or any other feedback needed. Happy to help.
I’ve been using my RPi3B and a SenseHat v1 for a while to track the temperature and humidity in my bedroom for a while and log it I a csv file. Yesterday I discovered Adafruit IO and felt that could be my solution to share the information in a dashboard.
Today I tried adding it to my python script and the first issue I came across is not being able to install the AIO packages outside a virtual environment on the pi os. I eventually figured that out and edited my script to share the data with my AIO feeds. But the script won’t run inside the venv as it doesn’t have access to the sense had libraries and it won’t run outside the venv because of the AIO libraries. And I can’t find out to add the sense hat libraries to the venv or add the AIO libraries outside the venv as they’re not available on apt install.
Can anyone help me please?
Can you get it working by recreating the virtual environment [delete folder first] with the extra --system-site-packages argument? In theory that'd use the system level sense hat packages
Thanks, I’ll try that tomorrow, and hopefully my code works first time. 🤞
Nothing but errors 😭
I managed to resolve the issue, I'd used a feed name more than once and it didn't like it, changing the second feed resolved the issue
Every time I start this script, I have to have it create a new feed in my AIO dashboard, otherwise I get a load of error messages when I run it. Why can't I get it to send data to the existing feeds?
Depends on how you're trying to publish to them. Sounds like you're creating feeds each time the script runs.
I published the code to Codeberg https://codeberg.org/Steakhuis/Temp_monitor_SenseHat/src/branch/main/temp_monitor3.py
I was copying the code for communicating with AIO from this tutorial https://learn.adafruit.com/adafruit-io-basics-temperature-and-humidity/python-code
I'm not familiar with that version of the Adafruit_IO library, nor its syntax. I thought you were using CircuitPython.
No, I'm using Python3, as its what I've the most experience with
try:
temperature_feed = aio.feeds('temperature')
except RequestError: # Doesn't exist, create a new feed
feed_temp = Feed(name="temperature")
temperature_feed = aio.create_feed(feed_temp)
I would print out the exception to understand why the try is failing.
This is what I get when I try to run the script
vpy ./sense_hat/temp_monitor3.py /home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py:25: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources Traceback (most recent call last): File "/home/djmcc/./sense_hat/temp_monitor3.py", line 32, in <module> temperature_feed = aio.feeds('SenseHat Temp') File "/home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py", line 354, in feeds return Feed.from_dict(self._get(path)) ~~~~~~~~~^^^^^^ File "/home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py", line 132, in _get self._handle_error(response) ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
` File "/home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py", line 120, in _handle_error
raise RequestError(response)
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 404 Not Found - not found - that is an invalid URL, please check the API documentation at https://io.adafruit.com/api/docs to make sure your URL is correct
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/djmcc/./sense_hat/temp_monitor3.py", line 35, in <module>
temperature_feed = aio.create_feed(feed_temp)
File "/home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py", line 368, in create_feed
return Feed.from_dict(self._post(path, {"feed": f}))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py", line 142, in _post
self._handle_error(response)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/djmcc/.env/lib/python3.13/site-packages/Adafruit_IO/client.py", line 117, in _handle_error
raise RequestError(response)
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 400 Bad Request - ['Name must be unique within the selected group', 'Key must be unique within the selected group', 'Group feeds is invalid']`
temperature_feed = aio.feeds('SenseHat Temp')
try passing the feed key, not the string name
How's that different to what I already have? I figured it out and that appears to have worked
Thank you for your help
There might be a function that uses the String name to look up for the feed key. Or, I think the feeds() method might return both (that you'd have to parse.)
I'm not sure, changing that line from the String name for the feeds to the feed key has worked, so I'm now uploading data automatically to my dash, which is what I was after.
My Fruit Jam fails to provision when running WipperSnapper. It also doesn't clear its flash when I copy flash_nuke.uf2 to the bootloader. Can anyone help me fix this?
Can you try using picotool erase like mentioned above?
#help-with-wippersnapper-and-adafruitio message
Then follow the instructions from the learn guide linked by Brent.
Tagging @royal rapids who is around this week
I did not. After a bit of troubleshooting, it finally booted and ran WipperSnapper
What was loaded on the fruitjam before you installed wippersnapper?
CircuitPython
It also didn't want to erase its flash when I used flash_nuke.uf2
Good to know, thanks
There is a different nuke UF2 for the RP2350. See https://learn.adafruit.com/adafruit-fruit-jam/install-circuitpython#flash-resetting-uf2-3182477. Is there a link elsewhere to the one without "RP2350" in its name?
I'm unable to install adafruit-io with pip - I was able to replicate it in a venv, I filed an issue here: https://github.com/adafruit/Adafruit_IO_Python/issues/165
did you see this? Did you try it? https://www.adafruit.com/github-students
Yea but i already did that, I have a code and discounts but i dont know where to put it nor activate it
If you go to https://io.adafruit.com, are you redirected to https://io.adafruit.com/yourname/overview? If so then go to https://io.adafruit.com/upgrade. At the bottom of the right column is a link "Redeem Coupon or Pass". Did you try that yet?
Oh thank you so much 🙌
it worked? I must admit I had a little trouble finding it.
yes it worked thanks to you!
We've updated the Adafruit IO Map Block with Multi-feed Support, Tooltips, Paths, and Click-to-Publish
The full feature log is in the blog above. If you use a GPS in your IoT projects, or wanted to but felt the map block was limited, please take a look!
Question on MQTT and CircuitPython - does the adafruit_minimqtt library use MQTT 3.1.1 or 5.0? Is there a way to force 3.1.1?
3.1.1 only
I do not know of a CircuitPython lib that uses the MQTT 5.0+ spec.
There is an issue for adding 5.0, but currently it sits on 3.1 to match Adafruit IO's broker (which is on the same spec)
Can someone please explain what I am doing wrong with triggers and delays? It never runs the actions unless I manually trigger it.
what's sending data to the night-light feed?
can you post a picture of the feed page for the night-light:status feed, so we can see the data is coming in as expected (the value type and contents and timestamp)?
Its a Qt Py ESP32-S3
so what component / attached thing is each feed representing?
Status is the actual status of the light (ON or OFF).
control is a cloud override that prevents my daughter from turning the light back on once it is off for the night.
Ah okay, nice use case. LEt me think it through a sec
I have a backup action that runs on cron at 9:30 PM as a fail safe and that seems to be what is triggering it
I tried seconds and minutes and neither worked on delay
The goal was a 1 hour delay
So what triggers the status feed initially? I'm getting a little confused between what physical components are running when.
Let's start back a bit, is this wippersnapper, or your own code (python or circuitpython or arduino)?
For the physical hardware, it's a qtpyS3, are you using the Neopixel as a light, and the button as a request for light? Then you have an additional feed for control that should mean no more light, and that control OFF is set by the timeout of 1hour after request for light, or additionally Controll is set to off by the fallback cron job.
Sound about right?
Should the light period be extendable, is it like a snoozable light for reading before bed?
It is using the NeoPixel BFF yes. It has a USB power cable that has a switch on the cable. The intention is that it gives her 1 hour of reading time in bed (at 40% brightness). When it turns on it sends "ON" to status. This should trigger the action, and not execute the logic based on the delay. The intent is after 1 hour, it will send "OFF" to control, which the device will pick up and start the 1 minute fade out sequence. After that, if she tries to turn the device on/off, etc it will see an "OFF" signal recently in the control feed and not turn back on.
Cool, so the usb power cable has a switch, and turning that on powers the qtpy (starts coming online) and neopixel BFF.
You have code (worth sharing) for the qtpy that sends "ON" to the feed when device is booted, that presumably also turns on the light then and probably needs to instead check the control feed first to optionally not allow the light/turn it on.
Then after 1hr from boot "ON" message to status feed (delayed action that "keeps" existing delays, rather than "resets" existing) the action sends the control feed an "OFF" and your device should then see that and do the fade to black. Your existing 9.30 cron might then be removable.
The action will repeat trigger, but as the light/control will already be off that won't matter. You might also need a way to set control back to ON, say after midnight or 7am.
The 9:30 cron will remain, as I don't want her to ever have the light on after 9:30. If you set control to "ON" then the light will turn back on, as it is a hard override switch. It can only be triggered from the IO dashboard. I can post the code if it helps
I just don't know why the delayed trigger isn't working
Yes please post code, that will help! So the delay should be functional, add a Log block (Utility category) as the first action block, and replace it's child block with a new Text Template block using this as the contents:
{{"now" | date: '%H:%M:%S'}}
Then use Save+Run button (this skips delayed validation and skips the triggers) which will print the current time. Finally, wait past your delay time just to be sure, and then manually add data to trigger the action, wait the delay time +1s and then go into the action edit page (or refresh it) and use the Run History button and look through the times (of triggering and the logged time message). You can also just skip all that and just **accept **that the **Run History timestamps **are after the trigger and delay period.
Here you can see the feed timestamps are approximately 5s before the run history timestamps (action time schedules + delays are optimistic best effort - can be a bit out)
@devout pulsar I think I may see the issue just in your first screen shot. How did you get the = block to match the " ON qualifier in your Brown When block?
mine is dark blue = with lighter blue/teal "String" for "ON"
is that a data type mismatch?
Ooo I found it
That has to have been the issue, thanks. I will confirm tonight
oh gosh, so you did manage to get a text block into the numeric comparator block in the trigger in your original screenshot. Nightmare, and a bug, I'll tell Loren and we'll get that fixed in the next round of updates.
It'll also be made clearer in the future...
Indeed I did! 😂 I'm good at finding those edge cases that don't make sense
That's usually my speciality 😁
Just so you're aware, I went to patch it and then got reminded that it's a feature not a bug, but we're lacking the in-page validation that would make it more obvious, along with surfacing more error logging to the Run History. The intention is that more complex things can be used as the comparator value. Alas, as our main developer for blockly is tied up in some other major platform changes, the in-page validation and other improvements won't be seen to for a number of weeks (early Summer).
Fingers crossed, I might be shown how to surface such errors so I can improve the logging in the run history for such future complexities.
I'd love to be enlightend more on that "feature"
I believe the example highlighted to me was potentially using a string that contains a number, or a feed value, as the triggers' numeric comparator value.
Not all of the current possibilites are actually supported or well tested, more that blocking off avenues of exploration is being avoided if possible
Had I used "0" and "1" instead of "OFF" and "ON" would it have type-casted the string to a number during comparison?
In theory yes!
i've found a broken link https://io.adafruit.com/services/time - it just goes to the main IO home page. it's on these pages (at least): https://io.adafruit.com/api/docs/#services and https://docs.circuitpython.org/projects/adafruitio/en/stable/api.html . is there a place to report this?
Adafruit IO is the easiest way to get your projects onto the Internet of Things!
i reported this internally
are you logged in to IO?
seems to work fine if you are logged in. (that page is for setting up the integration for your account, thus it requires an active session.) but i notice it does a magic redirect to the home page without telling you it did that, i'll add an issue to address that soon
thanks! no, i wasn't logged in at the time.
Change in analog gauges. My analog gauges used to have colored sectors (red, green, blue) but suddenly the only colour now is green. I have high and low limits set, but there is no option for setting the colours.
Ah, thanks for the report @sleek plaza . There were some relatively recent changes. I'll try and get someone to have a look next week
looks good team!
creates a million feeds this month
but seriously, cool! if only I had enough IOT devices to need the +
👍 we'll still be around when you're ready
I’m glad to see some clarity on the direction for IO so thanks for posting the coming soon info. It’s non-trivial to replicate the features so I hope it does well for you.
Are there any API changes associated with this?
One other question: will there be a status page for it? I.e. to know if everything is working or not? OF course, it would never fail...
I just have a minute before a daycare pickup, but we do have a status page for all of adafruit. It's somewhat automated, but we need to add a few more hooks to it yet: https://status.adafruit.com/
I think API changes are fairly limited, but we'll publish any changes prior to them going live. I would just try to use our V2 of the API to keep up to date (it also has a lot more features).
Thanks, somehow I never managed to find that page. Might be good to link to it from Adafruit.io.
Would it be possible to create some coupon system that would offer free month with a purchase over certain amount.
I'm so happy about this! I've wanted extra streams for a long time. Now I can have a security system and my weather station hooked up to Adafruit.IO!!!!
@snow hemlock We are working on a solution for this now. Will let you all know when we figure this out.
@sonic niche awesome!
I should download my data every X days... right now I dutifully log temp/humidity in my basement every 5 seconds, and then... never look at it
That could be useful info in the future 😋
Running it through the code to look for unexpected changes could be useful - sudden spike in humidity for example
@opal vector FYI, adafruit.io is giving me 500 internal server error even though status.adafruit.com reports operational
oof! yeah, that's a problem, I'm looking into it now
@stable elm @opal vector Problem replicated (500 error)
Awesome response, @adam.io ! Gotta get you a hug report for that one.
it's like magic
the problem only affected the OAuth process, so people who are already signed in wouldn't see it, and none of the HTTP APIs (which the status page is using) would see it either
ha, I introduced the bug about an hour ago, so make sure you give me a "thbbbbtttbt" report too ;D
now I have to go write some tests to make sure I don't do it again in the future :)
@novel ember fixed for me. Thank you!
Well Can't just straight up port over the micropython MQTT library and use it with CPython. figured out that tonight,
Anyone know why any feeds I access from the python module that are in groups are duplicated into the default group? Do I need to use the 'group.feed' key instead of just the name when accessing the feed?
@sharp flower yes to the second question, the "group.feed" form of the key is necessary if you're dealing with any non-default group
that applies to anything over MQTT or HTTP
which means if you use the feed name to try publishing to a feed that isn't in your default group, IO won't be able to find it and will create a new feed (in the default group) with the name you sent
in general, it's best to use the feed key shown on IO when referring to a feed in code
ok thanks @novel ember, I seem to get a 404 error when using 'group.feed'. (for example: aio.send('group.feed',data) is a 404 error ) am I doing it wrong? Have only just started using adafruit IO
@novel ember I'm still getting this problem, won't accept the key... any ideas?
Ahhhh, yeah
could be that the Python library is using V1 of the API
what happens if you give the Feed a unique key?
(unique across all your feeds)
is it alright if I DM you to get some details @sharp flower?
sure
(if I can figure out how Discord DMs work :P
its ok to troubleshoot here too in case others have the issue
private keys and such should be in DM though of course 😃
great!
deployed a fix, was a problem with the old API failing to recognize new-API-style feed keys
my tests with the Python client + group.feed keys are running now, @sharp flower can you check that it's working for you?
👍
@novel ember I was going to ping you earlier inquiring if you had any thoughts about MQTT and CircuitPython.
Doing it now so I don't forget. Haha.
Or any other way a Wi-Fi enabled CircuitPython device could interact with io, doesn't have to be strictly MQTT right? I saw there's an API.
I think getting IO support into Circuit Python is a fantastic idea
I am a middling-to-low Python dev though. Was my first language, but that's deep history.
I would aim at MQTT first, probably
BUT, if there's decent HTTP support, our API for that is pretty slick, too
@novel ember that'd be awesome!
the docs are at: https://io.adafruit.com/api/docs/#!/v2
@novel ember there is decent http support, the only problem right now is memory
ahhhhh
@novel ember I'll take a look at the docs though. @shell star will be happy to see this discussion
yup! its on my radar to do but there are more pressing things at the moment
For the past several hours, 2 of my 5 active feeds are getting "404" responses: ```
aio.send('basement_temperature',50.0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/Adafruit_IO/client.py", line 90, in send
return Data.from_dict(self._post(path, {'value': value}))
File "/usr/local/lib/python2.7/dist-packages/Adafruit_IO/client.py", line 72, in _post
self._handle_error(response)
File "/usr/local/lib/python2.7/dist-packages/Adafruit_IO/client.py", line 56, in _handle_error
raise RequestError(response)
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 404 Not Found
hmm I found that by editing the name of the feed and savin it, it started working again. It no longer works if the name has an underscore in it - at least basement_temperature fails but basementtemperature works. Is that expected?
Rereading the guide, it appears that only "letters, number and spaces" are permitted in feed names. Since my feed had been working for months, I assume something was updated to enforce this more strictly today... Oh well, problem solved.
Nice catch, @keen dirge
@ornate pagoda thanks - I was flailng around and stumbled into that - whew!
Had the same problem (RequestError) since yesterday. I am using the REST api. Was using the 'human readable' name to identify my feeds, which worked till yesterday. Replacing it with the key (lowercase, no spaces, hyphens) solved the problem.
😿 You all are 100% right. A small change to the V1 API yesterday intended to bring it up to date with V2--let through group.feed style feed keys--blocked other requests that were working before. I pushed a fix to that problem, and it seems to have dropped 404 responses back down.
This chart shows the count of 404 errors per minute leading up to the deployment and immediately after.
Oh wow! No worries @novel ember, keep being awesome.
The first IO API was written to be super permissive with respect to naming, but that made it tricky to build the API in a way that would remain consistent.
naming things is tricky and we still haven't figured it all out 🤔 https://learn.adafruit.com/naming-things-in-adafruit-io/introduction
I've added some regression tests that sould prevent breaking old API endpoints the same way again.
Thanks @marble dagger!
@novel ember Thanks for the update and information.
@novel ember do you have any sort of monitoring for that?
We do, but in this case monitoring is only telling us what happened and wasn't alerting us when it changed unexpectedly.
We also confounded some of our metrics by upgrading our HTTP API servers yesterday.
upgrading => more CPUs, more memory
HOLD THE PHONE...
I didn't realize Adafruit IO has IFTTT integration @novel ember @shell star! Pshhhh forget trying to do API calls or MQTT! I can use Webhooks and IFTTT + Adafruit with my ESP8266
Annnnd it works
If the API has simple calls I can get it to work with that too. I looked at the api docs and didn't understand how I authenticate. If I send a get request using and of the examples, I'll get an error because I don't see where I add my key in the request URL
Hi @marble dagger did you try this type of call? https://io.adafruit.com/api/groups/weather/send.json?x-aio-key=a052ecc32b2de1c80abc03bd471acd1d6b218e5c&temperature=13&humidity=12&wind=45
There is a learn page here: https://learn.adafruit.com/adafruit-io/browser
I haven't tried it lately, but it did work for me when I was debugging a few months ago
I am working on a project where each house in our neighborhood monitors energy consumption. For households to visualize, I plan to send the power and time data to Adafruit.io (I'll buy a paid account). Now that the feeds are in Adafruit.io, I want to let each household view their usage as line and bar graphs in the web browser (and eventually their smartphones). I am familiar with how to use Adafruit.io / IFTT (e.g.: my summer project: https://bitknitting.wordpress.com/2017/09/12/summer-project-automatic-irrigation/) ... but not sure how I can then go from Adafruit.io to a web client that picks the neighbor's feed and graphs it to their web client, or graphs all feeds. I'm looking for any advice/suggestions. Thanks!
@tame cairn I'd use the adafruit.io MQTT stream as a data source, spin up a compute instance in Azure, and use MQTT to connect to adafruit.io and read the data out. Then I'd use the dashboard/visualization capabilities in Azure to make the web interface for the users to connect to. Does that make sense?
You could also bypass adafruit.io (I know, sacrilege, right?) and feed the data directly into an Azure Message Queue topic, which has an automatic data retention period of seven days. Then you could make the dashboard/visualization read the AMQ topic directly.
You'll also need to be careful to do the security right so one neighbor can't see another neighbor's data directly.
The adafruit.io site doesn't seem to work when in private browsing on iPhone
@dusky shuttle Thank you for the advice...I thought that might be the case. I am as loyal as I can be to Adafruit. However, for this project I'm going to explore an alternative as you suggest. I'll probably end up with Amazon goo because I understand their environment better.
That works. I honestly know AWS better, too, but I am trying to be loyal to my employer. 😃
(And I really do like the Azure Message Queue options!)
@dusky shuttle I have already found "tutorials" that will get me started. So whatever works. I can always switch. Again, thank you for the advice.
@tame cairn Any time! Good luck with the project!
@dusky shuttle thank you.
@white birch Thanks, I'll take a look and let you know tonight.
@marble dagger API calls can be authenticated by sending an X-AIO-Key header with the request. if you're familiar with the cURL tool, that can look like this:
# send
curl -F 'value=$VALUE' -H "X-AIO-Key: $IO_KEY" https://io.adafruit.com/api/v2/$IO_USER/feeds/$FEED_KEY/data
# receive
curl -H "X-AIO-Key: $IO_KEY" https://io.adafruit.com/api/v2/$IO_USER/feeds/$FEED_KEY/data/last
@novel ember thanks! Yes, I'm familiar with curl. For CircuitPython, I use the ureqests library to make my API calls. I can probably figure out how to make it work with ureqests.
"X-AIO-Key": your_key
}
urequests.get(url, headers=headers)```
you can also pass x-aio-key as a query parameter, so curl -F "value=9.99" https://io.adafruit.com/api/v2/$IO_USER/feeds/$FEED_KEY/data?x-aio-key=$IO_KEY will work too
or the equivalent urequests function call
putting it in the headers is much more secure though, right?
🤷 ehhhhh
Haha @hybrid granite you are on point
they're all going over the wire as plaintext
if you're not using https, it'll be compromised either way
oh yeah, true
my wishlist definitely includes per-device keys
Well thanks for the help @hybrid granite and @novel ember!
listen, until adafruit.io powers a botnet I think you're good 😃
Yeah, if someone wants to know the temp of my living room or turn my lights on and off; knock your socks off.
Haha if I slip up and post my io key, more power to ya haha.
I should make the stranger things lights and let you send me codes
yesssss
@marble dagger I made Stranger Things lights last year. Just spelled "Trick or Treat," but my wife made me turn them off because they freaked her out. This year I might have to network enable them!
@remote agate Nice! Haha, you definitely should!
I've got that unused ESP32...
That should do
I did wonder what the best way to feed data in would be.
Thank you for the link and information @white birch.
and why stop there. Big thank you to @novel ember and @hybrid granite as well! Combing the links and information you sent me. I can use Adafruit io on my ESP8266 using API calls. Which is much more valuable and complete than depending on IFTTT.
Hey!
I'm messing around with Adafruit.IO and a Raspberry Pi with some sensors and I'd like to know if there's an easy way to give the value of a feed to a variable
The way I'm doing it is like:
def message(client, feed_id, payload):
if feed_id == 'led1':
global led1status
led1status = payload
Hi @wraith marten! Checkout the Adafruit io Python client: https://learn.adafruit.com/adafruit-io/python
Hey, Kurt! I did and I made it work perfectly, thanks! I was just wondering if the way I did to pass a value from a feed to a variable was too overkill
Oh that's great news! There probably is, but I'm not well versed on io yet. So unfortunately I can't help.
I see. Well, that's good enough for my small project. It's my first time with these things and Adafruit IO guides helped me a lot 😄
😀 I've been messing with CircuitPython a lot so I just started looking into leveraging the API to hook up CircuitPython and IO. The guides are a huge help, I agree.
Happy to hear that @marble dagger ! Do you have code for that on Github? It would be useful for me as well but I haven’t tried it.
Thanks @white birch! Currently I do not. I added this MicroPython lib (works without any modifications). Then just use the GET or POST API calls with urequests and it works.
Sweet!
😀 
Hello
I'm not really sure that this is the right place to report a "bug" but maybe someone directly from Adafruit reads it.
When you view your AIO Key under settings there is a option "Show Code Samples" there are code sections for arduino and linux, but the Arduino Sample has a mistake.
It says #define IO_USERNAME "..." and #define IO_KEY "..." but it should be #define AIO_USERNAME "..." and #define AIO_KEY "..."
Could ruin the experience for some people...
Hope that helps!
@earnest schooner Thank you!!! I don't have access to change that, but Adafruit employees frequent this page and can take care of that for you! We appreciate the feedback!
@dusky shuttle Glad i could help 🙂
Shouldn't we tag <@&327289013561982976> and @opal vector @shell star ?
Nope. @novel ember (who hangs out in here regularly) will probably be the one to fix it. 😃
@dusky shuttle Ok, thanks.
@earnest schooner ah interesting! That's a tricky code sample to get perfectly right since some of our guides may have AIO_USERNAME / AIO_KEY and a lot of the IO Arduino library examples have IO_USERNAME / IO_KEY (for example, https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/examples/adafruitio_00_publish/config.h)
I was working from the Arduino library examples when I added the sample code to the key dialog on IO
BUT! It looks like our current Arduino MQTT library example uses AIO_USERNAME / AIO_KEY 🤔
Since neither of those macros (AIO_* or IO_*) are used inside the libraries themselves, it's always safe to change them once you copy them into your own projects.
@oak grail Sorry, I was at lunch. What's the problem you're seeing?
BTW, I've used mosquitto with mqtt (Adafruit.IO) a lot, so I know it works. 😃
@dusky shuttle I posted the error on the other thread 😃
Got it. Thanks!
@oak grail do you have an example project that demonstrates the issue?
Hi, I wonder if there is a way to see if I am hitting the limits? I send data every 30 seconds and only if it has changed since the last time it was updated. I am getting a regular outage of just over 8 hours from 12:13am (uk time) to 7:51am (uk time). The dashboard is here. https://io.adafruit.com/richarduk/dashboards/weather
@primal storm if you add a "stream" type block to your dashboard, you can set it to show errors:
Ta
that exposes the $username/errors and $username/throttle MQTT feeds
but a regular, repeating, 8 hour outage sounds like it may be on your device or your local network
Yes I was wonding that too. I have two posiblites to test, my end or adafruit.io end. Which ever one it is it must by my app doing it. Just working out the cause.
@novel ember is there a way to back date the history block?
Makes sences. Will wait till the morning, hopfully it's an easy issue to deal with.
the error messages, that is
I've seen other services (twitter, an internal one at work) send a HTTP 420 ("enhance your calm") if you go over the rate limit
Weather data going from indoor and outdoor data (web) to adafruit IO.
I have a 3 data feed but I'm having a problem with the CHIP PC dropping off the network since it's so far away from the router.
but it's really cool to use ssh keys to get the data from crontab and post to adafruit IO from a remote server.
Yo! A CHIP, nice. Haven't had the chance to play with one of those yet.
is that the pocket chip?
You could use a ESP8266 as a cheap repeater
https://github.com/martin-ger/esp_wifi_repeater
I haven't tried this exact software but had a good experience with other ESP NAT Routers
Oh wait I used this exact project but it got a major overhaul so I didn't recognise it 😅
Yes it's a pocket chip. It's great for this little project.
Is there any way of sending multiple pieces of data to multiple different feeds at the same time from the Python client? I am trying to graph internet speeds in a dashboard, but at the minute using three send blocks (upload, download, ping) means that often a piece of data is a second before/after the others, and therefore they don't line up on the graph. I'm using the .send function, would I be better doing this using MQTT or is there a better way completely?
@sharp flower I believe you can set the timestamp on each piece of data... so gather the data you want, timestamp to taste, and upload it sequentially.
ah ok, that'd be good. Do you / anyone know how to do this?
@sharp flower this is a crazy week for some of the Adafruit folks like @shell star, @lunar lance, @robust panther. They probably know, but it'll be a while. Combine that with @novel ember who's the almighty source for Adafruit IO, you'll get your answer.
That's a lot of tagging, sorry. Lol.
@sharp flower I am not a pro at python, but I know enough to probably help you too. I'll setup a test sometime in the next week or so.
My test will be using api calls via GET or POST.
@sharp flower @marble dagger A better bet is posting on the forums. Thats where the official support staff replies to questions.
@shell star good call.
I know how to do it with REST... you just add it that field to the JSON you upload. Not sure about python.
Does anyone know of a App (for Android) that Subscribes to a MQTT feed and shows the data in a widget on the homescreen?
congrats @novel ember @small ether & @sonic niche ! the new features look great
thanks!
Hey, is there a date when we can start signing up for AIO+ yet?
@rain leaf Very very soon. We are doing some final internal testing.
Awesome. I'm thinking of putting together an AIO-MOOS bridge, and it would be nice not to step on my existing feeds while doing so.
Cool, just seen your new home page. Looking good. 👌
Anyone else getting 500 Internal Server Errors from IO? Started here yesterday and still going ...
@graceful sluice My access is ok...
thanks. weird that it's still happening here.
@graceful sluice seems ok for me as well. what are you doing thats seeing the 500s?
It's just the Adafruit_IO python client calling create_data. Same as it's been doing for months and months.
File "C:\Python\3.4\lib\site-packages\adafruit_io-1.0.0-py3.4.egg\Adafruit_IO
client.py", line 144, in create_data
Someone suddenly change the API, perchance?
not sure. my test feed is arduino based.
So's mine
where's the python coming from?
Client reading from the arduino's serial line
what's doing the actual push up to adafruit io?
that same client, which is my PC.
so it's python on pc that's actually talking to adafruit io
right
for me it's an esp8266, running an arduino sketch
sorry. haven't tried the python client myself yet.
I guess I should be glad the service isn't down for everyone. But that sounds like somebody broke something by doing something they shouldn't have.
@graceful sluice did you post in forums?
Yes, I posted a query
🍩 🍩 🍩 🍩 (that one?)
lol - yes, that would be the one
it's been passed on internally
thanks much
whats the number
its on the screen ohm-bit-stab
I'm trying to get my gps coordinates to display on a map using adafruit io, my coordinates are uploading to my feed but they are not being displayed on the map, any suggestions or things to check?
im using a raspberry pi and python
Hello, I need to publish messages with retain for my project and I'd like to know if I can do it now or if I have to wait till there is a library update. I've seen some commits including it but I don't know if it is usable or not. Is it a better approach to use pubsubclient library? Thanks a lot.
@valid brook Its getting late in the US so most folks will be asleep. Keep an eye out tomorrow for responses and also post to the Adafruit support forum as well.
?forums
thanks!
Hey folks. So I'm on the free tier.
Do deleted feeds still count toward the 10 free ones?
I had 3, deleted 2, have 1 active feed showing, but now it says 3/10 free feeds in use.
I pasted some example code in from the adafruit learning modules which created a new group with some new feeds in it. I was finished with the module so I deleted the group without first deleting the feeds associated with it.
Is there a way to recover these feeds so I can properly delete them? Or do I need to contact some sort of support?
@cunning star This is pretty much "some sort of support"! This and the forums. Deleting the group should delete the feeds if they don't belong to any other group. I'll take a look at that right now.
hey @cunning star! I cleaned up those lingering feeds and fixed the problem you ran into. Your count should be accurate again.
Adam, you're awesome! Thank you for your help with this! I appreciate it!
hello, I need to publish messages with retain for my project and I'd like to know if I can do it now or if I have to wait till there is a library update. I've seen some commits including it but I don't know if it is usable or not. Is it a better approach to use pubsubclient library? Thanks a lot.
on a dashboard is it possible to put in a stream that shows location data from my feed? right now its just showing the date/time, feedname and value field
@novel ember 😀
We'll have to start calling @novel ember the yes man.
I don't think I've ever seen him say no.
hmmmm, "no" for me looks more like radio silence 😹
but this was an easy one, and something that's been on our checklist for awhile
easier to see the types of data when they're better differentiated, so I also added some color options to stream blocks
@novel ember just curious - is io+ live yet? I doon't see any option for it so I assume not, but teh FAQ reference payemtn method so I wanted to make sure I hade not missed something somewhere.
@keen dirge good news! Just opened IO+ sign up this morning.
the FAQ and Terms of Service were some of the last pieces we were finishing
@novel ember Thanks for the heads up - I see it on my profile page now - signing up!
Not like @keen dirge is excited or anything. Haha
Now I can stop juggling feeds!
Yes!
Are there any tutorials or sample code for the remote control dashboard block
It just produces numbers for each button press. Hook up a feed to it and a stream block to the same feed and you will see.
@raven prairie I matched the output values from the remote block to the values that our mini remote control sends (the controller + sensor from Adabox 004 https://www.adafruit.com/adabox004) when using the Adafruit NEC remote library (https://github.com/adafruit/Adafruit-NEC-remote-control-library)
but I just got those by running the example sketch and seeing what came out: https://github.com/adafruit/Adafruit-NEC-remote-control-library/blob/master/examples/listener/listener.pde
Well night all.
For the record, thank you for IO+!!!! Totally worth 10 bucks a month!
I've had an account from the start... just upped it to IO+. I actually have a use for it now that I'm starting to collect & analyze some of the data my sensor node gather (rather than just reacting to it)
MQTT v5 seems like it has some great new features. looks like they added better error handling for CONNACK and the request/response thing is useful
vs having to call an HTTP API
@kind pebble the new way of handling QoS1 and 2 looks really handy as well
yeah. the flow control stuff is neat, but it might be hard to implement server side if the server is expected to queue messages per-client. that could get ugly with buggy clients
Anyone have a Linux C/C++ client library for MQTT they like? I looked last year and didn't find anything good.
@rain leaf I’ve used both mosquitto and paho on raspbian jessie (on a Pi 3) & ubuntu 17.? (on an i7 based workstation), respectively.
@rain leaf Both seem fine. They work well and have a straight-forward API. My smarthome system uses paho for it’s internal MQTT message bus which is core.
Hi all! Total newbie here. Anybody got a moment to chat?
No?
Guess I'll try the forums. 😃
@wary tide I got some time, what's up?
Oh hey, thanks.
So I'm gearing up to automate my home.
I've been tinkering all week with Home Assistant, and it's making me want to smash things.
Then just today I learned about MQTT and Adafruit.IO, and I'm thinking, what do I need Home Assistant for?
As long as I can find or make a bridge between my Z-wave controller and MQTT...
then it seems like I could have a feed for every switch/sensor, and a feed for each Z-wave output (mostly lights)
and write some little scripts in python or whatever to subscribe to various sensors, and automate things as I see fit.
Is this a stupid idea?
Of course not. Just get Wifi, conect to Adafruit.io and upload your sensor data.
Yeah
I mean, it does have the disadvantage that if my internet goes down, my house stops working.
(Unless I set up my own MQTT broker, I suppose.)
Depends on the design. Your house should not stop working. It just won't update the cloud.
But if Adafruit.io is the glue that connects switches to lights...?
So you loose remote control. Local should still be available.
Again, depends on the systems design.
Hm. Not sure how that would work, but I'll give it some thought.
What about a Z-wave to MQTT bridge? Is that a commonly known thing?
That is out of my realm. I'm strictly Arduino and IoT via wifi.
Fair enough.
Sounds like a matter of more reading and some time hacking.
Suppose you wanted to make a derived/computed feed... where you take a couple of feed values, do some math or logic on them, and output the result as a new feed.
How would you go about it?
I like to design IoT as a parallel option for controlling lights or actuators as well as a status notifier.
My first thought is some always-on Raspberry Pi or some such, running a script in maybe Python.
I've gone down the Rpi road a few years back. But didn't like Linux. Arduino and Circuit Python are OSless. And that's my kind of computer.
never heard of Circuit Python
Just hang around Adafruit and you will. It's thier new flagship product. Hardware that runs a version of microPython.
I suppose so. If you go into the circuitpython room, er channel, shown on the left you will find people with the answers to those kind of questions.
Well... what do you use to tie your IoT things together?
I use a product called Photon by a company called Particle.
Adafruit carries their processors.
But what's the comm protocol? I feel like I'm missing something.
It pushes data to the cloud assigned to it and then my html access the cloud and downloads the data which then populates GUI controls to show the information.
Pushes data how? MQTT? REST? Some proprietary protocol only Photon understands?
to be honest, it's been a while since my weatherstation code has been looked at. I'd have to review it to answer that question specifically.
Think about making local devices/controllers autonomous. If they sense that MQTT or Adafruit.io is unreachable, they go into a protected mode.
@wary tide Hi there! Smarthome ... my favourite topic!
Yeah?
So the guys over in the Home Assistant server all think I'm nuts for even considering this
@wary tide Particle has some tutorials that show you how to do that comm stuff.
but the design of Hass is so bad, it makes me hate life
and MQTT looks like a fairly elegant solution for tying everything together.
My current sensor nodes are ATMEGA 328 based. I started out prototyping on Arduino UNOs.
Ended up with custom PCBs
I've done a fair bit of Arduino in the past... though lately, SBCs have gotten so cheap, I'm happy to spend a few extra bucks for something I can just ssh into.
I wrote some about it at daveastels.com
I’m starting to look at sending some data to AdadfruitIO. Right now I’ve started accumulating and saving to disk once a day... but if I have to reboot the control systems it gets lost.
Yeah, Adafruit.IO looks pretty amazing. Gorgeous UI.
Apart from the UI, I guess you could set up your own MQTT broker (Mosquitto etc.) on your own machine.
yes
I wonder if it's possible to have your own machine, and still use Adafruit's dashboard?
Maybe some sort of mirroring? ...Probably not.
I’m currently running the control system on my linux workstation, but want to eventually put it back on something like a raspberry pi.
Yeah... most Home Assistant folks are running it on an RPi.
And that's my plan too.
So what are you using to control it all?
Software-wise, I mean?
I expect/fear that I’ll have to put it on something like a Jetson to handle the ML/AI.
I said smarthome not home automation
What's the diff?
I’m in the process about writing about that too.
OK. But can you tell me more about your control system?
I guess it would come down to how much learning and adapting it does.
I have a couple posts on my blog
That’s probably the best way. There will be more posts over time.
I will look, but really... Python? C? C#? Something else?
Everything is in one repo: https://bitbucket.org/dastels/home_control
Git repository hosted by Bitbucket.
Using any off-the-shelf software package I could google?
C/C++ and Scheme
wow
I have one AWS Polly interface written in Go.
so if I dug deep enough, would I find some code that amounts to: "Subscribe to this feed, and when the value changes, run the following code"?
I used to use a Scheme I wrote in Go, but I wanted more performance and didn’t want to spend all my time tweaking the compiler and garbage collector, so I switched to Chicken Scheme.
The whole systems works that way. It’s all mqtt based once it’s off the wireless mesh.
Cool. That makes sense to me.
The control system is all small modules that pub/sub over MQTT
I just need to be able to do three things: (1) convert some hardware, UI, or sensor state into an MQTT stream; (2) convert an MQTT stream into a hardware (such as Z-wave) output; and (3) run some code when a stream changes value.
If I can do that, I can do anything. It should be very simple.
Very similar to ROS
yeah, good point
Home Assistant can do all that, but it obfuscates it something horrible.
ah
Haven’t look at HA
So, there’s chicken-mqtt.scm that is the actual interface to the mqtt client. Scheme with a bunch of embedded C.
Thene there’s the mqtt-*.scm files that build on top of that to give multiplexing, scheduling, etc
Cool. In my own work, I won't be using Scheme. 😃
That’s in the scheme_brain folder
But I'm sure something similar is possible in Python, C#, etc.
for sure
I was pushing data to AdafruitIO in the previous version but haven’t for a while. nOw I want to be capturing and analyzing some of the data rather than just reacting to it.
IO seems like a good place to do that.
When you say you're just reacting to the data...
does that mean you've set up a local MQTT broker?
I'm trying to use IFTTT to save a tweet to an IO feed. It does populate to the feed, but my arduino code doesn't seem to want to pick it up.
Serial.print("received <- "); Serial.println(data->value()); tape = data->value();
Should I be using something other than value(); to save this to the tape variable?
tape is initialized as a String (maybe that needs to be something else?)
Nothing comes across on my serial monitor for the tweets when they populate on the IO feed. Other things do, like if were to manually set my own value on feed at io.adafruit.com.
@cunning star I'm not that familiar with it, but are you using a single feed? If other things are showing up it's almost like the tweets are being inserted into a different feed....
Sorry! Didn't read that carefully. You said it's populating the feed....
My feed log on the website shows all appropriate data being fed to it.
You're okay. Ha sorry. I didn't see your reply update until I replied just now. :)
No worries. I have to get ready for work or I'd try to replicate the behavior. If nobody else has a suggestion I'll try to do that tonight.
Much appreciated. I'll provide whatever info I can to help!
Fortunately I already have IfTTT connected to Twitter, so it shouldn't take me all that long to replicate.
and I'm using the AdafruitIO example sketches as my base. Woo
Oh! That'll help. Thanks!
Oh! Some new data! A new tweet came through but only partially. I'm using the CNN twitter feed as it seems to post often (like every 10 minutes).
The full tweet that came to the feed was:
RT @cnntech: Alexa, is it a good idea to let strangers into my house? https://t.co/crrwh04rTj
What came through on my end was only:
"RT @cnntech: Alexa
No comma or anything after it. It seems like the data coming through isn't what's expected. Note the " mark that appeared in front of RT on my end but not in the original tweet saved to the feed.
One more clue.. I added a single line to be sent to the Serial Monitor to tell me when the tweet comes in, even if I have the wrong method set up to handle the data and save it to the local variable.
`void handleMessage(AdafruitIO_Data *data) {
Serial.println("Tweet!");
Serial.print("received <- ");
Serial.println(data->value());
tape = data->value();
}`
If I'm thinking correctly, that "Tweet!" line should come through as soon as a new message comes to the unit. But it's not. It only appered on the partial tweet I mentioned above.
Could this be an issue on AdafruitIO's end?
@cunning star It could be the CSV parsing in the Adafruit IO Ardunio library
I think you may be right. How do I get around that?
You could use the Adafruit MQTT library directly and do the parsing yourself :/ The IO library is just a wrapper around that.
It's on our TODO list, but hasn't been fixed yet
I'll try fiddling with that shortly. Thanks for helping!
Adam, sorry for being a noob here. I'm a nurse by trade. If I were to fiddle with the MQTT library myself as you suggested, would it be AdafruitIO_WiFi.h?
if you are changing the adafruit io lib, it would be here: https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/src/AdafruitIO_Data.cpp#L414-L439
i think what @novel ember was saying is that you could use the Adafruit MQTT Library instead of the Adafruit IO Library
Would I #include that instead of the one I just mentioned as seen in config.h of the adafruit examples?
it probably would be easiest to start with one of the MQTT library examples and work from there
Hmm. it's a little thick for me. I'll do my best.
Hey all! I just created my first Adafruit.IO dashboard and feed, and hooked it up to a custom little test client on my desktop. It all just works! 😄
@wary tide Great job!
Thanks for sharing my happiness. 😃
@wary tide Nice!!!
...And now I've successfully connected to it from Python, too. Really digging how well MQTT ties together just about everything.
OK, here's an issue. I've got a Python script sitting in client.loop_forever, with the on_message handler just printing out the message. (This is from literally the first example on https://pypi.python.org/pypi/paho-mqtt)
Most of the time it works great.
But sometimes... perhaps when the feed has been idle a little while... it's very slow to respond to new values on the feed.
Like, 5-10 seconds.
Other times — especially if I've been fiddling with the feed recently? — new messages appear right away.
Is this issue familiar to anyone?
If definitely seems to be something particular to Python, because all my other MQTT clients — including one on my phone! — are updating right away.
Hey, anybody here into Z-Wave, by any chance?
I'm gearing up to try to build a Z-Wave <-> MQTT bridge, on top of OpenZWave. Would love to have a partner or two.
(Oops, hang on — phone call)
OK, @marble dagger , mind if I ask how your system works?
I know it can be done with Hass, or openHAB...
but I'm thinking neither of those would really be necessary if we had a nice simple bridge to MQTT.
@wary tide for sure! Here's the project page. https://razberry.z-wave.me/
Ah, RazBerry! I received one of those (actually their little USB stick) just yesterday.
Doesn't use MQTT some of us on the #circuitpython-dev channel have been playing with MQTT and Adafruit IO however
You're using the Z-Way software?
With the Feather HUZZAH ESP8266
Yeah I'm using the software that runs on the Pi and that gpio daughter card
right
have you seen https://github.com/Edubits/Zway-MQTT ?
I haven't tried it yet, but it looks promising
though right now it's my plan "B" if I can't easily get something built on top of OpenZWave
Looks cool. Would probably work
(OpenZWave would be a more general solution, because it'll work with any Z-Wave controller, whereas Z-Way works only with RaZberry and the little stick made by the same company)
But on the other hand, I'm not made of free time... if Z-Way and this Zway-MQTT bridge module gets the job done, that'll be good enough for me.
Gotcha. My setup took only a couple hours.
Well that's encouraging
Got the card, put it on the Pi, installed the software and boom.
Paired it with what I needed and then I was good to go
I just use the device toggle. Turn on off.
It had a spot that's kinda just like if this then that
Where it seems easy enough to do
ok
Well, if you do try the Zway-MQTT module, please @ mention me and let me know how it goes.
I've got some time set aside to play with all this on Monday
but I'm not ashamed to stand on the shoulders of giants
(or walk in their footsteps or whatever that metaphor is)
For sure @wary tide, will do. I've had this setup for a couple years and don't really plan on changing it. Maybe whenever I move again.
Who knows.
ah, OK, I understand that
Q: why do I get "not authorized to connect" when I try to connect through MQTT
apparently its related to a bug for the ethernet shield
Im trying to subscribe to one of my feeds that includes long strings. (Feather Huzzah and Adafruit_MQTT). I can’t get more than 105 characters from a subscription. It seems like this was resolved before (see link below where packet length was 127 bytes and ladyada said she resolved it) but I can’t seem to get it to work.
https://github.com/adafruit/Adafruit_MQTT_Library/issues/17
Anyone else able to subscribe and get > 105 characters? I have the same problem when using the AdafruitIO library too.
Did some more hunting and it looks like Publish was resolved but Subscribe is still a lingering open item. https://github.com/adafruit/Adafruit_MQTT_Library/issues/79
WOOT WOOT!
I just succeeded in hooking an ESP8266 up to the door sensor from my obsolete home security system, and publishing to my Adafruit.IO test feed.
I now have widgets on my phone and my Dashboard that update when I open and close the front door! Huzzah! 😄
@wary tide Congrats! Great job!
Thanks! It's been a good day.
@wary tide that's awesome!!! Great job!
Thank you! I also have a crude but functional one-channel Z-wave <-> MQTT bridge. Needs to be built out to handle more channels and command types, but the basic approach seems sound.
I should be humming along by Thanksgiving. 😃
Not sure how best to get feedback to the Adafruit team... but the On/Off switch (in the dashboard) really should let me define what messages correspond to On and Off (separate from the UI label).
Hey all, I just saw this new Instructable that describes how to make an MQTT-based home automation system, with something called "Node Red" as the automation/UI component: http://www.instructables.com/id/Powerful-Standalone-Home-Automation-System-Pi-Sono
Thought it might be of interest here.
Woot! My Geiger counter is working and feeding data to IO+!
👍
good
Radioactivity ?
@dusky shuttle Nice!!!!
@surreal willow it's in counts per minute rather than a "real" measurement unit.
My dad has a radioactive calibration sample he picked up from a yard sale ages and ages ago
(Literally, the thing's older than me)
Working on adding some AOI functionallity to my smarthome app: capturing motion data for later analysis.
I may have found a bug in IO. I have a Geiger counter that updates a feed every 12 seconds or so. When I leave the dashboard running, it goes from a mildly jagged graph to a tightly jagged graph (top picture). If I refresh the tab, though, the jaggedness goes away for the historical data, but starts again with new data.... Any ideas?
Yes, that's due to the aggregation behavior of the charts
when the dashboard is live, every data point is added to the feed as it comes in,
but when requesting data for a period of time that includes > 480 data points, IO sends back data aggregated over discrete slices of time
which is useful for things with low variation between data points, like temperature in a room over the course of a day
but this is an interesting case, since the data can show big changes between readings,
which get cut out by averaging over the slices, if we're looking at a 24 hour chart, then it's probably aggregating over five minute slices of time
so all data received from 00:00 to 00:05 becomes a single data point @ 00:05
right now with the charting data, we're tracking min, max, average, and last-posted for each slice of time. And for slices, we're aggregating over 1, 5, 10, 30, 60, 120, and 240 minutes.
@novel ember is there a maximum number of location points that can be rendered on a map at the same time?
Hmmm, lemme check
if you just leave it open and running I think we start truncating at 640
(truncating on the client-side, i.e., we won't try to display more than 640 of anything on a dashboard)
I just tested my GPS tracking device on a long drive and it seems to not be loading all the points when I increase the hours of history
ah, you're probably also hitting the 1000 data point limit for the /data API
Ok
when rendering charts, we can aggregate, but for maps, we get the raw data
it's a tricky thing to balance, unfortunately
Well the good news is my program didn't crash
I can download it and put it into Google Earth
yeah
Thanks for your help Adam
let me know how that goes, I'm curious if it can be imported without massaging it too much
sure
happy to
I'm gonna use one of those csv to kml converters
@novel ember It was a little over 1,000 datapoints. i used http://convertcsv.com/csv-to-kml.htm and everything went fine
Thank you, @novel ember !
Thanks again, @novel ember . I switched my chart to one hour of data and it's fine now! It's been running for six hours with no hiccups. I appreciate your detailed description of what was happening!
I'm having motion-start events from my smarthome sensors post to AIO. It's great. I'll start working on analysis of data soon. I should be able to not only extract general typical times people are awake and moving around, but also travel patterns in the apartment.
I think I'll need to start posting motion end events as well.
Hey all! We just deployed some changes to MQTT topics for people using groups to organize their feeds. There's a blog post with details here: https://io.adafruit.com/blog/notebook/2017/11/02/groups-feeds-and-fixing-mqtt-topics/
Bottom line: if you use groups and MQTT, some of your feed subscriptions may have stopped working.
(but it's for the best)
👍
I think the update is a good move. Seems to have fixed the situation I mentioned in GitHub issue #16 (https://github.com/adafruit/Adafruit_IO_Arduino/issues/16), with regards to receiving new data from the AIO website. Could probably close that issue out now... I'm posting my new results in a few.
I'm confused about the difference between adafruit IO and MQTT. Is MQTT a subset of IO?
MQTT is the protocol. AIO is adafruit's IoT service, and it implements MQTT.
You can also use the Adafruit IO API if you don't want to use MQTT
Is there a way to publish a pair of numbers to a feed? The examples I see only show a single value. I'd like to publish x,y coordinates, preferably without publishing x in one feed and y in another, potentially letting them get misaligned.
@sinful shore I believe you could use the location fields for a feed. I haven't used it yet, but I'll see if I can get an example for you.
@sinful shore That is the example if you're using an Arduino IDE. But, the MQTT libraries and the REST API have the same ability.
Thank you! Unfortunately, I just discovered that I can't compile stuff for Adafruit IO because I'm using an Arduino Nano, not an Adafruit product. So back to the search--I had it running with Phant, Sparkfun's now defunct IoT setup. Sigh.
You could use the HTTPClient library the the REST API.
@sinful shore That doesn't sound right. Compiling shouldn't matter on if it's for an Adafruit board or not... And I don't see Adafruit as being the type of company to put things behind a proprietary wall
@Andon, the Adafruit's IO library only works on certain boards. It's not Arduino wide.
Their Adafruit IO libraries have a list of Adafruit processor boards they accept. Compile fails immediately when it sees my board type.
@sinful shore This post will help you use HTTPClient to utilize AIO with their REST API.
https://forums.adafruit.com/viewtopic.php?f=56&t=123666#p622065
If you get stuck, just hop on here or ask in the forum. Somebody around here will get you working.
How would you be contacting the IO servers with a nano? It might be failing because it doesn’t have WI-FI built in too...
@hybrid granite You can maybe use the Ethernet Shield Right ?
Hello.
I wanted to use my ESP8266 to read the voltage of my Lead-Acid battery and publish it to a feed over WiFi or with a SIM800 module.
I used the ESP-MQTT example to make sure the Analog conversion and the publishing work with Wifi - everything worked as expected.
But when I use the MQTT_Fona example my ESP keeps crashing
This is what I receive at the Serial Monitor:
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v3de0c112
~ld
It can't be a power-problem as the SIM800 is powered by a LiPo Battery and the ESP works fine with every other sketch I upload...
Does someone hav a solution to this prblem?
@earnest schooner My experience with the 8266 has shown it to be VERY picky about things happening to pins 0 and 2.
Also, there are some programs that just... don't like it. Especially with an empty loop
@earnest schooner
Do you have the right wires declared for SPI? This looks similar to an issue I ran in to.
I'm on mobile right now and am doing this from memory but I recall having to specify which two pins I wanted for SPI using wire.begin(5, 6);
There may be a capitalization in there somewhere.
@earnest schooner
https://github.com/esp8266/Arduino/issues/887
That should help you. Same output and everything from your issue above with solution.
Thanks for the help!!
@spring bolt GPIO 0 & 2 are floating, nothing attached to them... It would seem like the program is the problem.
@cunning star I only use Software-Serial, no SPI or I2C but it could be that the soft-serial library is the fault. I'll try to communicate over the serial0 port on the esp and report back if that works...
Hope it works!
GPIO 0 & 2 are what you use on an ESP-01 with specific driver support(at least that's my experience). GPIO 4 & 5 is for ESP's 7, 12, 12E as their defaults but can be changed(12E also has extra lines that can be used for secondary I2C and SPI)
I am deploying a rain gauge in rural Nepal as a pilot for a potential larger program, and for the purposes of the pilot, I am using Adafruit IO to collect and present the data. One user just told me he has a preference for a bar chart rather than a line chart. I do not think IO currently offers this. Is it something that is in the roadmap or likely to be offered sometime soon?
@wary wharf I don't know if they're planning on it, but it is definitely easy to do by downloading the raw data and charting afterwards. Unless you're presenting straight off of AIO, then obviously that's not an option...
Yes, it's definitely easy to do after the fact. It would be better if I could represent the live data this way.
I checked over on IFTT, and no dice there either. Seems easy enough for them to do, since they already have line charting.
@cunning star SoftwareSerial doesn't seem to be the problem, I used the TinyGSM library with Software-Serial and everything worked like a charm, I just couldn't connect to adafruit.io as I haven't yet figured out how to add the AIO-Key to the sketch...
:(
@earnest schooner can you post the portion of code where it is failing?
also, is there a reason you need to use the Fona code with an ESP?
@gloomy axle The problem is that I don't know where it's failing. The ESP just doesn't boot with the mqtt_fona example (To get it to upload I also had to remove the Sleepydog library from the sketch).
I want to read the cell voltages of a 6S pack and publish them to adafruit.io (https://hackaday.io/project/27506-6s-iot-bms) but the problem is that the ESP doesn't have access to WiFi 24/7, so I want to use the cellular network to connect it...
Hope that makes it clear 😉
Energy storage for a 12V (boosted to 24V) solar system which publishes the voltage of each cell to a MQTT Broker (plan on using Adafruit.io) ether by using a SIM800 or the ESP8266 depending on the availability of WIFI.
@earnest schooner That's a cool project!
@dusky shuttle Thanks 😊
@earnest schooner I found this issue on github that seems exactly like what you are seeing https://github.com/adafruit/Adafruit_MQTT_Library/issues/90
looks like it may be the serial connection is hogging all the time, and tripping a reset
Hopefully the same solution works here
@gloomy axle I'll try it in a few minutes, thanks 👍
@gloomy axle IT RUNS!!!! It's now stuck at AT+CREG? but I think I'll figure that out myself, thanks again for the great help!!!!
@wary wharf sounds like a pretty amazing project / opportunity! Question about bar charting: are you looking for something like a histogram, or do you envision very spread out data points?
Part of the reason we started with and stick with line charts is that we deal with a lot of data points in series. Most bars in a chart like that would be one or two pixels wide, kind of end up looking like a filled in line chart.
Ok, I'm back with one more question...
after the intial setup, the mqtt_fona example runs the .getNetworkStatus:
uint8_t Adafruit_FONA::getNetworkStatus(void) {
uint16_t status;
if (! sendParseReply(F("AT+CREG?"), F("+CREG: "), &status, ',', 1)) return 0;
return status;
}
after a few second it returns:
---> AT+CREG?
<--- +CREG: 0,5
after a quick google search it seems like the module is registered (but not to the home network (roaming))
Thats no problem, as I'll still be able to connect to the internet.
How do I alter the function .getNetworkStatus to also accept +CREG: 0,5??
I tried:
if (! sendParseReply(F("AT+CREG?"), F("+CREG: "), &status, ',', **1||5**)) return 0;
but that didn't work...
@novel ember This is for rainfall data. I agree that a line graph is adequate, but I think this user is used to bar graphs from an earlier system. It's not a major issue, but I told him I would check.
@earnest schooner have you tried this? if (! sendParseReply(F("AT+CREG?"), F("+CREG:0,5: "), &status, ',', 1)) return 0; Not sure if that will work, but it is worth a shot
@gloomy axle Will give it a try 👍
I'm here, where's the badge?
@barren karma you gotta hang out and we'll give them away at some point
(*helpful also adds bonus points)
Don't be a Terrible Human
whyo whyo did the ESP8266 arduino guys use a typedef enum for the different wifi mode classes. and why have I spent so long avoiding c/c++. 😣
Resolved an issue pulling subscription packet data larger than 128 bytes. Just submitted to github as a pull request (first time rookie!). Location: github.com/kmatch98. Hope this works out to help make IO easier to use for long strings.
@runic tapir Hey congrats on your first PR! 😃
Thanks for the encouragement. Took a while to understand some about MQTT packets and now learning about github. In the end was an easy fix, but went down a few rabbit holes and learned several things in the process. Forward!
That's great! I still have to double check every time I do anything with git and GitHub. I've been working with it for a couple of months and it's still not habit for me yet. MQTT is neat, but I haven't worked with it myself. The rabbit holes that end in learning are the best rabbit holes.
yeah, git/github is a strange strange land at first. congrats, and thank you, @runic tapir
does anyone have a good program for the gyro sensor on the arduino
just to read the angles and turn on an led if the angle is too much
@WHO TOOK MY COOKIES?!?!?!?!?!?#9777 not sure this is the proper channel to ask that question. having said that, I have noticed you asking multiple times. which sensor are you specifically trying to use?
the MPU-6050 Accelerometer + Gyro sensor
@nova robin looks like this library will help you out. https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/examples/MPU6050_DMP6/
thx
I'm having an issue with my project connecting: https://github.com/seckela/anonChatCounter
It seems like its connecting but it's no longer resolving to the main part of the sketch
I can't figure out why its doing that all of a sudden
I assume config.h has your AIO Key and SSID/Password and what not?
What's the serial monitor output showing you that makes you think it's not working?
Yeah it all has that
Just removed it from the commit for obvious reasons
and didn't want to maintain 2 config.h since the only changes were my info and I've sucessfully connected it before.
Hello all. Im new here.
Hello !
@mighty fossil like Czar asked, what is the last thing that prints on the serial monitor. Also, which board are you using?
@stray delta / @cunning star it usually just keeps returning ....... (from line 108)
@mighty fossil which board are you using?
esp8266 or esp32?
ok. after your while(! Serial) put this: Serial.setDebugOutput(true);
then, you'll be able to see the actual state of the esp. let me know what it spits out
So right before the print(".") right?
a little higher up. line 90
`OLED begun
Connecting to Wifi
reconnect
state: 2 -> 0 (0)
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt
connected with N.S.A. Relay Point, channel 1
dhcp client start...
.ip:192.168.1.90,mask:255.255.255.0,gw:192.168.1.1
.WiFi connected
IP address:
192.168.1.90
Connecting to Adafruit IOf r0, .scandone`
@stray delta
alright. so, we're getting a wifi connection. are you sure that your AIO key and username are correct?
nice SSID, btw. 😄
I'll check again, but I used this before and it worked already :p
Haha thanks 😛
Yup, they both match
hmmm.
`/************************ Adafruit IO Config *******************************/
// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "username"
#define IO_KEY "aiokey"
/******************************* WIFI **************************************/
// the AdafruitIO_WiFi client will work with the following boards:
// - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471
// - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821
// - Feather M0 WiFi -> https://www.adafruit.com/products/3010
// - Feather WICED -> https://www.adafruit.com/products/3056
#define WIFI_SSID "N.S.A. Relay Point"
#define WIFI_PASS "password"
// comment out the following two lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
/******************************* FONA **************************************/
// the AdafruitIO_FONA client will work with the following boards:
// - Feather 32u4 FONA -> https://www.adafruit.com/product/3027
// uncomment the following two lines for 32u4 FONA,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);
/**************************** ETHERNET ************************************/
// the AdafruitIO_Ethernet client will work with the following boards:
// - Ethernet FeatherWing -> https://www.adafruit.com/products/3201
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);`
Thats my config.h with obvious changes
ie: password/aiokey/username all are correct on my side
I might try and regen my AIO Key, I think something might be wrong with it
Yeah still nothing
even after the key regen
it might just be the copy+paste here in discord, but "#include AdafruitIO WiFi.h" is missing the underscore. should be "AdafruitIO_WiFi.h".
ok. i didn't think it would be connecting if it wasn't...just trying to cover the bases
yeah, haha, this is what is boggling my mind
I had this working before and suddenly it stopped
and no changes to code?
Not that I recall, this is a project i'm revisiting after a few months
i'm trying something real quick, based on an issue i saw on either the forum or in github.
nope. that won't be it.
have you had your wifi in any mode other than station (e.g. AP, Client)?
I pulled the config.h from the original source so I'm going to try and work that side out to be sure
I haven't
your config.h looks textbook
I thought it did too, but I just wanted to be sure
honestly, i can't find any problems with the code (unless the display stuff is somehow causing it). are you sure you can get info in/out of your router with the huzzah?
I'm not sure on that front
I do know the display is working
I'm able to see up to Connecting to AIO
feed is public and everything
let me give it a go
Let me know what you get
can you add a datapoint. i'm getting an error
and i connected...but that's using my key & username.
Yeah
don't mind the chat history, past testers were trolls
not sure why the data points aren't updating
I'm not seeing the status bar you're talking about
is there a red line across the page, right under the IO in the upper left?
not for me
interesting. it shows usage and what not. go to Home -> Monitor on the AIO page. Do you have any live errors?
I did have to fix one thing
my Node script didn't have the regen'd key
now it does
So now we're getting data points
Not very often at all, literally just on connects I think, and the throttling wouldn't limit my feather connection
Because even when it has 0 connections it'd still resolve the connection
if we turn on the debug in the MQTT library, we might be able to catch it. IO and MQTT do a very elaborate dance...
How do I go about that?
goto the folder where your Arduino libraries are stored, find the Adafruit_MQTT folder, then edit Adafruit_MQTT.h
I'm there
find the following line, and remove the comment slashes: //#define MQTT_DEBUG
Done
save, and then reupload your sketch to the huzzah
Pushing to board
connected with N.S.A. Relay Point, channel 1 dhcp client start... ..ip:192.168.1.90,mask:255.255.255.0,gw:192.168.1.1 .WiFi connected IP address: 192.168.1.90 Connecting to Adafruit IOf r0, Network disconnected. IO test scandone please start sntp first !
i know there is a MQTT connection state of "throttled"...but that's not there. and the sntp thing is fine, i get that on mine
what about the network disconnected
I had commented out the while issue
Ouch, cursing isn't allowed 😦
Auto-modded
are your libraries updated? yeah, the bot will get yah. 😄
i ask because there is a new SSL key (your MQTT debug looks a little different than mine...which tips it off)
Updating and updating board
`OLED begun
Connecting to Wifi
reconnect
state: 2 -> 0 (0)
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt
connected with N.S.A. Relay Point, channel 1
dhcp client start...
..ip:192.168.1.90,mask:255.255.255.0,gw:192.168.1.1
.WiFi connected
IP address:
192.168.1.90
Connecting to Adafruit IOf r0, .scandone
................................`
well crap.
can you turn the MQTT debug back on?
also, you can drop the the Serial.setDebugOutput...don't need that (unless you want to keep it)
hmm.
going to reup to the board
I think something was off
Yeah not sure why its not debugging out, but that file has the line uncommented
if you want, you can change the Serial.print("."); to Serial.println(io.status()); and it will show the status of IO. (why didn't i think of this one earlier?)
line 108
Yeah I replaced it with that and upped the delay to 1.5 seconds
hehe. i usually just let it flood the monitor. 😛
statusText would be more vrbose...yes
status is 1
drop the delay down to 200. we might be missing some of the in-between statuses
upping now
you can change to statusText...but i have the defs up anyway and can translate
at 100 rate
hmm.
i'm about at the end of my knowledge. it may have something to do with your account that only AIO guys can help. I would put a post up on the form.
I hate to drop you off to that after working at this thing for so long
Yeah I might do that, because this has me bummed
Haha, no I appreciate it. I'll drop something on the forums here in a moment, I appreciate all the help.
not a problem. this community is just that. I gotta do my part.
now its bed time. work comes pretty fast. 😴
Haha I hear you and I super appreciate it, I'm starting to dive back into some tinkering after being out of it for a while, so this is me dustying my old projects off
Haha, yeah, same here, thanks for the help boss! Thanks again!
Figured it out I think
Looks like the AIO library handles the wifi connection, so if you try and initiate the wifi connection before the io.connect() you tie up the connection and don't allow it to resolve.
https://github.com/seckela/anonChatCounter/blob/master/anonChatCounter.ino
I'm up and running, thanks again for all the help @stray delta
Hey: when you make a dashboard public, it warns you that this will make all the feeds in it public. But it doesn't. At least, not for me.
@mighty fossil sweet! I had questioned the WiFi.status() before io.connect(), but didn't think it would keep it from connecting. Both learned something on that one.
you need to connect befor you question
like walking up to the teacher before you talk to him/her
@sacred depot the issue with that is io.connect() actually handles the wifi connection
So if you explicitly attempt to connect to wifi then call io.connect() you're trying to open a redundant connection (which isn't checked for in the AIO library) and thus hangs because the channel is busy.
@stray delta thanks again for all the help last night, so happy to have it up and running again, since it was discouraging me from wanting to work on AIO projects
I’m trying to get my pi 0 working but the tv pin isn’t working! I’ve tried 3 different pi’s and 5 different screens ! Does it need to have a ground and a composite wire ?
@crimson belfry what do you mean by tv pin?
I think he means RCA
I’m trying to hook up my pi 0 w to a 3.5 composite screen , I know the screen works I tested it on a old vcr but the pi won’t run , idk if the tv header pin needs to be grounded , all the videos on YouTube don’t talk about a ground being relevant
@seckela#7392 again, not a problem. I'm glad to help whenever I can. I've been digging in the AIO/MQTT libraries with my project, so I though I might be able to get you through the issue. Helping often == learning...such as the case here. And since we found a case where the AIO library might need to check for an existing connection, I figure it's worth it to see if we can get the library to handle that situation. So, into the breach once more! 😄
man...is dynobot still having issues? can't tag at the beginning. @seckela#7392
or at the end. haha
problem isolated and handled. pull request made.
@crimson belfry The TV header pin is two bits, signal and ground. You need both connected. Signal goes to the prong in the center of the RCA plug, ground goes to the round sheath. You can't just use one
Square pad is signal, round pad is ground
Additional sanity check: the signal pad is the one nearer the "TV" silkscreen text and closer to the main chip. Ground is toward the outside of the board
Well I tried it all I think adafruit sent me a sd card with nothing on it
@crimson belfry
https://www.raspberrypi.org/downloads/
https://www.raspberrypi.org/learning/software-guide/
If there really is nothing on your SD Card you can download the images here, and follow the guide for setup.
But you shuold also check if the RasPi is set to HDMI only, if you have a HDMI screen try to boot the pi up and enter sudo raspi-config. I can't remember how thew config screen looks but there should be something like preferences where you can select the video source...
Is my power boost 1000c supposed to get hot while charging a battery? I used a 2.1 amp power bank to try to charge it and instantly noticed the small chip on the power boost getting hot to the touch
@crimson belfry yep: https://learn.adafruit.com/adafruit-powerboost-1000c-load-share-usb-charge-boost/faq#faq-1
Thank you
Basically anytime your charging something at a faster rate (Li-Ion) you're going to get heat as a bi-product, same thing goes with a faster discharge rate.
AIO discorders, I've been working on an enhancement to the AIO Arduino library (ESP8266 only ATM) to enable use of AP+STA mode . I've got it initializing, but the AP side of things requires a lot of IFTT (not the webservice).
Before I get too much further, I wanted to ask if any of you would even use, or see a use for, this funcionality. It's not full Mesh, but would allow a hub-node type setup with multiple boards. Thoughts?
of course, i decide after posting this, to look at doing it without updating the library. it's possible by using the WiFi functions outside of the library. but hey, I could save people like 4 lines of code. lol 😒
Its not about the code you save people, its about saving people the finding/figuring out of said code @stray delta
@mighty fossil yeah, I might just do up an example.
@stray delta with this and the other WiFi related pull request, we'd gladly add more examples to the Adafruit_IO_Library repo. Like a lot of Arduino libs, examples/ act as our defacto guides and regression tests.
and thanks for the PR! I'll check it on the other supported boards for testing and hopefully merge it in next week.
SoftwareSerial mySerial(8, 9); // RX, TX
char endMarker = '\n';
char msgrcv[32] = {0};
char rc;
int x = 0;
const byte numChars = 32;
char receivedChars[numChars]; // an array to store the received data
int msg_num = 0;
boolean newData = false;
// these double values will hold our fake GPS data
int slider_data = 42;
double lat = 0;
double lon = 10;
double rcv_lat = 0;
int rcv_lon = 0;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// set the data rate for the SoftwareSerial port
mySerial.begin(57600);
}
void loop() { // run over and over
//mySerial.print(startMarker);
// mySerial.print(value);
// mySerial.print(endMarker);
mySerial.print(lat);
mySerial.print(endMarker);
mySerial.print(lon);
mySerial.print(endMarker);
lat += 1;
lon += 1;
recvWithEndMarker();
showNewData();
recvWithEndMarker();
showNewData();
delay(2500);
}
void recvWithEndMarker() {
static byte ndx = 0;
char endMarker = '\n';
char rc;
while (mySerial.available() > 0 && newData == false) {
rc = mySerial.read();
if (rc != endMarker) {
receivedChars[ndx] = rc;
ndx++;
if (ndx >= numChars) {
ndx = numChars - 1;
}
}
else {
receivedChars[ndx] = '\0'; // terminate the string
ndx = 0;
newData = true;
}
}
}
void showNewData() {
if (newData == true) {
msg_num++;
switch (msg_num) {
case 1:
rcv_lat = atof(receivedChars);
break;
case 2:
rcv_lon = atoi(receivedChars);
Serial.print("lat: ");
Serial.println(rcv_lat, 6);
Serial.print("lon: ");
Serial.println(rcv_lon);
msg_num = 0;
break;
}
newData = false;
}
}```
new here ,, was that wrong? posting code like that. that would be the uno side of the comm. I sending and rcving from ada io with a huz breakout in between,. Also completly new to discord, etc.
@torn moss If you surround it with three backticks (the one at the top left of your keyboard) on each side, it will show up as a codeblock
@torn moss And welcome to Discord!!
You can edit a previous message if you want as well, to add the backticks to the code you already pasted.
Like that?
Yeah edited! It's almost a code block, I think you might be missing a couple of backticks. That looks like inline code which only needs 1 backtick on either side.
Nice!
tried that. btw, make to claims to orginal code there, just lifted and confirmed it worked.
Here is the huz side.
const byte numChars = 32;
char receivedChars[numChars]; // an array to store the received data
int msg_num = 0;
boolean newData = false;
int slider_data = 0;
double lat = 0.0;
double lon = 0.0;
char endMarker = '\n';
// set up the 'location' feed
AdafruitIO_Feed *aio_lat = io.feed("aio_lat");
AdafruitIO_Feed *aio_lon = io.feed("aio_lon");
AdafruitIO_Feed *digital = io.feed("digital");
void setup() {
// start the serial connection
Serial.begin(57600);
// wait for serial monitor to open
while (! Serial);
Serial.print("Connecting to Adafruit IO");
// connect to io.adafruit.com
io.connect();
// set up a message handler for the location feed.
digital->onMessage(handleMessage);
// wait for a connection
while (io.status() < AIO_CONNECTED) {
Serial.print(".");
delay(500);
}
// we are connected
Serial.println();
Serial.println(io.statusText());
}
void loop() {
io.run();
recvWithEndMarker();
showNewData();
}
void recvWithEndMarker() {
static byte ndx = 0;
char rc;
while (Serial.available() > 0 && newData == false) {
rc = Serial.read();
if (rc != endMarker) {
receivedChars[ndx] = rc;
ndx++;
if (ndx >= numChars) {
ndx = numChars - 1;
}
}
else {
receivedChars[ndx] = '\0'; // terminate the string
ndx = 0;
newData = true;
}
}
}
void showNewData() {
if (newData == true) {
msg_num++;
switch (msg_num) {
case 1:
lat = atof(receivedChars);
aio_lat->save(lat);
break;
case 2:
lon = atof(receivedChars);
aio_lon->save(lon);
Serial.print(lat, 6);
Serial.print(endMarker);
Serial.print(slider_data);
Serial.print(endMarker);
msg_num = 0;
break;
}
newData = false;
}
}
void handleMessage(AdafruitIO_Data *data) {
slider_data = (data->toInt());```
It also reads from a dashboard. I'm using software serial so that I can see the io dashboard and serial monitors for both the huz, and uno. its just an exercise in learning and capabilities
Nice! I've not worked with any of that yet.
I'm workinhg on a IOT coffee roaster and want to be able for others to see, and retrive roast data for comaprision and learning purposes.
That's great! My dad roasts his own coffee. So delicious. He gives me some every holiday. It was a learning curve for him when he first started but now it's another part of his routine.
yep, been doing it for over 15 years, this is my 7th? roaster build. back when we talked via alt.coffee, or email list ? servers. Now we rea 'modern' we have forumns. 😃
Does anybody know if there a advanced way to make the graph dashboard function to display multiple traces from cose like this?
// set up the 'location' feed
AdafruitIO_Feed *location = io.feed("location");'
and then
/ save value and location data to the
// 'location' feed on Adafruit IO
location->save(value, lat, lon, ele);
@torn moss what roaster are you modding? 😉
Is there a prefered GPIO pin for neopixels on a feather express M0
@vapid pewter doesn't really matter, any of the GPIO pins. Various code uses D6
but just because it doesn't have other uses
@torn moss are you talking about the "line chart" block? to the best of my knowledge, it currently only supports one feed at a time. I haven't used it yet, but the "map" block is geared towards location data. Also, browse the AIO Learning Guides to maybe catch some ideas to help you with your goal.
Yep, line cdhart, and I've seen that reference. Just wondering if there isn't anything that can be done outside of their or supplemental to waht they have to get thecapability i I'm loooking for.
J.Andle, its a an air roaster of my own design. Think Sonofresco, but much more controlable with a drop chute, ccoling tray, and tryer. Not an overgrown fresh roast. Iv'e prototyped the roaster with 3-d printing to work out the airflow, so I know that I can do a variable batch size from 200G to 1.4 kG. Hope to be able to get to 2kG. Variable spped BLDC fan motor (not a vac), one-wire tc's with the capabilty of adding more, I2C for LCD / TFT, SD card, either stepper motor gas valve control, or a PV from Clippard., etc. Probalbly going to need to re-host on a Metro M0? for space and speed. And of course the Huzzah to talk to the outside world. As fara as other that i may or amy not have modd'ed....
@torn moss I don't know of any examples of outside supplements to AIO dashboards. However, the REST API is available, so it is definitely doable.
And that sounds like a huge project. Which is meant to say fun and frustrating at the same time. 😄
@stray delta figured it would be somethiong like that. However, I'm going to put that on the 'to-do' list since its jsut to try to keep from getting 'throttled' based upon points per minute. I'm borderline on what I'd loke to do there.
Thank you @robust panther !
@torn moss @stray delta The line chart will show up to 5 feeds at a time. Unfortunately no way to have it show locations for data points.
but if the checkboxes aren't working for you in the block editor, something is definitely wrong :/
@novel ember @stray delta From the support boards they say to use 'groups' as in code example 11. That does give me the abality to send multiple vaules in a single "push"? However, something is flaky in the system.
From the code example you posted on the forums, it looks like you may be pushing data into the system too fast
every data point added to a feed counts against the data rate limit
so a group publish to three feeds, for example, counts as three data points
your delay value is only 1000 milliseconds, which would put you at 180 points / minute, which is too quick for one IO account, unfortunately
what you'd see in a dashboard would be data showing up for about 10 to 20 seconds, and then stopping
@novel ember ahh. totally forgot going through the line chart setup and being able to select 5 feeds. thanks for correcting my misspeak. 😄
no worries 👍
Thats the problem I was seeking to fix myself. Groups let you push multiple data points within a 1 second frame. Anty faster and you get throtlled. Pushing data back out also counts against the feed rate. (at least it seems to).
hello all, I have an enviro phat and I am following this guide... http://frederickvandenbosch.be/?p=2242 its great but I can not figure out how to convert the C to F? any sugestions on what to modify in the code? I appreciate any feedback
@misty swallow equation I've used is: (Celsius * 1.8) + 32 = Farenheight
here is how i've used it in python with a list:
#C to F: C*1.8+32
cels = BMPsensor.read_temperature()
cvalues["temp"] = "%.0f" % (cels * 1.8 +32)
@stray delta Thank you! I am attemting it now.
also, after a quick glance at the BMP280 datasheet, looks like the sensor will only report in C...so converting after the fact is the only way. surprised pimoroni doesn't have a handy function in thier library...
@stray delta
I am new to python and i am confused were i should add it in.
this is what is working sending now...
Send the Enviro values to Adafruit IO feeds
if bmp280_enabled:
# Temperature
t = round(weather.temperature(), 1)
aio.send("enviro_temp", t)
try this. I didn't look at the pimoroni lib in depth, so I'm not sure the data type weather.temerature() returns; might have to play with the formatting/type-handling a bit...
t = round(weather.temperature(), 1)
temperature = "%.0f" % (t * 1.8 +32)
aio.send("enviro_temp", temperature)
you could just as easily use t = "%.0f" % (round(weather.temperature(), 1) * 1.8 +32) to put it on one line. I think it would be "pythonic" either way.
@stray delta i appreciate the tips and will let you know how it goes
@misty swallow np. python, while easy to read, is not easy to learn. at least I struggled with it...still am on most levels. 😄
@stray delta I tested the first example and it worked perfectly. Thank you!!
@misty swallow i think it's a bit confusing as there's some string formatting going on at the same time as the temperature conversion. the temperature conversion is very simple:
F = C * 1.8 + 32
the rest is just to make it look nice before publishing
maybe this helps make it more clear?
c = weather.temperature()
f = c * 1.8 + 32.0
f = round(f,1)
aio.send("envrio_temp", f)
Why not do this?
f = weather.temperature() * 1.8 + 32.0
aio.send("envrio_temp", round(f,1)
that'd work too. i just spread my example out to try and make it more readable and understand what's going on.
Thanks @raven ore this is very helpful 😃
@raven ore thanks for following me up with a deeper explanation. in my haste, i kind of glossed past the fact that round() and the "%.0f" were basically doing the same thing.... @misty swallow glad its working for you
So I’m building a mini computer.. is there a pcb or break out board that gives easy audio out put to a pi 0w ?
Or does the pi 3 have audio out ??
@crimson belfry it's easier on the pi3 via the TRRS jack, but can be done on the pi 0:
https://learn.adafruit.com/introducing-the-raspberry-pi-zero/audio-outputs
however, the analog audio out is pretty poor. you can try to use the audio on the HDMI line, but using something like a USB DAC greatly improves the audio quality and is easier to interface:
https://www.adafruit.com/product/1475
and if you really want to get crazy with audio quality, there are higher quality options:
https://www.adafruit.com/product/3016
which one of these is best for you depends on your application
The Raspberry Pi has an on-board audio jack, which is super handy for all kinds of sound effects and speech, just plug and go! However, for when you want better audio for music playback, a ...
@raven ore thats a lot of options! in terms of highest-quality-audio possible is that possible through the USB?
@storm kernel i use that USB adapter and I'm fine with it, but I'm not doing "audiophile" level stuff. i'm just playing mp3's and various streams. so when you say "highest-quality-audio possible" it kind of sounds like you're in that camp. in that case, something like the pimoroni hat might be better. there's also this:
https://www.hifiberry.com/
https://www.adafruit.com/product/68 is there a version of this wi fi compatible or is this? Not that i am planning on light sabor, but use that as example as that would have to be wi fi? I have this item in shopping cart, thought i would ask now. also would be awesome to see bitcoincash and dash payment since bitcoin fees cost so much fyi
@radiant radish The UNO doesn't have wifi built-in. But there are shields for that. This one is in stock:
https://www.adafruit.com/product/3654
If you want built-in wifi, look at the Adafruit Feathers. But, I don't remember seeing kits that come with extras.
Yes there are. And no problem.
There is a problem with the dashboard and group feeds. I started trying to feed a 3rd value in a group feed to the dashboard, both line chart and 1 feed per text box. I can see the data there, I can read the data back. Look at the feeds, you can see the data. However, the dashboard will only update the first and 3rd value from the feed. The 2'nd value gets updated 1 in 100 times. Works perfectly with only two values in the feed. So, I figured I would send 2 groups of two values to the dashboard as a work around. Quess what, the 2n'd feed of group one, and the first feed of group 2 now update only like 1 in 100.
Here is a link to the issue I raised on the support board, https://forums.adafruit.com/viewtopic.php?f=56&t=127501 It has code, screenshots, updates, all there. If somebody wants to take a look, have at it. Its pretty much stock examole code. I can't see where I would have messed up with that. It would be nice if at least support would respond with something; "odd, confusing, etc. Lack of response is disapointing.
Ok, they got back to me, said they confirmed the probloem I found and fixed it,😀
great work @torn moss
👍
Thanks!
Need help installing avr-gcc toolchain in debian linux for ATMega328p microcontroller
Got the prototype roaster interface working. you can see it here. https://io.adafruit.com/btreichel/dashboards/roaster
Its running on a Huzzah breakout, coded with the arduino ide. Roast data is faked, I do have an arduino controler that I could pass actual data to and from the dashboard via serial (software). Basically this would allow other people to watch the data from the roaster, and I could control the roaster from a browser. I can psot thecode if anybody really wants to see it. I did have to add the slider data into the roast data group to get a persistant value to show on the control sliders.
@torn moss did the gauge not work for you? if you don't need to change the value, a slider is just extra. although, astethics matter to, so if you like a bar vs gauge, then obviously no harm no foul.
@stray delta the sliders actually can feed back to the controller board (uno, or probably a metro mo?) and control the roaster. It's natural gas, air roaster. Obviously you wouldn't put those on a public link.
ok. gotcha. like i said, if it were just displaying data, no need for a slider. but, since we can't see your group/feed setup, I was thinking that your mention of adding the slider data into the roast group was referring to displaying the gas & fan.
The line chart would only plot a point at each change and draw a (slanted) line between points instead of showing a constant value until changed. That's why I feed it back into the group feed. If you look at 'artisan' software, that's the traditional way to log a roast. This was just to learn the tech and capability. In reality the data would be stored and capable of being used as an example of a roast profile, or ran in an automated roast.
Okay so... Public dashboards on AIO are read-only. How can I create a public interface that can send data?
No, there are items like sliders, toggles, etc? that can send data back.
They don't actually send data when I use the public version of the page
I Googled and the latest Github suchlike from a year ago said the public dashboards are read-only with no timeline to change that
Looks like I'll need to make a throwaway account. Oh well
Hmm, my page is public, but then I'm using it.
Open it in an incognito tab or another browser where you aren't logged in
Yeah treied that, I just get a blank page (aka, structure, no data) That doesn't seem rigth either.
Hmm, just created an account woth one of my alternative emails, and logged in. Still no joy(aka data).
hah. i didn't really even notice that the other day when looking at yours. it was all 0s...
Just posted thsi on the support boards. We''ll see waht they say.
are your feeds public? i did a quick test on my account and a text block populated in an incognito...
I looked to see if there was a setting for public feeds, didn't fine one.
yep, just found that
Yep, found that interesting! Gone from my logged in version as well as the incognito one.
Interesting, took everything back to private but now the sliders won't change value. They pop back to zero. You can see that they mometarily change, from the graph, but then go back to the intial value. Reconfirmed the slider action today. No code changes, just changes to the dashboard.
Had to delete the feeds, etc, to get ita ll working again. Them made public the non control feeds, and created a 'public' dashboard with just those feeds. Have another dashboard that is proivate that I can send data to control the roaster. However, there are data update problems with the 'public' board when I browse 'incognito'. Seems similar to waht was fixed before. https://io.adafruit.com/btreichel/dashboards/roaster-temps
Has anyone used an ESP32 with the Adafruit MQTT Library?
I want to use the two Cores of the ESP32, one for battery monitoring of multiple cells and the other one for publishing the values every few minutes.
So if anyone has any experience or tips I'd like to hear them.
Thanks 😊
The adafruit io does use MQTT to their broker
@crimson belfry that pHAT DAC also uses the same chip as the hifiberry AFAICS, and it works out of the box with one line changed in the config.txt on OpenElect on the pi zero w, which then allows you to select hifiberry as the device
@earnest schooner ESP32 with Adafruit_MQTT - yep, works like a charm. Dual cores - I've seen instability in the IO feed with a dual-core ESP32. I haven't been able to track it down but it's definitely not as reliable as I'd like.
@dusky shuttle I've seen similar things, but it seems to be in the dashboard, not the feeds. I keep feed data, seems to be solid. Display is another matter.
@torn moss That's a good point - I did not go look in the monitor to see what data were arriving!
@dusky shuttle Thanks for the information!! I will try to run the MQTT part on core0 and the battery monitoring on core1. I hope the MQTT library doesn't load the core0 too much...
Can some of you hit this link. There has been some oddity around it, and would like to know what if you see something like this.
Heres the link. https://io.adafruit.com/btreichel/dashboards/roaster-temps
@torn moss I can see it. The very first time it redirected to the .io home page, but now it's fine. Updating every second, it looks like.
@robust panther Thats what it suppose to be doing.
@dusky shuttle what sort of instabilities? Are the wrover units better than wroom?
@storm kernel I didn't test the wrover units, only the wroom 32s. Mostly I would see hangs that required a hard reset to resolve.
PREVIEW! All the Internet of Things - Episode 2 - Protocols @digikey @opal vector #adafruit http://www.digikey.com/alltheiot & https://youtu.be/wx4C51gkiqs
Preview! Visit: http://www.digikey.com/alltheiot Adafruit and Digi-Key have teamed up to present All the Internet of Things - a six-part video series coverin...
I've been getting this error msg since Monday. Tried to add a 9th feed it complained. Just now deleted one of my feeds (from 8 to 7), created a new feed, via "Feeds". Took it, ran the modified code, still getting this."Validation failed: Feed limit reached. Please remove one of your feeds prior to creating a new feed."
Anybody seen similar, support has been silent.
Can anyone help me, I'm trying to setup a dashboard for a NeoPixel ring, but I'm kind of lost at how to setup the initial stuff.
Can you make one input effect another?
@mighty fossil Yes, but if you do you cant make it public. Saw your msg, my public dashbaord doesn't seem to be working right now either.
See, those I share it with (including myself in incognito) can see the colors once made public
but can't interact with the dashboard
But with my instance where I'm logged in I can do so.
Yep, not changing, but then you can't chang stuff on a public feed from a dashboard. @viral stratus says it is designed that way in the protocol. And it knows you are you ob the public dashboard, thats why 'incognito' to test.
Are public dashboards still read only? I see at the start of the year a post saying that API V2 allowed for granual rights, but that dashboards remained Read Only
Apparently yes
So how do I make a dashboard that can be ineteracted with publically?