#iot

1 messages Ā· Page 1 of 1 (latest)

silent canopy
#

šŸ‘‹ 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/.

Golioth released a new open-source ESP-IDF SDK today, bringing Golioth Cloud connectivity to all Espressif projects built using ESP-IDF.

pastel citrus
#

Anyone did RPi Pico and Adafruit Fona in C++?

devout sapphire
#

Attempting to connect cellular radio to Pico through UART. Anyone done this that can point me in A good direction?

dapper carbon
#

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.

woven heart
#

@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 šŸ˜…

mighty mountain
#

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.

mighty mountain
# severe socket 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.

mighty mountain
#

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.

vestal rover
#

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)

vestal rover
#

Presumably an ESP-WROOM-32D or the ESP-WROOM-32 (the 38pin version) would work?

vestal rover
#

Solved it by adding a PCF8574 - I2C so not using any pins and gives me 8 extra pins šŸ˜„

devout sapphire
#

Anyone using AT Commands over a cellular module? Trying to find a resource to help handle At cmd errors.

wicked elbow
#

might help to post the code and the erroneous AT reply

silent canopy
#

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.

urban spruce
#

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?

silent canopy
#

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...

urban spruce
#

Press and hold boot, then press reset and release boot after that

silent canopy
#

I did. The flashing process wouldn't start otherwise

urban spruce
#

Gotcha. Very interesting

silent canopy
#

Is it possible that the Feather needs to have specific pin held high or low? Besides the BOOT one?

urban spruce
#

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?

silent canopy
urban spruce
#

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.

silent canopy
#

It's very weird. I've erased it several times now.

urban spruce
#

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

low fable
#

anything running that could interfere with the serial port? (cura or whichever)

silent canopy
devout sapphire
#

Hello! Anyone tried the PicoW? If so, how is the WiFi range and signal strength?

crisp pivot
#

Been pretty solid just walking around my apartment.. Not tested further than about 10-12'

static sapphire
static sapphire
#

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?

desert depot
#

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

desert depot
#

(other than the aforementioned issue haha, but it did initially connect!)

icy hazel
#

Can the FONA 3G make calls and send data at the same time?
<@&617066238840930324>

icy hazel
white junco
#

Realistically, 3G is obsolete in an increasing chunk of the world, so it might not work for you anyway

icy hazel
#

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

scenic meteor
# icy hazel I'm in UK and we still have 3G and 2G for a while

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

Ofcom

The 3G mobile networks are gradually being switched off over the next few years. Here’s what this means for you as a customer.

icy hazel
#

To be fair... my project started in 2020.

obtuse turtle
#

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

marble comet
#

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.

royal falcon
marble comet
ornate ivy
#

To Adafruit moderators, are there plans to have CP boards compatible with Matter, the new IoT standard?.

willow spear
#

Ohhh that would be sweet

wicked elbow
#

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

urban spruce
#

You’d probably still send data to/from the airlift over SPI.

wicked elbow
#

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

urban spruce
#

It would probably be easier to use matter and TCP/UDP together on an Espressif airlift than the new NRF7002

wicked elbow
#

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)

urban spruce
#

Yeah, I’m optimistic that we could get beta Matter support on CP9

royal falcon
#

A natural follow on from Matter support in CP would be a Thread featherwing.

pine furnace
#

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

urban spruce
void solstice
#

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.

pine furnace
urban spruce
#

Sort of in the airlift manner

#

Since using zephyr with circuitpython is in limbo which would make it difficult to deploy natively in circuitpython.

soft ravine
#

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...

ā–¶ Play video
wispy topaz
#

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

  1. Can an Adafruit IO feed have multiple data points coming from the Funhouse?
  2. Is there an example of pushing out multiple pieces of data from the Fun House out to Adafruit IO?
Adafruit Learning System

The FunHouse library makes it very easy to create connected, home automation projects with a display and plenty of inputs

dawn lynx
blissful perch
#

Anybody know if there’s an open source SDK like rp2040 pico for the teensy 4.1?

#

And for stm32f7?

pine furnace
desert depot
#

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?

median pilot
#

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

urban spruce
pine furnace
#

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

urban spruce
#

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

ornate ivy
royal swan
#

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!

wicked elbow
#

@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

royal swan
burnt raft
#

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.

