#help-with-wippersnapper-and-adafruitio

100 messages Β· Page 7 of 1

warm palm
#

can OpenCV run on a RP3B+ ?

#

or is it overloaded

graceful sluice
sacred depot
#

I am using adafruit io

#

my problem is that my esp8266 does not receive any data

#

my sketch

#

@royal rapids

#

It connects sucessfully

royal rapids
#

Ok

#

what do your feeds look like?

sacred depot
#

it has a value

#

like this

#
Adafruit_MQTT_Subscribe *subscription;
  while ((subscription = mqtt.readSubscription(5000))) {
    if (subscription == &onoffbutton) {
      Serial.print(F("Got: "));
      Serial.println((char *)onoffbutton.lastread);
    }
  }
#

if i add data it does not receive it

#

@royal rapids here

royal rapids
#

Looking..

#

@sacred depot what happens when you add a value called "ON" to the feed?

#

does it your board receive it?

sacred depot
#

no

#

that 's the problem

royal rapids
#

@sacred depot Ok. Could you paste your code as a gist here, https://gist.github.com/, and share it in the channel? Make sure to remove your WiFi credential and AIO keys

#

I'll review it.

sacred depot
#

@royal rapids i removed pass and keys

royal rapids
#

Ok, taking a look

sacred depot
royal rapids
#

It should show up under Connections

sacred depot
#

it is not connected

#

but my nodemcu is connected with mqtt

royal rapids
#

@sacred depot your Serial Monitor printed out "MQTT Connected"?

sacred depot
#

yep

royal rapids
#

@sacred depot Could you reset the board, keep the monitor page open, and see if the board shows up under Connections when it prints that?

sacred depot
#

okay wait a sec

royal rapids
#

I think the board may not not be receiving data because it disconnected

sacred depot
#

here

#

it's connected

royal rapids
#

@sacred depot Ok, open a new tab and go to the onoff feed

#

click add data and then type ON

#

the new data should show up on your feed

sacred depot
#

i use 0 and 1

royal rapids
#

Please try ON

sacred depot
royal rapids
#

Does the serial monitor show new data?

sacred depot
#

that works

royal rapids
#

Yep!

#

so..

sacred depot
#

no the serial monitor not shows it

#

i meant that u can add data

royal rapids
#

What does the serial monitor show?

sacred depot
#

nothing

royal rapids
#

could you copy and paste here?

sacred depot
#

wait a sec

#

lol it works

royal rapids
sacred depot
#

wdym

#

but else thx

#

πŸ˜„

sacred depot
#

yes lol

royal rapids
#

Ok, let me respond saying it's solved so I dont reply in two places

#

np!

sacred depot
#

okay or i am closing

#

it

royal rapids
#

done!

sacred depot
#

okay thx

royal rapids
#

np, im leaving it open so you can post any other q's in there πŸ˜„

sacred depot
#

thx again

toxic venture
#

I'm new to adafruit-io Where do i find my your_big_huge_super_long_aio_key

keen dirge
#

@toxic venture log into you aio account. In the top right of the page there is a link to your key.

#

Upper right

low depot
#

hi. does anyone know the max mqtt keepalive setting that is allowed on the mqtt broker on adafruit io?

#

with a cellullar conneciton I would like this to be as long as possible

sacred depot
#

Should one be able to see the io dashboards on ios?

low depot
#

with a cellullar conneciton I would like this to be as long as possible
Seems to be pretty short. <5 minutes? If that is correct it is not very well suited for ultra low power sensor applications 😦

#

Aws iot has 20 minutes. Had hoped adafruit was longer than that

royal rapids
#

@low depot It should be configurable from your MQTT client, not the broker.

low depot
#

Yes but the broker ultimately decides what the maximum allowed timeout is right? It seems like the socket is closed when i use keepalive longer than approx 5 minutes. Same setup have worked towards aws iot with 20 min keepalive.

#

If anyone can confirm they have worked with longer keepalive timeouts it is great. (then the problem probably is on my end)

royal rapids
#

5 minutes is our standard keepalive. 20 minutes is a long time to keep a connection open.

acoustic igloo
#

I am seeing lots of dropped packets. I have increased SUBSCRIPTIONDATALEN to 255 my message is about 90 bytes. I have turned on MQTT_DEBUG. The data is commingin but it says "Dropped a packet". This is an example

#
15:53:36.847 -> mqtt:   Read data:        0 [0x30], 
15:53:36.847 -> mqtt:   Packet Type:        0 [0x30], 
15:53:36.847 -> mqtt:   Read data:        V [0x56], 
15:53:36.847 -> mqtt:   Packet Length:    mqtt:   86
15:53:36.847 -> mqtt:   Read data:          [0x00],   [0x20], c [0x63], b [0x62], i [0x69], t [0x74], t [0x74], e [0x65], 
15:53:36.847 ->     r [0x72], 7 [0x37], 8 [0x38], / [0x2F], f [0x66], e [0x65], e [0x65], d [0x64], 
15:53:36.847 ->     s [0x73], / [0x2F], i [0x69], o [0x6F], t [0x74], - [0x2D], b [0x62], e [0x65], 
15:53:36.880 ->     e [0x65], r [0x72], - [0x2D], c [0x63], o [0x6F], m [0x6D], m [0x6D], a [0x61], 
15:53:36.880 ->     n [0x6E], d [0x64], { [0x7B], " [0x22], n [0x6E], a [0x61], m [0x6D], e [0x65], 
15:53:36.880 ->     " [0x22], : [0x3A], " [0x22], v [0x76], e [0x65], n [0x6E], d [0x64], " [0x22], 
15:53:36.880 ->     , [0x2C], " [0x22], i [0x69], d [0x64], " [0x22], : [0x3A], " [0x22], 1 [0x31], 
15:53:36.880 ->     " [0x22], , [0x2C], " [0x22], s [0x73], l [0x6C], o [0x6F], t [0x74], " [0x22], 
15:53:36.880 ->     : [0x3A], 1 [0x31], , [0x2C], " [0x22], a [0x61], r [0x72], g [0x67], s [0x73], 
15:53:36.880 ->     " [0x22], : [0x3A], [ [0x5B], " [0x22], C [0x43], h [0x68], a [0x61], r [0x72], 
15:53:36.880 ->     l [0x6C], e [0x65], s [0x73], " [0x22], ] [0x5D], } [0x7D], 
15:53:36.880 -> Dropped a packet
#

This is what I posted to the feed {"name":"vend","id":"1","slot":1,"args":["Charles"]}

#

It looks like all the bytes made it but it still says the packet was dropped. Ideas? has anyone seen this behavior?

royal rapids
#

@acoustic igloo What library are you using?

#

Adafruit MQTT?

acoustic igloo
#

yes

#

Here is an example of when I posted the same message from a dashboard. The button press posts the json on press and on release so the topic gets 2 copies on the json.

royal rapids
#

Could you try this branch?

acoustic igloo
#

Perfect. that tends to explain the behavor I saw in the message.txt I just sent

royal rapids
#

Sounds similar to the issue you're having.

acoustic igloo
#

where the bytes look like they are out of order

royal rapids
#

If It works for you, I can merge it in.

#

hasn't tested it robustly

acoustic igloo
#

SWEET. I will test right now.

#

I totally love this place. just sayin!

royal rapids
#

πŸ™‚

acoustic igloo
#

Ok tested it, I am still seeing my issue but its behaving much like the other lib

#
16:11:36.305 -> Read data:        V [0x56], 
16:11:36.305 -> Packet Type:        V [0x56], 
16:11:36.305 -> Read data:          [0x00], 
16:11:36.305 -> Packet Length:    0
16:11:36.305 -> Packet len: 2
16:11:36.305 ->     V [0x56],   [0x00], 
16:11:36.305 -> MQTT ping packet:
16:11:36.305 ->       [0xC0],   [0x00], 
16:11:36.305 -> Client sendPacket returned: 2
16:11:36.305 -> Read data:        c [0x63], 
16:11:36.305 -> Packet Type:        c [0x63], 
16:11:36.305 -> Read data:        b [0x62], 
16:11:36.305 -> Packet Length:    98
16:11:36.380 -> Read data:        i [0x69], t [0x74], t [0x74], e [0x65], r [0x72], 7 [0x37], 8 [0x38], / [0x2F], 
16:11:36.380 ->     f [0x66], e [0x65], e [0x65], d [0x64], s [0x73], / [0x2F], i [0x69], o [0x6F], 
16:11:36.380 ->     t [0x74], - [0x2D], b [0x62], e [0x65], e [0x65], r [0x72], - [0x2D], c [0x63], 
16:11:36.380 ->     o [0x6F], m [0x6D], m [0x6D], a [0x61], n [0x6E], d [0x64], { [0x7B], " [0x22], 
16:11:36.380 ->     n [0x6E], a [0x61], m [0x6D], e [0x65], " [0x22], : [0x3A], " [0x22], v [0x76], 
16:11:36.380 ->     e [0x65], n [0x6E], d [0x64], " [0x22], , [0x2C], " [0x22], i [0x69], d [0x64], 
16:11:36.380 ->     " [0x22], : [0x3A], " [0x22], 1 [0x31], " [0x22], , [0x2C], " [0x22], s [0x73], 
16:11:36.380 ->     l [0x6C], o [0x6F], t [0x74], " [0x22], : [0x3A], 1 [0x31], , [0x2C], " [0x22], 
16:11:36.380 ->     a [0x61], r [0x72], g [0x67], s [0x73], " [0x22], : [0x3A], [ [0x5B], " [0x22], 
16:11:36.380 ->     C [0x43], h [0x68], a [0x61], r [0x72], l [0x6C], e [0x65], s [0x73], " [0x22], 
16:11:36.380 ->     ] [0x5D], } [0x7D],   [0xD0],   [0x00], 0 [0x30], V [0x56],   [0x00],   [0x20], 
16:11:36.380 ->     c [0x63], b [0x62], i [0x69], t [0x74], t [0x74], e [0x65], r [0x72], 7 [0x37], 
16:11:36.380 ->     8 [0x38], / [0x2F], 
16:11:36.380 -> Dropped a packet
#

This is super interesting We see the header i think should be 0x56, 0x56, 0x00 int he first part of the packet.. Bit we see the data content in the first 3 bytes

#

This is a GOOD message

