š Hi all, Jonathan from Golioth (https://golioth.io,) and IoT platform that already works great with Adafruit boards. Any ESP32/ESP-IDF users out there? We just made it easier to add a couple of cloud functions without having to become an AWS or Azure expert. We're also going to continue building out training for ESP-IDF https://blog.golioth.io/announcing-the-golioth-esp-idf-sdk/.
#iot
1 messages Ā· Page 1 of 1 (latest)
Anyone did RPi Pico and Adafruit Fona in C++?
Attempting to connect cellular radio to Pico through UART. Anyone done this that can point me in A good direction?
Hey, do you know great low-power mcu+ gsm/gps modules that work in europe and can be woken up with movement/accelerometer, sms, call or data?
Suitable for battery-powered setups.
@carmine trail I saw you did some work on the The BLE friend firmware. After reading around some, is it correct that it is uploaded to the device presuming the device has the nrf supplied bootloader?
If you don't the question š
Probably counts at IOT. Just automated my iPhone to send battery level to adafruit.io automatically when plugged in. Completely native using iOS shortcuts. Works like a champ. Which also means I could send events if a HomeKit bulb is flipped on as an example. If any interest I can post clean screenshots of the shortcuts involved.
interested!!
Cool. Iāll post it later tonight. Pretty simple once youāve seen it. I have my iPhone and iPad posting battery level each time I plug them in.
First I made one shortcut to send whatever payload. Just put in your token. It will expect the webhook url be in payload which will be shown in second shortcut
Yeah I have extra fields io we hook will ignore. But i have them there in case I wanted to use a raw endpoint
Put appropriate feed url in webhook dictionary spot for what youāre sending to.
I am wanting to assemble some IoT monitoring devices to sit around the house. I am trying to run the following sensors: BH1750 (I2C), AHT20 (I2C), AM312 PIR, KY-037 Sound Sensor, 4x Reed Switches to monitor doors. Therefore, I need 8 pins - 2 for SCL/SDA, 6 digital inputs (4x with pullups).
I am planning to use Home Assistant with ESPHome
I was hoping to use NodeMCU v3 but I don't think there are enough pins without giving me a headache.
Can someone recommend another board that will give me enough pins - preferably without breaking the bank (as I need 4 of them and the NodeMCUs I can get for £3)
Presumably an ESP-WROOM-32D or the ESP-WROOM-32 (the 38pin version) would work?
Solved it by adding a PCF8574 - I2C so not using any pins and gives me 8 extra pins š
Anyone using AT Commands over a cellular module? Trying to find a resource to help handle At cmd errors.
might help to post the code and the erroneous AT reply
Does anyone use the ESP-IDF? I have a brand new esp32s2 Feather (w/ bme280) and I consistently get errors when flashing (OSError: [Errno 71] Protocol error) with idf.py. I've tried everything I can think but was hoping someone might have an idea before ruling out faulty hardware.
have you tried using esptool?
actually let me step back
are you compiling the bme280 example in the idf?
or are you trying to put circuitpython/arduino onto the feather?
Good point! I'm on Linux and using the manual install process (https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/linux-macos-setup.html.) it fetches esptool and idf.py.
I'm not even touching the sensor - just trying to flash a hello world.
I've checked permissions, OS packages, IDF and those tools, USB cable...
Did you put the feather into download mode?
Press and hold boot, then press reset and release boot after that
I did. The flashing process wouldn't start otherwise
Gotcha. Very interesting
Is it possible that the Feather needs to have specific pin held high or low? Besides the BOOT one?
No, being on download mode should be enough.
I suspect there might be something else going on. Unfortunately I donāt have a Linus box to validate against.
Are you able to load circuitpython onto the feather at all?
https://circuitpython.org/board/adafruit_feather_esp32s2/ pull the .bin file from here.
1 out of every 10 times š If it randomly lets me wipe it and randomly let's me flash the "reset" image with the uf2-enabled bootloader.
Okay, try erasing first and then programming if you arenāt already
There is a weird issue Iāve seen where if you donāt erase the chip before loading new firmware, it has issues.
It's very weird. I've erased it several times now.
Are you using the tip of their main branch? Or are you on like 4.4?
It might be worth trying to switch to one of the release branches
anything running that could interfere with the serial port? (cura or whichever)
Naw, only the one device connected and I've tried several re-boots
Hello! Anyone tried the PicoW? If so, how is the WiFi range and signal strength?
Been pretty solid just walking around my apartment.. Not tested further than about 10-12'
Just received a bunch today. Will have to test soon.
Ok that's not bad
Is there an easy way to load access point and password as a secret key or something so it's not distributed as part of the code?
there's some kind of interoperability issue with pico Ws and my wifi :(. Drops after a couple seconds, after having managed to tx/rx some NTP or ICMP or whatever
I think the pico-examples repo has examples of using cmake defines for them. So like
cmake .. -DWIFI_SSID=my_ssid -DWIFI_PASSWORD=my_password
Worked pretty well for me
(other than the aforementioned issue haha, but it did initially connect!)
Can the FONA 3G make calls and send data at the same time?
<@&617066238840930324>
I don't know. Give it a try?
I don't have one... and its $70 so I want to know whether it will work before I take the plunge
Realistically, 3G is obsolete in an increasing chunk of the world, so it might not work for you anyway
I'm in UK and we still have 3G and 2G for a while
Anyway the project has changed so I don't need call and data simultaneously, thank you anyways
2G is not for long in this country, but strangely will be supported longer than 3G as mentioned in this doc it will be switched off After networks have decommisioned 3g. Even 3G already has a switch off date on some networks (vodafone 2023) https://www.ofcom.org.uk/phones-telecoms-and-internet/advice-for-consumers/advice/3g-switch-off
!!!
To be fair... my project started in 2020.
Oh wait
my bad
thought this was in a different discord I'm in with some friends where we talk about radio stuff lmao
but yeah you might get a better answer in #help-with-radio if you haven't already asked there
sorry for the confusion
Are there any smart thermostats that have a local API? As in I don't have to go to the cloud to talk to it.
I have a Honeywell T6 Pro Z-wave that works locally with my Hubitat hub. Since it's Z-wave, ipso facto it has to be local. If you want a REST API to talk to it, getting a Hubitat would be one possible way of doing it. HA could probably do it as well.
Cool thanks I will have to check out Hubitat, it looks like it might do what I am looking for.
To Adafruit moderators, are there plans to have CP boards compatible with Matter, the new IoT standard?.
Ohhh that would be sweet
it's IP-based and would probably need changes in the core, and SDK changes (espressif has a Matter SDK, but it's separate from the esp-idf that we use afaict; I couldn't find anything for raspberrypi Pico W)
those wifi devices should be fine hardware-wise though
less likely to see it on Airlift or Ethernet, I suspect
From what I understand, the airlift modules would have to be programmed to use Matter and an API/Library would need to be made to use it with Circuitpython
Youād probably still send data to/from the airlift over SPI.
that would probably be easier to implement than conjoining Matter protocol to the existing NINA firmware, but might mean no co-existence of Matter and the present TCP/UDP protocols
on espressif, for example, I'd want Matter and all of the existing IP functionality, which comes naturally when adding Matter to the core with a helper Python library
It would probably be easier to use matter and TCP/UDP together on an Espressif airlift than the new NRF7002
right, but either Matter has to get shoehorned into the existing NINA, or the Matter firmware needs to support the full range of protocols (essentially re-implementing NINA)
NINA is currently based on espressif's Arduino core (a mash-up of Arduino and esp-idf)
looks like Matter sits on top of esp-idf though https://docs.espressif.com/projects/esp-matter/en/main/esp32/introduction.html, so the core espressif support should be straight-forward
Yeah, Iām optimistic that we could get beta Matter support on CP9
A natural follow on from Matter support in CP would be a Thread featherwing.
I think its a bit early because commercial Matter products aren't really out though
I saw an article about diy matter devices and can't find it now
Most Matter deployments Iāve seen right now are in cars
Shouldn't have to wait for commercial products to become available in order to figure out how to get the functionality out of programmable devices.
This is the link I was looking for: https://staceyoniot.com/can-you-use-a-diy-matter-product-yes-but/
I think given the context that most people using Adafruit products, there wouldnāt be any concern except if Adafruit sells products with matter installed. It might be workable in the future. I think for now just an api to use devices that support matter would be sufficient
Sort of in the airlift manner
Since using zephyr with circuitpython is in limbo which would make it difficult to deploy natively in circuitpython.
This video showed how to DIY a Matter device using ESP32-S3-DevKitC-1 N8R8
(tho for purposes of this mini-lighting project, any ESP32 would work provided you wired up an external LED)
https://www.youtube.com/watch?v=i2doZomr9V0
ESP32 can also be based on Matter platform. It means we can try to make Matter accessories with our ESP32.
I made a Smart Lamp with ESP32-S3 DEVKit for the first time. It works with Apple's HomeKit and can be accessed from anywhere to change the color and brightness of the lamp.
*Timestamps
0:00 - ESP32 Smart Lamp
0:58 - Hardware Preparation
2...
Cross posting from #help-with-wippersnapper-and-adafruitio
Hi everyone - finally got around to playing with my Adafruit Fun House and I'm interested to understand how I output the temperature AND humidity AND barometric pressure to shoot out to a Feed. I tried to mod the Temperature example (https://learn.adafruit.com/creating-funhouse-projects-with-circuitpython/temperature-logger-example)
Questions
- Can an Adafruit IO feed have multiple data points coming from the Funhouse?
- Is there an example of pushing out multiple pieces of data from the Fun House out to Adafruit IO?
The last example here: https://learn.adafruit.com/creating-funhouse-projects-with-circuitpython/code-examples#mqtt-example-3094670 publishes multiple things to adafruit IO. There is another channel, #help-with-wippersnapper-and-adafruitio , that might get more eyes on your query
Anybody know if thereās an open source SDK like rp2040 pico for the teensy 4.1?
And for stm32f7?
generally the manufacturers do have open source code for their chips. quality varies
stm32f7 is here: https://github.com/STMicroelectronics/stm32f7xx_hal_driver
I think Teensy's aim is to work with Arduino? But yeah, stm32 has a very vibrant community
for teensy you might look at the chip? NXP's imx.rt.something I think for the 4.x?
i think ST has relicensed their "open source" firmware libraries/SDKs to have restrictions that are no longer compatible with some (many?) open source licenses, probably because of the emergence of clones of their MCUs
Yeah, theyāre taking a pseudo FTDI approach
ya, I only mean "open source" as-in you can read it
many vendor hals have clauses that you can only use the code on their micros
Realtek does this
The startup I briefly worked for over the summer used a CEL module that used a Realtek WiFi/BLE module and a majority of the documentation and macros was behind NDA due to restrictions Realtek placed on the chip users
Several manufacturers are promising Matter compatibility through software update. Homepods got a firmware update not long ago to support Matter protocol.
Greetings from sunny Australia. I was hoping to add some Adafruit IoT Buttons to some projects yet they appear Out of Stock everywhere so any idea when we can expect restocking...? Take care a happy making everybody!
@royal swan itās a new product, theyāll make more, the best thing to do is sign up for back in stock notifications on the product page
Oh I was unaware it was a new product so will patiently await its return. Thanks for the reply and suggestion to sign up for notifications. š
anyone have experience hooking up feather32's to Home Assistant via the ESPHome tools? I have multiple boards (S3 from UM, Huzzah32, Feather S2) and all of them give me grief in getting the esphome environment loaded. I have tried from Mac and Linux computers, now I am going to try the Borg variant and see if I can find a work around. I keep seeing hints about holding the boot button down, but that doesn't seem to work either. TIA for any hints.
I was reading a little on github and it seems like ESP32s are problematic. Make sure you are using the latest version of PIO which it looks like some are having success with. https://github.com/esphome/issues/issues/3357
I was able to get the UM feather to take the code. It worked as expected where I held the boot button just as one would to flash a new version of circuitpython. However, doing the same for the adafruit feather would stop at the boot partition, but the esphome flashing tool would never succeed from the chrome web serial tool, it failed when hooked directly to usb cable on PI (homeassistant server) and it failed the same way from both Windows10 and MacOS. I think I may have to dig in and get down to a cli tool. The cables are known good, the issue above would be something I may encounter a few steps deeper into the process (appreciate that tip). I have had great luck with D1 minis (esp8266) and with some other brands of esp32, but I really, really wanted one with stemma connectors so I could simplify the prototyping while sorting out quick ways to focus on the HA/ESPHome automation and scripting elements, not spend so much time tripping over my shoelaces with things like a bootloader being in the way. Alas tools like WLED also reject a lot of new products as not supported yet. ah the fun of bleeding edge toys. š
My chief concern was that perhaps serial port drivers were getting in the way, and in modern linux kernels have not had to monkey with drivers like on windows and to a lesser extent on macos. I think that is less likely the issue ATM.
but my linux box refuses to let me run chrome (needed for web serial stuff) due to rolling release grief unrelated to this topic.
I found the esphome discord, so I may try some probes over in that space.
i need help with esp mesh network
Just trying to Build a simple mesh network Using three devices, 2 esp8266 and 1 esp32, they are all abe to communicate to each other but i want the esp32 to be able to send requests to servers on the internet
I am using the following code in arduino ide
#include <HTTPClient.h>
#include <WiFi.h>
#define MESH_PREFIX "Things_Mesh_Network"
#define MESH_PASSWORD "thingsmesh"
#define MESH_PORT 5555
// Replace the following with your home WiFi name and password
const char* WIFI_SSID = "Wifi_02";
const char* WIFI_PASSWORD = "wifi_optix";
Scheduler userScheduler;
painlessMesh mesh;
HTTPClient http; // Create an HTTPClient object to make HTTP requests
WiFiClient wifiClient; // Create a WiFiClient object to use for the HTTPClient object
void sendMessage();
Task taskSendMessage( TASK_SECOND * 1 , TASK_FOREVER, &sendMessage );
void sendMessage() {
Serial.println("sendMessage()");
String msg = "hello from node 3\n";
msg += mesh.getNodeId();
mesh.sendBroadcast( msg );
taskSendMessage.setInterval(1000);
}```
Serial.println("receivedCallback()");
Serial.printf("startHere: Received from %u msg=%s \n", from, msg.c_str());
// Make the GET request to Google
http.begin(wifiClient, "http://www.google.com");
int httpCode = http.GET();
String payload = http.getString();
Serial.printf("HTTP response code: %d\n", httpCode);
Serial.printf("HTTP response payload: %s\n", payload.c_str());
// Close the HTTP connection
http.end();
}
void newConnectionCallback(uint32_t nodeId) {
Serial.println("newConnectionCallback()");
Serial.printf("--> startHere: New Connection, nodeId = %u\n", nodeId);
}
void changedConnectionCallback() {
Serial.println("changedConnectionCallback()");
Serial.printf("Changed connections\n");
}
void nodeTimeAdjustedCallback(int32_t offset) {
Serial.println("nodeTimeAdjustedCallback()");
Serial.printf("Adjusted time %u. Offset = %d\n", mesh.getNodeTime(),offset);
}```
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
// Connect to your home WiFi
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
mesh.setDebugMsgTypes(ERROR | STARTUP); // set before init() so that you can see startup messages
mesh.init(MESH_PREFIX, MESH_PASSWORD, &userScheduler, MESH_PORT);
mesh.onReceive(&receivedCallback);
mesh.onNewConnection(&newConnectionCallback);
mesh.onChangedConnections(&changedConnectionCallback);
mesh.onNodeTimeAdjusted(&nodeTimeAdjustedCallback);
userScheduler.addTask(taskSendMessage);
taskSendMessage.enable();
}
void loop() {
mesh.update();
}
I get this output in serial console
HTTP response code: -1
My internet is working
Esp32 does connects to my wifi successfully before making the request
Can't figure out why is that happening, just wanted to confirm if this is even possible for esp32 to connect to a Wifi access point while being in Mesh Network?
Any Help would be very appreciated
@uneven spindle I'm not sure how ESP's mesh works, but it's unlikely that you can connect to both at the same time.
All the nodes in the ESP Mesh network can get IP connectivity and communicate both with each other and the external world. The internet access of these nodes is provided by a root node acting either as a NAT or a bridge.
The question then would be if painlessMesh supports it -- it looks like maybe not?
Thank you for the response, i wonder what does this means
well, some mesh networks might create a TCP/IP network, so everyone in the mesh gets an IP generated by some algorithm or master, and that's how they address each other and communicate
painlessMesh doesn't appear to do that; instead they are just addressed by their chipId, not an IP, and it's not a TCP layer; you just send JSON objects back and forth
oh okay, So this doesn't have anything to do with the problem i am having right?
so it's a bit of a simple & easy solution to get going quickly exchanging messages over mesh, but perhaps not suitable for bigger tasks
not directly, no!
I think the biggest problem for you is that it doesn't seem like it uses the ESP's own "ESP-WIFI-MESH" tech (from https://www.espressif.com/en/products/sdks/esp-wifi-mesh/overview) -- that would be an IP-based network, and it does allow interoperability with internet connections too
(i.e. one node would connect to the internet, and other nodes could connect to the internet routed through that one)
Right
Also it looks like that official "ESP-Wifi-Mesh" is only available for ESP IDF
aha, right.
in that case, if I were in your position, depending on what you're trying to achieve, I'd likely have one ESP that's dedicated to connecting to the internet, and then it connects directly to one of the mesh nodes (via UART/I2C/whatever), and that node is the designated 'connected to the internet' one which can service requests by funnelling them over to the wifi-connected one
yeah that would work for experimentation but not really a practical solution
so now i am trying to setup ESP-IDF on my mac
But getting this error now
even though all environment variables are set
I'm afraid this isn't really something I can assist with; good luck!
ok thanks anyways
ok found the solution, I need to run get_idf every time i restart the terminal
Amazon Sidewalk more available https://www.theverge.com/2023/3/28/23659191/amazon-sidewalk-network-coverage
The Verge
The free-to-access IoT network could help bring billions of connected devices online ā if youāre willing to share.
nRF52840 can use it (Nordic dev kit avail)
Just thinking of the nRF52840 Itsy, Sense, and Feather - CP on Sidewalk?
Would be amazing
Thoughts?
hi, anyone tried to replicate or to do smth like kinetic switches from enocean ?
Are those the ones that are operated by electricity created by pressing the switch?
Iām tempted to make a button that has a coin cell in the shaft that connects the battery to two terminals to deliver an electrical signal
I donāt see a good use for this other than it would be fun to do lol
Buttattery (tm)
Button battery? Lol
That would give excellent cell life, as it would be disconnected when not in use! Bigclive did a nice teardown of some motion powered ones (some were fake and had a hidden cell powering them, but a few actually had moving magnet generators)
basically it is just a coil and magnet with a spring. It creates uwatts enough for BLE
Am I being pedantic by saying that the CAN bus isn't "iot" if it's not actually connected to the internet? The attack is a physical attack and not over the internet, it's just a CAN bus hack.
https://www.darkreading.com/attacks-breaches/cybercriminals-can-steal-your-car-novel-iot-hack
Well, CANbus is kind of like a local intranet for the vehicle so IoT might be apt enough
Yeah, this is definitely an attack that you need physical access for- I think they're just tossing in buzzwords
But there is wired internet though
š
I mean yes, if you build a microcontroller that has the appropriate firmware to compromise the CAN network and supports Ethernet, then plug said controller into your headlight and the Internet, then sure, it's IoT
IoT is a pretty broad definition though. I still tend to think the hack as being IoT hack because of the nature of electrical systems within vehicles
Physical access or not.
So is hotwiring a car an IoT attack?
Depends on the ignition system
The 1990s serial device I have on my desk is now iot because the python script that controls it communicates over mqtt. on the internet. if the attack came from the internet, I could see it being called an iot hack. If I connect directly to the serial device, with no internet, it's just a serial hack
IoT is just a term for a network dependent system. Being wireless isnāt a guaranteed feature.
Plus many of the systems in a car can be accessed/diagnosed over the internet.
so, and air gapped lan, is attacked by physical access, is still an iot hack?
Subaru vehicles for instance collate data and send it to their MySubaru app for end users to conveniently see
Could be, the definition of IoT doesnāt preclude air gapped networks nor does it preclude computers as far as I am aware.
But itās generally applied to network dependent peripherals
Computers arenāt inherently network dependent, though you might say they are today because of how updates are administered
"Internet" kind of defines the network though
We can define internet at different levels though. Locally, regionally, globally..
Anyway
Iām just saying IoT is a loaded term
It depends heavily on context and the developer
word erosion, I'd assume it was at least an internet adjacent thing, but in a few hundred years it'll probably mean just about anything
Canbus is more often now than not connected to the dealer/manufactures network? it's not a widespread as we know the internet as but it would be iot.
IoT was most likely used because itās a āhotā term to use in a headline
But I would argue that if a device on the CAN network also has some wireless protocol on it that can be exploited, then sure i guess it can be considered an IoT attack
Hello all,
I'm one of the student of engineering.
As my final year college project I'm working on Voice based Public Announcement Board Using IoT.
I'm Stuck in this project because My IoT module NodeMCU is can't connect to
Adafruit io website via MQTT protocol , why it's can't connect to adafruit website that I don't know.
In below I'm give you my code which I'm used in my project.
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <Adafruit_MQTT.h>
#include
<Adafruit_MQTT_Client.h>
#include <DMD2.h>
#include <SPI.h>
#include <fonts/Arial14.h>
const char* ssid = "your ssid";
const char* password = "yourpass";
HTTPClient http;
const int WIDTH = 1;
SPIDMD dmd(WIDTH,1); // DMD controls the entire display
DMD_TextBox box(dmd);
void setup() {
{ // Connect to WiFi network
Serial.begin(9600);
Serial.println(F("Booting...."));
int retries = 0;
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while ((WiFi.status() != WL_CONNECTED) && (retries < 10)) {retries++;
delay(500);
Serial.println(".");
}
if (WiFi.status() == WL_CONNECTED) {
Serial.println(F("WiFiconnected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
Serial.println(F("Ready!"));
}
dmd.begin();
dmd.setBrightness(255);
dmd.selectFont(Arial14);
}
#define AIO_USERNAME "AIO_USERNAME"
#define AIO_KEY "AIO_KEY"
#define AIO_FEED "AIO_FEED"
// Replace with your IFTTT webhook key
const char* iftttKey = "ifttt key";
// Define the LED matrix pins
const int CLK_PIN = D4;
const int OE_PIN = D6;
const int A_PIN = D7;
const int B_PIN = D8;
const int CS1_PIN = D1;
const int CS2_PIN = D2;
WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, "io.adafruit.com", 1883, AIO_USERNAME, AIO_KEY);
Adafruit_MQTT_Publish feed = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/" AIO_FEED);
void loop() {
Adafruit_MQTT_Subscribe sub = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/" AIO_FEED "/json");
mqtt.subscribe(&sub);
Adafruit_MQTT_Subscribe Subscription;
while ((Subscription = mqtt.readSubscription(10000))) {
String message = (char)Subscription->lastread;
message.trim();
if (message.length() > 0) {
box.print(message.c_str());
}Serial.println("MQTTconnected");
}
if (WiFi.status() == WL_CONNECTED) {
HTTPClient http;
String url = "your ifttt url";
url += iftttKey;
http.begin(client, url);
int httpCode = http.GET();
if (httpCode > 0)
http.end();
}
}
Here I'm give you my code I don't know What needs to be changed or added here? Can you change or add to it? So my IoT module can connect to Adfruit website?
Thank you
FYI. RJS is getting assistance in another channel #help-with-projects .
@severe socket I never seem to get the iot monthly newsletter. I've signed up for everything (mailinglist-wise)after noticing I missed last months. I've now signed up just for the iot one and will see what happens. Fortunately the blog post has it all so thanks for that. (tyethgundry@googlemail.com)
Hello all,
Iām work on one IoT project and that include NodeMCU as a programming module and here I programmed this module on Arduino IDE software. My program uploads in NodeMCU but garbage value is shown in serial monitor. Which message I have pre-defined in Serial.print or Serial.println function, these garbage values are showing instead and my real data is not showing. I can't find any solution to this problem. I did a lot of research but did not find a solution that could solve the problem. I am requesting here for the solution of my problem. if anyone has a solution to this problem then please let me know how to fix it . So, that I can come out of this problem.
Thank you.
NOTE: The program that I use and the garbage value that comes in the serial monitor is in the word file that I have given above. Please open that file to see the output of the program and serial monitor.
I hope anyone can help me.
The garbage data looks like itās part of the esp8266 boot code, which for whatever reason runs at a baud rate of 74880. I think the design is intended to separate the boot loader output from the application output, but it does create an ugly mess before your code even begins its serial output.
If you look at the end of the garbage data, you do see your serial print outputs like āBootingā¦ā and āWiFi connected.ā The garbage is part of the esp8266 startup, so if you can ignore it, perhaps just add some new lines before your first println() to separate it from your own code output. Your data looks fine, youāre just hitting the watchdog reset because your MQTT is unreachable for some reasonā¦
On the ESP8266 I usually go with just setting serial output speed to 74880 so that I can easily read whatever CPU exceptions may be happening as well as my code's output.
Okay, now you can say me what can I do to solve problem?
I tried this baud rate but that's output on serial monitor like this.
Here, I set baud rate on 74880.
Yeah, the āgarbageā is now proper readable output from the boot loader. Canāt suppress it unless you use a different serial port for your application output, and Iām not immediately familiar with your alternatives.
Sorry, I probably can't really help. But is the garbage Serial output actually a part of the problem? Or is only the "can't connect to the MQTT stuff" the problem?
Ah, thatās what you meant by garbage. Yeah thereās something wrong with your MQTT credentials. Either your AIO key/user/port isnāt working right, or your device connected to Wi-Fi isnāt connected to the internet properly. Iād recommend double checking your credentials.
On that note, you probably donāt want to share your AIO key or username, or your Wi-Fi credentials, in a public server. Iād strongly recommend you reissue a new key and redact those values in future inquiries.
it is visible in the serial terminal and reviewing your code that it never connected to wifi
IP unset
Okay, but
Is IP unset relate with garbage values? Why coming a garbage values?
Garbage values āāshould not come, right?
Those have been repeatedly explained
There are no garbage values in your output. Only boot output from the esp itself that you captured at the wrong baud rate, then a memory dump when your application crashes, presumably trying to communicate with an mqtt server without a valid connection
I'm check all credentials but But WiFi connects once and then disconnects. It happens often.
Also if your WiFi password is legitimately 123456789, please change it
I have used 115200 and 74880 baud rate so far which other baud rate would be correct?
Where are you talking about invalid connection in this credential?
Here
You have an unset IP address. This means WiFi set up failed
But,
When I try to connect the NodeMCU to WiFi, it connects but disconnects within a few minutes after connecting. And this process repeats when NodeMCU tries to connect to WiFi.
Please say me, what can I do at this moment?
I will try your advice.
@idle hare can you post the code, or link to a code file? (see: #welcome message ) and also post output showing when wifi connects and when it doesn't?
Wrong RJS lol
sorry about that
@idle hare can you post the code, or link to a code file? (see: ā #welcome message ) and also post output showing when wifi connects and when it doesn't?
If you were getting started on an IoT platform today, what would you use? How would you choose differently based on household vs commercial vs industrial use?
For a household, something thatās widely available and easy to integrate is ideal, so something like an esp32 is perfect. Itās not particularly expensive, and ties into your existing network without too much extra effort.
For commercial or industrial use, wide adoption is far less critical compared to security. While the esp32 does have some features that helps in that department, itās so well known that itās not nearly as hard to target as a vulnerability compared to some of the more sophisticated security solutions other more expensive platforms offer.
Canāt say I do a lot of iot work, so thatās about the extent of my opinions based on my hobbyist experience and knowledge.
Thanks that's helpful! Do any other platforms come to mind that are more secure? Security is something I'm concerned about.
I've seen some platforms? that have cryptography chips built in, but I'm not sure what they do beyond calculate crypto algos quickly(if even that)
No names come to the top of my mind. Cryptography chips are great, but technically even the ESP32 has them, so it comes down to firmware and software implementation in most cases.
That makes sense
Do you know if the ESP32 is considered open and free? I noticed it has secure boot but is optional
Cryptography chips can be thought of as dedicated encoding/decoding hardware, something that takes the load off the main processor and hides the private key from anyone who could otherwise extract them from a firmware image dump.
Oh yeah hiding the private key is nice
Open source is usually used in the context of circuit design and software. You would be very hard-pressed to find an open-source IC designā¦
"Open and free" is a bit of a fuzzy marketing term when it comes to CPU architectures.
Technically RISC-V is an open source core, but the ESP32 family of chips are not that.
Even if some variants do use a RISC-V core, the chip itself, as all commercially available chips I know of, are not of themselves open-source.
RISC-V is an open ISA, the core implementations themselves though do not have to be open.
Ah, thanks for the correction.
A number of vendors claim their architectures are "open" without really specifying what that means. Intel for example loves to blast Apple by saying that x86 is an open architecture, but in practice that really only means that they are willing to sell you their chips if you give them enough money. Keep in mind that you would have to sign multiple NDAs in order to access the necessary documentation required to design and build an x86 platform.
Oh, @open blade when you ask regarding platforms, are you asking about hardware or software platforms? I know almost nothing about the latter š
Hardware primarily š
Yeah it doesnt make things easier. But as long as I have 100% control over the software running on the hardware I consider that to be open and free.
Well, that's definitely not true on x86.
Or most other platforms capable of running a full OS.
It's achievable...but hard. Intel is especially bad about forcing you to run software you have zero insight into (like Intel Management Engine).
It's far more achievable on RISC
But the Librem 14 uses a core i7 so idk š
I know. I used to work on firmware at Intel.
Ohh very cool!!
Lol why so?
It's... a long list. I don't really want to get into it here. Suffice it to say my experience at Intel was not a good one.
Gotcha. Do you still develop firmware for products?
Nope, I'm much happier as an EE at analog devices (doing device characterization).
what stops me from just taking the ISA docs and some real binaries, writing a custom cpu in verilog, and printing it out?
like, i can just disassemble a binary:
$ objdump -d /run/current-system/sw/bin/ls
0000000000408000 <_init>:
408000: f3 0f 1e fa endbr64
408004: 48 83 ec 08 sub $0x8,%rsp
408008: 48 8b 05 b9 df 12 00 mov 0x12dfb9(%rip),%rax # 535fc8 <__gmon_start__@Base>
40800f: 48 85 c0 test %rax,%rax
408012: 74 02 je 408016 <_init+0x16>
408014: ff d0 callq *%rax
408016: 48 83 c4 08 add $0x8,%rsp
40801a: c3 retq
then lookup what endbr64 does, and make it do the right thing
then sub is easy to predict, just rsp = rsp - 8
and just keep on going....
until an OS can boot
Then you're implementing your own architecture. Also good luck running it at 5GHz.
but its x86 compatible, so isnt it just another implementation of x86?
and yeah, getting it to 5ghz is the real challenge, the same one every cpu vendor spends decades trying to solve
RISC makes such implementations simpler
but, is there any legal trouble, with creating a clone of x86 like that?
or any other ISA
I'm sure you'd get sued for patent infringement for some parts.
I need to get several reed switches hooked up in a way that is 'converted' to i2c. Does such a board already exist?
@wintry current a reed switch closes a connection, so you can use it to toggle the value of a GPIO. To convert GPIO to I2C, there are a number of boards available. For example: MCP23008, PCF857x (light internal pull-up), AW9523 (requires external pulls), or Seesaw https://www.adafruit.com/search?q=seesaw
That's exactly what i'm looking for! Thanks!
Hey if anyone is interested in learning some IoT basics, I'm running an office hours / intro to iot tomorrow (sep 27) 1 pm eastern š
https://us06web.zoom.us/webinar/register/WN__1jKOo6KTnmkO1uzhLiKnw
Using an RP2040 to Cellular modem over UART I normally can send and receive messages. After an episode of occassional byte dropping on GET/READ AT Commands, I tried using Xflow with CTS and RTS connected and supplied. We also tried increasing the buffer size from the default 64 to 512. Things are much better but not 100%. Any advice to further reduce or eliminate byte dropping wuld be helpful.
other levers: adding a parity bit, adding a second stop bit, checking for sources of interference, reducing baud rate if performance requirements allow
if RAM allows, increase buffer size more
depends on what you think likely causes are for dropping bytes
hi guys, recently i made custom esp32s3 board based on s3fn8, everthing work just fine except the wifi. I can scan WiFi around me and get decent rssi (around -37). But i cant connect to the network using adafruit wifi test arduino sketch from https://learn.adafruit.com/adafruit-esp32-s3-feather/wifi-test. I
uploaded the same program to premade esp32 -s3 devboard and it work perfectly fine. Does anyone have solution?
Trying to connect my adafruit account to IFTTT and whenever I click to authorize the connection between adafruit and IFTTT, it brings me to another users IFTTT applet and fails to connect????
What is going on here?
The authorization seems to be completely broken
could you please file this issue over at io.adafruit.com/support?
Are there implementations of Matter for pi picos or zeros or CircuitPython
The only one I'm aware of is by Sparkfun: https://www.sparkfun.com/products/20270
CircuitPython doesn't support matter yet
That Sparkfun product name is really misleading. The special thing about it is that it has a Thread radio, not that it supports Matter - lots of CPUs run Matter. The reference implementation of Matter also runs on virtually any ESP32, including any Sparkfun or Adafruit ESP32 board. Their choice of names just adds to the general confusion many people have about Thread and Matter.
good to know
The reference implementation of Matter includes Linux support, so it should be possible to run it on a Pi Zero W under Raspberry Pi OS. I'm a little surprised that no one has ported it to the Pico W yet, though it's possible that either a Pico port would be too memory-constrained or that the Pico may not be able to do crypto fast enough to make it work well. It definitely runs well on ESP32 CPUs though.
The size and complexity of Matter may make CircuitPython support challenging as CircuitPython also adds a lot of overhead and between it and Matter even ESP32s may feel resource-constrained. But I expect someone will take a shot at it eventually. I wouldn't expect it to be feasible before CircuitPython 9.0 is out and the ESP32 port is based on ESP-IDF 5.0 or later as the Matter SDK requires more a recent ESP-IDF version than CircuitPython 8 uses. 5.0 had some major breaking changes from the older versions.
circuitpython main (future 9.0) is using IDF 5.1 now
I'm wondering if adafruit sells a board that has a combined BLE and Wifi Module with UART Pairing/Bonding support?
right now: the best BLE is on the nRF52840 boards... you can add an Airlift board to that (uses ESP32 as a wifi co-processor over SPI)
possible futures (not guaranteed): development of BLE on Pico [W], further development of BLE on espressif boards
What are the current problems with BLE on ESP?
ESP32-S3 (Which is what I'm currently using) does not have Pair/Bonding nor access to UART through circutpython lol
And they're still in development for full support
There's also Airlift (ESP32 as SPI co-processor) as a partial BLE implementation:
On most other boards with adequate firmware space, BLE is available for use with AirLift or other NINA-FW-based co-processors. Some boards have this coprocessor on board, such as the PyPortal. Currently, this implementation only supports acting as a BLE peripheral. Scanning and connecting as a central are not yet implemented. Bonding and pairing are not supported.
I have made an ESP32-S3 + LTE-M, NB-IoT and GNSS module (called Walter), it's now on Crowd Supply (https://www.crowdsupply.com/dptechnics/walter). It's very cool that one of our beta testers is the Toit.io language and they have just released a tutorial featuring Walter https://docs.toit.io/tutorials/network/cellular I hope you like my project
Hi y'all! I just installed Home Assistant and am hoping to connect my QT PY ESP32 S3 with a AHT20 sensor. My question is... If I flash ESPHome to the QT PY, will I still be able to use Circuit Python or will I be forced to use another language? Thanks y'all!
You only run one thing at a time on an ESP32. If you flash it using ESPHome, that overwrites CircuitPython. You can reinstall CircuitPython any time you want, but that will overwrite what you flashed with ESPHome. You're not going to run ESPHome firmware on it and then program it in any other language and still have the ESPHome firmware.
Thanks @wind olive! So, any support here for home assistant and QT PY or is it time for a rabbit hole? š
https://learn.adafruit.com/temperature-and-humidity-sensing-in-home-assistant-with-circuitpython. this guide shows you haw to send temp/humidity data to Home assistant via MQTT. I have set up several of these with QTPY esp32s2 and various sensors.
Thank you so very much!! š
i "rolled my own" MQTT light device using Kotlin and a Raspberry Pi Zero -- HomeAssistant makes it pretty easy to use as long as you do the discover process correctly and as needed
I wish there was mqtt/OTA upgrade example with arduino code...
Hello again... Ok, setting up my QT PY ESP32 S3 with the required code (https://learn.adafruit.com/temperature-and-humidity-sensing-in-home-assistant-with-circuitpython/code-the-sensor).
I created a "secrets.py" file with my info (using the default IP and PORT address on the page. Is this file supposed to be another name? Because I get the following error:
Traceback (most recent call last):
File "code.py", line 31, in <module>
TypeError: object with buffer protocol required
Thanks for any help! āŗļø
@lyric dune are the os.getenv() parametrs in a settings.toml file?
or perhaps missing quotes somewhere
(the settings.toml/os.getenv() approach is now favored over secrets.py)
hi i have a question. I have to create a measuring instrument for a study. Now I have a metro m4 airlift that is used to send the data from a few distance sensors to my PC. Only now I also have to connect a giro, but no cable is allowed to run from the boat to the metro. so I thought I still have an ESP32 dev kit lying around so I can send the data wirelessly to the metro. now I know that ESP has a data protocol ESP-NOW. but can I also use this on that metro board?
it's impolite to spam/crosspost the same question in multiple channels -- if the question is not necessarily appropriate for the given channel, you will likely get directed to one that can help better
No you cannot. The Airlift doesn't support ESP-NOW.
then I'll look for something else. thank you
Thanks for responding but I don't see those files anywhere...
Would those be in the Home Assistant files directories?
@lyric dune You can create a file called settings.toml at that root level, and put the credentials from the learn guide in that file (instead of in secrets.py). Anything that's accessed by os.getenv("SOMETHING") in your code needs a corresponding entry in the settings.toml file.
Sorry to bother but this is getting quite frustrating... So, now I'm getting the following error:
Traceback (most recent call last):
File "code.py", line 31, in <module>
TypeError: object with buffer protocol required
Lines 31 & 32:
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD"))
print("Connected to %s!" % os.getenv("CIRCUITPY_WIFI_SSID"))
I have the following in the os.getenv file and the settings.toml file
MQTT_BROKER = "192.168.1.1"
MQTT_PORT = 1883
MQTT_USERNAME = "My Network"
MQTT_PASSWORD = "My Password"
Also added the following into the settings.toml and os.getenv
CIRCUITPY_WIFI_SSID = "My Network"
CIRCUITPY_WIFI_PASSWORD = "My Password"
you could split line 31, store the ssid and password into variable and print them before passing them to connect
that way you can verify that getenv is working
I'll try that... Thanks @pine furnace !
I'm a terrible coder... Is this what you mean?
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"))
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_PASSWORD"))
print("Connected to %s!" % os.getenv("CIRCUITPY_WIFI_SSID"))
š
Yeah, thatās basically how the settings.toml file works
We terrible coders have to hold together
I made that change and still gives the same error. I've looked in the Home Assistant devices and it's not showing up. I have MQTT add-ons installed, so I'm thinking it maybe wants the Home Assistant u/p and not my WiFi credentials... but I really don't know.
Well, it's not the u/p ...
So now the error code is different...
Traceback (most recent call last):
File "code.py", line 31, in <module>
ConnectionError: Unknown failure 15
To me, this is a step forward.
Hmm, can you suggest the Code maybe?
calling wifi.radio.connect() twice is just going to try to connect without a password twice
try outputting the SSID and password before you call connect to confirm that they're correct
wifi.radio.connect() wants your wifi credentials
Well, I changed that line to the following:
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID")), (os.getenv("CIRCUITPY_WIFI_PASSWORD"))
It now connects to my network, bu now, I get the following error:
Traceback (most recent call last):
File "code.py", line 49, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 560, in connect
MMQTTException: Repeated connect failures
Line 49
mqtt_client.connect()
I'm guessing it's something in Home Assistant at this point.
It depends on where you're running your MQTT broker, but most likely the broker isn't bound to a network interface and is only accessible from the computer (or container) it's running on.
You can test this by installing an MQTT client app on a phone or tablet and trying to connect to the broker using the same credentials as you're using in your CircuitPython program
Hmmm... Well, I followed the Learning Guide to the T. What I don't understand is that the block of code that is put in the config.yaml file is the only thing supposedly required for the Home Assistant side:
sensor:
- name: "Temperature"
state_topic: "state/temp-sensor"
unit_of_measurement: '°C'
value_template: "{{ value_json.temperature }}"
- name: "Humidity"
state_topic: "state/temp-sensor"
unit_of_measurement: '%'
value_template: "{{ value_json.humidity }}"```
I set the MQTT username/password to both my Home Assistant username/password and to "none"
Also, I tried installing the MQTT Integration but it won't connect either. I'm rather flummoxed.
And FYI, line code 31 on the Adafruit Learn Guide is incorrect. It states the following:
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD"))
The line that works is:
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID")), (os.getenv("CIRCUITPY_WIFI_PASSWORD"))
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID")), (os.getenv("CIRCUITPY_WIFI_PASSWORD")) May work for you since you are not using a Password, but it is a bit strange. It will only send the SSID, the Password is only retrieved , but not used. You could replace it with simply:
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"))
Thanks @hot seal !
I don't have any more issues connecting to the WiFi... But I still can't connect to the MQTT - even following the Learning Guide.
I could try using the alternative going through AdafruitIO (I have an account), but the whole point of Home Assistant is to keep everything local.
Hmmm... I have some working examples ...somewhere...I'll see if I can dig them out. It may be a few hours -- I have some priority errands to run.
in Home assistant, I have sensor: - name: "ender5pro_temperature" unique_id: "ender5pro_temerature" device_class: "temperature" state_topic: "state/temp-sensor" unit_of_measurement: '°C' value_template: "{{ value_json.ender5pro_temperature }}" - name: "ender5pro_humidity" state_topic: "state/temp-sensor" unit_of_measurement: '%' value_template: "{{ value_json.ender5pro_humidity }}" so that looks like yours
Can you post your CircuitPython code? I am using a password on my Wifi -- not sure if that makes a difference
and on My Home Assistant
This is example that I am using. I t uses the older "secrets.py" for some of the settings. It may need some updates for current version of CP and the libraries. I'll try to update it whan I get back.
Thanks @hot seal!
This is the Circuit Python code I have...
import time
import ssl
import json
import alarm
import board
import socketpool
import wifi
import adafruit_minimqtt.adafruit_minimqtt as MQTT
import adafruit_ahtx0
PUBLISH_DELAY = 60
MQTT_TOPIC = "state/temp-sensor"
USE_DEEP_SLEEP = True
# Connect to the Sensor
#i2c = board.I2C() # uses board.SCL and board.SDA
i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
sensor = adafruit_ahtx0.AHTx0 (i2c)
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID")), (os.getenv("CIRCUITPY_WIFI_PASSWORD"))
print("Connected to %s!" % os.getenv("CIRCUITPY_WIFI_SSID"))
# Create a socket pool
pool = socketpool.SocketPool(wifi.radio)
# Set up a MiniMQTT Client
mqtt_client = MQTT.MQTT(
broker=os.getenv("MQTT_BROKER"),
port=os.getenv("MQTT_PORT"),
username=os.getenv("MQTT_USERNAME"),
password=os.getenv("MQTT_PASSWORD"),
socket_pool=pool,
ssl_context=ssl.create_default_context(),
)
print("Attempting to connect to %s" % mqtt_client.broker)
mqtt_client.connect()
while True:
temperature, relative_humidity = sht.measurements
output = {
"temperature": temperature,
"humidity": relative_humidity,
}
print("Publishing to %s" % MQTT_TOPIC)
mqtt_client.publish(MQTT_TOPIC, json.dumps(output))
if USE_DEEP_SLEEP:
mqtt_client.disconnect()
pause = alarm.time.TimeAlarm(monotonic_time=time.monotonic() + PUBLISH_DELAY)
alarm.exit_and_deep_sleep_until_alarms(pause)
else:
last_update = time.monotonic()
while time.monotonic() < last_update + PUBLISH_DELAY:
mqtt_client.loop()```
And Home Assistant...
sensor:
- name: "Temp/Humidity"
state_topic: "state/temp-sensor"
unit_of_measurement: '°F'
value_template: "{{ value_json.temperature }}"
- name: "Humidity"
state_topic: "state/temp-sensor"
unit_of_measurement: '%'
value_template: "{{ value_json.humidity }}"```
I don't see anything obvious -- What error messages do you get when you run it? What MCU and version of CirCuitPython are you using?
I'm running the QT PY ESP32 S3 with Circuit Python 8.x (latest)
Here is the error I get.
code.py output:
Connected to Ross Family!
Attempting to connect to 192.168.1.1
Traceback (most recent call last):
File "code.py", line 49, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 560, in connect
MMQTTException: Repeated connect failures
I'm also running the MQTT server in Home Assistant that gave me a username and I plugged that into the settings.toml and the os.getenv
Still no go.
I just rebooted Home Assistant to see if anything got missed on last boot.
I guess you have to look into the library.
I wonder if I upgrade to Circuit Python 9.x
Have you tried a desktop client, like MQTTX? https://mqttx.app/ It might help narrow it out down if it can connect but your code can't
Not as of yet. Just trying everything in Home Assistant for now to see if the issue lies in there. I'm merely hypothesizing that the MQTT "server" is not yet active?
I'm downloading that program now though... Thank you!
I just updated to CP 8.2.9 and updated all libraries and my code.py to use the settings.toml -- this is working:
@lyric dune Okay, the Error you are encountering is an OS Error, thats already clear.
Oh, no im talking trash
My Brain was not Braining.
No worries... still early.
In the mqttx.app, what do I put for my Client ID? I just put my username... š¤·āāļø
I think Client ID is just a random string to identify it. I wouldn't use your username. Starting the app, I see mqttx_82793ea6 in mine for example
Just a thought, you are on the same network as the Home assistant, correct? Is it hardwired to the Router?
Are you sure you have the correct IP address for the Home Assistant?
Hmmm.... Good questions. I'm using the default IP addresses stated in the Learning Guide. Let me see if the Home Assistant IP works.
Yeah, Home Assistant is restarting again. As soon as it boots, I'll look up the IP.
I changed the IP address in both the settings.toml and os.getenv to the Home Assistant IP
Still getting:
code.py output:
Connected to Ross Family!
Attempting to connect to 192.168.86.75
Traceback (most recent call last):
File "code.py", line 49, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 560, in connect
MMQTTException: Repeated connect failures
If I change the port number, the error comes about much quicker
It sounds like one of the setting is just not quite right... Check the spelling of the username/password for the Home Assistant.
I tried using the u/p of Home Assistant in those two secret files (I copy/pasted from the Password Manager) and that didn't work either... but let me check again.
Yep... still same error message.
Let me try porting CP 9.x - but it's lunch time, so it may be a while.
Thank you for all y'alls help!
IT is not the same username/password as the Home Assistant itself -- I'm trying to recall when/where they got set for mqtt
I'm off for bit as well... good luck
FYI -- I also tried 9.0 alpha.6 and it also works for me.
Ah -- I found where I set the mqtt username/password -- It was when I installed the MQTT broker. @lyric dune You may want to check that they are set as you expect (go to Settings-->Add-Ons-->mosquito broker--> then select the Configuration Tab.) It will show you the username/password
I don't have mosquito broker installed... š¤¦āāļø
Let me play.
That may help š
I hope it works...š¤ it's starting up now. To be fair, it was not mentioned in the learn guide. I assumed Home Assistant handled that in the background.
I changed the code under active from "false" to "true"
mine is still set to active: false
I think all I had to set was the username and password.
This was the guide I used -- it is a bit outdated, but generally correct https://learn.adafruit.com/set-up-home-assistant-with-a-raspberry-pi/mqtt-setup
You can now do the configuration right in the tab -- instead of editing a config file.
You may have to hit the "START" button after installing to actually start it.
So this is what it auto-configured. I changed the two files (os.getenv and settings.toml) with the change and I still get the same error.
ok... I think it's working. I plugged it into a power source instead of my computer but I received this:
If this works...
I just changed the state/temp-sensor
to
state/MBtemp-sensor
Restarting now.
Still can't figure out how to get rid of that message.... So frustrated! Sorry.
Here's the documentation they suggest to follow. https://www.home-assistant.io/docs/configuration/customizing-devices
I changed the state/temp-sensor back to default. I still get the same error in Circuit Python...
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Connected to Ross Family!
Attempting to connect to core-mosquitto
Traceback (most recent call last):
File "code.py", line 39, in <module>
File "adafruit_minimqtt/adafruit_minimqtt.py", line 560, in connect
MMQTTException: Repeated connect failures
It must have connected briefly at some point because I do have a history on that entity. Very curious.
I'm diverting and going to try ESPHome
I wonāt be able to offer any help for the next week as I am traveling. When I get back, Iāll be happy to try a new installation to see how it goes. itās been quite awhile since I did it and I donāt know what may have changed.
No worries... Thanks for your help on this and safe travels!
does assistant do OTA update of the sketch or access to raw packets, Im kinda confused how it helps mm and the difference with adafruit.io
I already have philips hue home and the home assistant support it so Id have to do supplmentary code (ie: implement polling the hue rest service) and I wonder if home assistant would be a better fit for that + iot mini-boxes with a single sensor, velcro, battery, pir sensor and small oled that send data every minute
i've been rolling my own with the MQTT integration (not using auth, so no help for above), but you can also get nice really cheap sensors for things like zigbee and zwave if you set up the appropriate stick: that may be cheaper in the long run, but not quite as much fun as doing your own thang
A bit of a side topic but my problem atm is putting them in a box / learning solidworks cloud to make box to improve my open-air "iot device" kept in perforated fridge tupperwares . My current sensor is a laser setup for knowing a door was opening, II is a water capacitance sensor that screams when water reach it and III) a SOT thermistor sensor that screams when I leave the stove on for 60 mins without the pir detecting any movement
I doubt zigbee / zwave have stuff for many of these uses, cost me about 30$ each in components (that I already have) that is what I want to integrate with home assistant and/or adafruit.io (and put them in std enclosures)
I figured it all out with ESPHome. It was way easier and the data is flowing! Thanks everyone for all your help!
looking at the first examples. they differ between https://io.adafruit.com/api/docs/#create-data and https://adafruit-io-python-client.readthedocs.io and none work for me. what would be the most simple working example to wrte data to a feed in python to io.adafruit.com ?
Here's some code I wrote that records an audio sample, uses Shazam to identify it, and then send it to Adafruit IO: https://github.com/prcutler/songmatrix/blob/main/python/record-identify.py - lines 33 and 34 is all it really took to send it
@loud belfry thanks for that unfortunatetly
from Adafruit_IO import Client
aio = Client('username', 'aio_234242342..')
data = '10'
aio.send_data('Test', data)
fails for the feed Test with
dafruit_IO.errors.RequestError: Adafruit IO request failed: 404 Not Found - not found - API documentation can be found at https://io.adafruit.com/api/docs
hmm, I'm not sure, I'm looking at the docs
Have you already created the feed in your IO Dashboard?
And have you tried a curl example from the docs just to double check it's not your Python code? https://io.adafruit.com/api/docs/#create-data
Otherwise, I'm not really sure, sorry
you may want to ask for help in #help-with-wippersnapper-and-adafruitio - crossposting is usually discouraged, but in this case I'd recommend it.
found it. in the UI I created a Feed called 'Test' but the feed url is ...test.. therefore
aio.send_data('test', data)
works fine. Thought it would be good to not allow Capital letters in the ui... @loud belfry thanks
glad you figured it out! š
The SMS connected service for AIO+ is really nice!
glad you like it!
wow
I got gifted a mailbox (https://yunhai.shop/products/taiwanese-mailbox) yesterday and I'm brainstorming things that I can do with it.
I've got a bunch of random electronic parts so I'm thinking I can do something fun with it, but would love ideas or suggestions. Right now what I'm thinking is swapping out the mail slot with an adafruit rgb matrix and swapping the window with a thermal printer that gives folks a nice message when they submit something.
I've got a bunch of loose arcade buttons and an rpi camera so I've got a lot of wiggle room to make something cool. Would love suggestions if y'all have any?
Yun Hai Taiwanese Pantry
These green and red mailboxes are icons of Taiwanese hardware store vernacular. You can find them woven through every locale, from seaside to mountain top. With age, they develop their own patinaāthe sun fades red to pink, and the rain washes green into grey. Over time, they become individuals, each with a different as
Which affordable sensor can I use to measure fluid level in a tank like generator fuel tank or elevated water tank?
Liquid level is sort of a tough one, depending on the type of liquid. Traditionally, floats have been used for that type of thing, but it is also possible to measure liquid levels capacitively IIRC.
Some types of ToF sensors could also be usable, if properly calibrated.
The manufactures claim most of the ST family of ToF sensors (VL53 prefix) family can be used for liquid measurement. e.g. https://learn.adafruit.com/adafruit-vl53l1x
And here is the different ranges / single SPAD vs mutliple (this image is old - from https://www.st.com/en/imaging-and-photonics-solutions/time-of-flight-sensors.html):
They have a video specifically on using the VL53L5CX (video called Liquid Level Monitoring last on page):
https://www.st.com/content/st_com/en/support/learning/video-page.html?products=FM132%2CSC1934&featuredVideosReferer=true#
I think you will need to develop a device starting with these sensors and some algorithms to get results with certain accuracy. In industry applications this is usually done with ultrasonic sensors, however, those need to have contact with the liquid, e.g., this one:
https://autosen.com/en/Process-Sensors/Level-sensors/Electronic-level-sensor-G3-4M-AF004
Usually, the measurement is done over a longer timespan, so I would consider using an industrial grade device to avoid problems with corrosion etc.
I'm trying to spin up a MQTT client on the W5500-EVP-Pico board, and it seems to work pretty well publishing chunks of simulated sensor data every second or so. However, consistently after many hours of this it seems to get into an unreliable state where it hangs while listening, will publish a bit more if I connect over the serial console, but then hang soon after I disconnect from the console. After a microcontroller.reset() it seems to recover and start publishing again for several more hours until it again gets into this 'congested' state. Any idea what might be going on? Is the circuitpython MQTT generally robust enough to operate indefinitely/days at a time or is it not surprising that I'm running into this issue?
my guess is that there's a memory "leak" where a buffer or some other memory container simply keeps accumulating
@uncut tapir There's also some possibility that the socket connection stalls. I don't see this much in wifi-land, but I have a current WIZnet app that gets restarted somewhat frequently due to watchdog timeout during Requests.
yeah, it's weird that I can get it to start going again by connecting to a serial port, but only for a little bit before it stalls again. I'm going to keep trying to see if I notice any specific pattern, and which functions it's stuck in when I ctrl-c out if the stall. In the meantime I'm going to spin up MQTT comms using an RPZero wireless to see how robust that is
unfortunately, debug logging is probably not an option šæ
if I can get consistent results I'll post where the hangup seems to be happening and maybe that will clue someone in who knows something
Hello and good day, I would like to know if AdafruitIO (Adafruit's IoT cloud service) supports STM32duino?
well, hate to jinx it but I have 2 W5500-EVB-PICO systems running MQTT publishing synthetic sensor data every second for several days now without a problem
heh, spoke too soon. got home and the system had stopped working, soft resetting gives me the error I saw previously:
File "adafruit_minimqtt/adafruit_minimqtt.py", line 419, in connect
File "adafruit_minimqtt/adafruit_minimqtt.py", line 535, in _connect
File "adafruit_minimqtt/adafruit_minimqtt.py", line 1067, in _sock_exact_recv
File "adafruit_wiznet5k/adafruit_wiznet5k_socket.py", line 276, in wrapper
File "adafruit_wiznet5k/adafruit_wiznet5k_socket.py", line 599, in recv_into
you can try to catch the exception, and skip or retry
yeah, a brute force way would be try/except and then hard reset. but I would like to understand the issue
What version of the library are you using? 599 doesn't line up to where the exception is
it's the mpy version from the latest bundle, I'm on 9.0.0-rc.0
I could pop the .py versions on and see if that helps track things down
yeah
am I possibly running into the loss of precision problem with time.monotonic?
since a hard reset fixes it?
It's specific to the call, so you shouldn't. It's more that the call is taking too long...
yeah, it does seem like it's hanging right before the timeout, which tracks with that
You could download the py file and print out time.monotonic() - last_read_time to see what it is...
Before the exception here: https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/blob/a0e956215075160635feb3fc3c23ec0e26a952fe/adafruit_wiznet5k/adafruit_wiznet5k_socket.py#L599
yeah, I got the py file
I'm just soft resetting again and again, and the exception seems to occur at different places, now it's the mqtt complaining about no data received from broker...so there's likely something else going on...maybe memory leaks
That's always frustrating when it's not the same thing...
yeah
Are you connecting once to mqtt, or just when you need to?
Also, with 9x there have been a lot of updates. I would make sure all your libraries are up to date
I checked with discotool and it said everything was up to date
and it's been running fine for a couple of days previously
monotonic-last_read seems to always print 0.125
I connect to mqtt just once
Which seems good. I might wait until it fails and see what it prints... Sometimes the timeout is too low for network hiccups...
yeah, it prints 0.125, even when it timesout, that's what I see
if self._timeout > 0 and time.monotonic() - last_read_time > self._timeout:
print(time.monotonic()-last_read_time)
raise timeout("timed out")
what's weird is that I see it print out 0.125 a bunch of times even before it timesout, which I don't quite understand
What is the value of self._timeout?
Can you change the timeout?
yeah, changing it to 0.2 seems to have fixed it for now
right now I just hardcoded it above the timeout check, not sure where it gets set normally
ah, duh, I'm setting it when I initialized it in my code, probably just directly copied it from an example.
I might recommend going to 0.5 or so, but you can totally run at 0.2 and see when/if it fails
yeah, there's still something fishy going on where it runs for days, then doesn't run anymore unless I hard reset
Unless I'm doing something time critical , I usually set pretty high timeouts
yeah, I think I lowered it because I thought I needed a lower mqtt loop timeout for more responsiveness, and the mqtt loop timeout has to be larger than the socket timeout
Yeah that's true...
I'll try a timeout of 0.3 and see how far that takes me
thanks for helping me troubleshoot
For sure!
time.monotonic() loses precision the longer it runs. i wonder if that is what is happening
Yeah, that was my first guess
But I tried replacing with monotonic ns and it didn't fix it
Also, the client and broker are on the same computer so response time should be fast
I opened an issue regarding this on github, so others can weigh in
Have you tried testing with ticks? I had that thought last night and see you put it in your Issue
not yet, I had done a hard reset so now I have to let it run a bit before I can test to see if it fixes the timeout.
How often do you send a request? Might try to reproduce
1/sec, you need to wait long enough for the precision of the monotonic value to reach the same value as your timeout
right now I've set my timeout to 12msec to try to speed up the error
but it will still take hours
probably
started timing out at 12msec after ~3h or so, bumped the timeout to 20msec to have a more robust baseline to test against, so another couple of hours of waiting
fortunately I can tweak code and soft-reset as much as I need without resetting the monotonic precision
That is handy indeed...
progress?
Attempting to connect to 192.168.1.30
Attempting to connect to MQTT broker (attempt #0)
Attempting to establish MQTT connection...
Sending CONNECT to broker...
Fixed Header: bytearray(b'\x10\x14')
Variable Header: bytearray(b'\x00\x04MQTT\x04\x02\x00<')
Receiving CONNACK packet from broker
MMQT error: No data received from broker for 10 seconds.
Reconnect timeout computed to 2.00
adding jitter 0.45 to 2.00 seconds
Attempting to connect to MQTT broker (attempt #1)
Attempting to establish MQTT connection...
Sleeping for 2.45 seconds due to connect back-off
Socket error when connecting: Socket already connected to mqtt://192.168.1.30:1883
I can still connect to my MQTT broker from another client, so not sure where it's getting stuck
it seems to be reading lots of single 0x00 bytes from the socket in the recv_into function before it gives up
while waiting for the CONNACK packet I think
is there some sort of low level socket connection to the broker that is persisting through the soft reset that is preventing the establishment of a new working connection?
I restarted my MQTT broker but that didn't help
I probably broke something because it didn't start working even after a hard reset, so I just reverted back, verified operation, and then made a get_monotonic_time function in wiz5k sockets that returns monotonic_ns if available, just like the MQTT library, we'll see how this goes
so, from the error above, what it looks like is the MQTT client isn't closing the actual network socket when it times out, so the client needs to be closed on the timeout before trying to re-initialize it
What version of MiniMQTT are you using?
should be the latest installed from circuip/discotool for 9.0.0
I think my changes somehow messed up the comms, because I got the same error even after a hard reset, which normally fixed everything. So I reverted back my changes, and just replaced monotonic with monotonic_ns in wiznet5k sockets. I had used adafruit_ticks previously
As of when? Today? MiniMQTT had a socket bug a week or so ago. May not be related, but just making sure.
Was the file already there? Install doesn't upgrade...
nah, delete then install
And you answered before I finished š
it's humming along with monotonic_ns for now, in a couple of hours it will pass the point where it timed out with the plain monotonic, so we'll see
Trying to think of the best plan. Both wiznet5k and esp32spi should work the same, but since esp32spi is frozen on some boards, I don't want to also add ticks...
I've been writing up some test code and will be trying it out on a handful of boards tomorrow
yeah, the mqtt library has a monotonic function that returns ns if available, otherwise normal
@tired coral it may be worth looking into⦠I thought the only boards that didnāt have long ints were the M0 boards, which means that anything with any kind of networking can use monotonic_ns ⦠but that could be a wrong assumption
Yeah, and regardless, if you have a board like the M0, even if you are doing networking, you'll probably have much higher timeouts regardless
A few years ago, I tried to get ESP 32 SPI to run on an M0⦠I pared it all down to fit on flash, but there wasnāt enough memory to do anything more network-wise than the built-in get time
Oh wow
Definitely the downside to Python and not being able to only put on it what you need
Ugh, ran into same issue again, and this should be using monotonic_ns in wiznet, are we looking in the wrong place?
Published to rpp/data with PID 10928
Published to rpp/data with PID 10929
Published to rpp/data with PID 10930
Published to rpp/data with PID 10931
Published to rpp/data with PID 10932
Traceback (most recent call last):
File "main.py", line 59, in <module>
File "asyncio/core.py", line 317, in run
File "asyncio/core.py", line 276, in run_until_complete
File "asyncio/core.py", line 261, in run_until_complete
File "main.py", line 54, in main
File "asyncio/funcs.py", line 162, in gather
File "asyncio/core.py", line 261, in run_until_complete
File "mqtt.py", line 67, in pub_data
File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 694, in publish
MMQTTException: No data received from broker for 10 seconds.
0;š694@/lib/adafruit_minimqtt/adafruit_ MMQTTException | 9.0.0-rc.0
Code done running.
soft resets put me back with the same error I saw earlier
longer run time with longer timeout settings seems like a monotonic precision issue, but _ns should have fixed that. There's still monotonic in the wiznet5k socket_write function, but don't think we're hitting that
in any case, I changed that over to _ns and going to run it again. see you in 3 hours
over 11k and counting, so we'll see if it makes it overnight
nope, crashed at 11603s, must have been soon after I posted
Crashed how?
same as the previous message, MQTT no data received. Changing to monotonic_ns in wiznet socket seems to have removed the timeout error I was getting at first, but maybe there's a standard monotonic still hanging out in MQTT somewhere, or some other module it's interacting with
There's a few still in the wiznet dhcp and dns modules
duplicated the results at work using same model of board: W5500-EVP-PICO, timeouts after ~3 hours if I don't fix the monotonics in the Wiznet socket, MQTT publishing errors after a bit longer if Wiznet is fixed.
If you disconnect from mqtt and reconnect, does it still error?
late to the party... 0.1 second timeout?, but if I read this right, time.monotonic() still has 4ms precision after a couple hours https://docs.circuitpython.org/en/latest/shared-bindings/time/index.html#time.monotonic, it shouldn't get to <0.1 second precision until well after the intervals above?
I've been using 0.012 second timeout to accelerate the error, 0.1s timeout would occur after ~day-ish timescales, maybe 2. 0.012s timeout I can reliably get after 3ish hours
how should I disconnect from mqtt? wouldn't a soft reset do that?
attaching minimqtt debug messages after a soft reset
Yes a soft reset would. Do you still get errors after a soft reset?
yup
same errors
they occur right away after the soft reset
sometimes the error occurs when I try to connect to the broker, sometimes I connect successfully, and the error occurs when I try to publish
if I change the MQTT socket timeout up to 0.05s, I can start to publish again here at home (it's been ~22-23 hours since the last hard reset)
I've changed all of the monotonics in the wiznet module to use _ns, so either there's a monotonic somewhere else that's messing things up, or the connection is really slowing down over time and it's not a precision issue, but a real timing issue
I'm starting to lean towards a real slow down, because if it's just a precision issue, then the timeout should only trigger when you're near a tick 'edge', and most of the time the time diff should be 0
I would start printing all the timings you can. I've also seen load intensive things mess up monotonic. If I want precision time, I use a RTC
yeah, I'm just wondering why things stop working after hours or days
I got fooled by thinking that monotonic_ns()/1000000000 maintained precision (that's what the minimqtt library does), but it doesn't. So I've switched the wiznet library and minimqtt library over to using ticks_ms, and ticks_diff from the adafruit_ticks library. We'll see how this goes!
looks great! I've got uptime of 4 days, monotonic time resolution of125ms, a timeout of 12ms, and it's working using adafruit_ticks for timeout checks, think I'll let it plug away for a while and maybe try a fix using monotonic_ns properly to avoid depending on the ticks library
Awesome. We'd want the same thing in esp32spi and with that frozen on some boards, be good not to have another dependency...
yeah, now that I understand the issue I think I can duplicate success with monotonic_ns
do we still want fallback to monotonic for boards that don't have _ns?
I would say since ticks does I would. Although not sure what boards don't and if they could use this anyways. Since it's in minimqtt, it probably makes sense...
yeah, it's not hard actually
already done
just modified their get_monotonic_time function to stay in nanosecond ints, and made a helper function to difference the nanosecond timestamps before dividing
modifying wiznet will be a little trickier, save that for tomorrow
Hi all.
I'm about to start on my home automation system and I am wondering what could be the main hub or central server. Some kind of small headless computing-device to host Home Assistant or similar.
These days the obvious choice might be a Raspberry Pi 5 with an SSD disk for storage, but I am wondering if there are other alternatives out there.
What I need should be running Linux, plenty of storage, decent amount of CPU power, ideally passive cooling and cheap.
Any ideas?
basically anything "that runs Linux" would fit the bill, to be honest -- i've run HA on everything from full desktop systems to Pi 3 -- my setup is currently running HA in Docker on an Intel Celeron system, along with an MQTT broker with CPU and memory to spare, so a Pi 5 with SSD will be quite sufficient
What mqtt broker do you use? I've started with nanomq
eclipse-mosquitto
i put my docker-compose.yaml file at https://gist.github.com/EAGrahamJr/f180421612d835e41ee5e4efc24ad73c
awesome, thanks. how long have you been using the system. Any stability/uptime issues you've noticed?
i've been using HA for over 5 years and it's one of those things that keeps getting better: the GUI is why i ditched my "roll-your own" because i suck at user interfaces
Thanks. I found a cheap used thin client PC. That should do. š
Home Assistant also has their Home Assistant Yellow model w/ Pi 4 Compute: https://www.home-assistant.io/yellow/
Thanks. I'll be going for a mini PC as it's cheaper.
I buy refurbished Dell Optiplex Micro Form factor all the time from https://www.dellrefurbished.com. Note that the prices are fictitious, there is almost always a coupon, e.g. https://mailchi.mp/dellrefurbished/jan_dell-249-e7240-laptops-465326?e=c20c51f0fa and https://www.dellrefurbished.com/coupons
I've been looking at mini/micro pcs a lot recently, this site had some recommendations as well: https://www.servethehome.com/introducing-project-tinyminimicro-home-lab-revolution/
Hi Everyone, I can't find a dedicated topic for Adafruit IO so posting here. Is it possible to assign a specific AIO key to a single device with read/write access to a specific feed? It appears that there is only a single global active key per account (aio_xxx..) even when creating a new device.
Cross-posting is usually discouraged, but I would recommend asking in #help-with-wippersnapper-and-adafruitio for Adafruit IO questions
now i feel silly, the channel name was cut off so all i saw was "help with wippersnapp.." Thanks, I'll post there.
are there any adafruit modules that need soldering and they came unsoldered? i need something to rpactice
through hole or smd?
Most feathers, featherwings and sensor breakouts all come with unsoldered headers
The featherwing doublers, triplers, and quads https://www.adafruit.com/search?q=prototyping+add-on are handy if you are using feathers and featherwings, and require many points of soldering š . It's also a bit tricky to make sure the headers are not tilting when you solder them in. You want to, say, put a Feather in the headers to hold them aligned.
One trick with alignment is to solder just one pin on say, a header. Then check the alignment. If necessary, reheat that single joint and move the header into alignment. Then when it cools, it will be aligned, and you can solder the rest of the pins.
I usually use a breadboard to align the pins for soldering
is my python paho-mqtt client supposed to be logging broker status to my console? I have a simple mqtt client that is publishing to a broker 1/sec, and it's printing out:
$SYS/broker/publish/messages/sent b'338304'
$SYS/broker/bytes/received b'5447252'
$SYS/broker/bytes/sent b'14482623'
$SYS/broker/publish/bytes/received b'2812455
continuously
but I don't see any callbacks that should do that in my code
oh, nvm, it's hiding a subscribe in the connect callback
Is IOT adafruit free?
Adafruit IO has a free and a paid tier
Thank you
Has anyone used a MuRata ABZ-093 for LoRa? Was wondering if one could load CPy on the STM32LO on this module?
The smallest ECC capable system I worked with is an HP Z240
anyone know of any API's (besides adafruit's product one) that would return a complete list of "all" IoT devices/microcontrollers? i'm working on an iOS app to help teach/introduce younger students to IoT and want a portion of it to have resources and a variety of available IoT devices
that would depend on the devices themselves -- typically IoT devices register themselves with a static "server" because it's kind of hard to scan every known protocol for any device that might be "awake" at that particular time -- that's why the Adafruit IoT is set up; i use HomeAssistant as my central control hub because the hard work of integrating All The Protocols is already done š
Not quite what iām asking about - i meant if there is a database out there with brands and types of IoT microcontrollers (ex. raspberry pi pico w, arduino uno, adafruit feather, etc.) The adafruit product API iām mentioning is this one: https://www.adafruit.com/products_api
Adafruit Industries, Unique & fun DIY electronics and kits : Products API - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D printing NeoPixels Kits & Projects Robotics & CNC Accessories Cosplay/Cost...
there's no such thing, unfortunately -- too many manufacturers and not everyone has an open API to "scrape", plus you need to define what you mean by "IoT" (controllers? microprocessors? sensors? radio? bluetooth?)
all of the above 𤣠yes thatās what i feared⦠for now iāll use adafruitās product API (which has an impressive amount of items on it)
With regards to IOT, if one has physical (not remote) access to an MCU (any microcontroller) it could be reprogrammed correct? Perhaps even program store read and reversed engineered correct?
I think the answer is "probably". Sometimes designs do things that would make it difficult, like not exposing pins that would be required for reprogramming, hiding components under various epoxies
There are products out there that essentially self-destruct if physically tampered with, like HSMs or bitcoin wallets
but those aren't IOT devices
many MCUs have "security" features to prevent reading or writing existing firmware without a full chip erase. a (closed-source) commercial device likely has those enabled. there are sometimes various ways to bypass these
yes, I finally found a few of these devices. They are High-End and create lots of manufacturing issues like bricked devices, etc. Really difficult to upgrade too. However, outside of these few MCU's with essentially security keys on an eprom to decrypt code, I think most can be reprogrammed and many expose their code even if its compiled. I'd like to speak to an expert on this subject, if I can find one...
I don't think there is one centralized database. Adafruit has a product API, Home Assistant/Tasmota/ESPHome are projects that support lots of different IoT MCUs and likely have some type of device catalog
AWS IoT and Azure IoT also have device catalogs
Again, I'm not sure if these catalogs/databases present APIs but these are the ones I can think of
Hlo guys, I am seeking solution to this problem that I am facing;
Whenever I flash the esp32 it connects to wifi perfectly, after sometime it disconnects, never to connect to wifi back again, same issue happens after few reboots. I have to reflash it everytime after few time when it's wifi stops entirely.
I have been flashing WLED onto it, Tried esp-rainmaker same issue, Tried few other codes still the same issue
It could be that your router is broadcasting both 2.4GHz and 5GHz on the same SSID. I've heard that esp32 devices can have a hard time dealing with these dual band routers and drop connection from time to time. If you are able, you might want to create two SSIDs on your router, one for 2.4GHz and the other for the faster 5GHz radio. You might also be able to find a cheap 2.4GHz wifi access point or router and set it up for your iot devices. But that's just a guess. If your wifi/router is single band 2.4GHz then there is something else happening to cause the disconnects...
Hello! Iām finding bluetooth kit for my next project but Iāve never worked on it before so Iām not sure what I need. I will need a wireless communication between the control unit and three other sub units. Can you recommend me what I should look into and what parts I should be purchasing from Adafruitās website?
Iām also looking at these two modules https://www.adafruit.com/product/2479 and https://www.adafruit.com/product/2267 Iām not sure what are the differences and which one would be better for my project
Would you like to add powerful and easy-to-use Bluetooth Low Energy to your robot, art or other electronics project? Heck yeah! With BLE now included in modern smart phones and tablets, its ...
The Bluefruit LE Friend is your new BLE BFF! This USB-to-BLE board makes it easy to get your computer talking to your BLE-enabled phone or tablet using a standard serial/UART connection.In ...
What software are you planning to use? Arduino? C? CircuitPython?
CircuitPython, but Arduino would do too
I'd probably use an ESP32-S3 with 8+ flash. That'll give you wifi and BLE. Are you going to battery power it? The devices you linked to are usually used with another micro. I'd simplify by using a microcontroller with native BLE support.
Hello community, I have been working with the IoT server service, I am trying to send GPS data and have it published in the Dashboard, but I cannot get it to be published when I sent the data In the map. Does anyone have information or how I should send the data to be published?
If you send a data value (anything) to a feed, then your can add metadata with the location information. Plotting that feed on the map widget will then use the location metadata for each data point.
See example of creating data point with appropriate metadata here: https://io.adafruit.com/api/docs/#data
I created a project with the ESP-32 and would like to display the sensor data on AWS-IOT. In order to indicate that the multiple devices are installed at various locations.
I attempted connecting several devices in different ways to AWS-IOT.
-
After creating a single object with a single certificate, I created multiple objects and linked them to the initial certificate. This allowed me to view the data from a single device at a time (the object that was previously connected to the device), but now I am having trouble viewing the data from all of the devices at once, so I tried a different approach.
-
After that, I created multiple objects with multiple sets of certificates and presented all of the device data on a single topic. I was able to view the data here, but if I had to connect 100 devices, I would need to create numerous sets of certificates, which would be laborious and challenging to keep up with. Although this solution is effective, I am searching for one that is better.
-
I recently learned about JITP, which eliminates the need for me to create multiple certificates. We just need to create a Root CA in order to address the issue of creating multiple certificates on my own, as mentioned above. I searched the internet for a solution, but I was unable to find one that would be helpful. I am therefore hoping for advice that will be helpful.
-
Kindly inform me if there is any more information that I can tell which would help.
-
I also tried the 3rd step using some tutorial which is not working for me.
ISSUE STATEMENT: Establish AWS-IOT connectivity for 100 devices.
Not an AWS person, only limited IOT playing there, but very curious what the tutorial suggested (5), got a link?
The AIO WeatherKit plus-up is fantastic. I'm using it to gather local weather data then populate AIO feeds needed to predict workshop corrosion events. It's running very reliably on an ESP32-S3 TFT Feather, experiencing > 100 hour continuous connection without any failures. Wish List: A server-side capability to feed WeatherKit local weather information directly into AIO feeds rather than retrieving and uploading from the ESP32-S3. Is that in the realm of possibility, do you think?
Definitely something being considered. We were talking about exposing such things, i.e. a weatherkit block with a dropdown for the elements of weatherkit result, via blockly actions in the future.
Excellent!
particle + Adafruit ā Here comes Adafruit: CRICKIT Robotics HAT, plus free Adafruit IO for all Tachyon backers - https://www.kickstarter.com/projects/particle-iot/tachyon-powerful-5g-single-board-computer-w-ai-accelerator/posts/4178338
"You just backed Tachyon: Powerful 5G single-board computer w/ AI accelerator" + Adafruit CRICKIT Robotics HAT
i am using DS3231 / DS1307 RTC for data logger, the problem i am facing is
RTC gets reset when voltage spike occur in the system.
how i can rectify the problem.
RTCs should have their own battery that allows them to keep the correct data through power cycles.
But why exactly are you having voltage spikes in the system? Does your microcontroller board reset?
Hi, I dont know if this is the correct place to put this but I have tried to send a few emails but they probably get lost in the enormous amount of mail that the Adafruit support team gets. Me and my team have been working on a Pycom GPy drop-in replacement that is also a serious upgrade. The result is a module called Walter that has LTE-M, NB-IoT, WiFi, BLE and GNSS and is fully certified (CE, UKCA, FCC, IC, RCM) and thus ready for use in products. Since a few days Walter is in-stock with Crowd Supply and a webshop from The Netherlands. We are now working to get Walter in stock with other major vendors such as @celest lintel. Therefore we would need to know who to contact within the Adafruit organisation to talk about this. All info about Walter is on the Crowd Supply website: https://www.crowdsupply.com/dptechnics/walter Could anyone help me with this (maybe @night mason)? Thanks in advance!
support@adafruit.com is the right email. It may take a bit since they'll need to redirect it internally
Thank you very much, I will give it a try.
there was a hint of an adafruit custom board for the Ikea VINDRIKTNING. Anything come of that exploration?
It is in the works but not top priority afaik
Hi, I created a dash board with three toggles but if I toggle one the other toggles switch off
How can I prevent this from happening?
Using the adafruit io dashboard
Normally you would have each toggle switch pointed at a different Feed. Then each one would match/sync with the individual feed value / status.
Are all three toggles pointed at the same feed? (If so they will all toggle at the same time)
Yes they are
Thanks for the heads up
Will make each toggle a unique thread
How do I efficiently subscribe to multiple feeds then
Has anyone seen a good explainer for thread, matter, zigbee, z-wave, etc? pros/cons, device support, that sort of thing?
With multiple subscribed topics if mqtt, or if http then the library will do it for you (inefficiently š ). You could also try to use an Action to act on multiple feeds (if that's the objective)
I am using an reactive action in AIO, and I am trying to pass a JSON including a portion which includes the value passed using {{value}}... I am having trouble passing the value... when I use it... it passes the literal text "{{value}}" in the JSON. Any suggestions? Thank you!
JSON: {"elements": [{"type": "icon", "content": "mario_mushroom1"},{"type": "text", "content": "{{value}}"}]}
official support for IO is handled via the IO forum, if you'd like to post there with more details: https://forums.adafruit.com/viewforum.php?f=56
Hey, Does anyone have experience with designing/ mass manufactering a new IoT product? I have a prototype but no idea how to finish the product and manufactur it
@night mason Thank you. Will do.
I posted it. https://forums.adafruit.com/viewtopic.php?t=215123
Did it get moved or deleted? The link no longer works...
Hi all, I am looking for a reliable IOT remote setup to control a microcontroller like an ESP32, arduino MKR or anything else with wifi that I can control from an IOS or Android phone. I have seen some solutions like RemoteXY, but I am not sure how reliable they are. This is for a one off customer to control equipment from anywhere. He travels the world and needs to manage his off grid home. Generators/pumps etc. I have all that covered, just looking for a solution for the remote side.
Does anyone know of a service thats reliable enough for a customer?
Hi, I need help with an issue involving multiple IP addresses on a single Raspberry Pi. Iām using MQTT and Node-RED with Docker to monitor and receive data from Adafruit sensors. I need the network connection between the Adafruit sensors and the Raspberry Pi to remain consistent, which requires using the TAMU_IoT Wi-Fi.
The Raspberry Pi connects well to TAMU_IoT, but when I check the IP address using hostname -I, I see multiple IP addresses listed. This wasnāt an issue when I was connected to TAMU_WiFi, my collegeās official Wi-Fi network. However, I need only one IP address since it must be entered into the Arduino code to establish the connection. Do you have any suggestions on how to resolve this?
are they a mix of IPv4 and IPv6 addresses?
or are they the IPs of the docker container networks
ip addr can show you the link between ip addresses and their interface, a docker container network might be named something like docker0 or br-[hex]
These are the IP addresses i am getting
Im not sure, I am getting lot of addresses including wlan0 and docker0
so it's most likely the wlan0 address if you're connecting over wifi (wlan = Wireless Local Area Network), but anything beginning 169.254 is garbage / private / no-ip assigned by dhcp.
Won't be the docker0 interface, and there is one beginning br (for bridge) that has the same private network prefix as docker of 172.xx, which it usually wont be.
eth0 will be an Ethernet port on the pi (RJ45), but it has no IP assigned so it's not that.
The wlan0 interface has both ipv4 and ipv6 addresses, but simplicity usually means try the ipv4 address, which was 10.251.249.19 in the pdfs.
It may change on reconnection or after a lease period from the DHCP server (worth checking IP changed if any issues in the future).
If you had both Ethernet/RJ45/LAN connected and Wifi connected, both interfaces would have IPs and both should allow connection through them (at their respective IP addresses).
It is due to power cutoff, I am using 5V DC Adapter connected to 230V 50Hz AC system.
This sounds like a very poorly designed (and potentially dangerous) adapter to me.
Hi,
I'm currently working on a project that involves using MQTT to communicate data from an ESP32 and an SCD30 sensor to a Raspberry Pi. I'm using the Arduino IDE to create an MQTT bridge for this communication. Initially, the setup worked perfectly, but it stopped functioning after the university changed the IP address. Despite verifying that I've entered the new IP address and trying a few other troubleshooting steps, I haven't had any success.
Below, I've included the code and the Serial Monitor output from the Arduino IDE. Any suggestions would be greatly appreciated.
Thank you.
The second mqtt node has a space between IP and port, probably the issue
Is it possible if i were to wipe clean the SD card and fix this Issue. Or allow multiple IP addresses being used for one port?
is like 35$ for a basic 3d printed box + qt py + 5V LCD screen + prox sensor as a "base IoT" too costly or you guys think I could do better ? Like the LCD is about 15$, the prox sensor about 1$, the qt py about 12$ and the filament uses is about 3$ + pareto of shipping costs
check out the m5stick maybe?
Hi. My washing machine broke down. It was about time, I've had it for 23 years. Now I'd like one that is smarter than this one (which has just a simple time delay), because I expect the energy supply to become more dynamic in the next 23 years. But..
I don't want my dirty laundry connected to some cloud. I want local comms. Any hacker friendly brands out there?
š I've been searching the Home Assistant device integration lists, and chasing 3rd party developer API docs of manufacturers. Never occurred to me to check their fora. š
I'll sell you mine if you are in Seattle area
it isn't connected at all though
I'm in EU. ))
We're looking at LG which is definitely cloud connected
I was kinda hoping on one that supported Matter. And have reason to cleanup your python code some more. š
I don't feel like I've seen any that are matter enabled
From what I read on that Home Assistant forum, all of them are cloud connected, or made hacked smart by adding a door sensor and a ZigBee power meter.
The only "smartness" I want is not to get a notification when it's done, but so I can start it when clean energy supply is high.
My old one had a simple timer which I would roughly set to 1PM, when I assumed my solar input would be highest.
We have an LG set, front loaders, with cloud connection. The only annoying thing about it is it uses an "LG ThinQ" app rather than hooking up to some more universal app you might already have, at least as far as I know. I haven't actually looked into seeing if I could add them to another app. That said, the cloud connection is handy as it will alert you when your washer or dryer has completed a cycle, will alert you if there is a problem (such as stopping due to an imbalanced load), and will tell you when things are due (washing filters out, running a tub clean cycle, etc.). You can also download other wash cycles although you can only have one in use at a time, however I have found most of the built in cycles cover most uses. As I said, notification are handy if you are are a tight schedule and are trying to, for example, quickly wash and dry something to wear or pack and you get distracted around the house where you would forget to move it from washer to dryer or don't notice is stopped on an error 20 minutes ago.
Oh one other handy thing is in the app you can turn on the setting so the washer and dryer talk to each other. So when you use the, for example, bedding cycle on the washer, when you move the bedding over to the dryer and turn it on, it will automatically pick the "bedding" setting on the dryer. A minor thing but still kind of cool.
Awesome! I think we're sold on it. Just gotta figure out how to give away our existing set that is working ok.
Oh one more feature I love, which has nothing to do with cloud connection. We bought the models with the steam feature which can be used on both the washer and dryer for certain functions like sanitizing, but the one I love is the drier has a steam setting for when you quickly need to dewrinkle something and don't have time or simply don't want to iron. It is 10 minutes and you can throw a shirt or a pair of pants in there (or both) and in ten minutes is will steam out the wrinkles so long as you pull them out right after it is done and don't let them sit and re-wrinkle. I have used it when I discover the shirt or pants I wanted to wear look like they have been crumbled into a tight ball for a week. Throw it in the dryer, go take my shower, and they are ready when I get out of the shower. Of course the app will remind you to get them out (had to bring this back around to "iot" to keep on topic).
I like our LG set - but for one annoying bug. About 30% of the time the washer won't turn on unless I unplug it for a bit then plug it back in. Often, when this happens, I have to do it a few times. LG support says they will not dispatch a repair crew for intermittent issues.
What model is it?
WT7880HWA
That is weird and sound very annoying.
Hi all, I'm honored that my IoT project Walter is picked up by Data Slayer who made a cool video about it: https://www.youtube.com/watch?v=6QUVzvhEhu4
Big Telco will hate this...
This video explores Walter, a new open-source cellular board that combines GPS, LTE-M, NB-IoT, WiFi, and Bluetooth in one ultra-low-power module built for real-world IoT deployments. I test its capabilities in live environments and sit down with its creator to unpack how it's changing the game for developers, from SI...
Adafruit IO send_group_data() from Python?
Goal: send a voltage value and a current value in a single API call
In some of the documentation (https://io.adafruit.com/api/docs/?python#create-group-data) there is some detail about group data.
There is CirCuitPython doc for send_group_data() (https://docs.circuitpython.org/projects/adafruitio/en/stable/api.html#adafruit_io.adafruit_io.IO_HTTP)
- Is this capability not available from Python?
- Is there an alternative method for a sending data to a Group or a method of performing a single 'send' of data to multiple feeds from Python?
Great question, the python library doesn't have such a thing built in yet, but it's possible to use the _post call and supply your data as a custom list with feed keys included.
This is because most of the methods use Data model for a single feed so there is no feed_key field/property.
In theory you can use the Groups endpoint to send both feeds at once, but the python library specifically doesn't support that. We could expand the models to have such support though!
Instead you could make your own list of data-model-like objects (to represent the API data for this endpoint: https://io.adafruit.com/api/docs/#create-multiple-data-records ) and pass that along with the URL to the _post call, similarly to how the library does it's data sending.
Also you will probably be better off asking such things in the #help-with-wippersnapper-and-adafruitio channel ā¤ļø
Thanks. I did try using "_post()" but from python, it doesn't like the "groups" endpoint.
I saw "groups" in the code for CircuitPython and hoped it would all work.
I am just starting to explore Adafruit IO to decide if it will help with some performance testing.
i think its groups/batch instead of just groups
I tell a lie, groups/GROUPNAME/data but it still wants the feed_key supplied with each datapoint
Yeah. I used "groups/data" and I get a 404 error. I even confirmed the root URL from my IO account.
I am going to let someone else clear this path š
I did construct the data with all the necessary stuff like the individual feed keys and values.
Okay, just confirmed with Postman that it does at least work, although I had forgotten how the data looked for posting to groups/GROUPNAME/data. It's a dictionary with a feeds collection, each item with key/value fields. Then the main object can have created_at / location too.
In theory calling _post with path arg as "groups/group1/data" and then data arg as
"feeds": [
{
"key": "feed1-in-group1",
"value": 0
},
{
"key": "feed2-in-group1",
"value": 100
}
],
"location": {
"lat": 52,
"lon": -2
}
}
This assumes the IO python client already has the IO username + key set internally (self.key)
Can you anonymize the whole URL? I was getting a 404 error which suggests the url was the issue and not the payload.
I was getting 404 when I had the groupname missing, or the group or groups feed didn't exist. Effectively my URL was https://io.adafruit.com/api/v2/tyeth/groups/test-group-plant-pirate-flag/data
Thanks. I'll try again tomorrow.
I did wonder how best to add to the python library, but having to manually set each feed key is a pain / not so obvious how best to achieve in the current system
I'm using this to do hardware endurance testing with the IO service and dashboard.
When you say "endurance"?
I have written Python libraries to drive both my DMM and the Nordic PPK2. This lets me run a battery powered device which capturing measurements and recording them over hours and days.
Ahh, yeah the PPK2 is amazeballs, did some repeated brownout testing using that and python api
I run the python on an old RPi so I can use the GPIO to fake user button presses.
I also control an OWON HDS272S and capture data from it.
oo nice. That's still on the todo list, have it auto capture some known bug on the scope
I can capture the oscilloscope data as well but I have not found an instance where that tells me much.
I want to dig into the digital signals from the PPK2 and see what I can do with that.
Yeah fair, the only one I have in mind is a clock stretching i2c bug. Apart from that just providing some CI test farm where one can also "virtually" attach components and analyser+scope (via analog matrix switches). It would be cool for tracing circuitpython issues, along with Wippersnapper (so many i2c sensors)
I had this thought about getting an LLM to pepper the codebase under test with a trace signal on the PPK2's digital inputs, effectively binary counter to give exact line numbers / references instead of having to add each trace manually around key events when desired.
Maybe the URL was also a problem as I had issues with including the groupname prefix in the feed key with batch sending. i.e. key=testgroup.feed1 fails but key=feed1 works (when sent to api/v2/tyeth/groups/testgroup/data endpoint).
@glad helm Have a quick test of this PR when you get a chance: https://github.com/adafruit/Adafruit_IO_Python/pull/162
Thanks. I will see if I have luck
I have not yet revisited the āgroupsā API but I wanted to say I am enjoying Adafruit IO.
My use case is a bit different. I am using AIO for capturing test data. My feeds and dashboard are transient. I only need them for a few days and then I will delete them. That said, the whole system is very convenient for capturing test data and visualizing it. šŖš¼
I built a test this morning. The proposed method work as I expected.
I added a comment to the PR. I was expecting the response from post to be returned (similar to what send_data() does)
Feeds graph does not match table data
This may be a bug, and if so, would someone tell me where to report it.
2 days ago, I had a glitch in my code. I fixed my code, deleted the data anomalies from my feed, and restarted my code.
The table data has valid data. There is a gap in the data (as expected).
2025/05/27 12:58:04PM 2.728
2025/05/27 09:49:52AM 2.709
However, the feed graph shows a value of 2.77 at 12:30PM
Is this the feed graph on feed pages as opposed to graphs on the dashboard pages?
This is unfortunately a known issue, related to the backend storage system and what we get charged for, basically the graphs are using heavily cached data.
You can request an individual feed be regenerated via the support / feedback option on IO pages. I can't quite remember if they self-heal eventually...
This is the graph on the feeds page. I would expect there to be some caching but I was expecting it to be accurate after 48 hours.
Also, at the time I deleted the erroneous data, the graph was correct.
ooh that's curious, what do you mean by the graph was correct but with the erroneous data? What was the value of the bad data point, and how should it look / be different now the datapoint is gone?
Steps:
- code generated some bad values which were subsequently uploaded to AIO
- stopped code
- deleted bad data from AIO (at this point, the table data and the graph agreed)
- fixed my code
- restarted my code and verified new values uploaded to AIO were correct (both table and graph agreed)
Sometime later I noticed there was a spike on my graph and it coincided with the last erroneous value I had deleted.
Now that erroneous data shows in the graph but not the table.
so at/before step 3 (deleted bad data), before that delete you say the graph and table agreed, so surely would have shown the spike? Then after delete (still step 3) the table would be updated but not the graph, or at least that's what I would expect to see
Before deleting data, the table and graph agreed and the spike was present.
Immediately after deleting data, the table and graph agreed and the spike was gone.
After my corrected code resumed, the table and graph started receiving new data. The table was correct but the graph had the spike.
.
It's as if the graph was not displaying the last value I deleted but the graph still had that value cached. Once the feed received new data, the graph appended the new data and the spike point was visible.
oh interesting, almost like the javascript graph code dropped the datapoint, then when getting the new data / whole feed data it then got the bad point back
Either way, I was expecting the graph to match the table.
If there is caching, then ...
- The graph caching should be documented
- The coaching should be refreshed eventually (also documented)
FYI: the dashboard has the same erroneous spike.
Yeah agreed, as a user it's very unclear and unexpected. Fire off an email highlighting the issue / desired resolutions, it won't be immediately fixed, but it's more ammo for the issue (about regenerating feed graphs)
(I've been told a couple of times it's not an issue very often, so hearing from users that it is an issue is useful even if it doesn't feel like it)
I don't see a way (on my AIO page) to report the issue
Send Feedback link at bottom of list in footer
submitted the feedback
much appreciated, thanks!
Perhaps some of these posts of me seeing the same sort of issues will help? https://forums.adafruit.com/viewtopic.php?t=210760 and the last post on this one about getting your graphs rebuilt https://forums.adafruit.com/viewtopic.php?t=211919
In my case it's even more insidious. I deleted data points from the table of a feed and the data points still appear in the feed graph. No dashboard.
It has happened again ⦠a deleted datapoint in a feed table still appears in the feed graph.
I deleted an erroneous negative value. I downloaded the CSV to confirm there is no negative value in the data. The feed graph still shows the erroneous value.
If I create a new dashboard with a graph of the corrected feed the dashboard graph also has the erroneous data.
It turns out there is a "generated" version of the feed data that is different from the table entries.
I received an email on my issue and the proposed resolution is for someone to go in and manually rebuild the interpretive graph data.
Given this happens on nearly every feed I create, I don't see this as a sustainable solution.
If the feed graph data has the possibility of getting out of sync with the feed table data, I suggested a button or menu option to trigger a resync. Even if the resync needs to be scheduled and handled asynchronously, the process should be under user control and not burden a support person.
Thank you for the emailed feedback, it's allowed me to raise it more easily with the team. We now have a provisional plan and it's added to the backlog (not immediate priority, ETA 2-3months).
Hello world
having an issue with the MQTT subscirbe example ardunino sketch with a basic local MQTT server. Connection is established, messages can be published from a ESP32 feather. The topic is availible from the local server and verified with mqtt explorer on a 3rd system. No subscibe updates seem to be happening (at the ESP32). what are the most likely issues i should check for?
Can you link the example, or mention the exact library name and version (and example name)
i tried it on a ep8266 and a esp32 feather... just a one topic SUB. Maybe i should be using the callback method example? p.s. this is on Arduino 1.8.13, MQTT server is version 2.0.11 running on a RPI 3, MQTT lib is 2.6.1
"fixed" on ESP32... it was the syntax of the nodered output... aka topics didn't match. Still need to test it on ESP8266.
with out MQTT explorer i would have never found this.
It's a great tool, I love it!
Hey everyone š
Iām facing an issue while trying to set up Adafruit libraries on my Raspberry Pi 4 Model B running Debian Bookworm (32-bit) (also tested with Bookworm āTrixieā 32-bit).
Iām specifically having trouble installing the Adafruit DHT11 library.
The installation either fails or throws errors during the build process, even after reinstalling dependencies and verifying my Python and pip setup.
Here are some details:
Raspberry Pi: 4 Model B
OS: Debian Bookworm (32-bit) / Trixie (32-bit)
Sensor: DHT11
Python version: python3 --version ā (you can fill this in)
Installation command used: pip3 install Adafruit_DHT
Error output: (paste the exact error message here)
Has anyone successfully installed the DHT11 library on Bookworm 32-bit?
Any guidance or steps would be really helpful š
Thanks in advance!
Umm⦠You pasted a sentence that instructed you to paste the exact error message you've observed into that particular spot, but didn't end up following those instructions yourself. š¤¦
If anyone is looking for an app that bridges mqtt and ble I have made one : http://wildq.com/mbb (available on app store and android sideload)
Cool! Does it support forwarding advertisements? That is often used by low-power sensors to transmit sensor data. Can one set up allow-lists/matching for which MACs or manufacturing ID to forward?
No it's not that granular. It only supports one topic at a time.
But I'm willing to open source if you want to add functionality to it.
Part of the Open Home Foundation, BTHome is an open standard for broadcasting sensor data and button presses over Bluetooth LE, using a free BT UUID/license sponsored by Shelly/Allterco. https://bthome.io/ - even has a circuitpython device example linked
What are the most impactful IOT/home assistant things you've done in your home?
personally, I have just run an experimental setup for a few weeks a couple of years ago. Since that I've done one test setup to see compatibility with Adafruit IO.
This week I've obtained some IKEA matter/thread devices, and have some existing 3rd party (app/api) switches etc which I use via google home (no HA), so I'm planning to setup HA again for the matter integration once my sonoff dongle-E arrives as I don't have an existing thread compatible apple/google/amazon/HA hub (zigbee/thread coordinator), and I've been keeping a close eye on the updates as their (nabuCasa/HomeAssistant/OpenHomeFoundation) voice assistant and new products and firmware releases (with matter certification) have come along. I'm also half keeping an eye on related tasmota and esphome things, both with a view to Adafruit IO compatibility and generally, so these days it's a no brainer to connect those to home assistant rather than anything else.
Hey everyone! š
I'm Kritish, a 3rd year Electrical Engineering student from India š®š³
I just wanted to say a huge thank you to the Adafruit team for featuring my open-source project '100 Days, 100 IoT Projects' in the Python on Microcontrollers Newsletter! šš
It's been incredibly motivating to be recognized by such an amazing global community. I'm currently on Day 64 of my 100-day challenge, building real-world IoT projects daily using MicroPython, ESP32, and Raspberry Pi Pico.
š GitHub: https://github.com/kritishmohapatra/100_Days_100_IoT_Projects
Thank you Adafruit for inspiring makers around the world! ā”
AIO line graph of Lat and Lon values
I am sure this is a case of "why would you want to do that?" but it appears the line graph block is fixed to only graph the feed value.
I would like to graph the changes in Lat and Lon.
Ideally, I'd like all of the feedback data to be graphable and ideally as a multi-line graph.
Full disclosure: My reason for this is to store non-positional data in the metadata fields as it is easier and uses less overall storage to treat those other fields an nothing more than just numeric data vs using multiple feeds for the related data.
For now, I have stopped using dashboards and just watch the feed data directly.
This is a huge step forward from an appliance company: https://github.com/geappliances/home-assistant-adapter/tree/main
GitHub
Contribute to geappliances/home-assistant-adapter development by creating an account on GitHub.
ah... very unclear what this is or is for
It's an adapter that hooks up to GE appliances and then uses a microcontroller to communicate with Home Assistant for data collection and control of said appliances
and they're selling it as a semi-commercial product, but open sourcing the design and firmware means that you can DIY it as well
no list of which appliances.... or what features you get for doing said connection. the other facts where clear in the name. Buy our thing it does stuff... (no)
compatibility list is here in the docs: https://github.com/geappliances/home-assistant-adapter/tree/main/doc/compatibility-list
The "what features you get" is less well documented, but if you look at the examples, you can get an idea
Thanks for sharing this, we'll slurp it up into the IOT monthly newsletter!
I built micropidash. real-time web dashboard in under 20 lines of MicroPython. No cloud, no framework.
Just shipped v2.0.0 with live sensor graphs ā tested with DHT11 on Pico 2W, temp + humidity updating in the browser over WiFi.
pip install micropidash
https://github.com/kritishmohapatra/micropidash
Would love feedback if you try it!
Channel is all about #iot
new channel, sweet
Yep!
Hello! I'm currently researching how to make a project that involves a fairly high-quality video stream via wifi (I want to look at an outdoor location, from an indoor location) and I was looking at different hardware options:
- raspberry pi + gopro (there is an api for gopro wifi, but I haven't tried it myself yet) ex. https://www.hackster.io/estefanniegg/automated-gps-controlled-photo-taker-3fc84c , see https://github.com/KonradIT/gopro-py-api/blob/master/README.md
- raspberry pi + raspberry pi camera module (seems easy to implement?) see https://projects.raspberrypi.org/en/projects/getting-started-with-picamera
- particle photon / adafruit feather ?
In the longer run, I also want to run the video through an image processing python script, to detect X number of certain objects that come into frame, and I'm not sure how that can be incorporated into the stream of data.
This will be my first IoT project, so any advice would be much appreciated. Thanks!
the disappointing part of the GoPro is that you have to use WiFi. They won't give you the stream over USB
for object detection you'll probably want a Pi4. I don't think any of the Particle or Feather boards can keep up at high resolution
a USB webcam might be worth considering. The better ones provide h264 streams natively. That makes your processing more intensive though.
@icy magnet yep, pretty much waht @glass bridge said. If you want to do image detection, you may want to pick up a nicer USB Webcam (https://en.wikipedia.org/wiki/List_of_cameras_with_onboard_video_compression) over the Raspberry Pi Camera
https://learn.adafruit.com/running-tensorflow-lite-on-the-raspberry-pi-4 though, TensorFlowLite seems OK on a Pi 4 (https://learn.adafruit.com/running-tensorflow-lite-on-the-raspberry-pi-4)
@glass bridge can I only get the stream for object detection through USB on a Pi4?
@severe socket so regardless of the camera I pick, do you think I should get a Pi4? @glass bridge
Nah, I'm sure you can use pretty much any scheme to get the video stream. The GoPros only allowing WiFi means that you can't use WiFi to connect the Pi to the internet without adding a USB WiFi dongle.
@icy magnet Sure - it's a good single-board-computer and well priced. Unless you can swing for a Jetson Nano or something similar.
Video analysis is computationally hard so you'll want as much power as you can conveniently get to throw at it.
You could always plug a Movidius Neural Compute Stick into a Pi.
I did run into some dropped USB packet issues when I was streaming from a Pi3 a couple months ago, which may weigh against the USB webcam on an older Pi. The Pi4 has a new USB controller so hopefully it doesn't suffer the same issues
If I had a Pi 4 available, I'd try it with my fancy webcam
Got it thanks!
Any thoughts on the pixycam? It doesn't look like I can get the video stream from it to run an object detection script, right? https://pixycam.com/pixy2/
@glass bridge why can't I use wifi to connect the pi to the internet if the gopros only allow wifi?
because you have to use the wifi to connect directly to the gopro
There is a way to get the video stream from the pixy2 (the software will let you monitor it on your host computer while you dial in the settings), but I don't know how it works. It can do its own object detection (colors and symbols) as well.
the pixy2 looks like it'll do some object detection for you. You can get frames from it that you can probably run through opencv for your own detection
you probably want to consider what sort of lensing you might need to get the shot you want too
Ah thank you
Do you think that the esp32 would have enough processing power to run object detection?
It can do it with ESPCAM
What do you think about using an IP webcam, and running the object detection on a remote computer? Rather than having a raspberry pi with a camera run the object detection, and stream the video and data from the object detection, onto the remote computer
Reminder that the next edition of the Adafruit IO Monthly Newsletter goes out next Friday. Sign up for our spam-free newsletter all-about-iot here: https://www.adafruitdaily.com/
Hello! Does anyone have experience using Wyze cameras?
@icy magnet I'm using the dafang camera now
I think our projects might be running on some parallels here
Just found out about this new channel!
iot means internet of toilets
Internet of Thongs is a very easy typo, and always hilarious to my perpetually 9 year old sense of humor.
@rain otter oh cool! It's interesting how similar the dafangs is to the wyze... I have two main questions right now: 1) do you have experience powering the camera outdoors, with no wires (not even PoE)? I have heard some people say that a solar-rechargeable battery works, but other people say no, 2) do you have experience getting the video stream and using it for your own scripts (maybe through RTSP or IFTTT)? Thank you so much!
@icy magnet hey mate first things first, I've noticed you pasted this question in several topics, if you could make up your mind where you would like to be replied I'll post it there
The ESP32 can't run object detection and would already be struggling hard with keeping a decent fps going
and top that off with that fact you want to run it on battery power... I think you need to look at your hardware setup and weigh out some of your nice-to-haves with needs
Anybody here actually using the ESP32 cam? I'm wondering what kind of FPS can it achieve
@valid jasper are you 9?
@woven mesa Yes and I have been for a very long time.
I am 13
I was teasing you. I turned 9 almost 50 years ago. It's cool that you're interested in IoT at 13.
Ok
.oO(Are you Herbert?)
"Spock tells Kirk that the reference to Herbert is 'somewhat uncomplimentary' and that 'Herbert was a minor official, notorious for his rigid and limited patterns of thought.'"
I reach.
Hi, Iāve been bugging the forum and adafruit.io previous about the webhooks. However my problem is receiving a cut-off json through mqtt in uart mode (circuit playground express + bluefruit le). anybody has run into this limitation issue before?
I'm not sure it would fit. Generally when I want a tiny wifi device with a low pin count, I grab an Electric Imp or the usual inexpensive 8-pin ESP8266 board.
The Electric Imp is very cute (looks just like an SD card), but a little strange to configure using a flashing screen to send data to it optically, and not as cost effective as a Trinket or ESP8266.
Seeedstudio has 'em, but they want $30 apiece (plus shipping), which seems fairly high.
I haven't tried reflashing one of those boards, but I've heard people having issues with them.
Same here. I'm pretty sure I fried one, but I never got one to work right. I did get the Electric Imp to work, but never did much with it.
the invalid head of packet problem happens when you don't select the right bootloader
I've been following this tutorial https://randomnerdtutorials.com/esp32-cam-video-streaming-face-recognition-arduino-ide/ , but when I connect my esp-32 to my Mac, the port shows up as /dev/cu.usbserial-A50285BI, instead of a COM# port. Is that fine to use?
I tried installing this: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers , but it didn't change anything. The error I get when I try to upload code is "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header" and I tried these solutions https://randomnerdtutorials.com/esp32-cam-troubleshooting-guide/ but they didn't help
The CP210x USB to UART Bridge Virtual COM Port (VCP) drivers are required for device operation as a Virtual COM Port to facilitate host communication with CP210x products. These devices can also interface to a host using the direct access driver.
Hi , I was trying publish data to adafruit.io using a MQTT android app (MQTT Dashboard), and when publish the data using the app i got error like MQTT ERROR: Adafruit1574510330844 137.97.81.167 PUBLISH Samanfarisvp/feeds/"key" rejected, resource not available or not authorized
Any help appreciated š , Thank you
@past shoal "key" should be set to an actual feed name without the quotes
Is there currently a problem with Adafruit ai time provision? My long-working PyPortal program that gets local time with pyportal.get_local_time() now keeps returning this error message: Didn't receive full response, failing out Anyone know if this is the ESP on the PyPortal acting up or a time source problem?
Hi
I recently got an esp8266...
Can I do wifi deauther kinda thing with miropython (with esp8266)...
Also send me a example
Tag me
@south salmon did you google it ? https://github.com/spacehuhn/esp8266_deauther
@mystic wadi he use Arduino not miropython
ah well, sometimes you must change languages to use the library that does what you want.
for all the Cayenne and CircuitPython users out there...
Hello People. Im looking to integrate a esp32 into a hue network. Not as a bridge, but as an emulated Light. Does anyone know a good way to pair up a esp32 with the hue bridge? I saw someone managed to flash a mesh Bee into a zigbee Light link.. But im wondring if there is any small zigbee transceivers out there, that i get get a simple pwm signal from which i Can feed into a esp32
Should be a row of 4 pads somewhere
the first board has alot of those
the dlink has 4 square gold pads
i also see 4 holes with a jp1
madbodger i have a better photo
on the far right i see 4 holes near the jmp_start button
both are dir-825 dlink
the second one someone seemed to added a usb cable
i found a dlink router that cant be upgraded because the ISP disabled the firmware update section
i tried messing with actual web interface with no luck , managed to modify the web interface to accept the firmware so it allowed me to choose the file but it wont upload it.. because of the isp disable
It's possible to get around the ISP disable but it's not for beginners.
Hello Everyone,
Working on this beautiful piece for months now. Get Ready for some positive updates in near future at crowd supply
Link: https://www.crowdsupply.com/embedinn/iotsdr
Wish me Luck
Cheers š
Looks great
Anyone have any experience with Faraday cages/shields?
I've worked with Faraday cages some.
I'm trying to kill a cell signal on a ublox R410M -- I've wrapped the thing in aluminum/ium foil (6 layers), in a metal pot, in another metal pot... and only have lost 20 or 30% signal :/ Any tips?
Wrapped like a burrito (open ends) or wrapped like a crunchwrap (completely surrounded)? Are there any wires going from outside to inside? Did you try grounding the shield?
I've got it like a crunchy burrito? heh -- very small opening on one end only, I have the power cable and a grounding wire from the board's ground plane hanging out. I've tried connecting the grounding wire to the shielding with the same results... oddly.
oh -- and cable for USB serial connected to PC
no shield:
+csq: 24,99
with shield:
+csq: 20,99
:/
My guess is that the cables are propagating signals inside. You might try winding the cables around some ferrites, but for real isolation, you might need either a USB isolator, or filtered feedthroughs.
crazy -- I'll give it a shot. Thanks for the help.
If that doesn't help, you may want to look for some copper foil (you can get stuff like copper flashing from home improvement stores)
Or build a box out of unetched printed circuit board material (I've built shield enclosures that way before)
I'm on the right track though, right? I feel like I'm missing something, but AFAIK, it's just wrap and optionally tie to ground. A real faraday box/cage/shield would be better, but time is currently my enemy...
I had an opportunity to buy a shield room at auction once. $50 for an 8x8x8 foot cube with 2-inch thick walls filled with honeycombed copper, and including fingerstock door seals and an RF tight cable feedthrough. Probably cost a fortune (over $100k) when new. Alas, I didn't have access to a truck to move it.
wow -- crazy price
All the Internet of Things ā Episode 6 ā Digi-Key IoT Studio #digkey #adafruit #iot
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 the Internet of Things.
http://www.digikey.com/alltheiot
We are excited to release Episode 6, the final episode of this series, which incorporates all the different subjects we discussed in our previous episodes and shows off an incredible resource: Digi-Key IoT Studio.
Unlike most other IoT platforms, Digi-Key IoT Studio is code-less ā all sensor interaction and storage is done automatically by the drag-and-drop IDE. You don't need to install toolchains, code editors or compile any code on your computer! Digi-Key Studio runs in your web browser, handles all aspects of developing an Internet-of-Things project, and even compiles your code remotely.
If you aren't already using it, check out this guide to get started now.
https://learn.adafruit.com/digikey-iot-studio-smart-home
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 the Internet of Things.
http://www.digikey.com/alltheiot
We are excited to release Episode 6, the final episode of this...
Is the pycom GPy compatible with feather ethernet ?
@chrome sapphire you can try bypassing your power supply wires to ground with caps... .1 uf might be enoughā@white junco can probably give you better values. use twisted pair for any connection wires with one wire going to ground on one side onlyāor use small coaxial cable. RG-174 is small and inexpensive, but may not have shielding adequate to the frequeny youāre trying to block. there are feedthrough caps made especially for bypassing power and signal lines into cabinets or enclosures that need to be rf tight. an asideāi once worked at a 50kw am station and spent most of my shift inside a faraday cage! the rf density outside the shielded room was so high that you could be burned by picking up a pair of needle-nose pliers! ā anyway, some random thoughts on what might help you.
We're looking into what occurred with the images on the IoT Monthly for Feb 2020, the blog post on the Adafruit IO Development blog includes images - https://io.adafruit.com/blog/notebook/2020/02/01/iot-monthly/
IoT ProjectsAll-in-One MQTT Home Automation Remoteserverframework built a WiFi āMQTT remoteā with an ESP8266. Pressing a button will trigger a function to se...
Does anyone here currently use IFTTT? Having a hard time navigating this website. I see a ton of squares on the screen with various projects but I'm just trying to do a simple "if this then that" scenario.
I was able to figure it out (go to your account photo then click "create").
figured something like that would be in the center of the front page.
Hey.
I got the need for a few PT100 sensors. THey will be used in quite a harsh enviroment. So I want to connect them over Wifi instead of having alot of cables running.
What products from Adafruit would you use to connect 1-2 PT100 and send that over Wifi to a raspberry Pi?
The amplifier boards + some sort of ESP or Circuitpython mini board?
Could probably add a small battery in there also to make sure that nothing nasty gets into the enclosure I plan to build for it?
Morning, I'm wondering if anyone has run into this issue before. I'm writing functions for formatting messages that are going to be published to my mqtt broker. I keep getting core panics and I've narrowed it down to an sprintf line. I'm trying to convert an integer to a char * and it's causing the panic. Removing the sprintf line and setting formattedMessage to a string like hi works without issue
is there an issue with sprintf? is this even the best way of converting (I'm not ultra versed with c)?
also tried itoa with the same result:
and just to show a string in place works fine:
and it reaches the broker and relays to clients just fine
me == perplexed š
casting panics it too š¢
well, I figured it out. I didn't realize that the pub/sub library's publish method requires const char * strings and not char * strings. I don't 100% understand the distinction, but once I made sure I was passing the correct types of string pointers and figured out how to pull those string pointers out of String objects it worked.
To explain your original panic, you were creating a pointer variable for formattedMessage, but didn't have any memory that it pointed to, so sprintf() was just writing somewhere random in memory, causing the panic.
The right way to do that would have been to declare a char array of an adequate length, and pass a pointer to that array to snprintf().
ahh! thanks for the explanation. Restating it so I make sure I understand:
char * varname creates a pointer, but without initializing it to anything the pointer doesn't actually grab memory b/c it doesn't know how much memory it's going to need, so to actually reserve memory (I know that's not right term, just trying to conceptualize it) I can char varname[xx] so that I get the character array pointer AND have specific addresses in memory reserved for the array, right?
and that pointer with the array can be used for sprintf
Exactly right! šÆ
Note that declaring a char array in a function will reserve temporary memory on the stack, just while the function is running, so if you need the data to be persistent for the length of the program, that's what malloc() is for.
awesome, thanks for that explanation š That's def a good insight to have in understanding how pointers work and are handled
cool. re: malloc, is that similar to using new to grab memory from the heap?
Yep! Under the hood, new is basically calling malloc to get the memory and then initializing the object too.
ah another good to know š
thanks! hitting these little snags and debugging them and getting explanations like this def makes me feel like I'm groking the language more
like I think about when I learned my first programming language it was always these kinds of problems and explanations that made me really get it
I appreciate the help! š
Happy to help. For what it's worth, pretty much everyone stumbles over C pointers in learning the language, so you're in good company. š
def good to know š
@trail pagoda got it all working together: https://vimeo.com/391332680
I'm really excited to have mosquitto working on my pi. I was using the mosca mqtt broker (node) and it was functional, but it had a lot of issues and the repo hasn't been touched for years. It's good to have a solid broker under my belt š
and it was so easy to setup!
Awesome!
A bit of a hack, but it is possible to use the Airlift co-processor boards as standalone Arduino ESP32 boards: https://twitter.com/anecdat/status/1228079013354262531 I liked this because it's small and relatively inexpensive, while still allowing a half dozen or so GPIO pins. A little more effort to flash though.
Using an @Adafruit Airlift Bitsy Add-On as a standalone ESP32 with serial and a few more GPIO. Modified @thingspeak @cheerlights demo:
https://t.co/CdZVI7zxKx
Onboard RGB + NeoPixel.
"connecting to https://t.co/2T2FLHvBwA
Requesting URL: /channels/1417/field/1/last.json
purp...
interesting
Hi! I am about to start working with the bluefruit LE nrf52832 microcontroller for a school project.
I was wondering, will I be able to use other bluetooth peripherals with that board? Specifically, I am considering buying one of those cheap bluetooth camera triggers. I want to use it to trigger things on the board.
Is this possible?
Or do I need to get another board and build my own buttons for working with the bluefruit?
It should be able to talk to any Bluetooth Low Energy peripheral, but not Bluetooth Classic devices. Probably the camera trigger will be BLE, so you're okay from a hardware perspective. Software library support is probably okay but may not be fully plug-and-play depending on the specific device.
I'm not afraid of some coding! Thank you. I will make sure my buttons are ble
Is there a feather board using the ublox Sara r4 for cat-m ?
Hmm, there's a Sara r4 Mikrobus board https://www.mikroe.com/lte-iot-click you might be able to use with a Click shield https://www.adafruit.com/product/4496 with a Feather
@white junco the shield is out of stock
But awesome suggestions
Got it from their website
Anyone have any working examples of using NFC with the nRF52840?
Looks like you the PIN is exposed on the feather but would love some example code for tag reading
@real iris have you tested NFC? Any recommendations?
it cannot read tags
I wrote that wrong sorry. Are there examples of reading from another NFC device (like a phone) or writing? Looking to make an easy way to pair Bluetooth using NFC
Anyone know if there are enclosures for adafruit feathers? I'm looking for ip67 rated
There is this -- but only IP66 -- also out of stock š¦ https://www.adafruit.com/product/903
or this https://www.macsboost.com/product/lightspeed-waterproof-feather-iot-project-box/ and I'll leave you to google more
@hot seal thanks I think I was using too narrow key words š
@hot seal š I just got MiniMQTT working with W5k, I think I fixed the issue with Recv while I was at it.
SOOO much faster than WiFi
https://www.seeedstudio.com/Wio-Terminal-p-4509.html CircuitPython candidate?
I'm still fairly new to Discord, so I'm not sure if I'm going about this the right way, but I'm trying to connect Discord to Node-Red so I can make my IOT connected wearables respond to Discord messages. As far as I can tell, I need to create a Discord bot to get Node-Red to receive Discord messages. However, I can only add my bot to servers where I have administrator permission. I created a test Discord server and added the bot (named BrightWearables), and it works well there, but can't see messages on other servers. Would I be allowed to add a bot that does nothing more than read messages from the Adafruit server? I thought it would be fun to create a project which responds to Discord messages, and demonstrate it on Adafruit Show and Tell, so it could respond to messages in the #live-broadcast-chat channel in real time. Any help or advice is much appreciated. Thanks! ( @frigid jasper , do you know if this is something I can do? Thank you! )
@buoyant island I can help get your bot setup if you like. @misty glen would know how to do it.
š
@pine furnace , @misty glen Thank you! I believe that all that needs to happen is that someone with authorization to add users to this server needs to click the URL I'm pasting at the end of this message, then from the web page it takes you to, select the Adafruit server from the dropdown menu and add the BrightWearables bot. Doing so authorizes the bot to read, post and react to messages, but if you're worried about the posting, I can remove that capability. I promise to use it only for good (and entertainment!)
https://discordapp.com/api/oauth2/authorize?client_id=694774522414628877&permissions=76864&scope=bot
@buoyant island done!
It worked! Thank you so much!!! Hope to see you (and demo the bot, if I can get it all pulled together in time) on Show and Tell this afternoon!
Hola
hola a todos
Might not be the spot for it, but I'm curious as to how cloud cameras work, especially Wyze. Do they use WebRTC or something you reckon, to get peer-to-peer connectivity from the smartphone app to the camera, or do they just push everything to a cloud server? In which case how do they afford to do that when they don't charge monthly fees? I was thinking for mine to use WebRTC to establish a direct connection between app and device, and rely on STUN and TURN servers for NAT traversal as needed. TURN would involve a running server so it would be used as a last resort if NAT/firewall policies prevent all inbound communication to both phone and device. I could also just setup a reverse SSH but that doesn't seem as professional.
And if device/phone are on the same LAN it'd just direct connect
@jade surge Wyze uses AWS to keep a 14-day history. Typically when a service is "free", you are paying with your data. You can have your attorney attempt to interpret their privacy policy š https://wyze.com/privacy-statement
highlights include: "We also obtain information about you from other sources." & "...Personalize your online experience and the advertisements you see when you use our Devices or Services or third-party platforms based on your preferences, interests, and browsing and purchasing behavior..."
Other than that, looks like they have SD Card or WiFi access.
Yeah I knew they used AWS to some extent, I just didn't know if ALL streams went through AWS
in which case they are paying for that bandwidth
Cheap devices and no monthly fee, of course there's a catch š
I want to make my own IoT device that has a camera as a secondary feature and have that camera accessible anywhere but not pay out the nose for it
I've already made a device and an app, now is just the video streaming bits
Unless they're using your network, in which case you're paying for the bandwidth.
Right, either they stream everything via the AWS server or they use some P2P technoloy like WebRTC and the AWS is only used when no NAT traversal can be done. I'm trying to do the latter, was just curious how the big boys did it
Nest doesn't charge for streaming either only recording, so I imagine they must do something similar or they just eat the cost of streaming, which makes more sense for them because of the high per device cost vs a company like Wyze
If anyone has experience with setting up AWS IoT + circuitpython, I'm having some trouble (see this post in #help-with-projects https://discordapp.com/channels/327254708534116352/330406777009209346/699290709575860294 )
Ooffda. Thatās a lot of steps that have to be done exactly right. I played around with it when it first came out, and the security was a pain. Looks like it still is. I kinda gave up on it. I would try looking for logs on amazon. There should be some. And you should be able to watch the MQTT messages that get sent, to see if they get there. Do you need the power and complexity of amazon, or could you use Adafruit IO. I found it much easier to work with.
@near garnet - no experience with AWS, but I've been working on getting Azure IoT Hub and IoT Central working with CircuitPython, so if you need the power/complexity of a major cloud IoT platform and can switch to Azure I can help. The libraries for it are going through a PR/testing phase now and will hopefully be available in a few days in the Adafruit CIrcuitPython Bundle.
@lucid flame What's the short pitch for Azure's IoT offering? The draw of AWS' for me is: MQTT pub/sub relationships, rules triggering on publish, and device "shadows" (states-as-seen-by-cloud) that allow devices to drop connectivity for lengthy periods of time and recover
@severe wing I got it working (and submitted doc change requests to clarify the problems I had)! Then I did something unfortunate to my ESP32 and haven't had time to fix it. :(
And unfortunately, yeah, I want publish and subscribe and rules execution, which is a bit further than AdafruitIO can get me.
Yea, you are right sounds like you needed this direction . Thatās great you got it working. Was there a āgotchaā?
The whole GUI (on AWS' end) has changed since the docs were written and there are 3 certs (AWS root CA, device pub key, device priv key) while the docs only mention two. I believe I only needed the device public and private keys, but the docs were pretty unclear. Oh, and the docs ask for a "destination" which needs to be your AWS Thing endpoint with the protocol (https://), which caused me quite a bit of grief
NOTE FOR FULL TRANSPARENCY - I work for Microsoft, and my role is to help makers, students and teachers be successful with Microsoft products, especially with IoT.
Azure has 2 offerings - IoT Hub and IoT Central and they can both work over HTTPS, MQTT and AMQP.
Azure IoT hub (https://azure.microsoft.com/services/iot-hub) is a lower-level pipeline for IoT events in both directions, so you can send messages from the device to the cloud over MQTT, send messages from the cloud to device, send requests to invoke methods on the device to tell the device to do something, and devices have a twin that can be updated by the cloud and device and synced when you connect, which is essentially the same as an AWS device shadow. You can connect IoT Hub to a host of other Azure services that react to messages to analyze data, store it, do AI, whatever. The more advanced IoT Hub SDKs allow you to even update device firmware via the cloud.
Azure IoT Central (https://azure.microsoft.com/services/iot-central) is a software-as-a-service platform that sits on top of IoT Hub, so you can define what devices can do, create dashboards and other visualizations, set up rules and connect the data to other Azure services as needed. IoT Central allows you to send telemetry from the device, sync properties between the device and the cloud, and invoke commands on the device to tell the device to do something. You can even connect no-code apps such as Azure logic apps to IoT Central to control devices (I have a busy light linked to my calendar for example)
We have official Microsoft supported device SDKs for C, .NET, Python, Java, JavaScript, iOS and Android, and I've been working to update the CircuitPython SDK from Adafruit to use MQTT and fully support IoT Hub and IoT Central. It's an 'unofficial' community SDK supported by me and a few engineers from Microsoft who build the CPython Azure IoT SDKs, not managed and controlled by Microsoft but we are looking at the interest in official CircuitPython support, and if there is enough interest we will bring it back in-house and maintain it officially.
BTW - your issue about having the protocol at the start of the AWS Things endpoint. How recent is your MiniMQTT as there was a bug introduced recently that made this necessary, even for MQTT endpoints. https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT/issues/25
It was exactly that error, actually! I believe MiniMQTT is a transitive dependency for my circuitPython setup, so I don't think it'd be easy to version bump alone.
And that's good to know - I'll definitely give Azure's IOT offering a try soon & tell you how it goes. I'm mostly on AWS out of familiarity, so am keen to try a few different providers out.
Yeah - the AWS library uses it. The changes that introduced that bug are breaking, so might break the AWS libs if you roll back to an earlier version. I've been adding https at the start of my library as a workaround till the issue is fixed - which is fun when the broker name is retrieved from another service, so I have to try to connect, and if I get an error, retry with https on the start.
IoT Central is probably the best place to start as its got a nice GUI to see the data, whereas Hub is just and endpoint for data. It's not the simplest to set up as it's designed to scale for enterprise use, but it's not too complex. It's also free for up to 2 devices with an Azure subscription, or free for 7 days without one. Hub has a free tier for up to 8,000 messages a day and for that you need an Azure subscription. Free is always good when playing with new toys!
Yeah! I expect I'll get to playing with it in the next week or so. Is it ok if I reach out to you then w/ architectural, troubleshooting questions?
Of course! Either here or email me at first dot last at Microsoft dot com.
Hello guys, I am trying to control a battery powered led strip with a cell phone, is there any easy way to do this wirelessly?
Are you wanting to use adafruit io to do it? You could...
Bluetooth might be the easiest way - something like the Bluefruit playground app. https://learn.adafruit.com/bluefruit-playground-app/overview
Or via an IoT service
@lucid flame - so if I am starting out with a simple CircuitPython project that I hope to scale (basic monitoring, and some centrally pushed status notifications) - these seem to fall into the IoT central "Tier 2" concept, however for my dev case of one device, it will be free it seems.... do I also need to create and manage an IoT Hub myself in the Azure portal?
Also, the https://learn.adafruit.com/using-microsoft-azure-iot-with-circuitpython/microsoft-azure-setup example pretty much road blocks instantly, as the command "az iot hub generate-sas-token --hub-name <azure-hub-name>" chokes :(
Is there a better / more complete example of using IoT Central with CircuitPython you can point me at?
@sullen field have a look at this post from Microsoft about using CircuitPython with Azure IoT It's from 20 April 2020
https://techcommunity.microsoft.com/t5/internet-of-things/use-circuitpython-with-iot-central/ba-p/1276986
In the bottom of this article, it says "If youāre interested in seeing more of CircuitPython or MicroPython in Azure IoT, let us know by filling out this quick form " There is a link that the bot wont' let me post, but go click and let them know yes we'd love more IoT turnkey options.
TECHCOMMUNITY.MICROSOFT.COM
As a Hackathon exploration,Ā we adaptedĀ an IoT Central Python library to create anĀ MQTT-based CircuitPython libraryĀ for Azure IoT.Ā CircuitPython,Ā AdafruitāsĀ stripped down version of Python for embedded development, is easy to use and significantly lowers the barrier of entry fo...
Do you know if i can sell product arduino based?
btw can I use for example adafruit libraries in my products?
Any recommendation about where to get CE certifications to launch an IOT product based on Raspberry pi, Arduino or both is possible in Europe?
@dim agate - we (Microsoft) have been working on updating the Adafruit IoT library to support both of our IoT offerings, Hub and Central. Currently we have an open PR to update the Adafruit Azure library based on the code that Elena (who wrote that post) and I worked on. We are trying to gauge the demand to see if we should create 'official' support in our core libraries fully published and maintained by Microsoft rather than maintained by a few enthusiasts.
@sullen field - those docs on learn.adafruit.com are a little out of date. I'm waiting to get access so I can update them all, as well as create content for using Central/Hub with CircuitPython.
IoT Hub is a raw pipe - so data in and out, messages to/from devices, request devices do things, sync a 'device twin' so a JSON document of values between the device and the hub. You can then connect the pipe to other services to do whatever.
IoT Central is a software as a service platform that sits on top of Hub, and gives dashboards to view data and a more simple way to talk to the device. Again, you can connect it to other services
The IoT cli prats were pulled out into a different tool, so if you want to set up IoT Hub using the CLI, then follow this doc: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-create-using-cli
For IoT Central, I created a nice walkthrough for a plant monitor here: https://aka.ms/agrohack
The updated library is currently sitting in my repo, and awaiting a PR into the main Adafruit one - https://github.com/jimbobbennett/Adafruit_CircuitPython_AzureIoT
Lots of samples there to connect your circuit python device to IoT Central and Hub, and use all the capabilities to send/receive data
As an Azure IoT consultant, I say "YES PLEASE" to official Azure IoT support for CP. It is a very robust set of boards, libraries, and community. Very rich set of tools to get proof of concepts and certain size production deployments going.
It doesn't support stuff like firmware updates or IoT Edge
Thanks @dim agate - did you fill in the form by any chance?
Thanks! Encourage your friends, relatives, enemies etc. to do the same. The more data we have, the more we can push to make it happen.
Great, I look forward to it. Despite having almost 10K in AWS credit available, their codebase just makes me want to shoot myself, so I am happy to go out of pocket for Azure as the basis of the kickstarter projects I am bringing out later this year. MS really needs to step up it's maker outreach though or AWS will own this space sadly.
(by outreach I mean bringing back some version of bizspark)
Thanks! Encourage your friends, relatives, enemies etc. to do the same. The more data we have, the more we can push to make it happen.
@lucid flame Encouragement sent... https://twitter.com/askpatrickw/status/1255584957667262465?s=21
If you're into #CircuitPython #MicroPython and #Azure #Iot check out tnis @Azure Blog post https://t.co/l2nDNR1ota Scroll to the bottom of the post and fill out a quick survey if you'd like to see more CP, MP, AzureIoT ! (direct link in reply)
@sullen field we are working on maker outreach! https://www.instagram.com/p/B-s6sKMDdPt/?igshid=1cevo0bvud38b. As for giving out credits, we only have free trials and free tiers of services (for example IoT Hub is free for 8,000 messages a day, IoT Central is free for up to 2 devices), and for organized events we can sometimes bring passes to give credits for 30 days or so. No idea if we have other programs in the works. But it's true that the winners can sometimes be solely because they gave out the most money to folks.
heya @lucid flame going over your PR rn