coral stream
# burnt raft anyone have experience hooking up feather32's to Home Assistant via the ESPHome ...

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

GitHub

The problem Im trying to commission a new Adafruit Feather ESP32 V2. It adopts fine using a generic ESP32DEV board type but when I attempt to set the board to adafruit_feather_esp32_v2 from the pla...

burnt raft
#

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.

uneven spindle
#

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

blissful perch
#

@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?

uneven spindle
blissful perch
#

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

uneven spindle
blissful perch
#

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

blissful perch
#

(i.e. one node would connect to the internet, and other nodes could connect to the internet routed through that one)

uneven spindle
#

Also it looks like that official "ESP-Wifi-Mesh" is only available for ESP IDF

blissful perch
#

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

uneven spindle
#

so now i am trying to setup ESP-IDF on my mac

#

But getting this error now

#

even though all environment variables are set

blissful perch
#

I'm afraid this isn't really something I can assist with; good luck!

uneven spindle
#

ok thanks anyways

#

ok found the solution, I need to run get_idf every time i restart the terminal

spring otter
#

nRF52840 can use it (Nordic dev kit avail)

#

Just thinking of the nRF52840 Itsy, Sense, and Feather - CP on Sidewalk?

#

Would be amazing

#

Thoughts?

severe socket
#

that is my thought šŸ™‚

tawny grotto
#

hi, anyone tried to replicate or to do smth like kinetic switches from enocean ?

white junco
#

Are those the ones that are operated by electricity created by pressing the switch?

urban spruce
#

I don’t see a good use for this other than it would be fun to do lol

urban spruce
#

Button battery? Lol

tough gorge
#

Heh yep

#

(tm)(tm)(tm)(tm)(tm)(tm)

white junco
#

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)

tawny grotto
#

basically it is just a coil and magnet with a spring. It creates uwatts enough for BLE

celest pebble
urban spruce
tough gorge
urban spruce
#

šŸ˜›

tough gorge
#

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

urban spruce
#

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.

tough gorge
#

So is hotwiring a car an IoT attack?

urban spruce
#

Depends on the ignition system

celest pebble
#

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

urban spruce
#

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.

celest pebble
#

so, and air gapped lan, is attacked by physical access, is still an iot hack?

urban spruce
#

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

celest pebble
#

"Internet" kind of defines the network though

urban spruce
#

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

brisk marlin
#

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

midnight cove
spice palm
#

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

idle hare
#

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

silent crest
scenic meteor
#

@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)

idle hare
#

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.

meager elm
# idle hare Hello all, I’m work on one IoT project and that include NodeMCU as a programmin...

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…

wind olive
#

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.

idle hare
idle hare
meager elm
#

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.

quartz holly
#

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?

meager elm
# idle hare Okay, now you can say me what can I do to solve 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.

hidden whale
#

it is visible in the serial terminal and reviewing your code that it never connected to wifi

#

IP unset

idle hare
hidden whale
#

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

idle hare
hidden whale
#

Also if your WiFi password is legitimately 123456789, please change it

idle hare
idle hare
hidden whale
#

You have an unset IP address. This means WiFi set up failed

idle hare
#

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?

wicked elbow
#

@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?

rocky python
#

That's odd... I didn't post that!

#

I was in bed sleeping at 6am.

meager elm
#

Wrong RJS lol

wicked elbow
#

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?

open blade
#

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?

meager elm
# open blade If you were getting started on an IoT platform today, what would you use? How wo...

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.

open blade
#

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)

meager elm
#

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.

open blade
#

That makes sense

#

Do you know if the ESP32 is considered open and free? I noticed it has secure boot but is optional

meager elm
#

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.

open blade
#

Oh yeah hiding the private key is nice

meager elm
#

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…

cunning dust
meager elm
#

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.

cunning dust
meager elm
#

Ah, thanks for the correction.

cunning dust
#

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.

meager elm
#

Oh, @open blade when you ask regarding platforms, are you asking about hardware or software platforms? I know almost nothing about the latter šŸ˜‚

open blade
cunning dust
#

Well, that's definitely not true on x86.

#

Or most other platforms capable of running a full OS.

open blade
#

It's far more achievable on RISC

#

But the Librem 14 uses a core i7 so idk šŸ˜…

cunning dust
open blade
open blade
#

Lol why so?

cunning dust
#

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.