16:11:21.185 -> Read data:        0 [0x30], 
16:11:21.185 -> Packet Type:        0 [0x30], 
16:11:21.185 -> Read data:        V [0x56], 
16:11:21.185 -> Packet Length:    86
16:11:21.185 -> Read data:          [0x00],   [0x20], c [0x63], b [0x62], i [0x69], t [0x74], t [0x74], e [0x65], 
16:11:21.185 ->     r [0x72], 7 [0x37], 8 [0x38], / [0x2F], f [0x66], e [0x65], e [0x65], d [0x64], 
16:11:21.185 ->     s [0x73], / [0x2F], i [0x69], o [0x6F], t [0x74], - [0x2D], b [0x62], e [0x65], 
16:11:21.185 ->     e [0x65], r [0x72], - [0x2D], c [0x63], o [0x6F], m [0x6D], m [0x6D], a [0x61], 
16:11:21.185 ->     n [0x6E], d [0x64], { [0x7B], " [0x22], n [0x6E], a [0x61], m [0x6D], e [0x65], 
16:11:21.185 ->     " [0x22], : [0x3A], " [0x22], v [0x76], e [0x65], n [0x6E], d [0x64], " [0x22], 
16:11:21.185 ->     , [0x2C], " [0x22], i [0x69], d [0x64], " [0x22], : [0x3A], " [0x22], 1 [0x31], 
16:11:21.185 ->     " [0x22], , [0x2C], " [0x22], s [0x73], l [0x6C], o [0x6F], t [0x74], " [0x22], 
16:11:21.185 ->     : [0x3A], 1 [0x31], , [0x2C], " [0x22], a [0x61], r [0x72], g [0x67], s [0x73], 
16:11:21.185 ->     " [0x22], : [0x3A], [ [0x5B], " [0x22], C [0x43], h [0x68], a [0x61], r [0x72], 
16:11:21.185 ->     l [0x6C], e [0x65], s [0x73], " [0x22], ] [0x5D], } [0x7D],
#

In this we see 0x56, 0x56, 0x00 then the data

#

Not saying the branch is not correct. just that it may not fix my issue. πŸ™‚

royal rapids
#

@acoustic igloo That is good. I'm using that branch to test a dev build of Adafruit IO Wippersnapper which has tight timing constraints and it doesnt drop packets

acoustic igloo
#

hmm I am using a feather M0 not sure if that matters

#

I am also going to set up a test harness that can publish messages to the feed so I dont need to double the messages (the dashboard push button wants to post on press and release) This should give me a way to test a bit better.

royal rapids
#

@acoustic igloo that'd be great. Let me know how it goes

acoustic igloo
#

ok. not sure if you saw, I have alrady tested the branch. and I am still seeing the packets come in weird. the 2 examples above were from the new branch

#

am happy to do more testing. πŸ™‚

#

and post results on the PR.

royal rapids
#

Yeah, I'll be watching that branch

sacred depot
#

Hi!
I have attached a D1 mini - ESP8266 to a led strep and I try to adjust the leds via my google home. I have succeeded to do so with IFTT and adafruit.io. I am using the adafruit package and mqtt protocol to send messages. This works fine up to 3 or 4 hours, but then the D1 gets stuck in some kind of zombie mode, and does not read the incoming messages anymore. Does anyone know why the D1 is freezing and how I can solve this problem?

acoustic igloo
#

@royal rapids I set up a test script you can see it here: https://github.com/cbitter78/iot-beer-machine/blob/adafruit/test_harnis/test_vend.py. Then I double checked the pr and I was testing from https://github.com/Fapiko/Adafruit_MQTT_Library but I was on the wrong branch. πŸ€¦β€β™‚οΈ Good news is, so far no misformed packets!

#

I am noticing that if I post a message the the feed the feather gets it very quickly.. LOVE IT. However my project is to convert a 1980's vending machine (cans) to my IOT beer cooler As such the feather gets a command, that has the slot number to vend. vending (turn on a motor, wait until its done, turn it off) takes about 10 seconds. During this time if I post new messages to the feed the feather for a second vend when its done, The feather gets the message but never calls my call back function. Would love your thoughts. [I fully expect this to be my codes fault πŸ˜‰ ]. I can test over and over again because I built a test rig that simulates vending with some motors.

acoustic igloo
#

@royal rapids This fixed my issue https://github.com/cbitter78/iot-beer-machine/pull/1/commits/1e397933abc029259031e5d20ef2a4ab6899efcb#diff-0c8b26aa178a448635c3c311e20d35f954d71dcc34ee982353a5c6b66e1ffeb6L133. You could say it was my code. I switched from using mqtt.processPackets to mqtt.readSubscription. Not sure what that suggests but hey everything is working awesome. NO DROPPED Packets when using the branch from https://github.com/adafruit/Adafruit_MQTT_Library/pull/170. its 1000% better! Thanks again for the help.

GitHub

GitHub is where people build software. More than 50 million people use GitHub to discover, fork, and contribute to over 100 million projects.

sour vigil
#

Is it possible to use the AdafruitIO libraries with an Arduino Nano 33 IoT? I'm having problems getting any of the examples to work, but I'm also not very familiar with that board so it may be something totally obvious I'm missing.

acoustic igloo
tardy wadi
#

Has anyone got Adafruit IO working with Unity? πŸ™‚

south gust
#

I need some guidance on Adafruit IO. I have I Pi 4 and I recently bought the 7" Raspberry Pi touchscreen and a case to hold it all as a kiosk style indoor air quality display. I have dashboard and feeds allset up in IO. Functionally, everything is fine. Is there a way to display just the gauges? In effect crop out top, right side, bottom of IO Dashboard web page to just show the gauges? The top image is as it shows via VNC, bottom is what I desire it to look like. Of note is that at bottom of page is a bunch of links, other stuff that I also want to hide.

late pelican
#

I think there is an argument to launch chromium in fullscreen mode (aka kiosk mode)

#

@south gust --kiosk or --app , I don't know the real difference.

south gust
#

I thought about that but while not 100% sure I think I'll still get what amounts to the Adafruit header and footer since those items are part of page.

south gust
#

@late pelican You were right. I had been looking at a different site regarding kiosk mode on a Pi but on Adafruit IO page there is an option to share in kiosk mode which strips out everything except the blocks added to dashboard.

late pelican
#

good πŸ™‚

sacred depot
#

Hi @royal rapids I had an idea and I'm curious to get your take on it. I think it would be helpful if Adafruit IO+ had a feed generated automatically that kept a tally of operations per minute for a given account. For example, if I get throttled at 60 operations per minute and I'm currently doing a number of feed updates that total 34 in the last minute, the auto-generated feed would show 34. This would be really helpful on devices to allow some devices to use more IO feed updates when there's some available.

royal rapids
#

@sacred depot hi. like a counter?

#

There is an error topic

sacred depot
#

hi @royal rapids yes, I was playing with this yesterday and the simplest may be to expose the feed updates/min that IO uses for throttling. If I can read that value I can have my code throttle up/down based on my cap

twilit jasper
#

Hey guys, im not getting any temp or humidity data, just nan, on the adafruit dashboard. Not sure if i wired this correctly with qwiic and the esp8266 d1 to yellow and d2 to blue

#

Or is it because that example is not for the si7022 and i need to use that library in the example?

#

Yep that was it, works now

twilit jasper
#

has anyone worked with the sgp30, i am trying to figure out how to manage the baseline

stuck stump
#

anyone here got experience with adafruits 2.13" e-ink monochrome feather? I can't seem to get the display working :/

red glen
#

I wonder if there is any interest in adding some sort of "blueprint" importing and exporting feature to the IO server. I noticed walking through the set up in this guide: https://learn.adafruit.com/aio-quote-board-matrix-display/code-the-quote-board#adafruit-io-group-feeds-dashboard-3071451-9 that there are quite a few things that need to get set up by the user (Feeds, Groups, Dashboards). Perhaps the server could generate some JSON blob that describes all of those various items that need to be set up. The blob could be provided alongside projects. The server could then have an import function where the JSON blob can be pasted and it will parse through and create anything that the user doesn't already have set up.

floral pagoda
#

I've got a Huzzah32 talking nicely to Adafruit.io using the examples provided in the Arduino Adafruit IO library. When I send a string feed->save(myString) with escaped double quotes, the send fails. If I convert double quotes to single quotes, the data is published: myString.replace("\"","'");feed->save(myString). Is this working as intended? Am I making an obvious mistake? The replacement is easy enough to implement, but seems to present a problem if the string being published is something like JSON, which is supposed to have the double quotes.

sacred depot
#

@red glen I'd be open to just about anything

pulsar osprey
#

Hey guys, I have a raspberry pi project where I'm using the following python libraries: adafruit_mcp3xxx.mcp3008 and adafruit_mcp3xxx.analog_in
I'm trying to read temperature values from an MCP9700A, which is a "Low-Power Linear Active Thermistor IC".

I'm getting odd temperature readings when I follow the formula given in the documentation for the device - which I get by doing:

temp = (chan.voltage - 0.5)*100

More specifically, they seem to be about 20C above expected. So subtracting 0.7 seems to fix it but I'm doubtful if the readings are actually accurate. I'm wondering what chan.value does incase I can maybe find out if I can work out the temperature using that instead!

twilit jasper
#

https://www.instructables.com/Control-LED-Using-PushButton-With-NodeMCU/ <-- can someone help me understand this setup? why can i not just pass current from 3v, into switch, and into a pin that i am listening to? I actually tried this and it was responding to the smallest voltage changes regardless of the swtich being on or off. But i dont understand why

Instructables

Control LED Using PushButton With NodeMCU: Hello Makers,In this instructable we will see the easiest way to connect the Push Button to NodeMCU. And control LED using PushButton.

twilit jasper
#

can not get this to work

left dragon
#

@twilit jasper there are a few problems with the first instructable, the switch is not wired correctly in the above diagram and there is no current limiter on the LED. The second one doesn't have the switch wired correctly either, but at least there is a current limiter on the LED.

twilit jasper
#

yeah i wasnt ableto get any of them to work, i basically just did a input_pullup to ground with switch, and got that working

left dragon
#

that's the best solution, congrats

twilit jasper
#

ty πŸ˜„

#

now to learn about input pullup vs input, i have no idea πŸ˜„

left dragon
#

basic idea is that a digital input cannot be left "floating" it needs to be HIGH or LOW

#

the INPUT_PULLUP uses an internal resistor to keep the pin HIGH until you press the switch, then it goes LOW

#

you could use an external 10K to pull the pin HIGH and use INPUT, but since it's built in...

#

i've found instructables to vary in quality from excellent to "HUH???"

marsh violet
#

Looking for some assistance on connecting a Grove sensor to Adafruit.io. My research so far is taking me down the road of learning more on push requests and scripting them in python. The goal of the project is to use sensors to push data into adafruit.io since Seeed discontinued their IFTTT connector a few years back. This all may be a crappy explanation but I'm trying to breath new life into a bunch of sensors. I can send a curl command (guessing thats the right term) via command prompt to get LEDs to go on which is pretty cool (as an example).

#

Really want to hook in the sensors (temp/hum/dust) to an adafruit.io dashboard. Just not sure how to integrate any of this. Im in the understanding that this Grove sensor kit can utilize REST API (barely familiar here)

graceful sluice
#

sensors don't usually do comms on their own. they usually need to be connected to a controller. what controller are you using?

marsh violet
#

Its using the Grove board which is connected to the internet via wifi

#

I can launch the app on my phone to connect to it and it even has API strings to use. Just trying to figure out how to run a script that will allow the grove sensor board to talk to adafruit.io

#

@graceful sluice This used to hook right into IFTTT which did all the work of communicating

marsh violet
#

if I copy/paste that curl example into a Windows command line it works like a charm. Just trying to figure out what can I do so that I'm getting constant readings and data sent to Adafruit.io

#

what all is involved in standing that up via a rest api

#

is there an easy button for this one where I can just copy/paste that curl example into an app or do I need to start from scratch and host a python script on AWS? I know the concepts here and lack full knowledge on how to take this project across the finish line (willing to learn though!)

graceful sluice
#

if the wiolink board can be reprogrammed to send its data to AIO, that's the best option. Otherwise, you'll have to set up some sort of scheduled job to read the data from seeed.io and post it back to AIO.

marsh violet
#

Would I program it solely in python?

graceful sluice
#

I don't think you can do that. Have you checked the manual for the board?

marsh violet
#

So I ran the curl push example in a command line and it works which tells me I’m pulling data from the sensors. Now time to automate

cinder nymph
#

What is the best way to unregister a callback set with onMessage for a feed?

#

feed->onMessage(0); seems to work, based on looking in AdafruitIO_Feed::_init() where it sets "_dataCallback = 0".

molten elk
#

New UI changes are nice! Is there a way to move keys between groups with their data? The UI doesn't seem to have a way to do it, and I tried to insert a group name in front of an existing key (that is not in a group, aka default) via Feed Info dialog, but that doesn't work.

marsh violet
#

@graceful sluice here is the visio of my understanding on how this board works. Just trying to figure out the what/how of a REST API orrr if there is something out there that lets me get the GET/POST requests into an app and then map it to Adafruit. This was all done previously with IFTTT but SEEED shut down their IFTTT connector a few years ago

graceful sluice
molten elk
#

would love to see an IO Plus tier where feed rates and size were limited but data storage was near infinite or FIFO on a long window?

sacred depot
royal rapids
#

I'm trying to consolidate support for this new update

#

ah, i saw you already did thanks

simple drift
#

I have a device streaming sensor data to Adafruit IO. It crashes once every 24hr, no specific time, but it always happens when I send data to a particular feed. The only difference between this feed and the rest is that it is uploading a string value (Ex: 'a', 'b', 'c'...) while the rest are integers/floats. I'm using the python API, and here is the line which fails:python aio.send_data(string_feed.key, my_string_value, metadata) and here is the error I get: bash ERROR:root:Could not send data to Adafruit IO. Exiting System This error message is from the logs I am generating from my device so that I can troubleshoot (using the python3 logging package). How can I get error message feedback from send_data()?

sacred depot
#

@royal rapids do you know if supporting a wider canvas is in the pipeline for future features? Nearly all non-mobile devices have widescreen and there's a ton of wasted space in the margins

royal rapids
#

@sacred depot Likely the "large" canvas is the largest for now, it's 1300px I believe

#

You can add that request to the IO UI Updated thread, Justin's in there and checking it.

#

@simple drift I'm not sure, Adafruit IO Python should raise an error when it fails...

simple drift
#

@royal rapids do you happen to know what the error message is roughly? That would allow me to search the logs

royal rapids
#

@simple drift Are you using Adafruit IO Python with the HTTP client or the MQTT client?

simple drift
#

@royal rapids HTTP

royal rapids
simple drift
royal rapids
#

np!

sacred depot
#

@sacred depot Pinning a shortcut to your homescreen is probably the closest.

slate rock
#

Is it possible to self-host adafruit io service? Or at least the time sync part?

royal rapids
#

@slate rock Not currently

slate rock
#

Hm, I'm getting a lot of time drift and don't want to spam the service to stay in sync.

royal rapids
#

@slate rock You're getting time drift with the Adafruit IO time service?

slate rock
#

Drift between updates, several minutes per hour.

#

I could update more often, but don't want to have to spam the service to do it.

late pelican
#

@slate rock : you can host a very simplistic api in your local network and call it whenever you want... a php code that give utc time in json whatever the arguments, for example

#

there is also a way to do that with a oneliner python http server, and a .py file, I guess

slate rock
#

ah, that's a great idea... why didn't I think of that

twilit jasper
#

is it possible to send an array or object to a feed?

twilit jasper
#

also how do you delete a feed group?

zenith temple
#

@royal rapids I got pulled away from my AIO project for a bit, but I am now now back to trying to build out dashboards via the API, as we discussed here on 10/26. Following your suggestion, I sent an email to the AIO support last week, but I have not received a response. If you could connect me with the IO web dev team, I'd appreciate it a lot. Thanks!

white apex
#

Getting a "Failed to request Hostname" message when trying to send data to my feed. It had been happily plugging away for days before failing around 2am this morning. Any ideas? resetting my pyportal seems to have cleared it up but this device is monitoring the air temp in the room that the water pipe comes into my house (it froze last year) and sends me an alert when it gets below 32 and I'm hoping to avoid having it fail when I need it.

late pelican
#

maybe you can add the faulty code in a try: except: block so it doesn't crash if your Internet connexion is down, for example ?

white apex
#

It has one, the except is catching it and telling me the message about Failed to request hostname and then looping again

#

Do I need to do some kind of reinitializing of the connection to adafruit io if this happens?

#

I do the connection to the feed once before entering the while loop, so that would make sense to do if this is something that indicates that connection is broken somehow

shell star
#

@white apex the library will usually try and reconnect

white apex
#

That’s what I wondered, thank you. Is there a way to test for connection? I should go look at the documentation for that library I suppose.

shell star
#

There are a lot of layers below the pyportal library. debugging usually involves removing some try: excepts so you can see where things are going wrong

twilit jasper
#

io.run is killing my stepper motor:

#
void loop() {

  //Serial.print(throttleCount);
  if (currentThrottleCount >= throttleReset) {
    io.run();
    currentThrottleCount = 0;
    Serial.print("reset");
  }
  currentThrottleCount++;

  if (stepper.distanceToGo() != 0) {
    stepper.run();
  }
  else
    stepperOff();
}
#

i tried to throttle it, but its still not ideal

#

without the throttle, my stepper motor runs 100x as slow, so io.run() is really slowing down the loop

twilit jasper
#

Anyone?

sacred depot
#

hey, this is a less frequented channel but people to stop in

#

let me see if I can help

#

Are you reading or writing to IO for your stepper motor @twilit jasper ?

#

If you are reading a value to action on with the stepper, I'd read the value (like number of steps) then interate through using a local variable so your IO stuff is not slowing your stepper motor.

twilit jasper
#

@sacred depot i use io to trigger my stepper to move between home and a predesignated position

#

so i guess its listening for events

#

the stepper motor part works fine, but the io.run() makes the stepper.run() perform much slower than normal

#

i dont know what a good solution is

sacred depot
#

well IO is not going to be very fast for that, and if your motor moves too fast IO may not update in time

#

I'd suggest a routine where you read the IO to a local value, then step

twilit jasper
#

@sacred depot isnt reading the io to a local value still going to need to run io.run() in the loop? which would result in the same delay?

sacred depot
#

let's chat in project help

twilit jasper
#

okay

keen zealot
#

I already posted this in #help-with-circuitpython but it may be a better topic for this channel:
I dug deeper into my problem with the error An error occured, retrying! 1 - Sending request failed. I am using the adafruit_matrixportal library and I cannot get/put any requests from/to adafruit io once I called the matrixportal get_local_time() function.
Can someone with a matrixportal m4 reproduce the issue? Does someone know a solution?
matrixportal.get_local_time()
matrixportal.get_io_data("test")

An error occured, retrying! 1 - Sending request failed

royal rapids
#

@keen zealot Could you file this as an issue on the Matrixportal library's github page?

royal rapids
twilit jasper
#

is it possible to send an array or an object to IO? I have a air quality PM meter, that outputs about 6 data items. sending each of them to IO one by one is not ideal. Any ideas?

royal rapids
#

@twilit jasper You may want to put these feeds in a group, and update the Adafruit IO group

twilit jasper
#

@royal rapids awesome ty! ill look that up

#

@royal rapids can it be done the same way for mqtt?

royal rapids
twilit jasper
#

awesome ty!

#

@royal rapids a problem i had earlier. I was using a io dashboard button to trigger a stepper motor. the issue was that io.run() was causing the stepper motor to run very slowly slowly since they both competed for cpu time in loop. I got around it by not running io.run() if the stepper needs to move. I am wondering if switching to mqtt will solve this issue

royal rapids
#

@twilit jasper It may be faster. We have a guide here:

twilit jasper
#

thanks @royal rapids

twilit jasper
#

@royal rapids how do i delete a group from IO? I dont see any option, looked everywhere, im probably blind

royal rapids
#

@twilit jasper on IO Web?

#

You can't, it's a bug and we're looking at it.

twilit jasper
#

Ohh i see, yes io web

#

I created a bunch accidentally from code somehow

keen zealot
#

@royal rapids I created the issue

twilit jasper
#

is there another way to delete a group from IO?

keen zealot
#

I am able to create and delete groups on the web page:
to delete (an emtpy) group just go to <username> > feeds so you see all feeds and their groups. click on the group name and then there is a "delete group" button. Is that not working for you?

twilit jasper
#

sweet they fixed it!

#

ty @keen zealot

twilit jasper
#

I cant figure out how to publish a group of data with mqtt and io. I am looking at the docs, and it says to send json. But i dont see any info on sending json with Adafruit_MQTT_Client and arduino/c++

crystal abyss
#

Is it possible to push to Adafruit.io with Micropython running on the HUZZAH32? I thought I could do it using CircuitPython, but doesn't appear to be supported on the HUZZAH32.

twilit jasper
#

I see that the publish function, which can probably take a feed and json is in Adafruit_MQTT.h. But all the examples online dont use Adafruit_MQTT.h, even though its included in the examples, they just use Adafruit_MQTT_Client.h

#

yeah i cant find anything on it, ive gone over a dozen articles and tutorials

graceful sluice
twilit jasper
#

@graceful sluice thats not c++ though :/

twilit jasper
#

I am trying to send group data over to IO , but instead its creating a feed named test (not going to my test group) and putting the raw json in the value of the test feed

#
  const char* js = R"({
        "co2Plus": 10, 
        "temperature": 10
   })";


  client.publish("alexzan/feeds/test/json", js);```
royal rapids
royal rapids
twilit jasper
#

@royal rapids I am use pubsubclient

twilit jasper
#

@royal rapids i tried the adafruit library for a few days, but could not get it working with mqtt json, and I couldn't find documentation for Arduino

drowsy tinsel
#

I started with the example sketch "adafruitio_07_digital_out" and I have a toggle on my dashboard with the on and off text labeled 1 an 0, and it works fine. Ok so now I want to change the text to "On" and "Off" and its giving me trouble. I'm using void handlemessage(AdafruitIO_Data *data) and then I tried this IF statement if(data->value() == "On") but it always evaluates as FALSE no matter what, even when serial.print(data->value()); gives me "On" I must have some kind of data type mismatch. Can anyone tell me what I'm doing wrong?

drowsy tinsel
grim vale
#

Hi. I cant seem to get webhooks working for my feed. I keep getting:

{"error":"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"}

I followed the docs but I'm sure I'm doing something wrong.

graceful sluice
#

@grim vale what URL are you using?

grim vale
#

@graceful sluice I copy pasted the URL it generated under the webhooks menu in my feed. I also tried replacing the /feed with the name of my feed but that didn't work

twilit jasper
#

any official Adafruit IO guys here?

sacred depot
#

what are you looking for specifically @twilit jasper ?

twilit jasper
#

i just wanted to mention it was pretty tricky to find out how to subscribe to a plan. I tried a week ago, gave up and never got it, then again today thought i would try it, and it took about 10 minutes to find it. I didnt know "IO Plus" at the bottom actually meant upgrade/subscribe". Just some friendly feedback because you might be loosing business this way

#

It should definitely be part of the top menu somewhere, atleast a sub item in a top menu, such as Profile->upgrade

sacred depot
#

They don't really respond to feature requests here, but there's a link on the IO site for feature requests- I'd post it there

twilit jasper
#

kk ty

drowsy tinsel
drowsy tinsel
#

I've noticed that upon start up, the device doesn't know the initial state of a toggle on AIO. I've been using digital->onMessage(handleMessage); and handleMessage(AdafruitIO_Data *data) but that method only works when an event on AIO (like a toggle state change) happens. So I have to hit all the toggles to get everything synched. It's there a way to read the state of a toggle on demand, that I could run at start up?

twilit jasper
#

@drowsy tinsel i have the same issue also, would be interested in a solution

charred quartz
#

Is there any way to make a dashboard public with write access? I'm making some IoT holiday lights and I want my family to be able to control them remotely

charred quartz
#

No, it is read only for everyone else

drowsy tinsel
charred quartz
#

I haven’t tried that yet

deep pivot
#

The map block at io.adafruit.com seems simple, too simple maybe. I'm just want to check it out but I can't even get test data to show up. Like pushing 42,39.1280037,-86.5431492,0 into the feed. anyone have a public map I can look at in io.adafruit.com ?

graceful sluice
deep pivot
deep pivot
#

OK Got it working : )

south gust
#

I am trying to send an IO dashboard data to a Magic Mirror I have made. I'm trying to load the dashboard link in to an iFrame on my monitor. I can do this just fine with YouTube live streams but if I swap out the YouTube address and replace it with the IO link nothing happens. The out of the box MM is set to http vs https but the YouTube vids are https and it handles them just fine. I sent same IO link to phone and it rendered no problem but I expect phone already configured for https but I may be barking up wrong tree on that being an issue. Anyone have any thoughts ideas suggestions?

graceful sluice
#

You try doing it in a standard page instead of in an iframe?

south gust
#

I don't think that is possible based on how Magic Mirror works.

twilit jasper
#

is it possible to empty/clear a feed?

#

I want to see the data coming in against the data in the past 2 hours, and with the filter does not update in real time, so i would rather clear it to just see fresh data against nothing

graceful sluice
tired prism
#

@twilit jasper sorry, we cannot clear entire feeds. you can delete and recreate, though.

twilit jasper
#

yeah ive been doing that, but its a huge pain since it breaks my dashboard

#

and then i have to recreate it

small nova
#

Hey everyone, I'm working on a project which requires me to use a fingerprint sensor (GT521) with ItsyBitsy M4 express. I'm trying to get it to work using the "Adafruit_Fingerprint" library but it keeps running into "Fingerprint sensor not detected". Could someone help me with this?

twilit jasper
#

so the adafruit io dashboard or feed page causes my cpu to run between 8-12% constantly while it is open, in chrome

#

that cant be normal

graceful sluice
#

Not seeing that here, @twilit jasper

twilit jasper
#

Starts after about 30 min

tired prism
#

@twilit jasper hey thanks for this report about your CPU usage going up, i'd like to look into that with you a bit if you're willing:

  • is it ANY dashboard, or just particular ones?
  • the feed page itself, just the list of feeds? how many feeds do you have?
  • if you refresh, does it go back to normal for another 30 minutes, then spikes again?

if you set one of the dashboards where you're seeing this to "public" and share the link with me (as a DM, if you like), i'll try to reproduce on my side and see if we can troubleshoot this

twilit jasper
#

@tired prism I only have one dashboard, i will test those other things now

#

@tired prism I also have 11 active feeds

tired prism
#

cool, not a crazy high number πŸ™‚

twilit jasper
#

@tired prism at 12:20 I started my dashboard, the feeds list, and an individual feed in separate chrome tabs. chrome was varying around 1-3% cpu usage. by 12:25 it was between 2-5%, at 12:50 it was still around 2-5%, at 1:20 it was between 4-10%. The task with highest cpu useage in chrome was the dashboard, second was the individual feed page, 3rd was the entire feeds page. I manually ended the tasks in chrome. With the 3 tabs/tasks shutdown, chrome went down to 0%. reloading the 3 tabs/pages took the chrome cpu usage to 2-5%

#

profiling the feeds tab also showed I.onmessage as the longest blocking time, but only about 16ms

#

Now at about 1:40, im hearing my cpu fan whining and oscillating again, cpu for the 3 tabs is about 3-7%

twilit jasper
#

now at 2:50pm its a steady 7-11% with just the dashboard alone

#

you can see the oscillation here, once its been running for over an hour, it really gets heavy

tired prism
#

@twilit jasper this is great, thank you for the reports. definitely worth investigating

#

what blocks do you have on that dashboard?

twilit jasper
tired prism
#

beautiful

#

@twilit jasper i'm capturing all of this feedback in our internal tracker to be addressed soon, thanks again for the thorough report

#

will let you know when we reproduce it, and if/when we fix it!

twilit jasper
#

@tired prism happy to help πŸ™‚ thanks!

warm mulch
#

Hi! I am testing the featherwing keyboard (bbq) and I get this error:
"ImportError: no module named 'displayio'

#

From what I googled, that should be part of circuit python 6, and the only post I found talking about it suggests that maybe I am on safe mode. But I don't know how to check that or how to ask it to try normal mode:
https://github.com/adafruit/circuitpython/issues/1825

#

do let me know if tha tis more of a circuitpython than io question and I will delete it from here and post there. Thanks!

warm mulch
charred quartz
#

Is there a good way to fetch the current time with Adafruit IO using MQTT? Or do I have to do it over HTTP? I know there are feeds for that, but they only update when needed, and you can't do the get thing with them.

warm mulch
#

@graceful sluice Thanks!

young hawk
#

hey, I am new in circuit python, anyone please help regarding this query "how to implement deep sleep stuff in Adafruit ItsyBitsy nRF52840 using circuit python".

steel tundra
#

When publishing to group topics user/groups/test123/json using the example JSON ```
{
"feeds": {
"key-1": "value 1",
"key-2": "value 2",
"key-3": "value 3"
},
"location": {
"lat": 0.0,
"lon": 0.0,
"ele": 0.0
}
}

