#help-with-wippersnapper-and-adafruitio
100 messages Β· Page 7 of 1
possibly of use: https://answers.opencv.org/question/179923/laptop-minimum-system-requirement-for-opencv/
Hi guys, Couldn't find anything solid regards with the kind of solution I am after online, so had to post this here. Please note I can't build a desktop which is definitely much better for such work. I mainly work on OpenCV. Currently doing good with python. C++ is an option. ...
I am using adafruit io
my problem is that my esp8266 does not receive any data
my sketch
@royal rapids
It connects sucessfully
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
Looking..
@sacred depot what happens when you add a value called "ON" to the feed?
does it your board receive it?
@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.
Ok, taking a look
@sacred depot do you see the board connected on http://io.adafruit.com/monitor ?
Adafruit IO is the easiest way to get your projects onto the Internet of Things!
It should show up under Connections
@sacred depot your Serial Monitor printed out "MQTT Connected"?
yep
@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?
okay wait a sec
I think the board may not not be receiving data because it disconnected
@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
i use 0 and 1
Please try ON
Does the serial monitor show new data?
that works
What does the serial monitor show?
nothing
could you copy and paste here?
@sacred depot Yeah, you might need to do a type conversion, please see https://learn.adafruit.com/mqtt-adafruit-io-and-you/more-on-subscriptions
@sacred depot Did you post this thread here? https://forums.adafruit.com/viewtopic.php?f=56&t=171109
yes lol
done!
okay thx
np, im leaving it open so you can post any other q's in there π
thx again
I'm new to adafruit-io Where do i find my your_big_huge_super_long_aio_key
@toxic venture log into you aio account. In the top right of the page there is a link to your key.
Upper right
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
Should one be able to see the io dashboards on ios?
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
@low depot It should be configurable from your MQTT client, not the broker.
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)
5 minutes is our standard keepalive. 20 minutes is a long time to keep a connection open.
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?
Here is my code https://github.com/cbitter78/iot-beer-machine/pull/1/files
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.
Could you try this branch?
Perfect. that tends to explain the behavor I saw in the message.txt I just sent
Sounds similar to the issue you're having.
where the bytes look like they are out of order
π
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. π
@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
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.
@acoustic igloo that'd be great. Let me know how it goes
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.
Yeah, I'll be watching that branch
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?
@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.
Test rig for a vending machine
@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.
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.
I suggest getting the Nano 33 wifi working then just use Adafruit_MQTT_Client and pass it the wifi client. You can see this pattern here https://github.com/cbitter78/iot-beer-machine/blob/adafruit/iot-beer-machine/iot-beer-machine.ino#L39. (not the same board, but the same idea)
Has anyone got Adafruit IO working with Unity? π
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.
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.
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.
@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.
good π
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.
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
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
has anyone worked with the sgp30, i am trying to figure out how to manage the baseline
anyone here got experience with adafruits 2.13" e-ink monochrome feather? I can't seem to get the display working :/
Is the IO server code on github somewhere? I found this repo but it hasn't had commits anytime recently, I'm thinking it may be an older version or something? https://github.com/adafruit/adafruit-io-node
Ah, I see a relavent answer here: https://github.com/adafruit/io-api/issues/1#issuecomment-361990411
Is the code for adafruit.io itself Open Source, i.e., could I run my own instance of IO including the Web interface?
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.
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.
@red glen I'd be open to just about anything
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!
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
can not get this to work
I tried this now also; https://www.instructables.com/NodeMCU-ProjectButton-Control-LED/. its behaving the same way with an over sensitive pin
@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.
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
that's the best solution, congrats
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???"
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)
sensors don't usually do comms on their own. they usually need to be connected to a controller. what controller are you using?
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
Here is a request line that came from the Wio Link app
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!)
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.
Would I program it solely in python?
I don't think you can do that. Have you checked the manual for the board?
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
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".
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.
@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
See bullets #5 and #6 here: https://wiki.seeedstudio.com/Wio_Link/#faq
Seeed Product Document
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?
@molten elk I highly recommend you submit it here- this is what Adafruit reads for feature update suggestions: https://forums.adafruit.com/viewtopic.php?f=56&t=139746
@molten elk Could you please ask in the updated IO thread here? https://forums.adafruit.com/viewtopic.php?f=56&t=171665
I'm trying to consolidate support for this new update
ah, i saw you already did thanks
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()?
@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
@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...
@royal rapids do you happen to know what the error message is roughly? That would allow me to search the logs
@simple drift Are you using Adafruit IO Python with the HTTP client or the MQTT client?
@royal rapids HTTP
@simple drift all the possible errors are within https://github.com/adafruit/Adafruit_IO_Python/blob/f5fce9f58afeeae55455cc9c89147b8eee686fab/Adafruit_IO/errors.py
@simple drift all the possible errors are within https://github.com/adafruit/Adafruit_IO_Python/blob/f5fce9f58afeeae55455cc9c89147b8eee686fab/Adafruit_IO/errors.py
@royal rapids Thanks!
np!
@sacred depot Pinning a shortcut to your homescreen is probably the closest.
Is it possible to self-host adafruit io service? Or at least the time sync part?
@slate rock Not currently
Hm, I'm getting a lot of time drift and don't want to spam the service to stay in sync.
@slate rock You're getting time drift with the Adafruit IO time service?
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.
@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
ah, that's a great idea... why didn't I think of that
is it possible to send an array or object to a feed?
also how do you delete a feed group?
@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!
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.
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 ?
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
@white apex the library will usually try and reconnect
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.
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
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
Anyone?
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.
you may also want to ask in #help-with-projects to get some other stepper ideas
@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
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
@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?
let's chat in project help
okay
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
@keen zealot Could you file this as an issue on the Matrixportal library's github page?
The updated Adafruit IO interface is now live on http://io.adafruit.com
The focus on this update has been on making IO easier to use (larger fonts, less digging into menus) and with more options!
Visit the Adafruit shop online - http://www.adafruit.com
--------------------...
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?
@twilit jasper You may want to put these feeds in a group, and update the Adafruit IO group
@royal rapids awesome ty! ill look that up
@royal rapids can it be done the same way for mqtt?
Yep, all of our libraries support it (https://io.adafruit.com/api/docs/mqtt.html#publish-to-feeds-in-a-group < underlying API) and have examples for it
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
@twilit jasper It may be faster. We have a guide here:
thanks @royal rapids
@royal rapids how do i delete a group from IO? I dont see any option, looked everywhere, im probably blind
@royal rapids I created the issue
is there another way to delete a group from IO?
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?
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++
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.
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
@twilit jasper Sending json: https://learn.adafruit.com/adafruit-io/mqtt-api#data-with-location-2825191-7
@graceful sluice thats not c++ though :/
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);```
CircuitPython is not supported by the HUZZAH32.
@twilit jasper Which library are you using?
@royal rapids I am use pubsubclient
@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
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?
Got it. I used String message = String(data->value()); and then if (message == "On") {digital.write(pin, HIGH);} and that worked. Not sure why, but it's working now. ... I'm an engineer not a coder, and just barely stumbling through this project. If anyone knows a better way I'd be happy to hear it.
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.
@grim vale what URL are you using?
@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
any official Adafruit IO guys here?
what are you looking for specifically @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
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
kk ty
I agree, I went through the same thing earlier this week.
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?
@drowsy tinsel i have the same issue also, would be interested in a solution
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
Did you try this? https://learn.adafruit.com/adafruit-io-basics-dashboards/sharing-a-dashboard. Is that not what you want?
No, it is read only for everyone else
What if they make an Adafruit account?
I havenβt tried that yet
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 ?
feed not receiving data is not a map block problem
I mean I manually add data to a feed connected to map block but nothing shows up on the map.
OK Got it working : )
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?
You try doing it in a standard page instead of in an iframe?
I don't think that is possible based on how Magic Mirror works.
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
There's an API call for deleting a data point (https://io.adafruit.com/api/docs/?cpp#delete-data-point), but I don't see one for deleting multiple data points
@twilit jasper sorry, we cannot clear entire feeds. you can delete and recreate, though.
yeah ive been doing that, but its a huge pain since it breaks my dashboard
and then i have to recreate it
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?
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
Not seeing that here, @twilit jasper
Starts after about 30 min
@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
@tired prism I only have one dashboard, i will test those other things now
@tired prism I also have 11 active feeds
cool, not a crazy high number π
@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%
Image from a 20 second profile in chrome of the dashboard
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%
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
@twilit jasper this is great, thank you for the reports. definitely worth investigating
what blocks do you have on that dashboard?
@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!
@tired prism happy to help π thanks!
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!
my goal was to combo these 2 into a lora texting device:
https://www.adafruit.com/product/3178
https://www.adafruit.com/product/4818
But I think the problem may be that the M) doesn't have enough space for the displayio.. and much less for the libraries needed for the lcd/keyboard and lora... is that the case?
You may want to ask this in #help-with-circuitpython
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.
@graceful sluice Thanks!
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".
You should ask that question in #help-with-circuitpython
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
}
}
Any chance that someone here had worked with the AS7341 10 channels color sensor?
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.
Not clear which example you're looking at. The json for the Create Data method doesn't look like that: https://io.adafruit.com/api/docs/#create-data
Iβm referring to the MQTT API.
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
}
}
I think that may actually be a typo as the section right below that is about subscribing to groups and a response actually makes sense there.
@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
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
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.
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
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 π
@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!
@worldly bramble Could you check io.adafruit.com/monitor and see if they get assigned the same identifier?
@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.
@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
@worldly bramble Is the second node sending data to Adafruit IO?
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...
@worldly bramble hrmmm, not sure then. It's getting difficult to debug this without code, could you post up on https://forums.adafruit.com/viewforum.php?f=56 and include your code for the problematic sensor node?
Thank you for the clarification, makes sense!
Yes.. i will prepare the code and post up there... i apreciate a lot your help and atenttion, thanks.. and merry christmans.
You too!
Hi, is here anyone who already created or know how to create android mqtt client which is connected to adafruit broker?
no one answered me....:(
It's possible that no one here knows the answer, but it's also the X-mas holidays so fewer people may be online.
@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. ;)
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
π 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
Iβm curious are you following an Android MQTT tutorial such as https://medium.com/swlh/android-and-mqtt-a-simple-guide-cb0cbba1931c
You can also jump straight to the MQTT client library https://github.com/eclipse/paho.mqtt.android
@violet coyote βοΈ
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).
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
Have you built any Android apps before?
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...
ok, i downloaded files from this link https://github.com/leonardocavagnis/MQTTClientSample_Android and how to open it in android studio?
Sorry @violet coyote Iβm not an Android os developer and thatβs a bit beyond the scope of the help with Adafruit IO channel. I suggest you start with the very first step of getting a basic app going. https://developer.android.com/training/basics/firstapp
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.
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
Oh that I know.
Let me get you the link
That explains where to get your key to authenticate
hahaha π thanks @kindred stump ...
i cannot find on this link connection btwn adafruit and android...only for arduino projects coding
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!
ok, thanks
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?
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??
adafruit io is a cloud service https://io.adafruit.com/
Adafruit IO is the easiest way to get your projects onto the Internet of Things!
i guess this is a better link https://learn.adafruit.com/adafruit-io
Is there a framework for working with a pitft and displaying static text etc?
if you're just displaying static text then i doubt you'd need that. Maybe you need to find some other example.
Not just static then
did you search the learning guides for https://learn.adafruit.com/search?q=pitft?
Fun with a camera, temperature sensor, PiTFT, PyGame, and adafruit.io REST, MQTT and API calls.
Client side
That uses putenv
I guess that project uses adafruit io to store the temps
Is this any help? https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi
I'm just going to make my own with C
Hullo! Is this the right channel to ask a question about the PyPortal?
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
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
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?
I don't immediately see a way to do that, but why would the broker need to differentiate between devices anyway?
@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.
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.
#help-with-circuitpython or #help-with-projects would be good places for this
Well in this case, a think they are getting right ids.. one for each... in this case, why i cant stay connected when i plug another devices.. that not exceed any limit rate? im pretty confused here, cause all should just works fine. i mean any way or clue what can cause it? or where i should look?
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
Are you connecting it to Adafruit IO? Then yes. Otherwise no; try #help-with-projects
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.
welp, io down
@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?
@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.
Thank you Brent
np!
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
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
@sacred depot Could you take a screenshot for me?
I'd like to file a request for the devs. to change this
yeah! perfect thanks
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
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?
OK I think I answered this question
name="core-mosquitto" key="homeassistant" password="PASSWD"
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
What's the longest string you can save, @dim sphinx ? Guessing you might be hitting the 45 character limit on data?
Dyno bot won't let me post the code reference. See lines 131-132 here: https://github.com/adafruit/Adafruit_IO_Arduino/blob/0ef372ce346e3c0954ec650663eb5d8e534b4743/src/AdafruitIO_Definitions.h
@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?
I don't know. And sadly, I can't find any reference to any of these limits in the documentation...
Hi, I'm testing MQTT with MagTag (ESP32-S2), could anyone help with this error: AttributeError: 'module' object has no attribute 'ESP_CS'
@royal rapids Hi brentru, is it possible to use MQTT with this ESP32-S2 device?
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?
Did some digging, it appears the library simply doesn't support it, because it always builds feed URLs with :username/feeds/
https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/src/AdafruitIO_Feed.cpp#L452
β οΈ 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.
@shell star ^ could you please pin this for me? Thanks!
done!
Thank you!
np
Can someone tell me if this doc is up to date? https://circuitpython.readthedocs.io/en/6.0.x/docs/common_hal.html I don't see anything to do with SRC_BINDINGS or SRC_BINDINGS_EXPANDED in the current Makefiles of any ports.
@worthy root This is the adafruit.io channel, please ask this in #help-with-circuitpython
Apologies, I somehow switched - Thanks.
np!
Anybody else getting the 503 error?
@left perch Adafruit IO is currently down and undergoing a scheduled maintenance
We should be back up soon π
aaand IO is back online!
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.
@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
@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?
the feeds aren't actually called foo & bar btw, I changed the names because they contain semi-personal information π
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
Hello. I have a problem using MQTT.fx for adafruit.io. I appreciate it if you can help me.
I have followed the exact instructions in here to set up MQTT.fx 5.0.3
https://learn.adafruit.com/desktop-mqtt-client-for-adafruit-io/configuring
But each time I try to connect, I get this error:
Interact with adafruit.io right at your computer!
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.
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.
@hybrid flower Using the Adafruit IO CircuitPython library?
@trail swan I do not know.
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?
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
thanks - I was hoping to use circuitpython
but thank you, if I cant get CP to work I'll give Arduino a crack
@hybrid flower Oh, you can use CircuitPython
....I just haven't written examples for using it with Adafruit IO CircuitPython yet π
Could you file an issue here: https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/issues
And request additional examples for the ethernet featherwing?
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
Your post was a while ago, is this still failing? If so, are you using one of the adafruit_io libraries or your own MQTT client ?
Does anyone know if public IO data can be accessed via MQTT publicly ? ie. mqtt without using a user/api key ?
I don't believe they can, to prevent any excesses and abuse of the system. However, free accounts should be able to access those feeds.
Hi, i am using IoT controller (android app) through which i connect to adafruit mqtt
Ok I canβt help with you that, but maybe someone else can. Iβd also try the Adafruit Forums.
this is so strange...it was working everything but now shows /feeds/name flood
@obsidian hedge thanks for the reply.
https://io.adafruit.com/api/v2/Lukasl33t/feeds/temperature/data?start_time=2021-01-13T09:59:48Z&end_time=2021-01-22T16:26:42Z&limit=1/?X-AIO-Key=myaiokey results in error not found but https://io.adafruit.com/api/v2/Lukasl33t/feeds/temperature/data/first/?X-AIO-Key=myaiokey works just fine? any ideas? there are most definitely values within the specified time on aio
That first URL doesn't look right
I still cant figure out how to solve problem with feed flood
$ 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
The URL you pasted above is malformed. It contains 2 query strings: "?start_time" ... "?X-AIO..."
i need to to include my key somewhere and it works with the other request
Thank you!
any update on this?
No update but we did get another request for it, which I noted for the devs.
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
The feather I'm using
hey yeah, you're right
@leaden rampart yes they were mislabeled on some boardshttps://learn.adafruit.com/st-9-dof-combo/lsm6dsox-lis3mdl-pinouts#i2c-logic-pins-3065004-7
fixed link
@keen dirge Thanks!
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.
@sharp scarab I've replied to this query on the Adafruit technical support forums
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?
Probably depends on what library you're using. Docs could be helpful https://io.adafruit.com/api/docs/
Is there a way to send string to and display it adafruit io?
Same as with any other data. Send it and display it.
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?
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
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
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?
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.
but the wiring guide https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout/wiring says one should use 5v for power.
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 π
@lunar sleet take a look at the Schematic for the board https://learn.adafruit.com/assets/26205 there is a voltage regulator that takes Vin and creates 3.3V for the chip. Here https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout/pinouts#power-pins-2177358-2 it says you can power the board with 3.3-16V
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.
Alright , thank so much!! ^V^
You're welcome -- Good luck with your project!
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.
It is quite straightforward. There are a bunch of helper libraries, not to mention learn guides on learn.adafruit.com
And you can create a dashboard on the AdafruitIO page (io.adafruit.com)
Where you can group and visualize your data
ok thanks, I'm like a person getting in a rowboat to cross the ocean here
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
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
Tutorial on Not-Matt Systematic-LEDs.
Links:
https://github.com/not-matt/Systematic-LEDs
https://github.com/coryking/FastLED
https://www.anaconda.com/download/#windows
https://notepad-plus-plus.org/download/
https://www.vb-audio.com/Voicemeeter/index.htm
First time install:
conda install numpy scipy pyqtgraph
pip install pyaudio
To run the ...
does anyone know of example projects using the Magtag that write to an adafruit IO dashboard? I am having trouble finding one
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
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!
None so far since we only recently got MiniMQTT working with Adafruit IO
Waiting on having I2C/WiFi working with the S2, then I'll do a guide I've been planning π
Are you still seeing this?
I won't have time to try it again till next week probably. Busy work week.
But if its only failing for me... It is prolly me. π
So it is technically possible to do? Thanks for the update
It's absolutely possible to do - there's an example here (https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/blob/master/examples/native_networking/minimqtt_adafruitio_native_networking.py)
but - if your sensor uses i2c and networking on the esp32-s2, you'll run into issues until it's fixed in the core.
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?
CorrecT!
yep, I want to do an air quality monitor with the MagTag as well, it's perfect π
Kismet!
where is a good place to go to start understanding sockets?
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
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
cool thanks!
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.
Are you aware that feeds already have a feature to email a notification when no data was received for some time frame?
I missed that but I need to notify multiple people, renotify every x minutes while down and notify when the feed is restored.
I managed to make something that works but I hard coded it. Gonna add an array for multiple feeds and loop through them
https://gist.github.com/matt-desmarais/6ed0aa45920a450cb7f663c8f4b6aa9f
Occasionally I'm getting a value of 1440 minute difference between the feed and the current time and I can't figure out why
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 ...
I use the aqi Python library instead of rolling my own. π
on raspi?
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.
Hi may I here ask how I should connect my ft232h to Pycharm IDE in windows 10? If not any suggestion where to ask?
@mystic fossil Using Python presumably? I would suggest #help-with-circuitpython or #help-with-projects, but please don't post to both. You'll get more visibility in either of those two channels though.
Thank you kattniππ»
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?
@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.
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
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!
@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.
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"
The API documentation unfortunately is very badly written, like most such documentation. It doesn't really say.
I'm just now getting to the iot part of my work so thanks for responding. I'll see what I can rig together
this guide https://learn.adafruit.com/mqtt-in-circuitpython?view=all calls secrets['broker'] and secrets['port'] but doesn't (seem to, in case I missed it) provide guidance as to what to put in your secrets dict. Does anyone know?
Ah I see that's for brokers other than adafruit io
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?
I'd think it would be possible, but why would you want to?
I'd like to post to a feed at Y interval and then download X (probably 24 hours) of data and average it on my device.
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:
It says it's not implemented in circuitpython. bummer
I should have specified I'm using CP
Although it says not implemented in adafruit IO CircuitPython, I wonder if adafruit_requests would work to get the data
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?
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!
Hm that's a good question, let me see if I can find anything
I've never done any bluetoothery but I'll see what I can find!
Great, thanks; there surely is a way but the examples on Adafruit always use a single sensor only, which for our citizen science projects is not enough (parents mapping their neighbourhoods while roaming the city with the stroller).
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.
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.
I assume you want to be able to walk around and use the phones as the pass thru for data logging to adafruit IO?
Exactly, that's the thing.
Hmmm it's got to be a use case they considered
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.
I hope the answer isn't use 3 phones
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 ; )
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
But how can AIO separate CSV data and put it into two different feeds? The app has only one "UART RX: username/feeds/feedname"
Oh sorry I was misleading, it would need to be able to
I was having a conversation with myself, sorry.
bad habit
No problem, it's midnight soon (here).
I have no such excuse sadly. I wish I was of more assistance
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.
I think it's basically creating a serial terminal on your phone and then sending the output to a single feed
https://learn.adafruit.com/bluefruit-le-connect I was reading this
oh heyy
multiple uart mode
Are all your sensors connected to the same bluetooth enabled mcu?
Yep, a Adafruit Feather 32u4 Bluefruit LE right now.
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
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.
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
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?
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
Yeah, thanks, GitHub issues section of the app is another idea.
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.
@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.
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
Right now I've not actually tested MQTT on my magtag, just started writing code for it. I have used HTTP but it's supposed to be slower than MQTT. can you link the 6.2beta MQTT example you mean?
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
oh interesting
yeah I'm pretty new to networking stuff, I wish this channel were more active with folks
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.
hmm
My problem is I'm not too good at finding the code, or docs
hey we have the same problem!
ouch my brain!
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
hm, that seems to match what I've seen on examples
My problem is I don't know where "socketpool" is
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
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.
that's a good practice I think, take it back to basics and then add stuff slowly
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...
well I'm wondering the the magtag.network stuff is separate enough that you can just run it on any ol' ESP32S2 board
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.
For future reference, if you enclose your code in a block with three back-ticks (grave accents), it will be displayed as monospaced. It can even do syntax highlighting if you specify the file type/languages.
```py
import os
print(os.uname())
...
```
renders as
import os
print(os.uname())
...
WOW. Thanks!!! ANYTIME you just blurt it out! I love it.
I just found out cntl Enter was \n
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
Hey do you know why socketpool or pool isn't kept globally with the wifi_module in adafruit_magtag/ ?
socketpool is a module built into CircuitPython for boards which include an ESP32-S2
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?
Right now I'm just typing in the example minimqtt
Do you know if I can do magtag=Magtag()
For an metroesp32
I do not think so, the magtag library includes and initializes hardware which the Metro ESP32 doesnt have
You're using this example?
yes.
What error are you getting? What broker are you trying to connect to?
gddeen/feeds/magtag1displayio
Looks right
It works on my Magtag. But not my MetroESP32-S2 Express
magtag.get_local_time() works fine
Could you paste your code here: https://gist.github.com/, make sure to take out any identifiable/sensitive information
I'll take a look
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()
ok, on the ESP32S2 Metro, where does it fail?
What error do you see? Could you paste that here too?
Ok, do you get an error in the REPL/serial terminal when it fails?
I heard you said Magtag() wont work. Is there a similar class which will?
The code you posted doesn't use the magtag class
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'
Ah I saw that on github earlier... it's this error, right
wow. yes
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(),
)
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'
But this works on MagTag for you?
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?
What port are you using?
8883
This error seems to be cropping up on people connecting without SSL, 8883 is secure ...
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(),
)
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 ?
That isn't a feed for me
Could you add one on the io website?
yup
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
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
No, you dont need to update the version of CircuitPython
Does the new minimqtt fix the issue?
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
I'm not able to replicate this given the amount of time I have left for support today
Could you file an issue on https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/issues
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
The issue is useful to file because it lets the community know there's a possible problem that needs fixing
@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 π
@royal rapidsu 5.0.5 Looks like the problem I saw, a logging object wasn't initialized.
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
@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.
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.
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
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);
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?
well, the good old fashioned reboot seems to have fixed it
anyway, yay my first sensor feed! π₯³
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.
i bought this item: https://learn.adafruit.com/adafruit-pioled-128x32-mini-oled-for-raspberry-pi/ but it appears to be DoA... I have tried and tried to get it to show any text or light up at all, sudo i2cdetect -y 1 does not detect it
Heya, this channel is more for the adafruit IO IoT service. But I'd check with #help-with-linux-sbcs to be sure it's DoA and then email the support folks at adafruit, they can help with returns/refunds if that's warranted.
Sorry to hear about the troubles you've been having
ty
sure thing
Any tutorials on getting alexa to read data from adafruit io?
@Holg Search for any guide with Brent Rubell in it.
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?
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?)
The resubscribe is on the client side, not the server side. It's supposed to be used if your client unexpectedly disconnects with the broker.
You'd want to use IFTTT. Adafruit IO triggers can be used to send notifications via email, you MIGHT be able to pipe that to SMS.
Thanks! I got IFTTT working fine for "Grubhub delivery" displayed on a 4.2" e-ink refrigerator display.
Adafruit CyP is great. So easy.
@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".
@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.
@placid belfry I'm not sure if that's possible, the guide which uses Alexa/IO sends data to IO using IFTTT as a bridge
not sure if it's possible because I don't know much about the Alexa SDK and don't have one.
Ha... that's easily fixable!
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.
Hi
clue_bridge update: https://github.com/LarryPriest/clue_bridge if i could get some feedback on my coding I would be great full. I know the documentation needs some work. but the project is a work in progress.
repository for clue -> PI -> adafruit.io project. Contribute to LarryPriest/clue_bridge development by creating an account on GitHub.
Is it possible to share a dashboard? According to https://learn.adafruit.com/adafruit-io-basics-dashboards/sharing-a-dashboard I should be able to, however, the user interface on the web page isn't there on my dashboard screen
@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.
Hmm. All feeds are public. When I click the cog:
So I don't seem to have the option to share links
@strange lodge dashboard is still set to private there
Hi everyone, i have a question about connecting Adafruit Pybadge ATSAMD51 to a 4G shield. Is it possible?
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
@mighty ridge Thanks. I finally made the connection that "Dashboard Privacy" was about being able to view the dashboard, not just edit the dashboard.
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?
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.
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
Unless you specify which components and what they shall accomplish once wired, nobody can say something useful.
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
Learn about and how to find Xfinity WiFi Hotspots.
Thanks. I was wondering if there might be something about Comcast/Xfinity that might be holding things up. I will try my cell phone as well as an old router to see if they can help.
Edit: Whaddya know? I tried connecting to my phone as a wifi hotspot and it worked like a charm! Thanks Systembolaget!
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!
Glad it worked! There are also non-captive-portal "nasty" routers out there where you do get a connection, but no reconnection once it has been dropped for whatever reason.
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.
Depends in part on what mc you're connecting it to. Here's a learn guide on output to AIO from a slightly different sensor using python: https://learn.adafruit.com/adafruit-io-basics-temperature-and-humidity
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.
@oak bison is is possible from an existing app?
It is possible from the Adafruit app, but I haven't heard of any third-party apps that do it
source for things are here: https://github.com/adafruit/?q=bluefruit&type=&language=&sort=
It looks like this is the current iOS app: https://github.com/adafruit/Bluefruit_LE_Connect_v2
does anyone have any insight on the motor shield v2.0?
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.
are all the libraries and CircuitPython completely up to date? I have not used this at all so I'm not sure I can be of more help.
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.
are you trying something like https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/blob/master/examples/adafruit_io_simpletest.py or your own code? Try the example first, since it should work.
Correct, it doesn't work. Chokes on board.ESP_CS.
It connects to the wifi fine with the wfi module though.
what board are you using?
FeatherS2
Same error,
AdafruitIO_MQTTError: MQTT Error: Unable to connect to Adafruit IO.
Good golly this is annoying.
did this board ever work? One more thing to try: use esptool.py to do a flash_erase, and then load the .bin version of CircuitPython 6.2.0.
Hi, Im a new member in this discord. Would this be the right place to ask about interfacing with accelerometers?
Probably not. "Adafruit IO" is a specific cloud-data thing, not a reference to general input-output. Probably #help-with-arduino or #help-with-linux-sbcs if you're using one of those platforms, or #help-with-projects for more general questions.
Thanks!
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.
excellent!
@royal rapidssee this troubleshooting suggestion, which might be good to put in a guide, if you haven't already ^^
@robust panther we could add a logging example
and then a pg. about this on the "MQTT with CircuitPython" guide too
that sounds appealing, it helped them debug their issue; could include somehow on troubleshooting page (if there is one)
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.
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
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.
The RX/TX pins are Serial1. The USB connection is Serial.
Thank you that worked
Please post this on the adafruit io technical support forums https://forums.adafruit.com/viewforum.php?f=56
got it thank you
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
nope
there's no repo for this service
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
I'm having a similar issue with my PyPortal Pynt. Can you supply the logging example code? Thanks!!!
or a link?
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!
Thanks!!
@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!
@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])
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 π
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."
Sorry for the late response. Iβve got my FeatherS2 connecting and successfully posting to adafruitio via MQTT now, so I think what you posted is a different problem. Have you tried initβing a logger and setting the MQTT instantiation logger to it to see whatβs going on in that object?
@modern widget my issue is with a PyPortal trying to receive data from AIO. "Strange things are afoot at the Circle K."
@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
Agreed... I have a support ticket opened on their website.
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.
@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?
@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.
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
It looks like the pogo pin assignments match the RasPi Zero pads, so PP1 = +5V, PP6 = GND, PP22 = USB D+, and PP23 = USB D-.
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
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?
@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 ?
For those with a PyPortal, I just submitted a firmware update issue on Github - PyPortal Pynt ESP firmware update issue #27 (https://github.com/adafruit/Adafruit_CircuitPython_miniesptool/issues/27). If anyone has a similar issue, please post any information that can help the good folks at Adafruit to resolve this. Thanks so much!
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!
Never mind... Got it working! π
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. π©
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?
I don't think so. We just have the free and pro tiers
Thank you for your reply!
Check out the GitHub student program. Adafruit is part of it and has some discounts on hardware and a free year of Adafruit io+.
I'm trying to find an adafruit-io + MagTag example. Anybody know of one ?
There's these from the learn guide:
https://learn.adafruit.com/adafruit-magtag/internet-connect
https://learn.adafruit.com/adafruit-magtag/getting-the-date-time
thanks but neither of those use the adafruit_io circuitpython library
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 π€¦
well apparently when I tried the MQTT style it wouldn't work, but the HTTP one does. this one : https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/blob/master/examples/adafruit_io_http/adafruit_io_simpletest.py
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.
You're right, it does offer a wrapper
And it's a bit of a dig to find it. But for now, these are the ones you should need:
https://circuitpython.readthedocs.io/projects/magtag/en/latest/api.html
https://circuitpython.readthedocs.io/projects/portalbase/en/latest/api.html?adafruit_portalbase.PortalBase#adafruit-portalbase-network
Since Magtag inherits from PortalBase, which, through the network property, has AdafruitIO wrappers, such as get_io_* and push_to_io
nice. that's exatly what I needed.
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
@peak pebble no
Nope!
anyone with good knowledge of visuino ?
I don't, but sometimes it helps to simply ask the question that's troubling you rather than ask for a skill.
;)
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
It can be one of these issues, or a combination of them:
- Your SSL-certificate on the device is not up to date
- Your Adafruit IO key in your code is wrong
- Your ESP32 has not established a connection with your router or smartphone hotspot
- Your router has no Internet connection
Adafruit has a MagTag tutorial page https://learn.adafruit.com/adafruit-magtag/usage-with-adafruit-io
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
@eager kitethanks but this is not circuitpython
maybe there is a better product than the PCA9685?
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.
Is it possible to boot the adafruit feather m0 from an sd card?
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.
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!
I'm not sure what issue you're seeing but for Adafruit IO, if the discord doesn't work, the Forums are a great place to ask. They're more of an official support vibe there whereas here there's more a community help vibe (but lots of Adafruit folks helping too).
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 ?
Is it possible for a dashboard to show bmp images?
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!
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
@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 ?
USB is just power.