open blade
cunning dust
#

Nope, I'm much happier as an EE at analog devices (doing device characterization).

jaunty sun
#

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

cunning dust
jaunty sun
#

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

cunning dust
#

I'm sure you'd get sued for patent infringement for some parts.

wintry current
#

I need to get several reed switches hooked up in a way that is 'converted' to i2c. Does such a board already exist?

wicked elbow
#

@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

wintry current
languid ravine
devout sapphire
#

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.

wicked elbow
#

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

fresh frigate
#

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?

serene crypt
#

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

graceful gate
#

Are there implementations of Matter for pi picos or zeros or CircuitPython

pine furnace
wind olive
# loud belfry The only one I'm aware of is by Sparkfun: <https://www.sparkfun.com/products/202...

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.

GitHub

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standa...

loud belfry
#

good to know

wind olive
# graceful gate Are there implementations of Matter for pi picos or zeros or CircuitPython

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.

pine furnace
#

circuitpython main (future 9.0) is using IDF 5.1 now

stuck eagle
#

I'm wondering if adafruit sells a board that has a combined BLE and Wifi Module with UART Pairing/Bonding support?

wicked elbow
#

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

tardy seal
#

What are the current problems with BLE on ESP?

stuck eagle
#

And they're still in development for full support

wicked elbow
#

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.

dusty ermine
vale wagon
#

Has anyone here done OTA firmware updates?

#

I am looking for advice on best practices

lyric dune
#

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!

wind olive
lyric dune
#

Thanks @wind olive! So, any support here for home assistant and QT PY or is it time for a rabbit hole? šŸ˜†

hot seal
lyric dune
#

Thank you so very much!! 😊

naive obsidian
fiery saffron
#

I wish there was mqtt/OTA upgrade example with arduino code...

lyric dune
#

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! ā˜ŗļø

wicked elbow
#

@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)

ripe wedge
#

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?

naive obsidian
wind olive
ripe wedge
#

then I'll look for something else. thank you

lyric dune
wicked elbow
#

@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.

lyric dune
#

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"

pine furnace
#

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

lyric dune
#

I'll try that... Thanks @pine furnace !

lyric dune
#

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"))

😊

wintry forge
#

We terrible coders have to hold together

lyric dune
#

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.

wintry forge
#

Hmm, can you suggest the Code maybe?

wind olive
#

try outputting the SSID and password before you call connect to confirm that they're correct

#

wifi.radio.connect() wants your wifi credentials

lyric dune
#

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.

wind olive
#

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

lyric dune
#

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"))

hot seal
#

wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"))

lyric dune
#

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.

hot seal
#

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.

lyric dune
#

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 }}"```
hot seal
#

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?

lyric dune
#

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.

wintry forge
lyric dune
#

I wonder if I upgrade to Circuit Python 9.x

loud belfry
lyric dune
#

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!

hot seal
#

I just updated to CP 8.2.9 and updated all libraries and my code.py to use the settings.toml -- this is working:

wintry forge
#

@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.

lyric dune
#

No worries... still early.

#

In the mqttx.app, what do I put for my Client ID? I just put my username... šŸ¤·ā€ā™‚ļø

loud belfry
#

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

hot seal
#

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?

lyric dune
#

Hmmm.... Good questions. I'm using the default IP addresses stated in the Learning Guide. Let me see if the Home Assistant IP works.

hot seal
#

Can you ping the Home Assistant?

#

Mine got its assigned by my router.

lyric dune
#

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

hot seal
#

It sounds like one of the setting is just not quite right... Check the spelling of the username/password for the Home Assistant.

lyric dune
#

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!

hot seal
#

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

hot seal
#

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

lyric dune
#

I don't have mosquito broker installed... šŸ¤¦ā€ā™‚ļø

Let me play.

hot seal
#

That may help šŸ˜‰

lyric dune
#

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"

hot seal
#

mine is still set to active: false

#

I think all I had to set was the username and password.

#

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.

lyric dune
#

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.

lyric dune
#

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.

lyric dune
#

Still can't figure out how to get rid of that message.... So frustrated! Sorry.

lyric dune
lyric dune
#

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.

lyric dune
#

I'm diverting and going to try ESPHome

hot seal
#

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.

lyric dune
#

No worries... Thanks for your help on this and safe travels!