dark thunder
#

Any chance that someone here had worked with the AS7341 10 channels color sensor?

neat charm
#

This is probably the wrong channel for a question about color sensors... Try #help-with-projects , and just ask your question instead of looking for an expert ahead of time. Many times the problems will be generic or answerable from quickly reading the datasheet instead of necessarily needing prior experience.

graceful sluice
steel tundra
graceful sluice
#

Ok, but what you quoted is listed as a response from AIO, not data to be sent TO AIO.

#

JSON Expected Response from Adafruit IO

{
"feeds": {
"key-1": "value 1",
"key-2": "value 2",
"key-3": "value 3"
},
"location": {
"lat": 0.0,
"lon": 0.0,
"ele": 0.0
}
}

steel tundra
tired prism
#

@steel tundra you're correct, that is the json that you publish to IO, not a response. we'll work on the wording of the label for that json section!

#

re: the location data:

location data isn't shown on that table
only on the actual feeds table
the user needs to drill down into the feed to see location data

nimble raptor
#

Is there a place where I can find more info on the Network Disconnected message?

#

WiFi connected, your IP address is
192.168.1.229
Connecting to Adafruit IONetwork disconnected.
Network disconnected.
Network disconnected.
Network disconnected.

#

I had a mostly working setup, but a few feeds started misbehaving so I updated the IO and MQTT libraries. That's when the Network Disconnected message started. Rolling back the libraries to the previous versions and the issue persists. Doh

nimble raptor
#

I solved it. I had previously modified AdafruitIO_ESP32::_connect() to remove the "_disconnect()" and "WiFi.begin" lines, so I could maintain my own wifi scanner.

Future persons searching on this "Network disconnected." error message. Double check your wifi credentials in config.h. Even if you see the Wifi Connected message. Adafruit IO library is attempting to kill the existing connection and reconnect, and failing.

steel tundra
#

Is this on a IP or Account basis? We do not currently limit the number of clients that can connect to Adafruit IO, but we do limit the rate at which connections may be attempted to 20 per minute. Exceeding the connection attempt rate limit will result in a temporary ban. from https://io.adafruit.com/api/docs/mqtt.html#mqtt-connection-details

worldly bramble
#

Hi, im having a issue like a strange behavior, i have two arduinos mega + esp8266 in slave / master configuration. Both are connecting and sending data to adafruit io withou any error message, the issue begins here.. one esp8266 works fine, but the another one suffer of long time disconnected, eventually it get disconnected and reconnect it latter... during this disconnected time it become unresponsive to dasboard buttons etc.. i need it to be reliable, but im not understandt this behavior. any clue? no error messages... it disconnect for a long time like minutes, while it shouldnt. Any clue where im doing wrong? both projects are almost identical, so im not understanding this difernece in connection behavior. I apreciate any help. Ty πŸ™‚

tired prism
#

@steel tundra the connection limitation is a special throttle just for connecting. Once connected, it uses your regular throttling limits, but attempts to connect are specially limited this way. Reason for this is that a bad configuration can hammer us pretty hard as it loops and retries with bad credentials or whatever.

#

The throttling is all account-based

#

Let me know if this is clear!

royal rapids
royal rapids
#

@worldly bramble Could be a number of things! IOT is tricky in that way.

#

Could you try only sending data from the ESP which gets disconnected and see if it still gets disconnected?

#

You can send the expected values on a feed from the Adafruit IO web interface instead of from the master/main node you're using.

worldly bramble
#

@royal rapids yes.. i already did it... it sill get... i tried a lot of diferent aproachs of coding so im with one now thats is "safe"... but i still with a lot of doubts like

royal rapids
#

@worldly bramble Is the second node sending data to Adafruit IO?

worldly bramble
#

sorry master/main?

#

yes both are sending data to adafruit io im using io client

#

sorry for bad english im from brazil.

#

