#help-with-wippersnapper-and-adafruitio
100 messages · Page 3 of 1
@candid rapids yw! i went to digikey to look, but the only supplier was adafruit. lucked out that digikey had a drawing, which is how i found the manufacturer.
Yeah that’s what led me down the road thinking it was a proprietary item
We’re trying to use the Adafruit audio fx board (w amp) with a feather huzzah esp8266 over Adafruit IO. The code interfacing between the two of them over serial presented some problems getting it to work with IO so we hooked up a workaround solution this morning. Basically we have it wired so that the huzzah is just acting as a really fancy on/off using an IO toggle with the digital output code, sent to a relay which triggers the circuit to close (audio fx board using input pullup). Should in theory work fine, we’re literally using the digital example code. I even tried commenting out all the serial commands in case that was messing with it but no dice. The relays aren’t even triggering. Any help?
We had another project just the other day triggering a relay from the same type of board, with the same digital example code set to a different feed and a different toggle... and that worked just fine, what is this audio board doing that could be messing with stuff? We’re even using the same digital out pins...
@tawdry ingot Please post questions in only one channel. Someone will see your question regardless of what channel you post it in. Everyone has the ability to see all the channels. Thanks!
Got it, just wasn’t sure which one I should post it in
Hey folks, is there a way to subscribe to the time/seconds feed via the AdafruitIO_WiFi library? Or do I need to use a separate MQTT library?
Never mind, I found the answer I needed here: https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/examples/adafruitio_17_time_subscribe/adafruitio_17_time_subscribe.ino
Having played with the example (and being very new to Arduino programming) it seems to be sending the data as a char, rather than as a long - is this right? Would we just convert that to a long on the device, or is there a way to get it as a long directly out of the feed?
(I'm after a long because I want to do some calculations on the time, to find out how long as expired since an event, which is what I'm using the time feed for)
@near gorge "it seems to be sending the data as a char" -> it may be more precise to say all data is sent as bytes, and it's up to the client libraries to interpret the data as a particular type. Going to char* first is kind of a deferment of that decision (from the library author to the library consumer) since byte-to-char is pretty much one-to-one.
but to get a long value from the seconds feed, you could use the atol(const char *) function that's built into the C++/Arduino standard library
riffing on the example sketch you linked to:
// message handler for the seconds feed
void handleSecs(char *data, uint16_t len) {
Serial.print("Seconds Feed: ");
Serial.println(data);
long seconds = atol(data);
Serial.print(" as long: ");
Serial.println(seconds);
}
as long: 1541432819
Seconds Feed: 1541432820
as long: 1541432820
Seconds Feed: 1541432821
as long: 1541432821
Thank you so much for your help, @novel ember https://github.com/LimeBlast/wildcat/blob/master/src/main.ino#L128 😃
👍
atol is one of those deep c++ functions that exist in Arduino, but none of the documentation talks about it :P
Every time I do something with Arduino, I'm reminded of just how lazy I'm able to be in Ruby 😉
Hi
Hello, I am a terrible maker, I want to design and engineer projects together, that are practical, and usable, I always love the fun aspects of doing this type of stuff, I would like to work with arduino, but I don't know what to create, if you have some fun ideas please pm me! 😄
I think the first step is to find a problem that you'd like to solve. For example, maybe you don't want to go all the way downstairs to see if any post has been delivered, so you want to add something which tells you when the letterbox is opened. That's great, but you have some questions to ask, how is it going to alert you? Maybe by making a noise, or by sending a signal to your phone? If you're going for the phone option, is the device going to be within range of wifi, or will you need to connect it to a cellular network?
I think the key is having your own problem to solve, because that's going to generate it's own unique challenges, and thus your own motivations for solving them.
I have no idea what my problems are though
Quick question: I am looking to embed adafruit io data to a squarespace page. Would it be possible? 😃 Ty!
@faint hare You can make a public dashboard or feed, and then use an iFrame to embed it
alright thanks 😃
If you need any help with it, feel free to post up here
I have very little experience with web programming so I will probably ask some follow up questions 😃 Thanks
Okey I am already stuck at how I get the code from my adafruit io dashboard to copy in to a squarespace embed block. Any suggestions? 😄
I was playing around with a sim800l module, when magic smoke started to appear
it was a batterie sortage, which melted my jumper
🙃
Anyone here? I am trying to figure out how to re-order my data feeds so that my line colors in my graph match my feed's colors. I am pulling RGB values from a Pimoroni Sense HAT, and when I upload to Adafruit IO, they don't match. I've tried removing and re-adding in different orders, but can't seem to get them to change.
@sacred depot were you able to get it sorted? How is the data from that sense hat formatted?
Hi, is it possible to use an arduino uno connected to my laptop (through usb serial) to send data to adafruit io? I have been searching and found the mqtt desktop client, but it is not clear if or how to use this to connect to adafruit io. I realize the platform is meant for cloud and wireless applications mostly, but can my laptop serve as a cloud connection instead of using an ethernet shield for the arduino uno?
@full ore maybe something like this? https://github.com/mycontroller-org/serial2mqtt
Google "Serial to MQTT" , I've not tried any of the solutions though
@full ore What's the project that you're using it for?
@storm kernel thanks I'll look into that more... @spring bolt it's a pretty simple plant monitoring setup with DHT22 temp/humidity sensor + moisture sensor. I'm just trying to use parts I have , so arduino uno connected to an old laptop. I originally was seeking to log the data that is being printed to serial somewhere online so I can have a timestamp and track over time, which is when I came across adafruit io. So I thought it would be trivial, but I can't find any info about someone having done this.
@full ore Ah, ok. If you're not looking to buy new things, I would recommend python. I know you can talk to an Arduino via python, and you can then grab timestamps and put it to a file.
I also know you can interface with Adafruit IO via python on the pi. Not sure if that would work for a normal pc
If you can spend a few dollars, an esp8256 is fairly inexpensive and would be self-contained except for power source and the sensor
I've used Firmata for talking to Arduino code from Python running on a host.
I can't install adafruit-io library for windows python
can anyone please help me out?
😦
@white ivy Sure! What's the error you're having?
Anyone aware of an issue using IFTTT to publish to an adafruit io feed that is in a group? I can publish to one in the "default" group but when I put it in another group it shows up in IFTTT in that group, but when executing I get "Adafruit error: Unable to locate feed, operator, or value"
@visual herald IFTTT should publish to feeds inside groups fine, but if you moved the feed after you set up the IFTTT applet, then the key will have changed and IFTTT will still be holding the old one.
Does anybody know the answer to my follow-up question in this post on the forum? https://forums.adafruit.com/viewtopic.php?f=56&t=144126
"brubell" said the get() method is deprecated, but I can't find that stated anywhere else. Instead, all references, including the examples in the latest version of the AdafruitIO_Feed library show get() being used to initialize a value to the last published value in a feed.
@storm kernel I have three values uploaded to IO, each is a channel reading from a Pimoroni EnviroPhat. I have them named rgb-r, rgb-g, and rgb-b. It looks like IO assigns a color "automatically" but I am unable to change the colors. I've removed the feeds and added them in a different order, and they still stay the "wrong" colors in the IO line chart
I have opened the dashboard here to public so you can see, it's at the bottom: https://io.adafruit.com/jdoscher/dashboards/fabrication-lab
Hi, getting "Disconnected from Adafruit IO." in the serial monitor when trying to connect my MKR 1000. Any advice on what might be the issue?
no first time trying to get it working. ill send my code over so you can have a look
@royal rapids
You'll need to add the SSL certificate with that tool
Check out the WINC1500 Feather Learn Guide for reference: https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/updating-ssl-certificates
@royal rapids Thanks, all sorted
great!
Im publishing a JSON message to a couple of my feeds. Is it possible to chart (on the dashboard) some values from within the JSON messages?
never mind, I just changed my feed. However, now Im being throttled for deleting old data from within the io.adafruit.com website
I think I found a bug in the python client for Adafruit IO, what's the best way to submit or check if it's already a known issue?
yep! Just replied to a topic there, it seems to be a somewhat recent and known issue
thanks for reminding me to use the forums for that stuff 😃
reef-pi dashboard powered by adafruit.io 😃
did anyone get trigger working with adafruit.io ?
Can one ask a question here?
@tranquil depot of course, ask. whether you get an answer may depend on who is online at the time.
@clear plinth did you create those charts or is that a plugin?
@viscid aurora those are the line graphs on adafruit io
thanks, new to adafruit
welcome!
Yeah.. no plugin,,. my code just sends data to adafruit io and you can compose graphs there.. #win
Hello I am new to adafruit i/o. thanks for making it easy to get us and running
is there a way to have an IFTT where if does edge detection?
something like :
if (previous_value - recent_value) > tolerance then send_email
@fiery elk sure, you can compare the previous_value in any IFTTT applet using Adafruit IO
Is there a known issue with IFTTT access to adafruit.io? my applets turned off last night and now it gives an error when I try to reconnect the service. According to IFTTT Adafruit seems to be down right now.
hmm -- it is working now -- after I went to IFTTT and "re-authorized" my connection.....
Sorry if this is the wrong place to ask this, but is there a way to include shared feed data (from someone else) in a dashboard?
@novel ember several times in the past few days, my IFTTT applets have "turned off" due to connection issues with adafruitIO. To restart them I have to got to my account and "re-authorize" IFTTT access to adafruitIO -- once I do that , I can turn the applets back on. Note: I have to re-authorize it even though it says it is active. Is there a know issue between IFTTT and adafruit? Has anyone else seen this?
IFTTT error
Hi does anyone know of a learn guide or published example of how to interface between the Lorawan TTN network server and adafruit IO, it would appear that both are MQTT brokers ... i have a number of Lorawan devices communicating thru the TTN network and i would like to add a dashboard on adafruit io to display the sensor data.
@thick lotus Not sure if you have seen this. https://learn.adafruit.com/the-things-network-for-feather
Hello. Can I ask something about Arduino not Adafruit? I have problem with IDE and I not going to be banned or something 😄
@pale orbit you can ask your question on the #help-with-projects or the #general-tech channel.
@DaveyR thanks for the link. I have seen that, but from what i can tell that only gets data to the TTN network. I need to understand how to get from TTN to adafruit io. I did see a method using IFTTT as a go between but i was hoping for some type of direct interface without having to add yet another cloud service in the mix.
Ok not sure if this is going to be the correct channel but has anyone had any success getting the following to connect in to Adafruit-io?
Feather M0 WiFi with a RFM96 module. it seems that when i enable the wifi connection then the RFM69 will only transmit and not recieve any data. Comment out the adafruit IO connect and it is able to receive and transmit just fine.
@royal rapids have you been using IFTTT to send messages from TTN to Adafruit IO? It is working normally for you? It was working for me for a long time but latelty I am seeing very odd behavior on my AdafruitIO feeds. Everything looks ok at TTN but the IFTTT webhook apps don't seem to be getting triggered properly. I get several messages in AdafrutIO with the same time tag then it won't receive any for 30 minutes or hours. The TTN app sends a message every 5 minutes. I don't see any issue with my TTN gateway or LoraWan data flow.
@keen dirge Hi! I don't have anything set up monitoring IFTTT right now, is this recent?
It started several days ago -- not sure when . I also had to keep reauthorizing my adafruitio <-> IFTTT connection almost daily -- but that seems to have settled down
Can you email adafruitio@adafruit.com to get the IO team to look at the webhooks problem?
scroll back a few posts to see that issue
scrolling...
OK --- I'll do that tonight when I can gather some examples. I'm assuming it is a webhooks issue, but not sure where the problem is.
the web development team on that email will be able to pinpoint it better than I can (I dont sit on that level of IO)
It is an issue, though. Tons of IO feeds use active IFTTT applets. I wonder if it broke during the webhook feature.
I'm wondering if we can bypass IFTTT and just have TTN use webhooks to send to AdafruitIO
Maybe Zapier for webhooks?
Thanks -- I'll send note to adafrutio tonight and keep looking into it. Just wondered if anyone else was having issues -- or is is something I've done --- likely 😉
I need to set up some kind of IFTTT testbed on my desk, and a TTN one,
It has been running well for a few months.. so I think something changed somewhere in the stream.
looks like it broke on Dec 14 or so
hrm weird, I'll follow the issue down the line after IO support responds
thanks here is a screen shot of live data showing a burst of data at 10:50:32 but they really are a series of data every 5 minutes
looks like it is buffering an hours worth of data or something....
back to "day job" 😦
@royal rapids interesting -- I did a little poink about on IFTTT and somehow my Webhooks applets disappeared -- I reset my webhooks service -- got a new key - recreated the applets and now it seems to be working normally.. I'll keep an eye on it .. Guess I just needed a rubber duck 😉
huh, strange. I've confirmed it's not on IO's end.
no --looks like an IFTTT thing -- my entire webhooks service was gone. But it was easy to restore and looks good for now.
so AdafruitIO and TTN are absolved of all responsibility -- IT was between me and IFTTT!
Does anyone know if the Adafruit IO Basics examples are still functional? I was trying to do the Digital Output test to make sure I had my new Feather configured correctly, but I ran into a series of build issues. First I needed the MQTT library, so I installed that. Now I'm getting fatal error: ArduinoHttpClient.h: No such file or directory. When I install the ArudinoHTTPClient library, it produces entirely new errors.
I think I may have resolved it. I uninstalled the ESP8266 board that defaulted to a beta version and reinstalled 2.4.2. It's compiling now.
Hello All
I am building a circuit to turn on a wax heater and a exhaust fan via a Controllable Four Outlet Power Relay Module version 2 PRODUCT ID: 2935
and a Feather Huzzah ESP8266 and my Adafruit.io account and the example code
Everything is working except for occasional burps where the dashboard indicates that it has switched , but in fact the relay doesn't fire (or release)
Any tips or pointers to improve the performance? approaching 100% would be ideal
Hello folks,
I am trying to use MQTT library with IFTTT using Adafruit.io but seems like it doesn't work. It says mqttStatus(-) : can't connect to statusunknown error
Any tip what I should do next?
@heavy aspen It should be 100%, IO hasn't gone down recently
@finite shadow The IO Basics tutorials for Adafruit IO Arduino (incl'd with the lbirary) are still functional.
@royal rapids I hoped it "should be " but it isn't, but ~ 30% of the time the on screen indication is that it has switched but in the real world the esp8266 - power strip does NOT switch
@heavy aspen What are you running IO on? Arduino/CircuitPython?
Is the serial monitor registering a "switch"? Is the web client?
@royal rapids Arduino . I'm not at home, so I can't 100% say, but as I remember serial monitor doesn't and the web "dashboard " does. I will confirm when I get home ~ an hour
Sure, I'm around today so I'll be able to help
If the dashboard is getting it and the sermon isnt, something's up with the code
@heavy aspen something you can add to your hardware side sketch is a message that publishes whenever your relay or device switches states.
there's no easy way to tell which piece of the system is failing, since it could be just about anything: wiring on the device, your local network, the internet between your location and adafruit io, etc.
@royal rapids I very much appreciate the help! So I bring up a Dashboard on my computer, it has a single On/Off switch, ~30% of the time if I swtich the switch it will turn from green to red (or visaversa ) but on the huzzah side it may not switch. looking at the serial monitor, when it doesn't switch it resondes "Recieved:OFFac72708297edd9Z4068Dec ZZ 201814:25:4Z"
@novel ember I was hoping to impliment some sort of response back to the dashboard from the Huzzah, looking for some pointers or a link to ways of doing that.... "I ain't never done that before" 😉
the way I always start is with the adafruitio_00_publish example sketch
@novel ember while responding the serial Monitor also responded "Dropped a packet cr Dropped a packet"
the two bits that matter for publishing are
// near the top of the sketch
AdafruitIO_Feed *messages = io.feed("messages");
// ... later on when something interesting happens
messages->save("something happened!");
@novel ember I'll look at that schetch
yeah, the "Dropped a packet" message comes from the Adafruit MQTT library that the Adafruit IO library uses for communication
@novel ember oh cool thank you
there isn't a lot to be done about it, and it usually isn't a problem
publish_example
@novel ember Thank you for your helpful "pointing in the right direction" After experimenting I decided to start from the "adafruitIOdigital Digital out" example, which I was able to get working and haven't had a fail yet. I began comparing the "working -30% code and the "adafruitIOdigital Digital out" example I found I had started with an example using Adafruit MQTT Client code. So I suspect somewhere within the MQTT I or it was screwing up! I very much appreciate your help
Hi, im having trouble compiling the AdafruitIO Library example code for my esp8266 board. So far ive tried both the publish and subscribe examples, but i keep getting this error, anyone know what im doing wrong?
`Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: "LOLIN(WEMOS) D1 R2 & mini, 80 MHz, Flash, Enabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"
In file included from C:\Users\blaab\Documents\Arduino\libraries\ArduinoHttpClient\src/ArduinoHttpClient.h:8:0,
from C:\Users\blaab\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO.h:23,
from C:\Users\blaab\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/wifi/AdafruitIO_ESP8266.h:18,
from C:\Users\blaab\Documents\Arduino\libraries\Adafruit_IO_Arduino\src/AdafruitIO_WiFi.h:32,
from sketch\config.h:21,
from C:\Users\blaab\Documents\Arduino\libraries\Adafruit_IO_Arduino\examples\adafruitio_06_digital_in\adafruitio_06_digital_in.ino:19:
C:\Users\blaab\Documents\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h: In member function 'virtual void HttpClient::flush()':
C:\Users\blaab\Documents\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:310:50: error: return-statement with a value, in function returning 'void' [-fpermissive]
virtual void flush() { return iClient->flush(); };
^
exit status 1
Error compiling for board LOLIN(WEMOS) D1 R2 & mini.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
`
@sacred depot you have to revert the ESP8266 BSP to verion 2.4.2 -- no idea why .... see https://forums.adafruit.com/viewtopic.php?f=57&t=145374
Thanks very much, ill try that
Good luck -- it worked for me.
Thats the "esp8266 by Esp8266 Community" package, right?
yes
it was at some 2.5 beta -- not sure if it broke or adafruitio broke, but one of them did.
Cheers, works now 😀
@keen dirge Yes, the ESP8266 2.5 beta breaks HTTPClient, required by AdafruitIOArduino along witha few other comms libs.
@royal rapids thanks. hopefully a fix is "in progress" -- had me a bit concened when it broke after upgrading to Arduino 1.8.8.
I've written up the process of downgrading the board to BSP 2.4.9 stable on the top of this page. We're monitoring the changes (hopefully they'll rollback - HTTPClient hasnt been updated in a while)
BTW -- just got my particle argon running CircuitPython outfitted with an sht31d and am now sending data to AIO via webhooks using the ESP32 with AT Firmware
There are more details on this issue, on the github issue linked above. The problem is they pushed the beta version onto the regular release channel (shows as an update) and that's why this is happening to people in forums/support.
Glad to see Adam pushing back
there's a specific issue here, for the ESP8266 on the HTTPClient repo
Thanks for the links.
@keen dirge would you be able to look at the pending PR on AIO_Python if I add ya as a reviewer?
@royal rapids I can look at it later this evening if that will help.
Cleanup of client.py, the API Client for IO:
Methods now have RTD-style comments
Updated method docstrings.
Slowed down travis to prevent throttling on builds causing errors
@keen dirge
Hi there,
I am building an application which uses the ESP8266 and MQTT library. I have everything setup using adafruit.io. For simplicity, I am toggling a switch on the adafruit.io dashboard and turning a LED on/off. This works great.
However, I was wondering if there was a way to check the status of the switch at startup so that the board automatically toggles the LED correctly.
For example, lets say that the dashboard switch was enabled but the board was off when this event occurred. When the board starts up, it does not receive a message and does not turn on the LED. I want it to poll the dashboard status and find out that the LED is indeed turned on.
Hi, my code compiles now, but when I upload and run the example to the board I get the following error in the serial monitor which endlessly repeats itself over and over. I did a couple of searches and most cases of this seems to be caused by dropping support for PROGMEM, but im running the latest example that as far as I can see, doesnt include this, so im not really sure what to do from here.
`Connecting to Adafruit IOAdafruitIO::connect()
Exception (3):
epc1=0x401003e9 epc2=0x00000000 epc3=0x00000000 excvaddr=0x40067be1 depc=0x00000000
ctx: cont
sp: 3ffffb60 end: 3fffffd0 offset: 01a0
stack>>>`
Followed by a bunch of random text that discord wont let me send because its over 2000 lines.
@sacred depot You're using an ESP8266?
I can help with the issue if you provide me with the full stack trace
Yeah, esp8266. I posted the full thing here https://forums.adafruit.com/viewtopic.php?f=56&t=145568
@sacred depot I've been unable to reproduce, and it's impossible for me to see where it fails via the stack trace since I can't reproduce it
If you can, could you install and run this when you get an error: https://github.com/me-no-dev/EspExceptionDecoder
It'd help me locate the issue within the library/libraries
@sacred depot Did you install it to the path <home_dir>/Arduino/tools/EspExceptionDecoder/tool/EspExceptionDecoder.jar
Yeah, just double checked
@sacred depot sighs looks like an issue with the toolchain for the ESP not being in the correct path, there is a solution here: https://github.com/me-no-dev/EspExceptionDecoder/issues/36#issuecomment-406144393
I just installed the stack trace tool, and I am getting this error message. I have also searched for the tool chain...and found it can be installed from here: gnutoolchains.com/esp8266/ but after t...
Tried that, but got the same error. I tried running some other example code, a http get request, and an example for setting up a web server, and I got the same exception error and endlessly repeating stack dump thing both times. Is it possible theres something wrong with my board?
@sacred depot If the issue is persistent it could be a board issue, email support@adafruit.com
I don't think it got bricked during the firmware upgrade/downgrade process, mine hasn't.
I know that this would be a very basic question but watching the New Products from 1/2/19, the Adafruit IO+ Subscription Pass – One Year was presented. I got interested in starting using adafruit.io and started reading this announcement but I really need more information about the service. Would you please send me the correct link where I can find more detailed information about adafruit.io and it's available services and APIs? Thanks and very best regards!
@rustic drum heya
The available APIs( and we're actively adding to them) are IFTTT, Zapier, a Randomizer, Time (from the IO Server) and Weather.
Weather is the only IO+ specific service
IO+ increases your message rate to 60/min, usage limit, storage increases to two months of storage, unlimited feeds, unlimited dashboards
http://io.adafruit.com/welcome might be a good place to visit for more concrete data
Thank you @royal rapids I'll read the documentation you suggested. Best regards and Happy New Year!
@rustic drum You too! If youy have any questions, just ping me in here 😃
Ah that's what I was hopping you would offer 😃 Sure!, thanks! 😃
@ivory wraith did you mean to put this in #circuitpython-dev?
Oops! Sorry guys
no need to be sorry. just wanted to make sure you were reaching your target audience. 😄
hi all, got something strange i send 4 feeds with 15 second delay to the adafruit io after a minute some time minutes i the esp32 disoncets it self
the whole skect stops and the only thing to get it working is to rest the esp
i tried siem code like if disconect then reconect but that does not work
looking in the log it runs for a minute
aha
i enabled debug and saw this message just before disconnecting: [E][ssl_client.cpp:28] handle_error(): UNKNOWN ERROR CODE (004E)
[E][ssl_client.cpp:30] handle_error(): MbedTLS message code: -78
hmmz how to solve this ????
i used the io example
I'm not sure how to find out what message code: -78 means, but I found code -76 here: https://github.com/espressif/esp-idf/issues/1630
I am getting a -76 error code (undefined) from MbedTLS when accessing a Google API the symptom is exactly the same @nkolban described in https://github.com/curl/curl/issues/1327 I have not been abl...
The error could be with your wifi network dropping the connection? Or or could be a bug in the ssl_client.cpp ? Since I can't find the definition for -78, I'll leave it to someone smarter than me to find the answer. sorry I couldn't be of any help.
it looks like the ssl is wrong
i dont know how to solve this, where to put the certificate ?
debug shows me also this line: [ssl_client.cpp:119] start_ssl_client(): WARNING: Use certificates for a more secure communication!
how to do that ????
verbose log:
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 2 - STA_START
.......[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 7 - STA_GOT_IP
[V][ssl_client.cpp:48] start_ssl_client(): Free heap before TLS 147684
[V][ssl_client.cpp:50] start_ssl_client(): Starting socket
[V][ssl_client.cpp:86] start_ssl_client(): Seeding the random number generator
[V][ssl_client.cpp:95] start_ssl_client(): Setting up the SSL/TLS structure...
[I][ssl_client.cpp:119] start_ssl_client(): WARNING: Use certificates for a more secure communication!
[V][ssl_client.cpp:143] start_ssl_client(): Setting hostname for TLS session...
[V][ssl_client.cpp:158] start_ssl_client(): Performing the SSL/TLS handshake...
[V][ssl_client.cpp:177] start_ssl_client(): Verifying peer X.509 certificate...
[V][ssl_client.cpp:186] start_ssl_client(): Certificate verified.
[V][ssl_client.cpp:201] start_ssl_client(): Free heap after TLS 104036
[V][ssl_client.cpp:240] send_ssl_data(): Writing HTTP request...
after a minute:
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 2 - STA_START
.......[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 7 - STA_GOT_IP
[V][ssl_client.cpp:48] start_ssl_client(): Free heap before TLS 147684
[V][ssl_client.cpp:50] start_ssl_client(): Starting socket
[V][ssl_client.cpp:86] start_ssl_client(): Seeding the random number generator
[V][ssl_client.cpp:95] start_ssl_client(): Setting up the SSL/TLS structure...
[I][ssl_client.cpp:119] start_ssl_client(): WARNING: Use certificates for a more secure communication!
[V][ssl_client.cpp:143] start_ssl_client(): Setting hostname for TLS session...
[V][ssl_client.cpp:158] start_ssl_client(): Performing the SSL/TLS handshake...
[V][ssl_client.cpp:177] start_ssl_client(): Verifying peer X.509 certificate...
[V][ssl_client.cpp:186] start_ssl_client(): Certificate verified.
[V][ssl_client.cpp:201] start_ssl_client(): Free heap after TLS 104036
[V][ssl_client.cpp:240] send_ssl_data(): Writing HTTP request...
i wrote in the sketch to connect again after disconnect.
i am thinking is this the correct topic to ask this, it look smore like a project help topic
[V][ssl_client.cpp:240] send_ssl_data(): Writing HTTP request...
[V][ssl_client.cpp:240] send_ssl_data(): Writing HTTP request...
[V][ssl_client.cpp:240] send_ssl_data(): Writing HTTP request...
[V][ssl_client.cpp:240] send_ssl_data(): Writing HTTP request...
[E][ssl_client.cpp:28] handle_error(): UNKNOWN ERROR CODE (004E)
[E][ssl_client.cpp:30] handle_error(): MbedTLS message code: -78
[V][ssl_client.cpp:209] stop_ssl_socket(): Cleaning SSL connection.
Adafruit IO connected.
[V][ssl_client.cpp:48] start_ssl_client(): Free heap before TLS 118708
[V][ssl_client.cpp:50] start_ssl_client(): Starting socket
[E][ssl_client.cpp:80] start_ssl_client(): Connect to Server failed!
[E][WiFiClientSecure.cpp:107] connect(): lwip_connect_r: 113
[V][ssl_client.cpp:209] stop_ssl_socket(): Cleaning SSL connection.
AdafruitIO::connect()
[V][ssl_client.cpp:48] start_ssl_client(): Free heap before TLS 144392
[V][ssl_client.cpp:50] start_ssl_client(): Starting socket
[D][WiFiGeneric.cpp:265] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:270] _eventCallback(): Reason: 7 - NOT_ASSOCED
[E][ssl_client.cpp:80] start_ssl_client(): Connect to Server failed!
[E][WiFiClientSecure.cpp:107] connect(): lwip_connect_r: 113
[V][ssl_client.cpp:209] stop_ssl_socket(): Cleaning SSL connection.
@sacred depot can you post this in the forums so I can take a better look at it?
put it in the forum as wel
thanks!
[Release] Adafruit IO Python 2.0.19 - MQTT and API methods for the new Dark Sky weather integration https://github.com/adafruit/io-client-python/releases/tag/2.0.19
I did a little write up on using AIO to add voice control to my Omega2+: https://www.hackster.io/xenophod/adding-voice-control-to-omega2-752695
@hushed sigil neat! I'll try to blog this later today/tomorrow 😃
@royal rapids cool! It's kind of a mess. I'm sure there is a more pythonic way to make it do it's thing. Right now it's a hodgepodge of python I took from the examples and some bash scripts.
Hello
Is it possible to connect a board running circuitpython to adafruit.io?
To be specific an esp8266.
@subtle turtle a few people have got it working but we're stopping esp8266 support for circuitpython in 4.0 because it doesn't have native usb
I just saw that posed in #circuitpython-dev
What about the other boards? I've only come across info for raspi.
samd and nrf52840 boards are supported
the only wifi support in 4.0 will be via a co-processor (ESP8266 or ESP32) https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32
you can use CP 3.x to talk to adafruit.io on an ESP8266 or use micropython.. in either case it uses the micropython mqtt library
Thanks, I've done this in the past using the arduino client library. Wasn't sure if there was something similar for circuit/micropython. I'll start looking at the native mqtt library for micropython.
I can give you an example that I have used if you want it
That's be great.
@keen dirge So even if the board has native WiFi and support CP4.0, you won't be able to use it directly? Or am I mis-understanding the question.
The arduino code I have uses Adafruit_MQTT_Library. I was hoping for something similar but think I can figure it out.
@subtle turtle this prompts for a feed and value then posts it -- also post the valailble memory -- just an example...
@timber robin there are no wifi boards that are supported by 4.0 alpha5 and beyond. the only wifi was the esp8266 and it is being dropped -- it has not been working since alpha3 ...
I haven't been using CP much -- just played with it a little via Adaboxes
I have a project where I just replaced the Arduino Mega 2560 with a Huzzah, which makes for a much nicer wi-fi solution
and was wondering if CP would be a good tie-in to use when I'm ready to start tinkering with the code
you can put CP on a feather M0 - WINC1500 but it won't use the Wifi -- just be a "basic" M0
the original project design uses C/C++ which I am not strong in, would be much more comfortable learning my way around Python
@keen dirge I was more wondering about some of the new boards coming out/just announced. Do the new Particle boards support CP?
The partible boards all have nrf52840 chips and all can run CP on them -- the argon also has an ESP32 co-porcessor and as noted in the guide above, it can be used by the CP runing on the nrf52840. its still a "work in progress" but I have been using it to post to adafruit.io feeds for the past few weeks.
Hmm.
Clearly I have a lot more to learn about
I'm not even sure if using adafruit.io makes sense with this particular project
but it could make a lot of the dev simpler
thanks for the info
if you want wifi access now - the simplest thing is to use micropython on an esp8266 or esp32
can I not use the older version of CP before ESP8266 was dropped, or does that not support WiFi?
sure -- it works fine up to 4.0 alpha 2, I think.
and is there a good link for the differences between CP and micropython?
I really like using Adafruit-backed technologies, they finally dragged me into electronics and I like supporting them
as far as using the wifi on the esp8266, they are very similar - the esp8266 wifi was just there because it was supported in micripython. The differences are in all the other interfaces and libraries. Most things are supported but the configrations are a bit different. I have not done much with micropython recently but will be looking at it for use with an esp32 .
@keen dirge Thanks a lot. That's exactly what I needed.
Hey, I want to send a few digits, for example "3255" and have the first digit be an LED number, and the last three a hue value. Is there a way to split data from a feed/ read specific digits separately like that?
@sacred depot Sure, you can split it using python like this:
s = "3255"
list(s)
['3', '2', '5', '5']
All of the splitting will be happening inside the program receiving the digits, using whatever software is on the device.
Thanks, but I probably should have clarified, im using C++. Do I need to convert it into an array basically?
C++ strings basically are arrays, so you should be able to reference s[0], s[1], etc.
Thanks, so id convert the data from my feed to a string, and then read it as I would an array?
That's one way to do it. You had originally asked to "split" the data, but it arrives a byte at a time, so it's already split. You can either deal with it like that, or combine it into a string, then split it back out as an array. I suppose it's a matter of personal preference.
Just now getting back to using the io platform and am getting the following error when I try and run the MQTT subscribe sample python program. Any help is appreciated.
SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1045)
Any help is appreciated.
Seems like you're connecting to a site via SSL, and that site has a self-signed Certificate. You can fix that by 1) adding that Certificate to the trust store, 2) installing a Certificate that's chainable to a root your system knows, or 3) turning off Certificate verification (the easiest solution).
I tried adding the certificate to my keychain, but it's still coming up untrusted,.
A few systems (like Java) have their own Certificate stores and don't use the system keychain. Additionally, not only does the Certificate have to be present, but it has to have the right attributes set to allow it to be used for verification.
Thanks!
Hey all, has anyone noticed that when using the REST API and setting a created_at date, when stored it uses the current date/time instead of the one specified in created_at
FYI - Adafruit IO Python Client has been renamed to Adafruit IO Python
is there a limit to how often i can send data? it doesnt seem to work very well for me
i have a feather m4 with esp8266 co processor and im using this sample code to send some test data https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol/blob/master/examples/espatcontrol_aio_post.py
it only manages to connect and send the value every few minutes at best
@tiny mountain try enabling “debug” and watch the code run in the REPL. You will likely see lots of retries and you can see how often you are sending data. As to limits, if you go to your home page on AIO it will show your limits. Depends if you have a basic or plus account, but it is several per minute at least.
Hmm, but the counter should only increment for each successful transmit ...
Have you modified the code?
@keen dirge here is my code https://pastebin.com/Hnef7yAt
i either get "No OK response to AT+CIPSEND=23" or "No OK response to AT+CIPDOMAIN="io.adafruit.com"" errors
the esp.ping command doesnt work for me, it just says cant ping no matter what IP i try, and i have also tried the nslookup command which also does not work 100% of the time
im running circuitpython 4.0.0 beta 1
Just a few suggestions - It does not look like you are using the rts pin for your connection -- that may be resulting in errors - try conncting a a GPIO pin to the ESP8266 GPIO13 pin . At 9600 baud, I would not expec them, but it is a good idea to use it anyway. Also, do you have the lasted version of the lib https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol from the repository. I see that there were some updates since the last release to the bundle, but not sure if it will help. I was able to run the post example from the current "bundle" version but I using a different board (nrf52840) -- I'll try it wih a feather m4 in a few minutes
the ping is not working for me either -looking to that. the post example works OK
i did download those files yesterday
not sure what do you mean with the gpio
is gpio 13 the rts pin
I have D9 on my feather_M4 connected to GPIO13 on the ESP8266
yes is it connected to your feather m4 ?
your code does not use it
no
i used the guide from here
its connected exactly as the picture there
OK -- at 9600 baud it should not matter -- I see it is not in the guide, but for bettr communication it is good to use the rts pin as it is in the espatcontol_aio_post.py example. It may not help at thsi low baud rate. and some erros/retries are expected.
alright i connected it and i am getting the same issue, but when you first replied you mentioned to look at the number of retries and after checking that it was failing after 1 retry because that is the limit set in https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol/blob/master/adafruit_espatcontrol/adafruit_espatcontrol.py#L201
i bumped that number to 5, and also did the same for others like CIPSTATUS and it is working better since then
i can get data every minute at least, its not ideal though, you mentioned nrf52840, what board do you have exactly?
I have both the particle_xenon and the adafruit feather_nrf52840 -- I seem to get better results with them thatn the m4's but it is not a very thorough study 😉 BTW -- the ping work when I use the feather_nrf52840 and an ESP32 ... still can't get it to work with the esp8266 -- yet
alright good to know, i will probably upgrade my setup
the ESP32 works much better and it support TLS much better - the ESP8266 cannot access some https sites at all.
OK -- the ping also fails on my particle_xenon with an esp8266 -- so I htink the issue is with the esp8266, I'll do some more testing and file an issue with the repo on it -- or you are welcome to file one if you would like to.
you are more familiar with the whole process so its better if you do it lol, thanks for the help so far
no problem -- glad to help -- wish I had better answers
OK - I can manually execute AT+PING on an esp8266 -- so that's a good sign
<--- b'\r\nOK\r\n'
---> AT+CIPSTATUS
<--- b'STATUS:2\r\n\r\nOK\r\n'
Pinging 8.8.8.8...---> AT+PING="8.8.8.8"
<--- b'+29\r\n\r\nOK\r\n'
Failed to get data, retrying
Couldn't ping
Checking connection...
---> ATE0
<--- b'\r\nOK\r\n'
Changing baudrate to: 9600
---> AT+UART_CUR=9600,8,1,0,0
---> AT
<--- b'\r\nOK\r\n'
---> AT+CIPSTATUS
<--- b'STATUS:2\r\n\r\nOK\r\n'
Pinging 8.8.8.8...---> AT+PING="8.8.8.8"
<--- b'+22\r\n\r\nOK\r\n'
Failed to get data, retrying
Couldn't ping
Checking connection...
---> ATE0
<--- b'\r\nOK\r\n'
Changing baudrate to: 9600
---> AT+UART_CUR=9600,8,1,0,0
``` the pings are actually working -- you can see the response times so the problem appears to be in parsing the response. Thanks for reporting this.
OK - found the problem -- the ESP8266 and ESP32 have different responses -- THe ESP8266 responds +xx and the esp32 responds +PING:xx xx -= ping time. the xample looks for the PING text. At least it makes sense 😃
@tiny mountain FYI -- I submitted a PR to fix the ping for the esp8266 -- https://github.com/adafruit/Adafruit_CircuitPython_ESP_ATcontrol/pull/22
I have a dashboard setup, with blocks connected to fees. The feed data shows up under activity, but none of the dashboard blocks show any data. The blocks are two charts, each connected to one feed each, a stream connected to the same feed as one of the blocks, and an indicator connected to a different feed. The only thing that has shown up is a throttle message on the stream block. Any ideas of what I might have done wrong, or what I can do to troubleshoot this?
@marsh raptor Does the feed data show up under the feed itself?
or under the monitor page
The feeds were showing up on the Monitor page. When I went to the Feeds page, they were all there, but under a different group. (The other group is associated with a different dashboard.) Looking into how to specify group with feed name.
That fixed it, now getting data on the dashboard. Thanks for pointing me in the right direction.
@marsh raptor np!
are there any official adafruit peeps here?
@versed perch Sure, there are a few and also some community helpers
I was wondering if it is possible to use more than the 60 updates a minute for a few days on the plus plan for an academic event
@versed perch Possibly! We like helping out. Email adafruitio@adafruit.com with more information about the event.
@versed perch np! good luck with the event
Anyone know where to go for help with pluseio? Need to find out how accurate and repeatable the PWM is. Thanks!
Trying to learn how to use webhooks from NASA API data to trigger MQTT Adafruit IO. Anyone know a great place to research?
how long does it take to get a reply from email usually?
@slim spire Adafruit IO supports webhooks
@royal rapids any idea how long emails take to reply to?
@versed perch Since the email is more of a proposal than a question/billing, it may take a while to discuss and reply.
Gotcha
I realized I sent out an email months ago and never heard back haha, but Ill jut resend in a week or so
@slim spire are you using NASA's openMCT ?
I've installed openMCT and it's running on one of my servers, but I haven't used it for anything. I just remembered that I had it when you mentioned NASA...
I keep getting "Network Disconnected" with Adafruit IO on ESP8266(ESP12e), the Wifi credentials are correct, any other ideas on things to check?
@hushed crown Can the ESP connect to the network in other, non-adafruit-io, sketches?
I figured it out, it was sending network disconnected, then going into the loop, and I thought it wasn't working but it received info when I sent it. Thanks @royal rapids
np!
rip 😦
Adafruit IO Monthly for February is LIVE https://blog.adafruit.com/2019/02/08/adafruit-iot-monthly-february-2019-adafruitio-iot/
If you want your project to show up in the Adafruit IO Monthly, give us a tag on social media or email us, adafruitio@adafruit.com 😃
I'd still love a reply to my email
I am using an mqtt client within Flutter/Dart. I am told on the Flutter side that I have connected. I want to verify on the Adafruit.io monitor. I expected to see "Connections" updated. But nothing changes. I have also attempted publishing to one of my feeds. It does not (instantaneously) update. However, I have updates that "finally" happened after two days. What am i missing? Thank you.
@tame cairn Can you link the client you're using?
IO Connections changes on a new MQTT connection, it's strange that it's registering on their end and not ours
@royal rapids thank you for the reply. The client i am using is at this github: https://github.com/shamblett/mqtt_client
@tame cairn have you tried using the example mentioned on the issue https://github.com/shamblett/mqtt_client/issues/73
I am having difficulty connecting to an Adafruit.io feed. Should connecting to Adafruit.io be straightforward? here is a brief doc on adafruit.io: https://io.adafruit.com/api/docs/#
@royal rapids that is what i am pretty much doing now (i am bitknitting). i admit i am no dart expert.
Neither am I 😄 hmmm, they're using mosquitto mqtt.
What QoS are you using? What port? Broker URL?
here's a string of logging goop: Header: MessageType = MqttMessageType.connect, Duplicate = false, Retain = false, Qos = MqttQos.atMostOnce, Size = 0 Connect Variable Header: ProtocolName=MQIsdp, ProtocolVersion=3, ConnectFlags=Connect Flags: Reserved1=false, CleanStart=true, WillFlag=false, WillQos=MqttQos.atMostOnce, WillRetain=false, PasswordFlag=false, UserNameFlag=false, KeepAlive=60
now i do get this in the logging goop: flutter: 2019-02-11 10:39:41.890377 -- MqttConnectPayload::Client id exceeds spec value of 23
my reaction to "client id exceeds" is to think the AIO key is too long? (I am using the right key)
the broker url is io.adafruit.com the port is not exposed in the api, but it is unsecured.
if they are using mosquitto...then why getting this exception if this is the same goop adafruit libraries use?
is it obvious what i am supposed to do to fix this?
The secure port is 8883
yah - will my booboo heal if i figure out how to connect via tls/8883?
(this isn't the same goop the IO libraries use - we use Paho MQTT for IO Python, they're using a different MQTT Client)
Don't know
🤷 I'd file an issue with their client with your connection info, and see if they can help debug on their end. How are you handling the on_connect?
Here's some of my code to connect... I get to the 'MQTT client connected' ``` client =
mqtt.MqttClient(brokerAndKeyJson['broker'], brokerAndKeyJson['key']);
// set logging to true while in test...
client.logging(on: true);
// Adafruit's python mqtt client uses 60 seconds. See https://bit.ly/2DtzcC0
client.keepAlivePeriod = 60;
/// Add the unsolicited disconnection callback
client.onDisconnected = _onDisconnected;
/// Using default connection message (mqtt.MqttConnectMessage)
/// Connect the client, any errors here are communicated by raising of the appropriate exception. Note
/// in some circumstances the broker will just disconnect us, see the spec about this, we however will
/// never send malformed messages.
try {
await client.connect();
} catch (e) {
print(e);
disconnect();
}
/// Check if we are connected
if (client.connectionStatus.state == mqtt.MqttConnectionState.connected) {
print('MQTT client connected');
connectionState = client.connectionStatus.state;
} else {
print('ERROR: MQTT client connection failed - '
'disconnecting, state is ${client.connectionStatus}');
disconnect();
}```
or is their client supposed to handle that...?
so what confuses me is the state of the connection does tell me the mqtt client is connected?
Can you publish to IO?
Whats strange to me is However, I have updates that "finally" happened after two days.
@tame cairn do you have a forum topic on this on the adafruit forums?
I could best respond and track this over there
I do have stuff in my feed that i published. However, I should have not included the line you quoted because at this point i think it is a red herring. So my answer is NO. Not publishing. Looks like the broker (adafruit.io) returns MqttConnectPayload::Client id exceeds spec value of 23 and my side thinks i'm connected to adafruit.io but i'm not?
i will open a forum topic. Thank you very much.
i am sending a publish message. Adafruit.io must have received it, not liked it, and disconnected. Is it possible to check the log for why the broker doesn't like my publish message?
Here is the mqtt traffic from publish flutter: 2019-02-12 05:42:40.293194 -- MqttConnectionHandler::sendMessage - MQTTMessage of type MqttMessageType.publish Header: MessageType = MqttMessageType.publish, Duplicate = false, Retain = false, Qos = MqttQos.atMostOnce, Size = 0 Publish Variable Header: TopicName={sketchy/feeds/test}, MessageIdentifier={1}, VH Length={0} Payload: {8 bytes={<24><0><0><0><0><0><0><0> flutter: 2019-02-12 05:42:40.374700 -- MqttConnection::_onDone - calling disconnected callback flutter: MQTT client disconnected
@tame cairn what is your Adafruit IO username?
@royal rapids thank you. I believe that will be helpful for my challenge here.
disclaimer: I don't usually ask him for logs, I dont know if it'll be helpful. the Monitor page logs errors with most issues
@royal rapids i would think it would be very helpful from a support point of view to provide each account with detailed log info (on the monitor page)
@royal rapids i am hoping the logs show why the broker disliked my publishing request and decided to terminate my connection.
I'm not sure if we should show more verbose logs. I'll ping you on here when he gets back to me about it.
@royal rapids the pro to verbose is perhaps obvious - we can help more with our own debugging. Saving your team time to deal with other challenges.
Most people don't use IO past our libraries, and we've seen almost every error from them (and quickly patch them as they're our own code).
Have you looked at the GO client?
@royal rapids since my current tool is Flutter/Dart, why would I look at the GO client?
@royal rapids the pro with more clients is of course a larger community of Adafruit.io users. In this case, a dev environment promoted by Google for mobile dev.
The client is not as interesting as the messages coming back and forth.
So in this case, it looks like my connection message is being ACK'd and i'm connected. But my Publish message is not liked by the broker and the broker disconnects me. Unfortunately, i do not learn why.
@royal rapids so my question is, what is Adafruit.io doing with my publish request if right before it tells me i am connected? Why does Adafruit.io disconnect me?
I do not know, I asked Adam to take a look at the logs (I do not sit on that end of IO, he'll have a better idea of what's going on in the backend) to help figure this out with you.
@royal rapids and i thank you very much. i am excited to understand what Adam.io finds out. Again, thank you.
np!
@tame cairn We dont trace with enough detail to figure that out, unfortunately. He suspects that the "connect" on your end is not registering correctly, or it could be the client expecting a particular MQTT response and disconnecting itself when it doesnt get an ACK back from IO
@royal rapids but I do get an ACK back? So your response confuses me? ```flutter: 2019-02-12 04:26:18.287512 -- MqttConnection::_onData - message received MQTTMessage of type MqttMessageType.connectAck
Header: MessageType = MqttMessageType.connectAck, Duplicate = false, Retain = false, Qos = MqttQos.atMostOnce, Size = 2
Connect Variable Header: TopicNameCompressionResponse={0}, ReturnCode={MqttConnectReturnCode.connectionAccepted}
I am still plugging away at getting Adafruit.io to work w/in my Dart app. On subscribe, I am getting back a subscriberAck, but the payload notes my QoS grant is "failure" MqttConnection::_onData - message received MQTTMessage of type MqttMessageType.subscribeAck Header: MessageType = MqttMessageType.subscribeAck, Duplicate = false, Retain = false, Qos = MqttQos.atMostOnce, Size = 3 SubscribeAck Variable Header: MessageIdentifier={1} Payload: Qos grants [{1}] {{ Grant={MqttQos.failure} }} But my topic is there (sketchy/feeds/test) so i assume the failure is not because it is illformed. I had previously connected, with my AIO key, so i assume i am on a connection that allows me access? Any thoughts on what I am doing wrong?
oh wait - i had the feed set to private. i thought that meant i would have access with my AIO key...but once i made it public, it seems the return grant was ok!
drat. i seem to be able to subscribe. But still, publishing fails. I do not get an anons/error ... I just get disconnected soon after trying to publish. Exactly what does a publish message look like that would be successful?
i am able to subscribe, add a value to the feed, then the value is sent to me. i am not able to publish. this causes the immediate disconnect. Since i do not get a anon/errors message, just an immediate disconnect - i am not sure why.
i want to setup a trigger to send a message to a discord/slack channel webhook when a value goes above a certain number, did anyone do anything similar?
@tiny mountain You can receive webhooks from services (Slack/GitHub) in Adafruit IO, but not send
@royal rapids yeah i made it work already
i connected adafruit.io with IFTTT and then made IFTTT post to a discord webhook when a value is reached
@tiny mountain I was just going to suggest the IFTTT integration. I like the threshold-checking you're doing with that
IFTTT has a delay between polling IO
I've found it ranges at the high end (Gmail) at 15 minutes to 5 minutes
yeah its fine, way better than me checking the values manually every few hours lol
I'm working on a weather station that uses io.adadfruit.com. I have my "weather station" send temp data in celcius.. if there a way I can have io.adafruit.com convert that to Fahrenheit for me. Sure I could do the conversion before I send the data to the io site.. but that would take up another feed.
I have a line graph in Celsius over time.. and a current temp gauge that I would like in F
@icy crescent IO can't convert data, it'd be neat if it could do post-processing.
You can suggest it here: https://forums.adafruit.com/viewtopic.php?f=56&t=139746
Hi guys I have an application where I am sending data to Adafruit IO which is working great! Now I am trying to make the solution robust i.e. I want the pi in this case to log data at all times. Problem is that if I simulate a WiFi disconnect by disabling WiFi manually the program will sometimes get caught in send_data() for a sensor. If it so happens that the disconnect happens at any other time its all good, but if I manage to do it while the command is running it just halts the program indefinetly = 0 logging which is critical for the application. I am using the IO Python port, any help is much appreciated! Im gonna post a code snippet when I get back to my laptop
try:
_WiFi = True
if(sensor == 0):
_ph = line
print("sending PH: %.2f to cloud" % _ph)
aio.send_data(ph_feed.key, _ph)
except:
_WiFi = False
print("failed to send data to IoT, check internet connection")
Most of the time if I disconnect WiFi I will get the "failed to send data to IoT, check internet connection" message, but in the rarer cases I get stuck in the aio.send_data() function. I hope you guys have some theories or anything really that could help make this more robust, thank you
my esp8266 not able get the adafruit topic subscription after few minutes of restart, what could be the reason?
@oblique swan Did the ESp8266 connect to wifi?
@faint hare What I've done in the past for situations like yours, is; create a screen session using "screen" to spawn a separate process/script in case it gets hung up. You'll need it installed (sudo apt install screen). It's not very "pythonic" but it works
import subprocess
command1 = "screen -XS name_of_session quit" #kill an existing session, in case it hung
process = subprocess.Popen(command1.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
command = "screen -S name_of_session -d -m python3 name_of_script.py" #start a screen session called 'name_of_session'
process = subprocess.Popen(command.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
of course, you would put that in your try: code block
and what's currently in the try, you can put in the "name_of_script.py" getting called into the screen session.
I've been trying to learn more about threading and stuff in python to make it more "pythonic" but I haven't had much time. Here's where I've been looking though: https://docs.python.org/3/library/multiprocessing.html
in the meantime, screen has been my friend. I love screen, we are buddies
@royal rapids testing adafruit_io using feather nRF52840_express, ESP32 Huzzah success after a few changes ```Adafruit CircuitPython 4.0.0-beta.2-97-g0dc260058 on 2019-02-19; Adafruit Feather nRF52840 Express with nRF52840
import aio_test
Sending 0 to Adafruit IO...
Data sent!
Receiving Feed test...
Feed Value: 0
Sending 1 to Adafruit IO...
Data sent!
Receiving Feed test...
Feed Value: 1
Sending 2 to Adafruit IO...
Data sent!
Receiving Feed test...
Feed Value: 2
Sending 3 to Adafruit IO...
@royal rapids change to adafruit_io.py ```jerryneedell@Ubuntu-Macmini:~/projects/feather_nrf52840$ diff adafruit_io.py ~/projects/adafruit_github/Adafruit_CircuitPython_AdafruitIO_brent/adafruit_io.py
64,66c64,66
< """
< TODO: Add Class DOCSTRING here!
< """
"""
TODO: Add Class DOCSTRING here!
"""
changes for example -- setting for Feather_nrf52840 differ frm pyportal -- uses esp32spi_setting.py (not setting.py) and use values in esp32spi_settings.py for aio_username and key.
17c17
< from esp32spi_settings import settings
---
> from settings import settings
22,26c22,26
< # nRF52840 ESP32 Setup
<
< esp32_cs = DigitalInOut(board.D9)
< esp32_ready = DigitalInOut(board.D10)
< esp32_reset = DigitalInOut(board.D5)
---
> # PyPortal ESP32 Setup
> esp32_cs = DigitalInOut(microcontroller.pin.PB14) # PB14
> esp32_ready = DigitalInOut(microcontroller.pin.PB16)
> esp32_gpio0 = DigitalInOut(microcontroller.pin.PB15)
> esp32_reset = DigitalInOut(microcontroller.pin.PB17)
31,33d30
<
<
<
35,37c32,34
< ADAFRUIT_IO_USER = settings['aio_username']
< ADAFRUIT_IO_KEY = settings['aio_key']
< ADAFRUIT_IO_FEED = 'test'
---
> ADAFRUIT_IO_USER = 'YOUR_ADAFRUIT_IO_USERNAME'
> ADAFRUIT_IO_KEY = 'YOUR_ADAFRUIT_IO_PASSWORD'
> ADAFRUIT_IO_FEED = 'testfeed'
56c53
< response = None
---
> response = None
\ No newline at end of file
the name of the settings file was changed for esp32spi to make it less generic -- settings.py was too common
@royal rapids the "get_feed()" call worked fine -- had issues with "get_all_feeds()" but it appears to be an issue in esp32spi -- I opened an issue there.
@hushed sigil thank you!! Going to try this tmrw then 😃
@keen dirge I saw the issue, thanks for doing testing
I'll have more examples for it tomorrow as I finalize and ready it for a PR
As for putting the username in settings, I'm not sure about keeping both the AIO username and AIO password there. My main concern is people c/p'ing their active key into shared code
lemmie remove that...
and re-generate a new key
wait, this one doesn't?
It has ADAFRUIT _IO_KEY
@faint hare I hope it works for you!
@hushed sigil thanks 😃 just got some thesis stuff to work out then I'm headed home to try this woho!
I'm very new at this and I've spent a couple days trying to run program update to Adafruit Bluefruit Feather52 with zero success rate. There's obviously something I was missing and could use a little help getting this started. I've followed the instructions online far as it would go a couple of times. Once I get to burning the bootloader with Segger J-link installed, the correct tool are not in the load list, only J-link option is found. Pretty sure I ruined the thing because it wouldn't take an upload from connecting my cell to it.
I doubt you've permanently ruined it: if you have a J-link available, you should be able to load the entire thing over from scratch.
The Arduino is't listing the correct tool selections in the drop window to preform that action. Didn't know what happened there.
You won't believe this but I bought a second feather and a new cell phone to solve my way though this and it was no help.
There's a whole process to install the J-link and Feather support into the Arduino IDE, I'm guessing you've done all that (if not, that's why those options aren't in the dropdown menu).
If the Arduino IDE refuses to play along, you can flash it with the command line tools instead.
But first I'd make sure your J-link is properly recognized by the host operating system.
👀 IO comes to CircuitPython
Thanks @royal rapids . I've seen that you've been working very hard on that.
we dont' do adafruit.io support over email
please post in the forums! they're checked during the week
The Z indicates it is UTC
can i change it?
ohh. ok
@old ocean you'd want to get the UTC time from IO, and convert it in your code to your local time
Anyone here ever used the Adafruit MQTT broker on NodeMCU ESP8266?
I keep getting this:
"subscription to [myusername]/lights failed: not a valid topic format"
When i add the key to it:
"subscription to [myusername]/lights/test-stuff failed: not available"
@sudden fiber I think the format is [myusername]/feeds/lights when I publish using mosquitto_pub, this is the command I use:
mosquitto_pub -h io.adafruit.com -m "data" -u [username] -P [aio_key] -t [username]/feeds/lights --cafile /etc/ssl/certs/certificates.crt -p 8883 -d
@sudden fiber username/feeds/lights/test-stuff
Yeah, i luckily got it 😄
IO Update: Line Chart (NEW!) and Gauge Rendering
Hello Adafruit IO community!In order to reduce the amount of Javascript we send to your browser every time you visit Adafruit IO and in order to fix an annoy...
@vocal berry it was a sponsorship request. Happy to post on the forums though
What is needed to install controls for neo pixel ring on to the bluefruit?
@sacred depot This is the Adafruit IO (the internet of things service) channel, you might find a better answer in #help-with-projects
@royal rapids do I have to import round from mat to use the precision?
nope -- not there -- did you run this in CP?
yep
wait simethig wrong n my end -- let me try again --
Ok np
random_value = randint(0, 50)
print('Sending {0} to temperature feed...'.format(random_value))
io.send_data(temperature_feed['key'], random_value, precision=2)
print('Data sent!')
``` this is what I tried and get the Not Implemeted error -- is there something wrong with this?
if I want to use precision ,do I have to put in metadata first -- are they postionaal?
nope
no they arent
I don't understand why you got that error, I just tried it again and it's ok
me either
yup -- I see that
it works on the ItsyBitsy _m4
Adafruit CircuitPython 4.0.0-beta.2-141-g2c9fbb5d4 on 2019-02-24; Adafruit ItsyBitsy M4 Express with samd51g19
>>>
>>> import ibm4_aio_data
Failed to connect, retrying
('No such ssid', b'Needell Airport')
Sending 30 to temperature feed...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ibm4_aio_data.py", line 67, in <module>
File "adafruit_io/adafruit_io.py", line 146, in send_data
NotImplementedError:
>>> round(22.5555,2)
22.56
>>>
but the code fails
Does the send_data you're using have the precision kwarg?
io.send_data(temperature_feed['key'], 22.05553, precision = 1)
# Send random integer values to the feed
random_value = randint(0, 50)
print('Sending {0} to temperature feed...'.format(random_value))
io.send_data(temperature_feed['key'], random_value, metadata=None, precision=1)
print('Data sent!')
oh -- its an int . not a float -- maybe that s it
Try using a float
That's my job 😉
``` yields ```NotImplementedError: Precision requires a floating point value
I suppose if the user is specifying precissin, they should know if there data is floating point or not. Since you don't explicitly specify type in python, I was concerned tere might be some weird cases where it failed sometimes and worked sometimes depending on sensor values.. Sy it just happend to be an even integer value.
I could add to the docstring as well?
so if my data readings were 20.1, 20, 10.9 would it crash on the 20
if you were sending floats using the io.send_data method, yes
that's a strange corner case - not sure if i want to add handling code for it
but I see the issue. hrm
if I'm reading a sensor and it happent to hit a round whole number for a reading, will the value be a float or an int?
...not sure, this is where my knowledge of how python handles data starts to get fuzzy
I guess you could just do a float(data)
but only if precision is not None
yes
I like that
issue, though
>>> data
20.0
>>> data = round(data, 2)
>>> data
20.0```
rounding won't append the requested decimal places onto it, since it's just a single-prec. float value
hmm
IDEALLY, the way it'd work
temperature = '%0.2f'%(temperature)
but that '.2' before the f is not set-able to a variable iirc...unless there's another python string format that it'd work with
I suppose you can just warn users taht hey have to ensure the data is a float if they want to use precision and leave it up to them how to do it.
Yeah, which is what I'm doing. Converting on the device-side from the lib. is enough for now
Ideally, IO should just get data and do things to it. But that's in the future - the code.py should be built to send the correct, converted, data to IO. adding this helper is useful
@keen dirge for now, though, its OK to just warn?
fine with me -- I just started a test with a modified "temperature" example ```while True:
try:
temperature = adt.temperature
# set temperature value to two precision points
temperature = '%0.2f'%(temperature)
print('Current Temperature: {0}*C'.format(temperature))
print('Sending to Adafruit IO...')
io.send_data(temperature_feed['key'], temperature, precision=1)
print('Data sent!')
except (ValueError, RuntimeError) as e:
print("Failed to get data, retrying\n", e)
wifi.reset()
continue
time.sleep(0.5)
your example sends a "str" -- so you've already dealt wit the formatting.
The temp. example?
yes -- that is waht I am running now -- I took out your conversion to string and want to see if it crashes if the returen temperature is a whole number
may never happen
I'm approving the PR though
Ok
Hi! I'm noticing that Adafruit IO does not have any support / scaffolding for WPA2 Enterprise network support. Both ESP32 and ESP8266 support WPA2 Enterprise but do so in different ways; additionally we'd want a way to pass SSID, username, and password to the library.
Some of the other supported wireless devices might also support WPA2 Enterprise but I don't have easy access to those boards.
Thoughts?
(To add — I work in a university environment where non-WPA2 Enterprise networks are not available.)
Would adding another header called AdafruitIO_WiFi_Enterprise.h and having it implement the enterprise versions of the connect functions work?
@urban arch heya - Submit a pull request on Adafruit IO Arduino and I'll take a look
@royal rapids thanks! I was asking for general design ideas. Right now I'm planning to subclass the esp32 and esp8266 wifi classes and implement a different connect method and a different constructor
And also I'll have an AdafruitIO_WiFi_Enterprise.h that sits alongside the regular one and has a different constructor
@royal rapids does that sound okay?
once I've implemented it and tested it with hardware I'll PR
@urban arch That sounds OK to me. You could also add the constructors to the regular WiFi class
If it's too different, though, we can subclass it
it just needs an additional "identity" parameter
since wpa2 enterprise has ssid, username, password
@royal rapids does the library currently compile for esp8266?
I'm getting a compile error even after stashing all my changes
You'll need to downgrade the board support package to 2.4.2
Ahh, known bug in the esp8266 stack?
Yeah, they changed the function signatures required for HTTPClient
in the ESP8266 BSP3.x
ahh :/ I see, okay. So that would need to be fixed in HTTPClient :/
Hello!
I have quite simple question, but I coudn't find answer on forum.
Q: After last line graph update time scale from 24h time format changed to 12h format. How I could set it to show time scale back in 24h format?
I refer to simple line graphs (time series) showed on dashboard
@royal rapids ah I see, it's an esp8266 core bug that they plan to fix in 2.5.1
Anyway I'll have a preliminary untested PR ready soon for feedback
Can't test until I have the hardware handy 😃
Greetings humans, I think I have a bug in IO. I have a feed with several hundred data points, and the line chart does not show on the dashboard without selecting "30 days" for that feed.
The dashboard is public, and it's the last two at the bottom of the page. https://io.adafruit.com/jdoscher/dashboards/fabrication-lab
I have selected "30 days" in the line chart config, but as you can tell there's only 24 hours in the line chart.
@sacred depot Could you post this on the forums, and I'll fwd it to the IO Team? https://forums.adafruit.com/viewforum.php?f=56
@royal rapids Sure will, it will be later tonight or tomorrow though. Thank you!
@royal rapids whats the "show us what your doing with adafruit io"? page
@royal rapids https://github.com/adafruit/Adafruit_IO_Arduino/pull/81
OK this makes no sense. I'm seeing data get pushed on the monitor, but not appearing in feeds.
The feed dashboard just seems flaky
or is it. MQTT is not returning errors but I'm seeing no data.
Yeah, getting no data through. No errors either, no throttling message...
Is anyone experiencing IO issues?
huh. "You created a feed" is appearing in the Activities log, but there's no feed in the feeds....
I'm not having any issues sending data to a feed.
Created at Value
2019/02/27 12:53:04pm OFF
2019/02/27 12:52:41pm ON
@urban arch if you have curl installed on something, try testing it with this:
curl -d '{"feed_key":"YOURFEEDNAME", "value":"TEST"}' -H "Content-Type: application/json" -X POST https://io.adafruit.com/api/v2/YOURUSERNAME/feeds/?X-AIO-Key=YOURKEY
or if you have mosquitto installed:
mosquitto_pub -h io.adafruit.com -m "data" -u [username] -P [aio_key] -t [username]/feeds/lights --cafile /etc/ssl/certs/certificates.crt -p 8883 -d
well, that's for linux
change the --cafile to the place you installed openssl and the ca-cert on your windows box
--cafile C:\Program Files\mosquitto\bin\PEM\ca-cert.srl
that makes it more secure
or, if you want to just send the word TEST to your feed using python, (after you 'pip install adafruit-io') try this:
from Adafruit_IO import Client, Feed, RequestError
ADAFRUIT_IO_USERNAME = "put_your_username_here"
ADAFRUIT_IO_KEY = "put_your_key_here"
# Create an instance of the REST client.
aio = Client(ADAFRUIT_IO_USERNAME, ADAFRUIT_IO_KEY)
aio.send_data('name_of_your_feed_here, 'TEST')
One last thought, maybe you're not sending data to a feed, but creating the feed using something like aio.create_feed(feed)
does the Arduino AdafruitIO library automatically create feeds?
the tutorial says it should.
Going to test a different wireless network
okay, that's what it is.
sorry :/
the weird part is that _mqtt->connect is returning AIO_CONNECTED
but publishing data fails
I wonder if this is because I hammered the API a bunch and there's some sort of additional mechanism that's blocking that IP?
weird.
@hushed sigil so the issues begin when I use ArduinoIO, with the basic demo connecting to a standard WPA2 PSK network, if I reset the board
humm, I haven't tried it with an arduino yet.
I'm using esp32 or esp8266
the weird part is that I see nothing of concern in the debug/verbose output
at all
I may have to set up mitmproxy
@hushed sigil disabled security and am debugging; the first few times it works, after a few board resets I am not getting an MQTT response from the server, only a TCP ACK
hmmm
the subscribe happens and succeeds
if wireshark logs are useful, I can attempt to anonymize the API key out and send it to you
(I set my Mac as a wireless gateway and am intercepting on my Mac)
I'm just a guy who hangs out in here
ahhh alright then 😃
I wouldn't know how to debug it
yeah, nothing appears there
MQTT pings seem to cause responses, but MQTT publish doesn't
I get a TCP ACK but no MQTT response
(or am I misunderstanding MQTT)
That might be the case.
No, I should be getting an MQTT response: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718041
when it works, I see that sort of packet coming back from the Adafruit IO service. When it doesn't, that packet never comes through.
Ah wait, QoS 0 -- no response
hm
I'd have to dig through the AIO docs about what they're using for QoS.
looks like 0, based on my capture
"For publishing feed values the Adafruit IO MQTT API supports QoS level 0 (at most once) and 1 (at least once) only. QoS level 2 (exactly once) is not currently supported."
Yeah.
Anyway, based on wireshark it seems like the calls against the API are being made as expected, and the API is responding as expected, but the feeds never display the data.
what is the feed name?
counter (this is from the example code)
No, it's going to the default group
The data appeared fine initially, but after a few board resets, it no longer publishes.
I'm just using https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/examples/adafruitio_00_publish/adafruitio_00_publish.ino
so I tried sending messages using mosquitto_pub: the first with qos=0 did not show on the dashboard, then two with qos=2 did, then two with qos=0 did
Restarted the arduino, tried a mosquitto_pub message with qos=0 again, no dice
it seems like the service is dropping qos=0 messages
I may have to hack up the mqtt lib to use qos=2
but that would be a workaround for a service bug? ugh
Testing with mosquitto on my win10 laptop, I can see via the monitor page, I've made connects and disconnects, but sometimes data isn't published
and the connects/disconnects are out of order on the monitor page
in fact, only 1 message out of 5 was saved to a feed
Yeah, that's the problem I'm running into
if I force qos=2, data does get published.
which means qos=0 is not providing the same QoS as regular TCP.
sets qos=1 in the Adafruit_Arduino_IO library
no dice...
which means the lib might not be doing that right
no, it's the service
same issue with mosquitto
but now my qos=2 messages aren't making it either!
IO uses QOS 0
@urban arch
I wonder if this is because I hammered the API a bunch and there's some sort of additional mechanism that's blocking that IP?
IO throttles your connection if you hit it over the 30 data points per minute (for IO regular) free limit
@royal rapids weirdly it's been reliable since
Yeah, but I didn't get a throttle alert
Not even on the monitor page?
nope
BTW we can't do verbose MQTT logging from our end, past what you've seen on the web end
and even after the throttle should have expired it was being extremely flaky
Are you still unable to send data to IO?
(nothing would appear on the monitor page)
it seems to be working now, but I haven't tried to do the same thing
I can try that within an hour or two
Try it with the regular AIO library, unmodified, first. Just to see if anything's off with the code you modified.
Will do so — though I was not using that code I added
I tested with the regular WPA2 class connected to my phone running as hotspot and after a few board resets the same thing happened
Debugging IoT with people is always trickier than regular support
Yeah. 😦
So many layers - it's like a sandwich of things which could go wrong (hardware, isp, router config, software)
If you're still having problems, though, @ me in here and I'll ping the IO webdev team to take a look at your account
Cool, sounds good
@royal rapids I put in an email support request and got a reply that there was degraded service for MQTT yesterday.
Yep, it's working reliably now, both with and without the WPA2 Enterprise additions
I am noticing only some of my feeds getting listed in groups
Is there something going on?
@versed perch I don't have that issue, can't replicate. Could you post on the forum with the steps you're taking (https://forums.adafruit.com/viewforum.php?f=56) and I'll let the web team know?
lol sure
There was a dashboard bug issue earlier
Probably not related, though, that was due to graph rendering
Hey everyone, not totally sure if this would be the best channel to post this in, but effectively I am using the IO and IFTT to read data from a Square payment system and perform some actions on a Feather with WiFi
however, I cannot seem to get IFTT to ping its trigger on a regular enough interval to make it a somewhat instant process flow
@olive rapids Does the square payment system have a webhook you could use?
@native fiber If you'd like to request a new Adafruit IO Feature, the development team watches this subforum thread: https://forums.adafruit.com/viewtopic.php?f=56&t=139746
Non-criticial bugs should be reported on the Adafruit IO Forum in a new thread: https://forums.adafruit.com/viewforum.php?f=56
You can also submit issues over on the io-issues repository if you like using GitHub more than forums: https://github.com/adafruit/io-issues/issues
Repository to submit bug reports for Adafruit IO at io.adafruit.com - adafruit/io-issues
Great, thanks
No problem - the IO Team watches both of those locations!
@native fiber Issues and bugs should be reported to the Forums first, though. Adafruit has more technical and customer support on the forum than that repository.
good to know. I assume there is monitoring in place for exceptions and the like but if a more critical bug pops up that's not clearly generating a 500, is there a bat signal? I'm not doing anything mission critical ATM but if there is someone who should know about such things, lmk
@native fiber Errors should pop up over on the Monitor page (https://io.adafruit.com/monitor) as they occur.
The forums are the best place to report bugs, even critical ones. You can always check the status to make sure IO is operational (MQTT/REST API) over at https://status.adafruit.com/
Welcome to Adafruit's home for real-time and historical data on system performance.
hello I want to have some information about mqtt client id
am i on wrong channel??
@left knoll For Adafruit IO? You're in the right place!
i need help. this is my first project and i'm pretty discouraged cause i think i screwed up.
but hopefully fixable.
i messed up my headers so i couldn't attach to breadboard on this step; https://learn.adafruit.com/cup-o-sound/solder-circuit-and-assemble
but i still want to attach my speakers to my audio FX board and i'm not sure how/where to put wires.
also, i tested everything so far with the 3.5mm aux port and i get sound, so hoorah. i just need this speaker for my project.
You can connect the audio outputs (R and L pins) on your Audio FX board to the inputs on your amplifier board and I think that will do what you want.
do i need a ground, too?
(there's a ground on the amp board)
hmm. not working. not sure what to do for troubleshooting.
left and right channel on my amp board are the points designated "audio in + and audio in -" ? maybe i'm wiring it up wrong.
Yeah, you'll need the ground connection as well.
i tried ground and i still get nothing out of the speaker.
Are you triggering the FX board?
indeed. i know it is triggering properly, i get sound from aux when something is plugged in there. but also, there is a red indicator led when the trigger occurs.
Hmm, those pins are connected to the same signals as the aux connector, so there should be sound there.
was i supposed to put something in these holes..? i'm p sure my red wire on top is the same as the inside of those contacts.
Yeah, it is. It would have been easier to just put the wires into the connector but you're right, soldering them to the pads makes the same connection.
the amp board is mono, you just connect either L and ground OR r and ground to the amp
with v+ being either l or r, and v- being ground
@little rampart thats from https://cdn-learn.adafruit.com/assets/assets/000/023/305/original/adafruit_products_diagram.jpg?1424239525
it's not working still. @tardy ocean any other ideas?
maybe draw out what pins you have connected where. by looking at your devices though, not from memory
okay, here's my configuration.
on the amplifier, i've tried moving the green wire to all the other amp board ports next to it (leaving ground to red) and still no sound from speaker.
You'll need to connect ground between the FX board and amplifier, and the amplifier will need power.
right now you have L going to VIN and sound GND going to GND on the amp, you need power going to vin and ^power ground* going to gnd
then you want L going to A+ and the gnd next to L going to A-
On the amp:
A+ and A- are for the audio signal and are decoupled from the regular power
Vin and GND are the actual power
you need power going to vin and ^power ground* going to gnd @tardy ocean where do i find this.
your vin and gnd on your microcontroller board also needs to go to your amp
yass it works. :) thank you.
:>
Adafruit and Digi-Key have teamed up to present All the Internet of Things - a six-part video series covering everything you could ever want to know about th...
Hi All,
I'm trying to get my adafruit Huzzah ESP8266 to connect to adafruit io but I keep getting a "Disconnected from Adafruit IO" error message. My wifi test is successful. can anyone give me an idea of how to start trouble shooting this?
@wanton urchin may also be exceeding account limits, esp. if using free account
what is the sketch you are running?
@royal rapids yep version 2.7.23 @raven ore adafruitio_00_publish, but modified to print io.statusText() instead of a "." this is also the only sketch I'm running on my account and I have reset the key so no others should have a valid key.
anyone work with NFC here? namely Adafruit-PN532
dont worry - sorted 😃
Triggers don’t work properly at all
A greater than comparison should be triggered by a change in either variable, not only the first one
Like I have trigger “if temp > tempgoal” and it’s only triggered if temp has a change, not tempgoal
Is there a gallery available of public dashboards?
@faint hare Not currently - you can only view dashboards which have been shared with you previously
@royal rapids alright thank you 😃
@royal rapids I tried the ZAPemail guide, but I could not get it to allow me to chose the feed to use for the "action" it picked one of my feeds, but I was not able to set ti to the "zapemail" feed. The dropdown menu would not show my feeds. Did this work for you?
@keen dirge If you're having that email, you may want to try selecting "custom feed key" instead of the dropdown
Do you have a screenshot? I can fwd. this over to Zapier CSupport
It should be, I added it as a PR on friday
may not have gotten into the latest one in time
It does not appear to be there. Hopefully a new one will come out today
It was added to drivers, but not the submodule. I added that on Friday. Probably coming out in today's bundle.
OK -- I was surprised no bundles were built over the weekend -- does adabot get the weekends off?
@royal rapids here is where I am stuck -- I don't want to us pitemperature as my feed, but I can't change it
@keen dirge Strange, I opened up an email with their support for the integration.
ok --- trying the custom feed setting now
@royal rapids using the custom feed seems to be working
yup -- emails flowing now -- it would be nice if the pulldown worked, but at least there is a wrokaround
It works!
yay!
Just got a response from their support - I'll sort it out. Thanks for letting me know of the issue
@keen dirge Would it be useful for me to start a features/feedback topic in the forums for the IO API Documentation?
I have a lot of ideas from mocking it up, but it's still very early and now would be the time to change it/look at feedback for it.
Probably a good thing for it to have a home of its own
It does have one, but it's currently hidden until I finish up moving things over.
there is this https://forums.adafruit.com/viewforum.php?f=56
makes sense
o/ looking for help with a trinket + 16 neopixel, the color orange shows up as yellow, yet red/blue/green/white works perfectly fine... driving me insane
you need to gamma correct
@terse tinsel ☝
try will try
Hey I've connected my Adafruit IO dashboard to IFTTT for voice commands to control the outputs, but I'm having an issue, after like 30 seconds or so I can't no longer control outputs or check the sensor's data in the dashboard, I can only control them with voice commands using google assistant, any idea why this happens?
@sacred depot Could you open a new forum topic here along with your code and what hardware you're using so we can debug it? https://forums.adafruit.com/viewforum.php?f=56
IO News: Adafruit IO's Zapier Integration is now PUBLIC ! https://blog.adafruit.com/2019/03/21/io-news-adafruit-ios-zapier-integration-is-now-in-early-access-adafruitio-iot-zapier-adafruitio-zapier/
@royal rapids nvm I solved the problem!
@sacred depot Yay, ok!
I'm having some trouble linking to adafruit io on zapier. I've set up my adafruit io account with zapier, and the test works fine, but when I try to select which feed to use the only feed there is the welcome feed and it says MISSING VALUE! I tried added a custom value with my feed name, but it didn't work. Is there anyone that can help me with this problem?
@edgy cave Entering a custom feed key (key, not name) didn't work?
you might want to re-check that you entered the feed key, and not the feed name
It did not work, but I've fixed it by using a web hook instead of the zapier api
I had the same issue as @edgy cave but I was able to enter a custom feed name after a few false starts.
I've got Zapier working by using webhooks, but I might have an issue with the pyportal library. Is there any way I can assign multiple feeds for the pyportal to be able to access?
@royal rapids I don't see an icons folder in the Smart_Thermometer Learning Guide
@keen dirge I'll PR one, the loading screen goes in an icons folder.
which file is that?
I see the note in the guide now -- got it.
hmm -- it is sending data to AIO but no displaying anything on my screen
ah -- just needed to be darker
with the backlight at 0 I don't see anythiing on the screen
and I was not getting it below 1000 -- easy to alter
@royal rapids its all good -- I just did not read the guide carefully enough. you may want to mention how to adjust the backlight threshold. I found 3000 worked better for me
Nice Guide and demo!
The threshold varies a lot -- Now I set it back to 1000 and just put my thumb on the light sensor to trigger it ?
@royal rapids another suggestion - Do you want 2 refresh rates - one to check the light sensor and display the data, but another to govern the rate data is sent to AIO?
as it is -- I am sending about 6 sample/min
For -example - I set an AIO_XMIT_RATE = 60 and then if elapsed time since last message sent to aio > AIO_XMIT_RATE -- send it but still check light level evey 2 sec and display temp.
Where's the link to submit what you've used Adafruit IO for?
Hey guys!!
I have a sensor that changes in less than a second. It stays on a "0" by default and by the press of a button it changes to a "1" very fast. My feed updates every 5 seconds or so and as such it is not able to sense this change with is very critical for my work.
So, please how can I reduce the time the feed takes to update, so that it can capture this change??
Thanks as I eagerly await a response
@versed perch , what do you mean exactly
adafruit dashboard take long time period for response,i.e. if i press "1"on led button then after 1 min led turned on which is connected to raspberry pi.please give me some solution
@swift ibex I've responded to your posts on the forum.
@indigo night Feeds update as soon as they receive the data sent to them. How are you sending the change to Adafruit IO?
I've been getting a "data rate limit reached, 10 seconds until throttle released" message in my monitor but when I check my usage I'm below the 60/minute. Is there a different data rate that I'm exceeding?
@scarlet sentinel Any chance you're sending two queries when you only expect to be sending one? Verify with a print next to each query, maybe.
Hello all -- hope I'm not being a bother, but I'm out of leads on what's probably a minor problem. I'm trying to get an Adafruit IO-enabled python script to run at startup on a Pi using rc.local. It runs fine if I do it manually, but when rc.local does it I get a pretty opaque pile of errors, ending with "Failed to establish a new connection: [Errno -3] Temporary failure in name resolution"
Update: ugh, and of course I just solved it
your path and environment is likely different in rc.local
Update2: never mind, I didn't solve it
@graceful elk Try CraigF's advice - when editing .rclocal, make sure your path is home/pi/IO_Script.py
where pi is the username of your Raspberry Pi.
The full path to the script is specified, and rc.local is set to run the script as pi instead of root. Alternatively, I tried setting PYTHONPATH to the Adafruit_IO module in rc.local, to no apparent effect, though it's possible I'm still messing something up with path stuff. ...Curiously, I get a completely different pile of errors if I make the script wait 5 seconds before trying to connect to Adafruit IO
in rc.local add a call to the env command before calling your script to see the environment
or /usr/bin/env
PATH shows up the same there as when I do it as pi. Is there a particular other environment variable the IO module would need to be set?
@graceful elk Might be a silly Q - but was the adafruit-io module installed with the same version of Python as your script is executing (i.e: if you installed with pip3 install adafruit-io, run the script with python3 scriptname.py)?
adafruit-io doesn't need to be running as root
Not silly at all. I hit snags there too earlier in the day, but I think at this point I've installed that module for all users and all versions of Python on this pi. And I've tried running it with both python and python3 in rc.local. Same thing. The only thing that's changed anything so far is that if I add a 20-second delay at the start of the script, it complains instead of a "bad handshake" / "initialization failed".
Can you post the errors here, in markdown code formatting?
By start of the script, do you mean before the io.client() call is performed?
Before it even loads the Adafruit_IO module.
I have to run away for now, but very thankful to you both for the help! I might bug this channel again tomorrow.
@graceful elk Could you post the error messages on the forums (https://forums.adafruit.com/viewforum.php?f=56) later as well?
Will do
Blargh, well, I think I solved it. I noticed it was actually working about 10% of the time since I added that 20-second delay before loading the AIO module, so I increased the delay to 60 seconds and now rc.local runs the script perfectly on every boot. Would it still be useful to post the errors on the forum? Or is this just a case where either my pi is flaky for some other reason, or I shoulda known to give it more time to get itself booted before trying to connect to AIO?
is it connected via wifi?
Nope, it's wired
my first guess is that the network is ready when it first starts
it is a long running script or just a one-shot that runs and exits?
Long-running.
you could look into creating a systemd service. The service can be configured to not start until the network is up and also restart the process if it crashes
For what I'm ultimately trying to make this pi do, a 60-second startup delay is perfectly tolerable, but I'm making a note of those approaches for next time.
Aaand it's back to not working. I'm just going to post in the forum.
Hello ... hope everyone is well ...
Been following the wonderful learning system post - pyportal email display with zapier
... but when configuring Zapier action to push to AIO feed ... there is an issue with Feed Key ... message says "Missing Value!" and am not allowed to finish creating zapier action
@mystic gorge Heya - could you try clicking custom key value on Zapier's website and manually adding your feed key (not the feed name)?
good morning all dose anyone is working on making IO work with arduino XOD IDE ? ( if no one is i might look into porting the library over at some point 😃 ) ?
Hi, I am new to Adafruit IO and have a couple questions I could not find answers to in their info. First can I download the data from a feed that is shared with me. It does not seem to give me a link. Second, the feed data gets timestamped by Adafruit with UTC timestamp. Is there any way to change that to EDT?
I think Adafruit IO keeps everything in UTC since it's used worldwide and doesn't know your local timezone. You can always adjust the time at your end to match whatever timezone you like.
hello, new as well and trying to use simple example off reading a on/off feed but i only receive off. The feed on the adafruit.io site changes properly but my esp8266 just receives off or low. Very frustrating.
Im hoping to make two esp8266 work together. One esp8266 is used with a button to send on/off to second esp8266 with a relay to actually turn LEDS on/off.
@plush bough Can you post some of the code you've used. Be sure to remove usernames, AIO keys, passwords, etc. from any posted code.
it was just from the adafruit io samples but just a moment
#define FEED_OWNER "xxxxx"
// set up the sharedFeed
AdafruitIO_Feed *sharedFeed = io.feed("lighta", FEED_OWNER);
void setup() {
// start the serial connection
Serial.begin(115200);
// wait for serial monitor to open
while(! Serial);
// connect to io.adafruit.com
Serial.print("Connecting to Adafruit IO");
io.connect();
// set up a message handler for the 'sharedFeed' feed.
// the handleMessage function (defined below)
// will be called whenever a message is
// received from adafruit io.
sharedFeed->onMessage(handleMessage);
// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.print(".");
delay(500);
}
// we are connected
Serial.println();
Serial.println(io.statusText());
sharedFeed->get();
}
void loop() {
// io.run(); is required for all sketches.
// it should always be present at the top of your loop
// function. it keeps the client connected to
// io.adafruit.com, and processes any incoming data.
io.run();
}
// this function is called whenever an 'sharedFeed' feed message
// is received from Adafruit IO. it was attached to
// the 'digital' feed in the setup() function above.
void handleMessage(AdafruitIO_Data *data) {
Serial.print("received <- ");
Serial.println(data->toInt());
}
Not sure if this will help, but that seems to be converting the text to an int. Did you try switching the ON/OFF values in your feed to 1/0?
Do you have a link to the tutorial?
ill try that. um i saw the tutrials on learn.adafruit
@plush bough hi - I'll take a look at this. Could you link me to the tutorial on Learn.Adafruit you're following?
i wasnt following a particular one. just using examples from the arudino IDE
@plush bough Check out the guide for this example, specifically this step
The button ON text should be set to 1 and the button OFF text should be set to 0
ah was just going to ask that
We're doing this because it's simpler to check against an integer in Arduino/CPP, than it would be to check against a string value like on or off
thanks the esp8266 is now changing but light not going on/off. but i guess i have to troubleshoot that. i was using internal led for 15
oh. I guess the esp8266 doesnt like to use the internal led for this. I put a LED on another pin and it works. Well its opposite of what i needs to be but I should be able to fix that. But least its reacting to whats on feed now. Thanks again.
another thing that is confusing about these esp8266 is that even with two plugged in my computer will only have one on COM5. Should I be able to get a second on COM6 or such?
@plush bough are you using a Feather HUZZAH ESP8266?
its a NodeMCU one
@plush bough Could you link me the product page?
I'm not sure what the issue with the COM ports is since I don't test/work with the NodeMCUs - the Huzzah ESP8266 enumerates correctly.
Hey, is there a way to use multiple inputs with triggers. For example, say I have a temperature sensor that is feeding data. If that temperature sensor reads above 80 degrees or so, I want a fan to come on. That trigger works, but it also sends the ON signal every time the temperature updates. Is there a way to set that up as a trigger to only activate if the fan switch is off and the temperature reads above 80?
You've almost solved your own problem already. Basically, when you turn the fan on, set a variable like "fan_on" too. Then your check can then use both of them like ```python
if temperature > 80 and not fan_on:
yeah, I can do that locally on the device, but was hoping there was a way to use the triggers remotely on the IO site to take care of the comparison.
that way the sensor just has to be a sensor, and the fan just has to be a fan without having any real "brains"
Ah, I had missed what you were looking for.
I mean, it works now. Updating the fan with the trigger so that it stays in the ON state works fine.
It's just that all the trigger activations bug me. lol I know, it's silly.
I'm the same way, I don't want the code doing unnecessary things (in some instances it can cause problems, so I got in the habit of coding around it).
@gloomy axle as of now, no. You can only do one trigger per feed. I'll pass it along to the rest of the IO team for discussion
You can, however, use a trigger to set a feed value. And then you can check against that feed in code
Triggers are a tricky part of IO and we're open to suggestions to make them better 😄
Thanks @royal rapids I was thinking to have a feed on the "ON/OFF" switch for the fan, that could watch the temp and switch on if it was off. I guess sort of like a logic gate (AND, OR, XOR, etc).
It would probably be pretty complex to do, but could be super useful. Users could make the sensors/real world devices pretty generic and then use the IO interface for control.
@gloomy axle IO is currently more of a data service, hence why it doesn't do unit conversions or other helpers.
We've implemented a localtime helper recently, for example. Hopefully this'll spawn more ideas regarding what we can do with the service to offload some of the processing on a microcontroller
That makes sense. I probably just need to rethink my approach like @eternal cliff suggested.
Do you have an example of a good use case for triggers?
@gloomy axle Most people use of triggers to send emails or set feed values
i.e: if an IO project in the wild has its battery drop to critical levels, it could send an email to allow a tech. to fix it
or
If the temperature in test chamber exceeds a certain value, you can set a feed which controls a fan to 1 to turn it on
So, ok, I was on the right track then. The second was what I was doing for the most part. Is it normal for the trigger to reactivate every time the temp sensor sends an out of range temp? I was hoping to activate it just once if the fan was off.
@gloomy axle the trigger should activate every time the trigger is...triggered
i.e: every time the temperature is over 80F
until the temperature goes underneath that condition
i found out that one of the cables i was using was for power only. Thats why I was only seeing one esp8266 as a com port at a time. Now that ive confirmed two data cables they do show up as COM5, COM6. Sometimes I just like to make live hard on myself
does the adafruit io service go down much if I used this to control my home lights? like sorry u can not see now....lul
@plush bough Not often, at all, you can also set a feed notification to email you if a device is not sending data to the service
Welcome to Adafruit's home for real-time and historical data on system performance.
oh cool.
ive gotten my first version working!! I can press a button attached to one and it toggles the LED on the second device.
A few years ago I bought a Arduino UNO and a WIFI card that I think were 40 bucks total at the time. How things come down in price..
It is amazing what you can buy affordably these days.
I'm attempting to use Adafruit IO with a HiLetgo ESP8266 NodeMCU board and I keep getting compile errors. Can I use this library in the first place? If I can, can anyone recommend a tutorial?
@viral nacelle Check out the "Adafruit IO Basics" tutorials here: https://learn.adafruit.com/series/adafruit-io-basics
(I accidentally tab @'d circuitpythonistas, sorry!)
👋
Thanks @royal rapids - this certainly helps, though it looks like I'll need a HUZZAH
Is HTTP 422 documented anywhere in the v2 api spec? I seem to be hitting a maximum message length in my MQTT feed, but I want to know what that maximum length is (and why it exists)
By poking and prodding, I've figured out that adafruit-io wont let me send more than 1024 chars in a single message via either MQTT or REST api calls. I don't see why I can't send more than this. Or at the very least, let it be a limit I can increase with a paid subscription 😉
"NOTE: when feed history is on, data value size is limited to 1KB, when feed history is turned off data value size is limited to 100KB." https://io.adafruit.com/api/docs/#operation/allData
Looks like an adafruit.io limitation
oh, so feed history is the big deal here
I'm literally using this as a hosted message queue, so i'm 100% OK with turning off feed history
voila, fixed the problem.
++good Adafruit.io coders for showing that limit on the web UI
hello, im working on a project for school and im trying to change the range of an accelerometer (LSM9DS1)) using the accel_range function however i do not know the syntax. pls help
im trying to use "ACCELRANGE_16G"
posted twice cause im not sure where to put this exactly
@raven remnant You might find better advice in the #help-with-projects channel
Hello, I am getting an error trying to add data to the feed via API
@round gorge Hi - what error are you getting?
{
"error": "request failed - failed to save data to feed trigger. undefined method `>' for nil:NilClass"
}
@round gorge That's a bug within our throttling code. We're aware of it and will be patching it this week along alongside a feature
No problem, saw your thread and reported it to the IO Web team.
but it means you've already been throttled,
so no data is lost (because we were going to ignore it anyways
@round gorge you may be sending data too quickly to IO
I have IO+ and the only thing i am sending is form Postman...
also related to that forum post, feed webhooks don't need X-AIO-Key
they're unauthenticated
and that is less than 5/min
@round gorge Rolled out the fix, try it again?
New error
{
"error": "request failed - Throttle error. trigger webhook data rate limit reached, 60 seconds until reset"
}
Yep, that's the proper error. Feed webhooks have optional rate limits, independent of the account limit
You might want to try deleting the webhook and recreating it, we don't have an update/bump feature for this.
Our group is attempting to set up and use a 64x32 LED Matrix with the 5mm pitch (https://www.adafruit.com/product/2277). We are running it through an Arduino Uno, and have it wired up in accordance with the online instructions (https://learn.adafruit.com/32x16-32x32-rgb-led-matrix/). Unfortunately, we are unable to get any sign of life from the matrix itself.
We believe that this is because we are underpowering it. We are currently only supplying it with 3 amps to test, and are unable to supply any more at the moment until we acquire a higher rated power supply.
Should there still be a signal at these power levels?
Thank you, Lucas
@brazen veldt This is a channel for io.adafruit.com. For general product help, please repost that in #help-with-projects
My apologies
@brazen veldt No problem - good luck with your project!
@round gorge Still hitting the rate limit?
Great!
A wild OSH Park order has appeared (not my design).
Oops, I intended that for a different channel.
Hi there! I'm a nubby and am looking for help with my arduino trying to change feeds in AdafruitIO with my ethernet shield using MQTT. Any help available?
@outer skiff What board are you using?
I'm using an Arduino UNO with Arduino Ethernet Shield. With the Adafruit_MQTT library I am able to connect with the AdafruitIO server but, I am not able to make changes to the feeds.
@outer skiff Have you tried this sketch? https://github.com/adafruit/Adafruit_MQTT_Library/blob/master/examples/mqtt_ethernet/mqtt_ethernet.ino
Yes, I used that sketch as my base. It allows me to connect with the AdafruitIO server. The photocell.publish object will not compile, so I used the command "mqtt.publish(FEED_PATH, n);" . It gets a TRUE response, but no change in the feed.
@outer skiff Could you file an issue on https://github.com/adafruit/Adafruit_MQTT_Library/issues?
Also - are you sure that it connects to Adafruit IO? Did you check your monitor page to see if it shows the client?
It should show up under Connections if it connects with MQTT
I'm curious if it actually connects, or if it's displaying that it's publishing but not really connected...
Yes, I checked the monitor and it shows that I connect every time. From the Adafruit documentation, I believe that library is for the Ethernet Feather boards. I am using an Arduino UNO with Arduino Ethernet Shield.
@outer skiff Can you link me to the shield you're using?
This is the shield I'm using: https://www.arduino.cc/en/Main/ArduinoEthernetShieldV1
@outer skiff Could you file an issue on the library's github page so I can look at it in depth later this week?
I'll be using an ethernet wing but the issue might be reproducible with it...
@outer skiff Ok, I just hooked up an ethernet featherwing with the MQTT lib
The ethernet library seems to be compatible with v1 of the shield, as it uses a W1500 chip
OK! Posted the issue on github.
@keen dirge Do you have an ethernet wing?
No - sorry.
Ah, np!
Hello all I am having trouble assigning a value to a variable thats coming in from IO
This command prints it in the console Serial.println(data->value());
but I cannot figure out how to format it to assign it to a var
@round gorge , may be the below example can be usefull:
https://github.com/adafruit/Adafruit_IO_Arduino/blob/master/examples/adafruitio_21_feed_read/adafruitio_21_feed_read.ino
You may need to convert to a specific type
->value() returns a const char*to a string representing value
There are a few other members to get the value as int (->toInt()), float, unsigned int, ...
@steel panther Thanks!!!
is there a reference library where I could look these up ?
Sorry what do you mean ? Looking for the doc ?
https://adafruit-io-arduino.readthedocs.io/en/latest/
There no API description indeed (or can't find it)
otherwise, read the code 😉 https://github.com/adafruit/Adafruit_IO_Arduino/tree/master/src