fiery saffron
#

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

naive obsidian
#

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

fiery saffron
#

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)

lyric dune
#

I figured it all out with ESPHome. It was way easier and the data is flowing! Thanks everyone for all your help!

austere wave
loud belfry
austere wave
#

@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

loud belfry
#

hmm, I'm not sure, I'm looking at the docs

#

Have you already created the feed in your IO Dashboard?

#

Otherwise, I'm not really sure, sorry

austere wave
#

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

loud belfry
#

glad you figured it out! šŸ™‚

hot seal
#

The SMS connected service for AIO+ is really nice!

severe socket
thick plover
#

wow

lone coyote
#

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?

pseudo cradle
#

Which affordable sensor can I use to measure fluid level in a tank like generator fuel tank or elevated water tank?

cunning dust
#

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.

scenic meteor
lethal flicker
#

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.

uncut tapir
#

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?

naive obsidian
#

my guess is that there's a memory "leak" where a buffer or some other memory container simply keeps accumulating

wicked elbow
#

@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.

uncut tapir
#

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

naive obsidian
#

unfortunately, debug logging is probably not an option 😿

uncut tapir
#

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

prisma quarry
#

Hello and good day, I would like to know if AdafruitIO (Adafruit's IoT cloud service) supports STM32duino?

uncut tapir
#

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

uncut tapir
#

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   
wicked elbow
#

you can try to catch the exception, and skip or retry

uncut tapir
#

yeah, a brute force way would be try/except and then hard reset. but I would like to understand the issue

tired coral
uncut tapir
#

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

tired coral
#

Is it a timeout error?

#

v5.0.7 (2 from current) raises that on line 599

uncut tapir
#

yeah

#

am I possibly running into the loss of precision problem with time.monotonic?

#

since a hard reset fixes it?

tired coral
#

It's specific to the call, so you shouldn't. It's more that the call is taking too long...

uncut tapir
#

yeah, it does seem like it's hanging right before the timeout, which tracks with that

tired coral
#

You could download the py file and print out time.monotonic() - last_read_time to see what it is...

uncut tapir
#

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

tired coral
#

That's always frustrating when it's not the same thing...

uncut tapir
#

yeah

tired coral
#

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

uncut tapir
#

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

tired coral
#

Which seems good. I might wait until it fails and see what it prints... Sometimes the timeout is too low for network hiccups...

uncut tapir
#

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

tired coral
#

What is the value of self._timeout?

uncut tapir
#

0.1

#

precision of time.monotonic() seems to be 0.125

tired coral
#

Can you change the timeout?

uncut tapir
#

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

uncut tapir
#

ah, duh, I'm setting it when I initialized it in my code, probably just directly copied it from an example.

tired coral
#

I might recommend going to 0.5 or so, but you can totally run at 0.2 and see when/if it fails

uncut tapir
#

yeah, there's still something fishy going on where it runs for days, then doesn't run anymore unless I hard reset

tired coral
#

Unless I'm doing something time critical , I usually set pretty high timeouts

uncut tapir
#

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

tired coral
#

Yeah that's true...

uncut tapir
#

I'll try a timeout of 0.3 and see how far that takes me

#

thanks for helping me troubleshoot

tired coral
#

For sure!

hot seal
uncut tapir
#

Yeah, that was my first guess

#

But I tried replacing with monotonic ns and it didn't fix it

uncut tapir
#

Also, the client and broker are on the same computer so response time should be fast

uncut tapir
#

I opened an issue regarding this on github, so others can weigh in

tired coral
uncut tapir
#

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.

tired coral
#

How often do you send a request? Might try to reproduce

uncut tapir
#

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

uncut tapir
#

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

tired coral
#

That is handy indeed...

uncut tapir
#

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

uncut tapir
#

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

uncut tapir
#

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

naive obsidian
#

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

tired coral
#

What version of MiniMQTT are you using?

uncut tapir
#

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

tired coral
#

As of when? Today? MiniMQTT had a socket bug a week or so ago. May not be related, but just making sure.

uncut tapir
#

yeah, today

#

and yesterday

#

when I revert, I just delete and regrab the library

tired coral
#

Was the file already there? Install doesn't upgrade...

uncut tapir
#

nah, delete then install

tired coral
#

And you answered before I finished šŸ˜‰

uncut tapir
#

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

tired coral
#

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

uncut tapir
#

yeah, the mqtt library has a monotonic function that returns ns if available, otherwise normal

wicked elbow
#

@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

tired coral
wicked elbow
#

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

tired coral
#

Oh wow

#

Definitely the downside to Python and not being able to only put on it what you need

uncut tapir
#

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

uncut tapir
#

over 11k and counting, so we'll see if it makes it overnight

uncut tapir
#

nope, crashed at 11603s, must have been soon after I posted

tired coral
#

Crashed how?

uncut tapir
#

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

uncut tapir
#

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.

tired coral
#

If you disconnect from mqtt and reconnect, does it still error?

wicked elbow
uncut tapir
#

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?

tired coral
#

Yes a soft reset would. Do you still get errors after a soft reset?

uncut tapir
#

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

tired coral
#

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

uncut tapir
#

yeah, I'm just wondering why things stop working after hours or days

uncut tapir
#

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!

uncut tapir
#

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

tired coral
uncut tapir
#

yeah, now that I understand the issue I think I can duplicate success with monotonic_ns

uncut tapir
#

do we still want fallback to monotonic for boards that don't have _ns?

tired coral
#

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...

uncut tapir
#

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

feral kettle
#

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?

naive obsidian
#

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

uncut tapir
#

What mqtt broker do you use? I've started with nanomq

naive obsidian
#

eclipse-mosquitto

uncut tapir
#

awesome, thanks. how long have you been using the system. Any stability/uptime issues you've noticed?

naive obsidian
#

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

feral kettle
#

Thanks. I found a cheap used thin client PC. That should do. šŸ™‚

tired maple
feral kettle
dawn lynx
uncut tapir
wary slate
#

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.

loud belfry
wary slate
small fable
#

are there any adafruit modules that need soldering and they came unsoldered? i need something to rpactice

uncut tapir
#

through hole or smd?

pine furnace
dawn lynx
# small fable are there any adafruit modules that need soldering and they came unsoldered? i n...

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.

uncut tapir
#

I usually use a breadboard to align the pins for soldering

uncut tapir
#

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

soft oar
#

Is IOT adafruit free?

loud belfry
soft oar
#

Thank you

devout sapphire
#

Has anyone used a MuRata ABZ-093 for LoRa? Was wondering if one could load CPy on the STM32LO on this module?

abstract anchor
bold crater
#

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

naive obsidian
#

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 šŸ˜

bold crater
#

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

naive obsidian
#

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?)