@royal rapids looks like sometimes i have problems with number of feeds or groups saving at same time...

royal rapids
steel tundra
worldly bramble
royal rapids
#

You too!

violet coyote
#

Hi, is here anyone who already created or know how to create android mqtt client which is connected to adafruit broker?

violet coyote
#

no one answered me....:(

red hamlet
#

It's possible that no one here knows the answer, but it's also the X-mas holidays so fewer people may be online.

sacred depot
#

@violet coyote For 'specialty' questions it pays to stick around and engage in conversation.

#

In electronics, putting partially completed projects 'on hold' is fairly standard. ;)

graceful sluice
#

Also, if you're talking about writing an MQTT client, that's a bigger project than you'll see most people taking on, so it's not going to be a subject a lot of people can engage on

violet coyote
#

πŸ™‚ ohhhhhhh MERRY CHRISTMASS PEOPLE...i am an orthodox, for us Christmas is on 7th of january..wish you all the best...

#

well i think that mqtt client is something that lot of people can use for themselves...especially because it is on the android platform and me like lot of others like adafruit broker...but i dont know how to build it...thats why i am here

kindred stump
#

@violet coyote ☝️

sacred depot
#

You can do a Hello World type of Android app and sideload it to the smarphone via USB.

#

Debian has the basic toolchain for that (or did, at one time, iirc).

violet coyote
#

thanks @kindred stump for your feedback...i am totally new in android and mqtt but would like to learn and to create mqtt client....i went through this paho mqtt android tutorial but didnt know what code to add in android and where, in order to connect to my account on adafruit ...is there step by step project of building simple client connected to adafruit for beginners

kindred stump
#

Have you built any Android apps before?

violet coyote
#

no...thats the point

#

but i like adafruit and have some things done here, so i would like to have my own client to be able to create and design buttons, sliders...

kindred stump
#

Then add 1 new thing to it like a button.

#

Then hook that button up to something. Basically break your problem down into small pieces.

#

And learn each step as you go.

violet coyote
#

yes, but where to find all infos for connecting to adafruit broker...its so strange that i am the first one (it looks like) who wanted to create simple mqtt cliend with its own username and password to be able to join adafruit account

kindred stump
#

Oh that I know.

#

Let me get you the link

#

That explains where to get your key to authenticate

violet coyote
#

hahaha πŸ™‚ thanks @kindred stump ...

#

i cannot find on this link connection btwn adafruit and android...only for arduino projects coding

kindred stump
#

Yes, Adafruit is a hardware company and their docs will be about arduino and CircuitPython

#

I’m going to drop of. Start with the Android guide then work to add in the Paho MQTT library. Follow each tutorial on their own. Then work to have it do what you want second. You can’t skip steps when you’re learning. But you can πŸ’― do it!

violet coyote
#

ok, thanks

indigo shard
#

hi folks, happy holidays! I used adafruit to write to a BLE hardware over the air in python on macOs. Everything works great except one thing and I'm not sure where to ask. My question touches upon custom Services/Characteristics & possibly Blinka/bleio

#

would you know where would be most appropriate to ask?

graceful coral
#

Okay so I have a adafruit pitft 2.2" with a raspberry and I just wanna send simple text and display it, I stumbled across the adafruit-io-python lib. And I have one BIG question, why in the world do you need an api key for that, it is a local script??

gleaming sapphire
graceful coral
#

Wait

#

so like github?

gleaming sapphire
graceful coral
#

Is there a framework for working with a pitft and displaying static text etc?

gleaming sapphire
#

if you're just displaying static text then i doubt you'd need that. Maybe you need to find some other example.

graceful coral
#

Not just static then

gleaming sapphire
graceful coral
#

Client side

#

That uses putenv

gleaming sapphire
#

I guess that project uses adafruit io to store the temps

graceful coral
#

I'm just going to make my own with C

lethal ledge
#

Hullo! Is this the right channel to ask a question about the PyPortal?

graceful sluice
#

If it's how to connect it with Adafruit IO.

charred quartz
#

How do I connect to Adafruit IO on a MagTag using CircuitPython and MQTT? All the guides for Adafruit IO only work on AirLift boards

worldly bramble
# royal rapids <@!146400512487587842> hrmmm, not sure then. It's getting difficult to debug th...

I've been doing some tests, and it seems that the problem only appears when I turn on the second esp8266. From the moment I turn on the second device, the first one starts to lose connection and takes 1 to 15 minutes without connecting. My current usage on the monitor never exceeded 20 per minute. Any idea? I don't know if both are registering with the same id. I did not post the code, because any code I put gives the problem, so it is related to the fact that two devices are connecting and not in the code itself. Any clue? i can post some code used by me if you think it helps. https://forums.adafruit.com/viewtopic.php?f=56&t=173234&p=845578#p845578

worldly bramble
#

Hello.. How can i set i client name or id to make brokker diferentiate two devices? like AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS); Where i set the AIO_CLIENT?

graceful sluice
#

I don't immediately see a way to do that, but why would the broker need to differentiate between devices anyway?

royal rapids
#

@worldly bramble The client ID is set in Adafruit IO Arduino automatically. depending on which device you're using, it either uses the MCU's silicon ID or the MAC address for the network adapter

#

@graceful sluice two identical CIDs (client identifiers) would cause Adafruit IO to reject the second client's attempt at connecting to IO.

#

some MQTT brokers handle this behavior differently, but that's how it's handled within IO

#

MiniMQTT is not compatible with CircuitPython 6 at this time, I'm working thru a few bugs.

sacred depot
#

Hey guys, As I am new here, feel free to point me to a better place to ask this. I am trying to steer 2 TFT 1.8 inch displays from my Raspberry pi zero WiFi and getting weird issues. I am using the adafruit RGB display lib: https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display

I modified the example that shows an animated gif so that I take 2 display objects created like this:

DISPLAY_1 = st7735.ST7735R(
    spi,
    rotation=90,
    cs=cs_pin_1,
    dc=dc_pin,
    rst=reset_pin,
    baudrate=BAUDRATE,
)```
The difference between the displays is only the `cs_pin`. One display is connected to `CE0`, the other to `CE1`. All the other wiring is identical (do I have to have a different dc pin?)  I then load both gifs into buffers of their frames and show them in the loop:
```python
start_time_1 = 0
start_time_2 = 0
while True:
    if start_time_1 + frames_gif_1[frame_index_1].duration < time.monotonic():
        start_time_1 = time.monotonic()
        frame_index_1 = (frame_index_1 + 1) % len(frames_gif_1)
        self.displays[0].image(frames_gif_1[frame_index_1].image)
    if start_time_2 + frames_gif_2[frame_index_2].duration < time.monotonic():
        start_time_2 = time.monotonic()
        frame_index_2 = (frame_index_2 + 1) % len(frames_gif_2)
        self.displays[1].image(frames_gif_2[frame_index_2].image)
    time.sleep(0.001)

The issue is that one display shows the gif as expected, while the other one triggers for setting an image to either of displays, resulting in image flickering between two gifs. It seems that the CE0 pin always received the data, while the CE1 correctly received data only when addressed. Any pointers are much appreciated.

worldly bramble
silk sleet
#

Good afternoon. Is this channel appropriate for me to try to get help with the "lego-neon-sign" ada project?

#

That project uses the Feather M4 Express board

graceful sluice
sullen harness
#

This function sends my sensor data to the Bluefruit LE connect and, then, my Rx feed correctly: uart_server.write("{},\n".format(kPa, )); where kPa is pressure in kilopascals. But does anyone how to read data sent from the output feed to the Bluefruit app? I guessed uart_server.read() and, though it doesn't cause an error, it only prints " b' ' "'s.

misty nimbus
north patrol
#

@royal rapids Hi Brent, I'd like to create send an image from a web app through WiFi to a board equipped with eink display. The board should be able to transmit signal such as button pressed back to the web app dash board. Which hardware should I choose for this application?

royal rapids
#

@north patrol the Adafruit MagTag has internet connectivity and an e-ink screen

#

Otherwise you can roll your own with an e-ink breakout and a wifi-capable development board.

north patrol
#

Thank you Brent

royal rapids
#

np!

sacred depot
#

Hello from Finland

#

I love adaruit io. But i have a question about dashboards

#

Is the a setting to use 24h clock instead of 12h clock

royal rapids
#

@sacred depot Where is the 12hr clock?

#

*where on the website do you see this?

sacred depot
#

Ah. Sorry

#

In the dashboard when i set a block of graph

#

And in the x axix is time

#

Axis

#

There is a am pm clock instead of 24h clock

royal rapids
#

@sacred depot Could you take a screenshot for me?

#

I'd like to file a request for the devs. to change this

sacred depot
#

Is this ok

royal rapids
#

yeah! perfect thanks

sacred depot
#

great

#

it would be nice to have feature. I made a temperature and humidity sensor for my father and it would be easier to read

#

one for greenroom and one for steam room. First to see that temp does not go below zero and second to send telegram when temp is over 60C

lyric prism
#

Hello! I am trying to use the MQTTclient and I don;t understand the client.connect(name, key, password) command. Mainly the NAME parameter. What is the name supposed to be in this scenario?
Its not the IP of the Broker... Its not the broker's "name" either. Any clues?

lyric prism
#

OK I think I answered this question

#

name="core-mosquitto" key="homeassistant" password="PASSWD"

dim sphinx
#

Running into a brick wall trying to send an image from an ESP32 + OV2640 camera to Adafruit IO. I successfully get the image data from the camera & convert it into base64 encoded data, which I can print on the serial console then copy/paste into a converter to retrieve the image. However whenever I try to save() that data to Adafruit IO it causes a LoadProhibited exception on address 0xc000e247, which I believe is a 'garbage' address as it is out of the acceptable range? If you look at this code, I can print the String on line 76 just fine, but trying to save() it on line 78 always fails.

https://gist.github.com/CJ-Davies/bcc0f07d44af81bb45c63c0f17989291

Gist

GitHub Gist: instantly share code, notes, and snippets.

graceful sluice
#

What's the longest string you can save, @dim sphinx ? Guessing you might be hitting the 45 character limit on data?

dim sphinx
#

@graceful sluice Ah, I had no idea that limit existed. Presumably there is an alternative way to save data to a feed, to make use of the full 100kb allowance when history is disabled?

graceful sluice
#

I don't know. And sadly, I can't find any reference to any of these limits in the documentation...

north patrol
#

Hi, I'm testing MQTT with MagTag (ESP32-S2), could anyone help with this error: AttributeError: 'module' object has no attribute 'ESP_CS'

north patrol
dim sphinx
#

Does anybody know how the feed naming convention for the Dark Sky weather integration translates to the Arduino library? The documentation gives the syntax for MQTT connections as :username/integration/weather/:id/:type but I cannot find anything that tells me what part of that, or what format, to give the AdafruitIO_Feed object.

#

Regular user-created feeds are given in the form :username/feeds/:group.:topic for MQTT connections & the Arduino library just takes the group & topic parts like io.feed(":group.:topic"), so I wonder whether the library even supports feeds under the 'integration' path, if it (appears to) assume that all feeds are part of the 'feeds' path?

dim sphinx
royal rapids
#

⚠️ We are scheduling a maintenance window on January 20th (TODAY) starting at 11am ET. We are hoping to limit the downtime to under 2 hours.

I believe this is our first scheduled maintenance since the launch of Adafruit IO.

If you are connecting via mqtt, we are anticipating that your data will still arrive, but will not process until the maintenance is completed (this is dependent on the length of the downtime, and is not guaranteed in any way). New connnections to mqtt during this window may be rejected until the maintenance is completed. The API and web front-end will be taken down entirely during this time.

royal rapids
#

@shell star ^ could you please pin this for me? Thanks!

royal rapids
#

Thank you!

shell star
#

np

worthy root
royal rapids
worthy root
#

Apologies, I somehow switched - Thanks.

royal rapids
#

np!

left perch
#

Anybody else getting the 503 error?

royal rapids
#

@left perch Adafruit IO is currently down and undergoing a scheduled maintenance

#

We should be back up soon πŸ™‚

royal rapids
#

aaand IO is back online!

dim sphinx
#

After that outage I had to power cycle all of my ESP8266 nodes which deep sleep between sensor readings before they would start publishing again. Can anybody think why? When they reset after a deep sleep they loop while io.status() < AIO_CONNECTED so I would've thought they would just sit in that loop until the service came back?

Interestingly some other ESP8266 I have that never deep sleep didn't require power cycling - the difference being that they were presumably running their loop() functions with io.run() at the top, while the deep sleeping nodes were looping waiting for the connection status & never reached io.run() further down.

royal rapids
#

@dim sphinx Which libraries are you running on the ESP's using deep sleep?

#