bold crater
devout sapphire
#

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?

lunar stirrup
#

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

median pilot
devout sapphire
# median pilot many MCUs have "security" features to prevent reading or writing existing firmwa...

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...

severe socket
#

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

junior mortar
#

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

celest pebble
# junior mortar Hlo guys, I am seeking solution to this problem that I am facing; Whenever I fla...

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...

tawny eagle
#

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

pine furnace
tawny eagle
#

CircuitPython, but Arduino would do too

pine furnace
#

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.

bold cedar
#

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?

scenic meteor
tacit burrow
#

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.

  1. 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.

  2. 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.

  3. 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.

  4. Kindly inform me if there is any more information that I can tell which would help.

  5. I also tried the 3rd step using some tutorial which is not working for me.

ISSUE STATEMENT: Establish AWS-IOT connectivity for 100 devices.

scenic meteor
tacit burrow
grim blade
#

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?

scenic meteor
celest lintel
quartz dust
#

"You just backed Tachyon: Powerful 5G single-board computer w/ AI accelerator" + Adafruit CRICKIT Robotics HAT

full heart
#

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.

tight snow
dusty ermine
#

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!

Crowd Supply

A certified ESP32-S3 module with LTE-M, NB-IoT, and GNSS for prototyping and production

pine furnace
dusty ermine
obsidian silo
#

there was a hint of an adafruit custom board for the Ikea VINDRIKTNING. Anything come of that exploration?

pine furnace
glossy tundra
#

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

scenic meteor
#

Are all three toggles pointed at the same feed? (If so they will all toggle at the same time)

glossy tundra
#

Thanks for the heads up

#

Will make each toggle a unique thread

glossy tundra
#

How do I efficiently subscribe to multiple feeds then

lunar stirrup
#

Has anyone seen a good explainer for thread, matter, zigbee, z-wave, etc? pros/cons, device support, that sort of thing?

scenic meteor
vivid meteor
#

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}}"}]}

night mason
crude moss
#

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

vivid meteor
#

@night mason Thank you. Will do.

scenic meteor
sturdy quail
#

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?

jade sierra
#

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?

hoary pivot
#

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]

jade sierra
#

Im not sure, I am getting lot of addresses including wlan0 and docker0

scenic meteor
# jade sierra 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).

jade sierra
#

Thank you so much, the explanation makes sense.

#

I appreciate you helping me again

full heart
cunning dust
jade sierra
#

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.

scenic meteor
jade sierra
fiery saffron
#

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

cursive lark
#

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?

lunar stirrup
cursive lark
pine furnace
#

it isn't connected at all though

cursive lark
#

I'm in EU. ))

pine furnace
#

We're looking at LG which is definitely cloud connected

cursive lark
#

I was kinda hoping on one that supported Matter. And have reason to cleanup your python code some more. 😘

pine furnace
#

I don't feel like I've seen any that are matter enabled

cursive lark
#

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.

past crown
# pine furnace We're looking at LG which is definitely cloud connected

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.

pine furnace
past crown
# pine furnace Awesome! I think we're sold on it. Just gotta figure out how to give away our ex...

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).

hollow dust
#

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.

hollow dust
past crown
dusty ermine
#

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...

ā–¶ Play video
glad helm
#

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?
scenic meteor
# glad helm **Adafruit IO send_group_data() from Python?** Goal: send a voltage value and a...

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 ā¤ļø

glad helm
scenic meteor
#

I tell a lie, groups/GROUPNAME/data but it still wants the feed_key supplied with each datapoint

glad helm
#

I did construct the data with all the necessary stuff like the individual feed keys and values.

scenic meteor
# glad helm I did construct the data with all the necessary stuff like the individual feed k...

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)

glad helm
scenic meteor
glad helm
scenic meteor
#

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

glad helm
#

I'm using this to do hardware endurance testing with the IO service and dashboard.

scenic meteor
#

When you say "endurance"?

glad helm
#

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.

scenic meteor
#

Ahh, yeah the PPK2 is amazeballs, did some repeated brownout testing using that and python api

glad helm
#

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.

scenic meteor
#

oo nice. That's still on the todo list, have it auto capture some known bug on the scope

glad helm
#

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.

scenic meteor
#

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)

scenic meteor
scenic meteor
glad helm
glad helm
#

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. šŸ’ŖšŸ¼

glad helm
glad helm
#

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

scenic meteor
# glad helm **Feeds graph does not match table data** _This may be a bug, and if so, would s...

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...

glad helm
scenic meteor
glad helm
# scenic meteor ooh that's curious, what do you mean by the graph was correct but with the erron...

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.

scenic meteor
#

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

glad helm
#

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.

scenic meteor
#

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

glad helm
#

Either way, I was expecting the graph to match the table.

If there is caching, then ...

  1. The graph caching should be documented
  2. The coaching should be refreshed eventually (also documented)
#

FYI: the dashboard has the same erroneous spike.

scenic meteor
#

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)

glad helm
#

I don't see a way (on my AIO page) to report the issue

scenic meteor
#

Send Feedback link at bottom of list in footer

glad helm
scenic meteor
past crown
glad helm
glad helm
#

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.

glad helm
# glad helm It has happened again … **a deleted datapoint in a feed table still appears in t...

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.

scenic meteor
harsh galleon
#

Hello world

dusty turtle
#

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?

scenic meteor
dusty turtle
#

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

dusty turtle
#

"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.

scenic meteor
timid echo
#

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!

reef bridge
mystic wadi
#

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)

forest agate
mystic wadi
#

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.

scenic meteor
#

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

lunar stirrup
#

What are the most impactful IOT/home assistant things you've done in your home?

scenic meteor
# lunar stirrup 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.

gusty abyss
#

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! ⚔

GitHub

A 100-day challenge exploring IoT and embedded systems using ESP32, ESP8266, and Raspberry Pi Pico with MicroPython. Each day covers a new sensor or module with complete code, circuit diagram, and ...

glad helm
#

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.

lunar stirrup
dusty turtle
#

ah... very unclear what this is or is for

lunar stirrup
#

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

dusty turtle
#

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)