also could you copy your code and paste it into a gist (https://gist.github.com/) so I could take a look?Strip out any personally identifiable info like your IO key, Wifi keys

dim sphinx
#

@royal rapids It's a very basic sketch, it just uses the Adafruit SHTC3 library. The config.h is just the standard Adafruit IO boilerplate example (which includes AdafruitIO_WiFi) with my SSID/pw/IO key substituted.

https://gist.github.com/CJ-Davies/6518c691382e8133969599ca61cf417d

I'm guessing maybe something happens with the io.connect() call on line 21 which causes it to never actually reach the loop immediately beneath?

Gist
.c

GitHub Gist: instantly share code, notes, and snippets.

#

the feeds aren't actually called foo & bar btw, I changed the names because they contain semi-personal information πŸ˜‰

worthy root
#

I'm having difficulty finding the files that include the code for *io support. can anyone point me in the right direction? I am compiling for Teensy 4.0.

#

Specifically, I am looking to add sdioio support.

#

and perhaps canio

#

Sorry wrong group

unborn spoke
trail swan
#

Hello! I was wondering if the adafruit/Adafruit_MQTT_Library (https://github.com/adafruit/Adafruit_MQTT_Library) is threadsafe?
Context: Using RTOS on an esp32 and would like to have different tasks use the mqtt library to publish values at different intervals and one task be able to call processPackets.

hybrid flower
#

Question on Adafruit IO. I'm playing with a BME280 with an Airlift M4, but when I move it to my roof, my Wifi eventually drops out. I'd like to replace it with ethernet - so an M4 and Ethernet shield. Are there any tutorials for using Adafruit IO (posting data) using Ethernet rather than the Wifi ESP libraries?
I found one using requests, but I don't see any examples of posting specifically to a IO datafeed using requests.

royal rapids
#

@hybrid flower Using the Adafruit IO CircuitPython library?

#

@trail swan I do not know.

hybrid flower
#

I was posting using the wifi.post() function, part of the ESP library I think. Is there a Learn guide that shows how to send data via the Adafruit IO library?

royal rapids
#

yeah hold on a sec.

#

Each example in Adafruit IO Arduino is compatible with the ethernet shield

#

you'll need to uncomment the include and subsequent line, and comment the wifi interface code out

hybrid flower
#

thanks - I was hoping to use circuitpython

#

but thank you, if I cant get CP to work I'll give Arduino a crack

royal rapids
#

@hybrid flower Oh, you can use CircuitPython

#

....I just haven't written examples for using it with Adafruit IO CircuitPython yet πŸ™‚

#

And request additional examples for the ethernet featherwing?

violet coyote
#

hi there..does any of you know, whats going on with adafruit mqtt? well i am using IoT panel with unique Client ID to join adafruit server, and with port 1883 i cannot reach my dashboard ( it says, /feeds/name request Flood, disconnecting, and MQTT ERROR enforcment limit reached, your account is banned) but when i go to port 8883 everything is ok....until today port 1883 was working with no issue

kindred stump
mighty ridge
#

Does anyone know if public IO data can be accessed via MQTT publicly ? ie. mqtt without using a user/api key ?

obsidian hedge
violet coyote
kindred stump
#

Ok I can’t help with you that, but maybe someone else can. I’d also try the Adafruit Forums.

violet coyote
#

this is so strange...it was working everything but now shows /feeds/name flood

mighty ridge
#

@obsidian hedge thanks for the reply.

plain lake
graceful sluice
#

That first URL doesn't look right

violet coyote
#

I still cant figure out how to solve problem with feed flood

plain lake
#
$ curl -H "X-AIO-Key: {io_key}" "https://io.adafruit.com/api/v2/{username}/feeds/{feed_key}/data?start_time=2019-05-04T00:00Z&end_time=2019-05-05T00:00Z"``` @graceful sluice care to elaborate? this is straight from the docs https://io.adafruit.com/api/docs/#get-feed-data
graceful sluice
#

The URL you pasted above is malformed. It contains 2 query strings: "?start_time" ... "?X-AIO..."

plain lake
#

i need to to include my key somewhere and it works with the other request

plain lake
#

Thank you!

sacred depot
royal rapids
#

No update but we did get another request for it, which I noted for the devs.

leaden rampart
#

Anyone know if the adafruit feather 9 dof has misslabeled scl and sda pins?
I noticed that a feather I ordered had it swapped and some of the other wings I looked at. Anyone know if this is intentional or a mislabel?
product: https://www.adafruit.com/product/4565#description

restive vine
#

hey yeah, you're right

keen dirge
#

fixed link

leaden rampart
#

@keen dirge Thanks!

sharp scarab
#

Hello everyone, if you have some time I would need some help. I'm using esp32 wroom and Arduino ide, and I have a problem with practically all of the examples simply because esp never connects to the IO. At first, a was getting endless ... so I changed Serial.print("."); to Serial.println(io.statusText()); and now I'm getting the message "Disconnected from Adafruit IO".(I found out that this message means that the client disconnected but don't know what do to with it).
Also, I tried the same code with esp8266 and it worked, but as soon as I tried any esp32 same annoying message.
Does anyone know what to do with it? Any help is appreciated thanx.

royal rapids
#

@sharp scarab I've replied to this query on the Adafruit technical support forums

keen siren
#

I'm new here.
I need to connect Sigfox to Adafruit IO.
I use the sht31 sensor (humidity and temp).

On Sigfox Callback→ "Body"
I have written JSON code like the following:
{ "value": "{customData#t}",
}

I guess the problem with JSON code...
What's the structure that is used by JSON codes when sending data to adafruit io?
Would you mind helping me?

graceful sluice
keen siren
#

Is there a way to send string to and display it adafruit io?

graceful sluice
#

Same as with any other data. Send it and display it.

hasty kraken
#

Hi! I'm trying to use adafruit.io with the circuitpython library for IO and adafruit_minimqtt running on a Feather M4 Express with the Airlift WiFi Featherwing. The problem I'm having is that io.loop() seems to block for 60 seconds then throws "MMQTTException: Unable to receive 1 bytes within 60 seconds" and I seem to have no way to either reduce the block timeout or otherwise take more control over polling for inbound messages. I want to be able to publish sensor data to IO every 30 seconds, but also receive messages on the subscribed topic (which I use for sensor configuration param setting) when necessary. Looking at the circuitpython minimqtt and io code in github, it indicates that the loop() call is "non-blocking" but I'm seeing different behavior. Am I missing something?

still horizon
#

Having an issue with Arduino IDE and the Group.Feed, all my code works fine but if i try to subscribe to a feed inside a group i receive an error ~ :85:33: error: expected initializer before '.' token
Adafruit_MQTT_Subscribe GroupName.FeedName = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/GroupName.FeedName"); ~ I am working on a workaround for it using ~ String TEMPFEEDNAME; TEMPFEEDNAME = "GroupName.FeedName"; ~

#

It seems like a bug of some sort

kindred stump
#

Anyone seeing publish failing today? I'm using the sample code for native_networking and publish succeeds (no error or anything odd) but I do not see the data in Adafruit IO.

#

And nothing on the Monitor view ...

#

I'll post in the Support Forum

brisk egret
#

io.adafruit.com tells me MQTT ERROR: ESP32Client 78.115.163.48 SUBSCRIBE to topic Engrobel/feeds/commandled rejected, resource not available or not authorized. I don't know why. can you help me?

lunar sleet
#

Hey guys I'm new to this discord, but it seems like the right channel to ask about this. I just recently bought the "Adafruit Bluefruit LE SPI Friend - Bluetooth Low Energy (BLE)" from: https://www.adafruit.com/product/2633. Although it wont yet arrive till a few more days, reading the datasheet and wiring guide I think there is a possible powering mistake.

#

In section 5.2 Operation Conditions", the typical supply voltage (VDD) is 3.0v, with maximum being 3.6v.

#

Is there something I am missing in the datasheet, would the BLE module work well with just 3.3v?

#

Thanks in advance for anyone who can help me out πŸ™‚

keen dirge
#

Note:the silkscreen (on the back of the board) says 3-5V for Vin -- may not want to go to 16 πŸ˜‰

#

FYI -- followup questions may be better in #help-with-projects -- this channel is more for question about using the Adafruit-IO system.

lunar sleet
keen dirge
#

You're welcome -- Good luck with your project!

sullen imp
#

I want to use my new magtag to create an air quality monitor that my parents can check from work, is adafruit IO a pretty straightforward path? I have no web/iot experience.

obsidian hedge
#

Where you can group and visualize your data

sullen imp
#

ok thanks, I'm like a person getting in a rowboat to cross the ocean here

obsidian hedge
#

lol, great analogy! But you know what? You're at least in a boat, and not swimming! And there's a whole bunch of folks willing to help guide you in the right direction

sullen imp
#

dopesauce

#

thanks

solemn aspen
#

hi all, i think im in the right place.. ive been trying to follow the below link
https://www.youtube.com/watch?v=W4jaAgjfvG8
for a project for my daughters room but everything goes fine until i compile and get the below errors in photo,, i think im in over my head as i dont code, at most ive configured marlin for 3d printers lol.. ive spent days upon days looking for info bit i have got exactly nowhere.. can anyone id the issue or have any links that may help..

many thanks

sullen imp
#

does anyone know of example projects using the Magtag that write to an adafruit IO dashboard? I am having trouble finding one

remote nebula
#

Hello, can anyone help me with finding out how to code a homing position for a stepper motor in combination with an adafruit motorshield v2?

#

here is what I am working with so far

obsidian hedge
# remote nebula here is what I am working with so far

Hiya @remote nebula - Just a heads up, since this channel is more geared toward AdafruitIO projects and platform, you may not get the help you're likely to need. Since it's an arduino project, I'd recommend asking in the #help-with-arduino channel, or perhaps better, since you're also working with stepper motors, trying #help-with-projects. However, please do not cross-post in multiple channels.

Good luck with your project!

royal rapids
#

Waiting on having I2C/WiFi working with the S2, then I'll do a guide I've been planning πŸ˜„

kindred stump
#

But if its only failing for me... It is prolly me. πŸ˜‰

sullen imp
royal rapids
#

but - if your sensor uses i2c and networking on the esp32-s2, you'll run into issues until it's fixed in the core.

sullen imp
#

Ahh shoot OK

#

I2C/Wifi coming soon?

#

And am I understanding correctly that the issues arise when you want to use an I2C sensor and wifi on the S2?

royal rapids
sullen imp
#

Kismet!

sullen imp
#

where is a good place to go to start understanding sockets?

royal rapids
#

hmmm, what are you specifically interested in?

#

the topic of sockets run deep!

sullen imp
#

I have no network experience and would love to get started learning about it so I'm not just cargo cult programming from examples. I want to grok what the libraries are doing, but not (for now) write my own.

#

for example in the example you linked: there's a line

# Create a socket pool
pool = socketpool.SocketPool(wifi.radio)

Everything about this is a mystery to me

royal rapids
#

take a look over at the API maybe?

#

most of that page should be do-able with CircuitPython

#

at the very least, the concepts are there along with similar API calls

sullen imp
#

cool thanks!

gusty lodge
#

I was wondering, I have 5 feeds that are updated every minute, is there a way that I can detect if they stopped uploading by checking the timestamp of the last upload and if its >5 then send a notification. I tried to do this with zapier and ifttt and wasnt able to get it to work. My guess is i'll have to write a python program to subscribe to the feeds and then compare the last values timestamp to the current time.

graceful sluice
#

Are you aware that feeds already have a feature to email a notification when no data was received for some time frame?

gusty lodge
#

I missed that but I need to notify multiple people, renotify every x minutes while down and notify when the feed is restored.

gusty lodge
#

Occasionally I'm getting a value of 1440 minute difference between the feed and the current time and I can't figure out why

sullen imp
#

I was looking at your existing project for air quality monitoring, very cool! Wondering what you think of my tweak to how you're calculating the AQI. Would this be slower?

from collections import OrderedDict


def PM_AQI(pm25,pm100):
    AQI_breakpoints = []
    AQI_25_range = OrderedDict()
    
    AQI_25_range[12] = [0,12,0,50,"Good"]
    AQI_25_range[35.4] = [12.1,35.4,51,100,"Moderate"]
    AQI_25_range[55.4] = [35.5,55.4,101,150,"Unhealthy for sensitive groups"]
    AQI_25_range[150.4] = [55.5,150.4,151,200,"Unhealthy"]
    AQI_25_range[250.4] = [150.5,250.4,201,300,"Very Unhealthy"]
    AQI_25_range[350.4] = [250.5,350.4,301,400, "Hazardous"]
    AQI_25_range[500.4] = [350.5,500.4,401,500,"Hazardous"]
    
    
    for key in AQI_25_range.keys():
        if pm25 < key:
            AQI_breakpoints = AQI_25_range[key]
            break
    AQI_val = ((AQI_breakpoints[3]-AQI_breakpoints[2])/(AQI_breakpoints[1]- AQI_breakpoints[0]))*(pm25 - AQI_breakpoints[0]) + AQI_breakpoints[2]
    
    if len(AQI_breakpoints):
      return AQI_val, AQI_breakpoints[4]
    else: 
      return []

It's late and I haven't tested it yet but I'm medium confident in it.
It's based on the wikipedia article from your guide, if you scroll allll the way down to the US portion https://en.wikipedia.org/wiki/Air_quality_index#Indices_by_location

An air quality index (AQI) is used by government agencies to communicate to the public how polluted the air currently is or how polluted it is forecast to become. Public health risks increase as the AQI rises. Different countries have their own air quality indices, corresponding to different national air quality standards. Some of these are the ...

dusky shuttle
#

I use the aqi Python library instead of rolling my own. πŸ™‚

sullen imp
#

on raspi?

placid belfry
#

I am beginner at circuit python, python.

I look at publishing data via the MQTT & IO_MQTT and, I guess ,it only takes a string value? I can't pass it a Label variable?

I want to send the entire contents of display, font, text, splash to be read in and displayed on another Maytag.
I could painfully do this by starting with the display group, send an array of labels or bitmaps or pallet item, then any fonts, but this seems horrible. Is there an easy way to pass "my screen" via RESP or MQTT with circuit python from a Maytag or esp32S2?

I'm trying to send "messages" to another Maytag, but quickly I saw sending a scribble or drawing with text is what I need to send. That seems to match a display object.

Any hints on what I should read? I could send:
" [ ( (0,0), 'Bitmapfilecontents 427 0x00000000...00000000' ), ( (40,30), 'string here is a string') ]
I could then read that any create the labels, bitmaps.

mystic fossil
#

Hi may I here ask how I should connect my ft232h to Pycharm IDE in windows 10? If not any suggestion where to ask?

ornate pagoda
mystic fossil
sacred depot
#

Hi @ all, I am new here and I could use some help with one isuue....

#

where is my post?

#

hmmmm

#

ok - again....

#

I spread serveral temp sensors all over my house and I would like to read them with google-home assist. Is there an easy way to do so?

ornate pagoda
#

@sacred depot Apologies for your post being caught by the bot. It was the three x's in a row that caught it. The bot's not that smart, but there's a reason for it. I appreciate your patience. As a side note, this channel is more for AdafruitIO questions. You might get more visibility in #help-with-projects. In general, don't encourage cross-posting on multiple channels, but it's entirely understandable if you post in a less applicable channel first and we suggest posting elsewhere.

sullen imp
#

Probably a silly question, but is it possible to write to and read from the same feed? I want to use Adafruit IO essentially as a hard drive to store data as well as for its purpose of displaying it

vernal shoal
#

Arduino Micro with Adafruit Bluefruit LE SPI Friend

I need help! I’m trying to connect an Arduino Micro with an Adafruit Bluefruit LE SPI Friend and use it as an HID keyboard, following the instructions and code presented here.

https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout/hidkeyboard

I already did it with an Arduino Uno following the same instructions and it worked just fine. But I’m trying to do it with the Micro and in the serial monitor looks like it doesn’t even get in HID mode. I’m following this connection for both Arduinos.

https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout/wiring

I don’t have much experience with Arduinos. Any help would be appreciated!

Adafruit Learning System

All the goodness of Bluefruit LE, now in easy to use SPI

Adafruit Learning System

All the goodness of Bluefruit LE, now in easy to use SPI

kindred stump
#

@vernal shoal the reason no one replied is that this channel is for the Adafruit IO service. I suggest you repost in the #help-with-arduino channel. The Arduino savvy folks hang out there.

sullen imp
#

does a feed return an empty string if there is no data present? I need to do a 24 hour average and need a way to know if I'm getting 0 back or "no data present"

graceful sluice
#

The API documentation unfortunately is very badly written, like most such documentation. It doesn't really say.

sullen imp
#

I'm just now getting to the iot part of my work so thanks for responding. I'll see what I can rig together

sullen imp
sullen imp
#

Ah I see that's for brokers other than adafruit io

sullen imp
#

How would one go about downloading onto a board the last X-time's worth of data points from a feed? Is that even possible?

graceful sluice
sullen imp
graceful sluice
#

I assumed there would be an API call for that, but I can't find one. The get feed details call, which you would expect to return that history, does not in fact do so.

#

The usual curse applies. As soon as I write an answer, I find the real answer which proves me wrong. Here's a call that gets data for a date range:

sullen imp
#

I should have specified I'm using CP

sullen imp
#

Although it says not implemented in adafruit IO CircuitPython, I wonder if adafruit_requests would work to get the data

sullen imp
#

seems not. Getting access errors with magtag.network.requests.get() if anyone is interested

#

I wonder, for adafruit HTTP IO on CP, does adafruit_io.adafruit_io.IO_HTTP.receive_all_data() get only the last 1000 values?

eager kite
#

For a citizen science project, I need to publish the readings from a decibel and pollution sensor onto smartphones and then on to Adafruit IO. Basically, it is just like your project https://learn.adafruit.com/datalogging-hat-with-flora-ble?embeds=allow but two different kinds of data. Where in the Bluefruit Connect app do I find settings to publish (UART RX) more than just a single feed?

Much appreciated!

Adafruit Learning System

Log Light Levels to Adafruit IO

sullen imp
#

Hm that's a good question, let me see if I can find anything

sullen imp
eager kite
sullen imp
#

it must be possible. I think I see how you'd post a csv style data to the phone but I don't know how you'd translate that into two feeds

#

If I had a bluefruit I'd test it out as my sensor is really several sensors.

eager kite
#

Ok, thanks, I hang on then for some hints. We intend to provide a large group of parents with a device with Adafruit Feather 32u4 Bluefruit LE and the two sensors, later three, and we tried it "directly" via WiFi, which of course was straightforward.

sullen imp
#

I assume you want to be able to walk around and use the phones as the pass thru for data logging to adafruit IO?

eager kite
#

Exactly, that's the thing.

sullen imp
#

Hmmm it's got to be a use case they considered

eager kite
#

Yeah, there are very many cases where this is useful for citizen science projects, people who walk or cycle, etc., mapping light pollution, UV exposure, road dust after the winter season, etc.

sullen imp
#

I hope the answer isn't use 3 phones

eager kite
#

Ha, no! Nearly all parents just own one. Two feeds instead of one would be great already. Using Fona here (Europe) will be too costly, and BLE connectivity is the way to go, as everyone and their dog/cat owns a smartphone ; )

sullen imp
#

Hmm I'm honestly not seeing a way to do it unless adafruit io mqtt can decode a csv formatted stream and plot multiple plots?

#

Because you're sending text over UART to your phone, so it's just reading that and that is getting sent over MQTT to adafruit IO

#

So you could send csv data as text? But then adafruit IO would need to know what to do with that. I assume it's just decoding strings into floats on its side

eager kite
#

But how can AIO separate CSV data and put it into two different feeds? The app has only one "UART RX: username/feeds/feedname"

sullen imp
#

Oh sorry I was misleading, it would need to be able to

#

I was having a conversation with myself, sorry.

#

bad habit

eager kite
#

No problem, it's midnight soon (here).

sullen imp
#

I have no such excuse sadly. I wish I was of more assistance

eager kite
#

Maybe the app coders know, or know how to have a second (or more) "UART RX: username/feeds/feedname". I mean, it's all the same, just an additional feed, as is possible direcly via WiFi.

sullen imp
#

I think it's basically creating a serial terminal on your phone and then sending the output to a single feed

#

oh heyy

#

multiple uart mode

#

Are all your sensors connected to the same bluetooth enabled mcu?

eager kite
#

Yep, a Adafruit Feather 32u4 Bluefruit LE right now.

sullen imp
#

Hmmm this is for multiple MCUs

#

dang and I tried inputting csv style data into a feed and it just took the first number it could find

eager kite
#

The recommended Adafruit Feather 32u4 Bluefruit LE can deal with several sensors no problem. Even the Flora Bluefruit from the tutorial I inked to in my initial question. It's just that all tuts only ever use one sensor.

sullen imp
#

yeah I wish I had one I could test things on for you, but from reading it seems there's no way to do more than one feed

#

in the guide I linked they do two sensors, but they don't publish to a feed

eager kite
#

Yeah, saw that, which is why I came here. The next thing we have will be GPS plus UV radiation. Again, that's two feeds. Using Fona for citizen science seems like overkill, as everyone and their cat owns a smartphone.

#

If you know the app coders within Adafruit, maybe they know how it is done, or maybe it's a simple patch to enable more than a single feed?

sullen imp
#

I don't know them personally but I know some of them monitor this feed so maybe they'll see it? You could also open a github issue so that they are aware someone wants to do this

eager kite
#

Yeah, thanks, GitHub issues section of the app is another idea.

eager kite
#

So, adafruit says on GitHub it's not possible right now and not really in the pipeline. That's too bad, many citizen science project on the go would need such functionality.

placid belfry
#

@sullen imp so are you now the Mqtt expert? I was building an app, then an Matt guide said download 6.2 beta. I switched to that on 2 of four boards, but even a connect no longer worked to io.adafruit.com. so I took 4 days off. I'm running metro esp32-S2 beta express boards with 6.2beta. A Maytag I have works at 6.1.

Do you know if 6.2beta MQTT example works on esp32? I've compared my code to the sample and there were changes from 6.1 for me to make in my code for 6.2 (port). It is likely I have simple mistakes.

I've bought one or two of most of the Adafruit boards so I should be able to choose a working board to continue software development if it is an esp32 difficulty.

sullen imp
#

I'm pretty far from an expert. I'm gonna be on mobile until tomorrow but I can take a look then. It it makes a difference I'm using the mag tag to do mqtt

sullen imp
#

I'm writing code that's going to be using both so I'm focusing on making a child class that will let me call both from the same object, so I'm not even to the testing stage yet unfortunately

placid belfry
#

I think my problem is io.connect, the docket pool not working.

#

Sovket

sullen imp
#

oh interesting

#

yeah I'm pretty new to networking stuff, I wish this channel were more active with folks

placid belfry
#

I set the magtag object even though it is a metro edp32-s2

#

Then getlocaltime. It connects and works.

#

But it doesn't connect after that.

sullen imp
#

hmm

placid belfry
#

My problem is I'm not too good at finding the code, or docs

sullen imp
#

hey we have the same problem!

placid belfry
#

Brain trsbsfer

#

Transfer

sullen imp
#

ouch my brain!

placid belfry
#

It's old now!

#

magtag = MagTag()
print(time.localtime())
_local_time()
print(time.localtime())
mqtt_topic="gary/feeds/displayio"

pool = socketpool.SocketPool(wifi.radio)
mqtt_client = MQTT.MQTT(
broker="io.adafruit.com",
#port=secrets["aio_port"],
#port="8883",
username=secrets["aio_username"],
password=secrets["aio_key"],
socket_pool=pool,
ssl_context=ssl.create_default_context(),
)
io = IO_MQTT(mqtt_client)
io.on_connect = connected
io.on_disconnect = disconnect
io.on_subscribe = subscribe
io.on_unsubscribe = unsubscribe
io.on_message = message
io.on_publish = publish

Connect to Adafruit IO

print("Connecting to Adafruit IO...")
connected=False
trycount=0
io.connect()

#

That fails at io.connect AdafruitIO_MQTTError: MQTT Error: Unable toconnect to Adafruit I/O

#

@sullen imp

sullen imp
#

hm, that seems to match what I've seen on examples

placid belfry
#

My problem is I don't know where "socketpool" is

sullen imp
#

yeah I don't really know much about that stuff, I just sort of take it on faith that it's a required part of the code

placid belfry
#

I got this connected on a Magtag and running... Then I went to adding a bunch more code and a 4.2" display...

#

Now I'm throwing out tons of code and getting it back to where it wont fail.

sullen imp
#

that's a good practice I think, take it back to basics and then add stuff slowly

placid belfry
#

I'm a good ole C++ programmer... So, I have to do this faith programming myself and it is frustrating... Loosely typed garbage collecting nightmare

#

So, I'm wondering what gets set in Magtag for a REAL magtag versus a Metro ESP32-S2 Express Beta...

sullen imp
#

well I'm wondering the the magtag.network stuff is separate enough that you can just run it on any ol' ESP32S2 board

placid belfry
#

From one of the guides, I think this board, Adafruit Metro ESP32-S2 Express IS the same base board in the Magtag. So, it should be able to work, but I don't know if there is some code not getting initted because it can see something missing and sees this as a Metro board not a Magtag.

#

Oh, the Magtag has a Black boarder around all of the displays. This is a mistake in the driver. a Boarder release command needs to be sent to the displayio microcotroller on the e-ink display to turn off that boarder. When this is done, the display doesn't have a constant wide black boarder.

#

I assume there is some mechanism the base code "portalbase" sees that the board is a magtag and not the esp32 version.

#

Do you know if there is a "adafruit_metro" base class that can be used instead?
The adafruit_Magtag class looks harmless enough with a graphics, network class.

obsidian hedge
placid belfry
#

WOW. Thanks!!! ANYTIME you just blurt it out! I love it.

#

I just found out cntl Enter was \n

obsidian hedge
#

I think shift-enter is too. I have to think about it, since it's muscle memory. Just difficult when switching between Mac/Windows and Slack/Discord/Teams

placid belfry
#

Hey do you know why socketpool or pool isn't kept globally with the wifi_module in adafruit_magtag/ ?

royal rapids
#

It's C code, not Python

#

"Core Module" = C Code

#

@placid belfry Which code are you trying to use, I got my magtag out to help test, could you provide me with a link?

placid belfry
#

Right now I'm just typing in the example minimqtt

#

Do you know if I can do magtag=Magtag()
For an metroesp32

royal rapids
#

I do not think so, the magtag library includes and initializes hardware which the Metro ESP32 doesnt have

#

You're using this example?

placid belfry
#

yes.

royal rapids
#

What error are you getting? What broker are you trying to connect to?

placid belfry
#

I setup my own mqtt_topic variable

royal rapids
#

hmmmm

#

What does your MQTT topic look like

#

the variable?

placid belfry
#

gddeen/feeds/magtag1displayio

royal rapids
#

Looks right

placid belfry
#

It works on my Magtag. But not my MetroESP32-S2 Express

#

magtag.get_local_time() works fine

royal rapids
#

I'll take a look

placid belfry
#
import socketpool
import wifi
import adafruit_minimqtt.adafruit_minimqtt as MQTT
from secrets import secrets
aio_username = secrets["aio_username"]
aio_key = secrets["aio_key"]

print("Connecting to %s" % secrets["ssid"])
wifi.radio.connect(secrets["ssid"], secrets["password"])
print("Connected to %s!" % secrets["ssid"])
#
mqtt_topic = "gddeen/feeds/magtag1displayio"

def connect(mqtt_client, userdata, flags, rc):
    print("Connected to MQTT Broker!")
    print("Flags: {0}\n RC: {1}".format(flags, rc))


def disconnect(mqtt_client, userdata, rc):
    print("Disconnected from MQTT Broker!")


def subscribe(mqtt_client, userdata, topic, granted_qos):
    print("Subscribed to {0} with QOS level {1}".format(topic, granted_qos))


def unsubscribe(mqtt_client, userdata, topic, pid):
    print("Unsubscribed from {0} with PID {1}".format(topic, pid))


def publish(mqtt_client, userdata, topic, pid):
    print("Published to {0} with PID {1}".format(topic, pid))


def message(client, topic, message):
    print("New message on topic {0}: {1}".format(topic, message))


pool = socketpool.SocketPool(wifi.radio)

mqtt_client = MQTT.MQTT(
    broker=secrets["broker"],
    port=secrets["port"],
    username=secrets["aio_username"],
    password=secrets["aio_key"],
    socket_pool=pool,
    ssl_context=ssl.create_default_context(),
)

mqtt_client.on_connect = connect
mqtt_client.on_disconnect = disconnect
mqtt_client.on_subscribe = subscribe
mqtt_client.on_unsubscribe = unsubscribe
mqtt_client.on_publish = publish
mqtt_client.on_message = message

print("Attempting to connect to %s" % mqtt_client.broker)
mqtt_client.connect()

print("Subscribing to %s" % mqtt_topic)
mqtt_client.subscribe(mqtt_topic)

print("Publishing to %s" % mqtt_topic)
mqtt_client.publish(mqtt_topic, "Hello Broker!")

print("Unsubscribing from %s" % mqtt_topic)
mqtt_client.unsubscribe(mqtt_topic)

print("Disconnecting from %s" % mqtt_client.broker)
mqtt_client.disconnect()


royal rapids
#

ok, on the ESP32S2 Metro, where does it fail?

#

What error do you see? Could you paste that here too?

placid belfry
#

o io.connect()

#

mqtt_client.connect()

royal rapids
#

Ok, do you get an error in the REPL/serial terminal when it fails?

placid belfry
#

I heard you said Magtag() wont work. Is there a similar class which will?

royal rapids
#

The code you posted doesn't use the magtag class

placid belfry
#

I've hooked up a 4.2" e-ink display

#

correct

#

Connected to AstroACN3!
Attempting to connect to io.adafruit.com
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/minimqtt_simpletest.py", line 60, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 437, in connect
File "adafruit_minimqtt/adafruit_minimqtt.py", line 235, in _get_connect_socket
AttributeError: 'NoneType' object has no attribute 'info'

royal rapids
#

Ah I saw that on github earlier... it's this error, right

placid belfry
#

wow. yes

royal rapids
#

within the mqtt_client initialization, could you add the line: is_ssl=True,

#

so it'd look like:

#
    broker=secrets["broker"],
    port=secrets["port"],
    username=secrets["aio_username"],
    password=secrets["aio_key"],
    socket_pool=pool,
is_ssl=True,
ssl_context=ssl.create_default_context(),
)
placid belfry
#

OK, I'll rerun

#

Connected to AstroACN3!
Attempting to connect to io.adafruit.com
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "minimqtt_simpletest.py", line 61, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 437, in connect
File "adafruit_minimqtt/adafruit_minimqtt.py", line 235, in _get_connect_socket
AttributeError: 'NoneType' object has no attribute 'info'

royal rapids
#

But this works on MagTag for you?

placid belfry
#

yes

#

Or it did a few days ago

royal rapids
#

ok, I just tested it OK on magtag, grabbing my S2 Metro

#

While I grab it, is your ESP32-S2 metro updated to the LATEst circuitPython firmware?

placid belfry
#

6.2beta

#

thats what the mqtt guide said (or one of the various guides)

royal rapids
#

What port are you using?

placid belfry
#

8883

royal rapids
#

This error seems to be cropping up on people connecting without SSL, 8883 is secure ...

placid belfry
#

mqtt_client = MQTT.MQTT(
broker=secrets["broker"],
port=secrets["port"],
username=secrets["aio_username"],
password=secrets["aio_key"],
socket_pool=pool,
is_ssl=True,
ssl_context=ssl.create_default_context(),
)

royal rapids
#

Ok, I just pulled down the latest version of MiniMQTT and installed Adafruit CircuitPython 6.2.0-beta.3 on 2021-03-04; Adafruit Metro ESP32S2 with ESP32S2

#

Don't see this error at all 😦

#

mqtt_topic = secrets["aio_username"] + '/feeds/temperature'

#

^ this is my topic, created this in Adafruit IO first.

#

Could you try this topic @placid belfry ?

placid belfry
#

That isn't a feed for me

royal rapids
#

Could you add one on the io website?

placid belfry
#

yup

royal rapids
#

Thanks, I want to rule something out..

#

@placid belfry also could you make sure you have this version of MiniMQTT installed

#

download the "adafruit-circuitpython-minimqtt-6.x-mpy-5.0.5.zip
", unzip it and drag the folder named adafruit_minimqtt to the CircuitPython drive

#

overwrite or remove whatever adafruit_minimqtt folder is in CIRCUITPY/lib

placid belfry
#

do I need a special tinyurl type file

#

got lib minimqtt copied over,

#

to change the 6.2beta to this... I need to run the program to rewrite the flash?

#

Do I need to change metro_esps32_s2_tinyuf2_combo.bin

#

Hmmm I hold down DFU then press reset, but it just resets and doesnt allow me to run the esptool

royal rapids
#

No, you dont need to update the version of CircuitPython

#

Does the new minimqtt fix the issue?

placid belfry
#

no

#

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:
Connecting to AstroACN3
Connected to AstroACN3!
Attempting to connect to io.adafruit.com
Traceback (most recent call last):
File "code.py", line 62, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 437, in connect
File "adafruit_minimqtt/adafruit_minimqtt.py", line 235, in _get_connect_socket
AttributeError: 'NoneType' object has no attribute 'info'

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

#

mqtt_topic = "gddeen/feeds/magtag1displayio"
mqtt_topic = secrets["aio_username"] + '/feeds/temperature'

#

I added temperature feed and set it to 27

#

That's good because I cant seem to reset it tooooo well and get it to allow me to run esptool to reload uf2, then copy over the UF2 file

royal rapids
#

I'm not able to replicate this given the amount of time I have left for support today

placid belfry
#

Yikes... I hate to mess with the big boys & girls

#

(all of them)

#

I'll try THANKS A BUNCH!!!

#

If you need any adafruit hardware I bought tons... Can ship you an ESP2

sullen imp
#

The issue is useful to file because it lets the community know there's a possible problem that needs fixing

royal rapids
#

@placid belfry I work for Adafruit and I wrote MiniMQTT

#

Thank you for the offer though, it's my job to fix this kinda thing and help you out πŸ™‚

placid belfry
#

Woah...

#

I read all your stuff... cool.

#

I used to be smart really...

placid belfry
#

@royal rapidsu 5.0.5 Looks like the problem I saw, a logging object wasn't initialized.

royal rapids
#

Yeah, its the exact problem

#

I'm really not sure why loading 5.0.5 onto your drive isnt working...

#

Could you try deleting the minimqtt on CIRCUITPY entirely

#

Then drag on 5.0.5

placid belfry
#

@royal rapidsu That was what I did.

#

Something is MORE basic than what you are thinking... It worked a couple of days ago on my magtag

#

@royal rapids The Magtag properly reads and writes adafruit temperature feed.

placid belfry
#
Traceback (most recent call last):
  File "code.py", line 62, in <module>
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 437, in connect
  File "adafruit_minimqtt/adafruit_minimqtt.py", line 240, in _get_connect_socket
TypeError: can't convert str to int

Code done running.
placid belfry
#

I'm going to test out the Metro ESP32-S2 Express TCP/IP and see if it is configuration of the board to the esp chip issue.

#
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
This is a test of Adafruit WiFi!
If you can read this, its working :)

----------------------------------------
Fetching json from https://www.adafruit.com/api/quotes.php
----------------------------------------
[{'text': "I'm an engineer. I see myself as a toolmaker and the musicians are my customers... They use my tools", 'author': 'Robert Moog '}]
----------------------------------------

Fetching and parsing json from https://api.github.com/repos/adafruit/circuitpython
----------------------------------------
CircuitPython GitHub Stars 2351
----------------------------------------
done
#

works. I'm switching back to my recognition engine for awhile, or displayio il0398 support for 4 level grayscale

oak eagle
#

I'm having trouble using a variable for my feed name through the Arduino IDE. Probably due to my inexperience with C++. I've tried several configurations but currently have the following code and I'm receiving the error no matching function for call to 'AdafruitIO_ESP8266::feed(String&)'

#

String feedgroup = "weather"; String room = "garage"; String t = String(feedgroup + "." + room + "-temperature"); AdafruitIO_Feed *temperatureFeed = io.feed(t);

valid merlin
#

not sure where to ask for help with this, but I've got ble = adafruit_ble.BLERadio(), for x in ble.start_scan():, and it's just skipping right pas the loop without waiting for any messages to come in...

#

is there some common mistake with the setup I could be making?

valid merlin
#

well, the good old fashioned reboot seems to have fixed it

#

anyway, yay my first sensor feed! πŸ₯³

placid belfry
#
        Socket Pool created
io.connect()
        MQTT __init__ in at 150
        MQTT __init__ at 213
        IO_MQTT __init__ at 46
        IO_MQTT __init__ 49  <class 'MQTT'>
        IO_MQTT __init__ at 57
        IO_MQTT __init__ out at 77
        Connecting to Adafruit IO...
        IO_MQTT connect at 100 enter _client connect()
        MQTT __init__ _get_connect_socket at 222
        MQTT __init__ _get_connect_socket at 240
        MQTT __init__ _get_connect_socket at 251 io.adafruit.com 8883 0
THIS line causes an exception:
( host is 'io.adafruit.com' port is 8883 _socket_pool is 0)
        addr_info = self._socket_pool.getaddrinfo(
            host, port, 0, self._socket_pool.SOCK_STREAM
        )[0]

        IO_MQTT catch at 104

Traceback (most recent call last):
  File "code.py", line 239, in <module>
  File "/blither.py", line 140, in <module>
  File "/lib/adafruit_io/adafruit_io.py", line 105, in connect
  File "/lib/adafruit_io/adafruit_io.py", line 105, in connect
AdafruitIO_MQTTError: MQTT Error: Unable to connect to Adafruit IO.
rich forge
sullen imp
#

Sorry to hear about the troubles you've been having

rich forge
#

ty

sullen imp
#

sure thing

small kelp
#

Any tutorials on getting alexa to read data from adafruit io?

placid belfry
#

@Holg Search for any guide with Brent Rubell in it.

placid belfry
#

The "Resubscribe" I assume is added because a client can be sleeping. I guess the Adafruit server saves the subscription from the client name and reestablishes communication. So, does this mean I can subscribe a hard coded client name and then resubscribe over a period where my client died and was restarted? If not... Is there a way to persist the tcp stack?

placid belfry
#

I wish to screen SMS messages on Android Q looking for a "sender" and then "publish" a message to io.adafruit.com. Are there any sample Android apps for this, or is something like ITTT the thing that must be used to do this? (Or does OTTT not do this?)

royal rapids
royal rapids
placid belfry
#

Thanks! I got IFTTT working fine for "Grubhub delivery" displayed on a 4.2" e-ink refrigerator display.

Adafruit CyP is great. So easy.

small kelp
#

@placid belfry @royal rapids I saw one learn guide on Alexa but it was for triggers to send something to your microcontroller coming from Alexa. I want Alexa to pull data from Adafruit IO and not sure where to start. Something like... "Alexa, what temperature is it in the garage".

placid belfry
#

@holg that one is covered in a guide. I can't remember which one but it is how you integrate a device to Alexa. I'll let you know when I get there. I usually read a few guides a day.

royal rapids
#

not sure if it's possible because I don't know much about the Alexa SDK and don't have one.

placid belfry
#

Ha... that's easily fixable!

small kelp
#

I'll do some additional research on it soon. Might be a good candidate for a new learn guide.

#

Now I have another question.

#

I am using PubSubClient on an ESP32 to publish data for temperature and voltage to two different feeds. The first feed publish always works but the second does not always reflect on Adafruit IO but always sends successfully. I originally had no delay between the two but have tried using 500,1000,2000 and still have issues with the second publish. Is there a limitation to how fast I can send data? In testing I was only sending two messages every minute but even sending two every hour, I experienced the same issue.

#

I am using the free tier.

orchid forge
#

Hi

white sphinx
strange lodge
royal rapids
#

@strange lodge you can share a dashboard, that guidepage is a bit older and pre-UI refresh

#

Go to your dash, click the cog -> share links

#

Make sure the feeds on the dashboard you're sharing are set to Public.

strange lodge
#

Hmm. All feeds are public. When I click the cog:

#

So I don't seem to have the option to share links

mighty ridge
#

@strange lodge dashboard is still set to private there

tacit granite
#

Hi everyone, i have a question about connecting Adafruit Pybadge ATSAMD51 to a 4G shield. Is it possible?

orchid forge
#

Hi

#

I need help with setting components together

#

I have the parts and the pictures

#

but I cant follow it

#

I need help with that if that is possible

strange lodge
#

@mighty ridge Thanks. I finally made the connection that "Dashboard Privacy" was about being able to view the dashboard, not just edit the dashboard.

small kelp
#

I am trying to use the arduino IO library with an esp32 and when it tries to connect I always get this in the serial output and it never connects.

[E][WiFiClientSecure.cpp:133] connect(): start_ssl_client: -1

#

I am using code from the examples.

#

Any ideas?

supple stratus
#

Hello, I am trying to connect a Feather Huzzah to the internet with no luck so far. I followed all the instructions on the Adafruit page. I can upload Blink and Hello World. But when I try to connect to the internet I get endless "....." I am trying to connect to Xfinity. I have two Huzzahs and both give me the same problem.

sacred depot
#

Hello everyone! I'm a complete beginner so while playing around with code in my internship i messed something up. Here we have 4 Raspberry Pis that controll some LED stripes. I got an error to my code saying "unable to import board, unable to import neopixel". I found on the internet that maybe Ardafruit-Blinka packages were missing, so i tried to reinstall it in one of the Pis with this command "sudo python3 -m pip install --force-reinstall adafruit-blinka". This rendered that Pi useless, and now its not responding to any code. My supervisors said that there may be a difference between Package versions so i checked at the other Pis and they were running on Adafruit-Blinka==2.6.1 version, while the first one is running on 6.4.2. Does anyone know why this happened or what the differences between the versions are?
Would be very thankful to any response

eager kite
eager kite
# supple stratus Hello, I am trying to connect a Feather Huzzah to the internet with no luck so ...

WiFi devices like Comcast's Xfinity require a browser so you can provide your credentials. After authentication you have internet access. It's called a "captive portall", like you have in airports, hotels, etc. that provide free access. Maybe you can use your smartphone as a WiFi hotspot to circumvent that problem. See https://www.xfinity.com/support/articles/about-xfinity-wifi-internet

supple stratus
#

Edit: Whaddya know? I tried connecting to my phone as a wifi hotspot and it worked like a charm! Thanks Systembolaget!

stone cedar
#

Hi,

I'm not sure if this goes best under help-with-arduino or help-with-adafruit-io, but I have the Adafruit Feather nRF52840 Express and want to modify the Bluefruit connect app and to develop upon the core codebase so I am currently working through #3 part 5 of the Arduino Set Up Support on this page. https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all

However, when I download the Adafruit_nRF52_Arduino repo all of the files within under libraries -> Adafruit_nRFCrypto @ 50131a5 do not download and that folder is blank, however I can see that when I click through the page there are in fact files there but for some reason are not downloading.

As a result when I try to run the Arduino IDE on my MacBook and select the Adafruit Feather nRF52840 Express board to run I receive and error saying β€œInvalid library found in /Users/Documents/Arduino/hardware/Adafruit_nRF52_Arduino-master/libraries/Adafruit_nRFCrypto: no headers files (.h)

So I want to know if there is something I’m doing wrong or some problem with this link https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide?view=all or the download setup on the link since I’m unable to receive the .h files needed within the libraries -> Adafruit_nRFCrypto @ 50131a5 -> src folder

Thank you!

Adafruit Learning System

Get started now with our most powerful Bluefruit board yet!

eager kite
lyric nest
#

Hello, I'm new to python and was wondering what I could use to collect temperature and humidity values of an adafruit shtc3 over a period of time. I want to take readings every 15 minutes for 24 hours but I don't know how to create the timer or where to store values obtained. Any help is appreciated. I'm also not sure if this goes in projects or adafruit-io.

graceful sluice
oak bison
#

Hello, I'm trying to code my own app that works via Bluetooth with the adafruit nfr52 feather board. Does anybody know what commands to send to the board to get it to turn on/off the pins? It seems that that's a hidden secret of Adafruit. Any help is appreciated.

shell star
#

@oak bison is is possible from an existing app?

oak bison
#

It is possible from the Adafruit app, but I haven't heard of any third-party apps that do it

shell star
pale hawk
gloomy steeple
#

does anyone have any insight on the motor shield v2.0?

lean swan
#

I'm unable to connect to adafruitIO with the following error:
MQTT Error: Unable to connect to Adafruit IO.
I'm using CircuitPython. A different device using the Python library is able to connect with the same user/access key. Any ideas on what could actually be causing the problem? It's connected to wifi and can ping google.com.

robust panther
lean swan
#

Just checked my other libraries for this, I'll double check the Adafruit_IO library for the same.

#

Adafruit_io library is up to date for the same version (6.x) of circuitpython.

lean swan
#

Correct, it doesn't work. Chokes on board.ESP_CS.

#

It connects to the wifi fine with the wfi module though.

robust panther
lean swan
#

FeatherS2

robust panther
#

ah ok, that demo is for AirLift

#

let me find another demo

lean swan
#

Same error,
AdafruitIO_MQTTError: MQTT Error: Unable to connect to Adafruit IO.

#

Good golly this is annoying.

robust panther
umbral sigil
#

Hi, Im a new member in this discord. Would this be the right place to ask about interfacing with accelerometers?

neat charm
umbral sigil
#

Thanks!

lean swan
# robust panther did this board ever work? One more thing to try: use esptool.py to do a `flash_e...

OK, I finally think I've got it licked. First, tip for anybody experiencing problems, import adafruit_logging and init a logger. After initializing the mqtt client, before connecting, set the mqtt_client.logger to the logger you initialized. This will give much more descriptive error messages, and tell you where it failed. In my case, the key was slightly different from the feed name, and the raised exception didn't detail this information, but the logger does. From here, I was able to fix these problems and subscribe to the feed, even though it looked like it was failing before feed subscription.

robust panther
#

@royal rapidssee this troubleshooting suggestion, which might be good to put in a guide, if you haven't already ^^

royal rapids
#

@robust panther we could add a logging example

#

and then a pg. about this on the "MQTT with CircuitPython" guide too

robust panther
#

that sounds appealing, it helped them debug their issue; could include somehow on troubleshooting page (if there is one)

lean swan
# royal rapids <@!329766224093249548> we could add a logging example

OK, weird bug. I can only successfully connect to AdafruitIO_MQTT when the debugging logger is set.
With no logger set:
Connecting to Adafruit IO...
Traceback (most recent call last):
File "code.py", line 120, in <module>
File "adafruit_io/adafruit_io.py", line 108, in connect
File "adafruit_io/adafruit_io.py", line 108, in connect
AdafruitIO_MQTTError: MQTT Error: Unable to connect to Adafruit IO.

With logger set:
Connecting to Adafruit IO...
164.123: DEBUG - Attempting to establish MQTT connection...
164.131: INFO - Establishing a SECURE SSL connection to io.adafruit.com:8883
185.203: DEBUG - Sending CONNECT to broker...
185.208: DEBUG - Fixed Header: bytearray(b'\x10L\x00')
Variable Header: bytearray(b'\x04MQTT\x04\xc2\x00<')
185.22: DEBUG - Receiving CONNACK packet from broker
Connected to Adafruit IO!Listening for plant-light changes...
185.299: DEBUG - SUBSCRIBING to topic GeneticCowboy/f/plant-light with QoS 0
Subscribed to GeneticCowboy/f/plant-light with QOS level 0
Publishing a new message every 15 seconds...

#

Looking through adafruit_minimqtt, I can't see any conditionals including if self.debugger that do any work other than using the logger. Very weird.

#

The only difference between the two outcomes was commenting out initializing the logger and setting the logger on the mqtt_client.

terse anchor
#

Hi, I needed some help with trying to get the stepper motor example running smoothly... there isn’t an error, but sometimes when I send a specific configuration to my raspberry pi to run a stepper motor, there are many time when the command isn’t captured on the pi or even if it is the stepper motor doesn’t rotate every time the signal is received by the raspberry pi. Here is a link to the guide I am using: https://learn.adafruit.com/wireless-stepper-control-with-adafruit-io-circuitpython-raspberry-pi-python/adafruit-io-setup

Thanks

Adafruit Learning System

Control your stepper motors over the internet with Adafruit IO

glossy night
#

I’m trying to send data from an adafruit feather m0 to an arduino via uart, but I’m not having any success yet. Is the uart on the adafruit on serial1 or serial? I tried looking for an example specific to this topic, but I couldn’t find any.

neat charm
glossy night
terse anchor
#

got it thank you

red lotus
#

What is the limit on the adafruit io image converter? I was doing some work and got a 429: too many requests error - I have a fee account - I see the 30/min rate limit for feeds but I don't see anything on the image converter

#

also is there a github repo for this service - I'd love to run it locally

#

though I will say - the rate limit doesn't seem to match up

royal rapids
#

there's no repo for this service

red lotus
#

just for the resolution here - I ended up following the instructions on that forum post to create a docker container to run my own image convert - then hosted that on my synology NAS

obtuse marsh
#

or a link?

lean swan
#

I'm including only the extra code below, plus where it should go in the process.

import adafruit_logging as logging

mqtt_client = MQTT.MQTT(
broker="io.adafruit.com",
username=secrets["user"],
password=secrets["pass"],
socket_pool=pool,
ssl_context=ssl.create_default_context(),
)
logger = logging.getLogger('test') # debugging mqtt
mqtt_client.logger = logger # debugging mqtt

# Initialize an Adafruit IO MQTT Client
io = IO_MQTT(mqtt_client)
#

@obtuse marsh Hope this helps!

obtuse marsh
#

Thanks!!

obtuse marsh
#

@lean swan, thank you very much! With just a modicum of modification, I did get more information. Unfortunately, I'm too noob to understand it. I posted the info to the forum and hopefully they can parse out the error log. I appreciate your help!

modern widget
#

@lean swan are you still having problems with connecting via MQTT? Based on the thread, and my own testing, looks like the connection issue is related to https://github.com/adafruit/circuitpython/issues/4152. Just want to be sure that I should be waiting for a fix versus trying sometime else (background - using an ESP32s2 Metro to connect to adafruit.io via MQTT [pub/sub])

modern pike
#

hello! i am trying to use adafruit IO as a MQTT server. i am trying to run the below code on an ESP8266 running micropython (removed personal info πŸ˜‰ ) but there is an error with the MQTT module (error attatched too)

code:

import ubinascii, time
from umqtt.simple import MQTTClient

def do_connect():
    import network
    sta_if = network.WLAN(network.STA_IF)
    if not sta_if.isconnected():
        print('connecting to network...')
        sta_if.active(True)
        sta_if.connect('WIFI name', 'Password')
        while not sta_if.isconnected():
            pass
    print('network config:', sta_if.ifconfig())

do_connect()#connect to WIFI


CLIENT_ID = ubinascii.hexlify(machine.unique_id())
mqtt = MQTTClient("device_id", "io.adafruit.com",user="zax71", password="my active key", port=1883)
mqtt.connect()
mqtt.publish('zax71/feeds/lights'.format(CLIENT_ID).encode(), 'ON'.encode())
time.sleep(1)
mqtt.publish('zax71/feeds/lights'.format(CLIENT_ID).encode(), 'OFF'.encode())
time.sleep(1)

error:

Traceback (most recent call last):
  File "<stdin>", line 20, in <module>
  File "umqtt/simple.py", line 99, in connect
MQTTException: 5

ping @modern pike on reply πŸ™‚

uneven finch
#

Hello. Am I able to get some help troubleshooting connection issue from my arduio to adafruit.io?

#

I am using a Feather M0 Wifi. The steps I have done include updating the firmware to 19.6.1 on the wifi module, uploaded the ping sketch from the WiFi101 library and confirmed I can ping google and adafruit.io, reverified the username and key (which were copied and pasted from the code example on adafruit.io).

#

per the adafruit website troubleshooting guide, I also included the line " Serial.println(io.statusText());", which repeatedly prints "Disconnected from Adafruit IO."

lean swan
obtuse marsh
#

@modern widget my issue is with a PyPortal trying to receive data from AIO. "Strange things are afoot at the Circle K."

modern widget
#

@obtuse marsh @lean swan - Ok - my issue is with receiving data as well. Specifically, I get an error when calling the "loop" function (I get an "EBADF" error). This sounds like a know issue at this point, so I'll wait for a resolution

obtuse marsh
mild kraken
#

Hey. I have an adafruit MPR121 capactive touch sensor, and was wondering if it works with sparkfun's SAMD51 thing plus.

#

And if yes, what ports can I hook the MPR121 onto? I would really prefer not to use A4 and A5 as specified in the docs.

uneven flax
#

@ornate pagoda Hi Kattni! I'm trying to use the adafruit mini gps pa1010d module with the micro:bit. I connect the sensor, get the green light and the red PPS light is blinking. The I2C read command for the micro:bit looks like this: i2c_read_number(address: number, format: NumberFormat, repeated: bool): number But I'm not sure of the I2C adress and the number format. I have tried I2C adress=66 and format=UInt8LE but that didn'twork. Any suggestions?

ornate pagoda
#

@uneven flax I have no idea! It's best to avoid pinging individuals unless you're already in a conversation with them. It means you're limiting potential answers, and unnecessarily pinging folks. This question is probably better posted to the #help-with-projects channel. We discourage cross-posting, but I would ask that you post your question to the other channel because it may not get seen in this channel. Please be patient once you post your question as most of the folks on this server are community members who help out when they can.

spice imp
#

I just received the Adafruit Zero4U Powered USB Hub (without the POGO pins) today and am trying to find out which of the Pogo Pin pads on the back of the Zero4U is which. I haven't been able to find the pinout or electrical diagram for it. i.e.- where do I solder each wire to power it up?

#

There are 4 pads: PP1, PP6, PP22, & PP23

#

Here's the image from the website, although mine doesn't have the "ALT 5v IN" solder pads on the back. It must be a different revision

neat charm
#

It looks like the pogo pin assignments match the RasPi Zero pads, so PP1 = +5V, PP6 = GND, PP22 = USB D+, and PP23 = USB D-.

bright coral
#

hello, can someone help me with why i get the "Disconnected from Adafruit IO." message?

#

i'm using the espressif esp32-wroom-32 on the esp32 dev board

ember quarry
#

Hey guys, I am trying to send JSON data via MQTT in order to create several feeds within a group at once. Everything seems to be going well on the surface and under monitor -> live data it is showing that adafruit.io is recieving the data. BUT for some reason, it is not creating or showing new feeds under the group. Has anyone else encountered this issue or knows how to fix it?

mighty ridge
#

@bright coral make sure you're using a unique client id. don't expect something like "esp32-client" is unique

#

@ember quarry maybe you're maxed out on a free account ?

obtuse marsh
obtuse marsh
#

Hello all! I'm modifying some MQTT code so I can read FROM IO (gas sensor data). The line I have is: mqtt_client.publish(rx_feed) but that line is to publish data. If I want to read the data from IO, is there a line something like mqtt_clien.READ(rx_feed)? Thanks!

obtuse marsh
#

Never mind... Got it working! πŸ˜ƒ

obtuse marsh
#

Actually, got the code itself to work but can't integrate it into the PyPortal UI example because UI code calls on the PyPortal board... Back to square one. 😩

alpine prawn
#

Hello! I wonder if someone can help me with a question. My daughter is planning to use Adafruit io for a project. Are there any accounts specific for students?

shell star
alpine prawn
full shuttle
mighty ridge
#

I'm trying to find an adafruit-io + MagTag example. Anybody know of one ?

mighty ridge
#

thanks but neither of those use the adafruit_io circuitpython library

obsidian hedge
#

I thought I had one on my MagTag, but apparently, I erased the device to test something at some point, and then erased my memory of erasing it 🀦

mighty ridge
#

I feel like the magtag library might offer a wrapper for all that ssl and sockets stuff but the documentation is so hard to find.

obsidian hedge
#

You're right, it does offer a wrapper

#

Since Magtag inherits from PortalBase, which, through the network property, has AdafruitIO wrappers, such as get_io_* and push_to_io

mighty ridge
#

nice. that's exatly what I needed.

peak pebble
#

hi, i have a question related to esp32 and adafruit io, does my internet need to have access to specific port (ex 8883) so that my esp can connect to adafruit server ? thanks

mighty ridge
#

@peak pebble no

pearl oasis
#

anyone with good knowledge of visuino ?

coarse vale
sacred depot
#

;)

pearl oasis
#

well i dont see any point to ask but at least you replied thx @coarse vale btw i have already tried tht too

#

all i want to know is what block we use in visuino to create menu with multiple pages on tft displays lm9341

eager kite
eager kite
gray sluice
#

Can someone please help me. I have 2 PCA9685 boards and for both of them on Day 1 they work fine and then on day 2 they stop working and don't even get an i2c address back using i2cdetect on my jetson

mighty ridge
#

@eager kitethanks but this is not circuitpython

gray sluice
#

maybe there is a better product than the PCA9685?

deep rampart
#

I'm having trouble using the "Adafruit IO Temperature & Humidity Example". It always fails to initialize the TCP. The FONA seemed to be working on the FONAtest example, but moving onto here it doesn't.

glossy night
#

Is it possible to boot the adafruit feather m0 from an sd card?

neat charm
#

Not directly. You have to have a bootloader in the internal flash which would transition to loading an application from SD Card or something like that.

steep trout
#

Hey guys I'm having an issue that could be something to do with my router but i'm not sure. I currently have 3 ESP32s connected to my network and to Adafruit IO and they all work fine but I just tried to connect another one and the serial monitor stays stuck on "disconnected from adafruit io". Ik it's not a device number issue because when I disconnect one of my other esp32s it still doesn't work. I've tried running the code on a different esp32 but it still doesn't work so it's not device specific. Any ideas on what the issue could be? I'm pretty close to just creating a single "smart hub" that connects to adafruit io and have all the other esp32s connect to the hub via ESP-NOW but i'd like to know what the initial issue was. Thanks!

kindred stump
mighty ridge
#

I'm trying get the bluefruit feather to receive data over adafruit IO via the Bluefruit connect app. However, it doesn't seem like that flow exists. You can send data back and forth from the App to the Feather, and from the Feather to the App to IO, but is there a way to get a feed data from IO -> App -> Feather ?

red glen
#

Is it possible for a dashboard to show bmp images?

dry vector
#

Hey guys. Im not very experienced programmer and would like some help. Has anybody done it or know how to send Pimoroni’s Grow sensor and pump data to Adafruit IO. Thanks!

woeful crescent
#

has anyone been able to play bad apple on SHARP memory display at 30fps ?

#

I get slide show speed even with m4, feels cheated by the demo video

mighty ridge
#

@dry vectorlooks like those sensors have i2c interface (SCL and SDA) pins. are you already getting the data onto your computer or are the USB cables just for power ?