lunar stirrup
#

The "what features you get" is less well documented, but if you look at the examples, you can get an idea

scenic meteor
gusty abyss
#

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!

GitHub

micropidash: A non-blocking web interface library for MicroPython microcontrollers. Featuring real-time sync, independent dark mode, and easy hardware integration via uasyncio. - kritishmohapatra/m...

severe socket
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Adafruit IoT Updates Adafruit IO Update: Set icons on your gauge and text blocks! Set-able Icons and decimal controls are now available for your Adafruit IO Gauge and Text elements! – Visit y…

#

Channel is all about #iot

blissful perch
#

new channel, sweet

severe socket
#

Yep!

icy magnet
#

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:

  1. 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
  2. raspberry pi + raspberry pi camera module (seems easy to implement?) see https://projects.raspberrypi.org/en/projects/getting-started-with-picamera
  3. 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!
Hackster.io

For this build, I put together a backpack to take pictures when I am close to places that I like; especially in London. By Estefannie Explains It All.

glass bridge
#

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.

severe socket
icy magnet
#

@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

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.

severe socket
#

@icy magnet Sure - it's a good single-board-computer and well priced. Unless you can swing for a Jetson Nano or something similar.

glass bridge
#

Video analysis is computationally hard so you'll want as much power as you can conveniently get to throw at it.

white junco
#

You could always plug a Movidius Neural Compute Stick into a Pi.

glass bridge
#

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

white junco
#

If I had a Pi 4 available, I'd try it with my fancy webcam

icy magnet
#

Got it thanks!

#

@glass bridge why can't I use wifi to connect the pi to the internet if the gopros only allow wifi?

glass bridge
#

because you have to use the wifi to connect directly to the gopro

white junco
#

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.

glass bridge
#

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

icy magnet
#

Ah thank you

#

Do you think that the esp32 would have enough processing power to run object detection?

severe socket
#

It can do it with ESPCAM

severe socket
icy magnet
#

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

severe socket
icy magnet
#

Hello! Does anyone have experience using Wyze cameras?

rain otter
#

@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!

woven mesa
#

iot means internet of toilets

valid jasper
#

Internet of Thongs is a very easy typo, and always hilarious to my perpetually 9 year old sense of humor.

icy magnet
#

@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!

rain otter
#

@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

woven mesa
#

@valid jasper are you 9?

valid jasper
#

@woven mesa Yes and I have been for a very long time.

woven mesa
#

I am 13

valid jasper
#

I was teasing you. I turned 9 almost 50 years ago. It's cool that you're interested in IoT at 13.

woven mesa
#

Ok

blissful perch
#

.oO(Are you Herbert?)

valid jasper
#

"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.'"

blissful perch
#

I reach.

clear moth
#

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?

white junco
#

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.

white junco
#

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.

white junco
#

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.

rain otter
#

the invalid head of packet problem happens when you don't select the right bootloader

icy magnet
#

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

past shoal
#

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

past shoal
#

Any help appreciated šŸ™‚ , Thank you

mystic wadi
#

@past shoal "key" should be set to an actual feed name without the quotes

brazen condor
#

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?

south salmon
#

Hi
I recently got an esp8266...
Can I do wifi deauther kinda thing with miropython (with esp8266)...
Also send me a example

#

Tag me

mystic wadi
south salmon
#

@mystic wadi he use Arduino not miropython

mystic wadi
#

ah well, sometimes you must change languages to use the library that does what you want.

severe socket
frail reef
#

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

floral torrent
#

anyone have any idea where to connect my serial interdace to this

white junco
#

Should be a row of 4 pads somewhere

floral torrent
#

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

white junco
#

Looks like a completely different unit

#

But yeah, that might be it

floral torrent
#

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

white junco
#

It's possible to get around the ISP disable but it's not for beginners.

merry sluice
severe socket
#

Looks great

chrome sapphire
#

Anyone have any experience with Faraday cages/shields?

white junco
#

I've worked with Faraday cages some.

chrome sapphire
#

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?

white junco
#

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?

chrome sapphire
#

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
#

:/

white junco
#

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.

chrome sapphire
#

crazy -- I'll give it a shot. Thanks for the help.

white junco
#

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)

chrome sapphire
#

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...

white junco
#

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.

chrome sapphire
#

wow -- crazy price

celest lintel
#

All the Internet of Things – Episode 6 — Digi-Key IoT Studio #digkey #adafruit #iot

https://youtu.be/_u8yrGhaDX8

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

https://youtu.be/_u8yrGhaDX8

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...

ā–¶ Play video
Adafruit Learning System

Build a miniature smart-home to learn all about Digi-Key IoT Studio

reef cove
#

Is the pycom GPy compatible with feather ethernet ?

fathom elm
#

@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.

severe socket
hazy skiff
#

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.

hazy skiff
#

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.

autumn forge
#

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?

eternal crest
#

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)?

#

me == perplexed 😐

eternal crest
#

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.

trail pagoda
#

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().

eternal crest
#

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

trail pagoda
#

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.

eternal crest
#

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?

trail pagoda
#

Yep! Under the hood, new is basically calling malloc to get the memory and then initializing the object too.

eternal crest
#

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! šŸ™Œ

trail pagoda
#

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. 😁

eternal crest
#

def good to know šŸ™‚

eternal crest
#

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!

trail pagoda
#

Awesome!

wicked elbow
#

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...

severe socket
#

interesting

vague cipher
#

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?

trail pagoda
#

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.

vague cipher
#

I'm not afraid of some coding! Thank you. I will make sure my buttons are ble

reef cove
#

Is there a feather board using the ublox Sara r4 for cat-m ?

white junco
reef cove
#

@white junco the shield is out of stock

#

But awesome suggestions

#

Got it from their website

crisp crag
#

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

crisp crag
#

@real iris have you tested NFC? Any recommendations?

real iris
#

it cannot read tags

crisp crag
#

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

reef cove
#

Anyone know if there are enclosures for adafruit feathers? I'm looking for ip67 rated

hot seal
reef cove
#

@hot seal thanks I think I was using too narrow key words šŸ˜€

severe socket
#

@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

hybrid zealot
buoyant island
#

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! )

pine furnace
#

@buoyant island I can help get your bot setup if you like. @misty glen would know how to do it.

misty glen
#

šŸ‘‹

buoyant island
#

@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

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

pine furnace
#

@buoyant island done!

buoyant island
#

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!

misty glen
#

@lilac island

#

nice

#

Is it coded in djs?

sacred kiln
#

Hola

barren scaffold
#

hola a todos

jade surge
#

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

wicked elbow
#

@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.

jade surge
#

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

white junco
#

Unless they're using your network, in which case you're paying for the bandwidth.

jade surge
#

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

near garnet
severe wing
#

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.

lucid flame
#

@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.

near garnet
#

@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.

severe wing
#

Yea, you are right sounds like you needed this direction . That’s great you got it working. Was there a ā€œgotchaā€?

near garnet
#

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

lucid flame
#

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

near garnet
#

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.

lucid flame
#

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!

near garnet
#

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?

lucid flame
#

Of course! Either here or email me at first dot last at Microsoft dot com.

cedar ember
#

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?

severe wing
#

Are you wanting to use adafruit io to do it? You could...

lucid flame
#

Or via an IoT service

sullen field
#

@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?

Adafruit Learning System

Monitor your plant's vitals by combining CircuitPython with Microsoft Azure IoT

dim agate
#

@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.

low copper
#

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?

lucid flame
#

@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

#

For IoT Central, I created a nice walkthrough for a plant monitor here: https://aka.ms/agrohack

GitHub

A hands on workshop for an agrotech hackathon 🌽. Contribute to jimbobbennett/AgroHack development by creating an account on GitHub.

#

Lots of samples there to connect your circuit python device to IoT Central and Hub, and use all the capabilities to send/receive data

dim agate
#

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.

lucid flame
#

It doesn't support stuff like firmware updates or IoT Edge

#

Thanks @dim agate - did you fill in the form by any chance?

dim agate
#

Oh yes !

#

Full Disclosure: I'm ex-MSFT '96-'06. šŸ™‚

lucid flame
#

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.

sullen field
#

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)

dim agate
#

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)

lucid flame
#

@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.

Instagram

209 Likes, 63 Comments - Jen FoxBot (@jenfoxbot) on Instagram: ā€œSooo amid all this pandemic chaos, last week I started a job that I accepted all the way back inā€¦ā€

severe socket
#

heya @lucid flame going over your PR rn