Using SMS and Twilio to control things...any delays?

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Using SMS and Twilio to control things...any delays?

Post by rskup »

Would be interested in hearing from those using SMS through Twilio to control things and what, if any, delays you may experience between sending the text and your board receiving the text. Thanks!

User avatar
rdagger
 
Posts: 88
Joined: Mon Nov 30, 2015 5:44 pm

Re: Using SMS and Twilio to control things...any delays?

Post by rdagger »

There can be a delay of several seconds delay both on the Twilio side and on the Adafruit side. The best-case scenario is about 2 seconds. The worst-case is it doesn't go through at all. I've been working on a CircuitPython Twilio SMS project with MQTT and Adafruit IO but I'm still in the debugging phase. I still have not been able to make the connection reliable. I don't think Adafruit IO supports qos 2. Adafruit IO also doesn't support the XML protocol required for Twilio webhooks so you will have to create a Twilio function instead.

You might have better luck with an Arduino or if you go directly to an Adafruit cellular board and not use Adafruit IO. Also, I have found the Wi-Fi co-processor boards to be currently more reliable than the newer ESP32 boards with Wi-Fi built in with respect to CircuitPython. Hopefully, this will get better when CircuitPython 8 is released. If you want to try CircuitPython 8 beta then make sure you get the latest nightly build because the earlier versions had a lot of Adafruit IO bugs.

User avatar
rskup
 
Posts: 230
Joined: Sat Aug 01, 2020 9:04 pm

Re: Using SMS and Twilio to control things...any delays?

Post by rskup »

Thanks for the info. I probably should have added I'm fine with "seconds", my concern is more along the lines of minutes or worse like messages not showing up at all.

For the last couple days I've been testing Hologram and I've been having no delays (meaning just a few seconds no more) using the Hologram dashboard to send text messages to a SIM7000 breakout board I have.

However, I've been hearing about Twilio and was curious about their service.

User avatar
rdagger
 
Posts: 88
Joined: Mon Nov 30, 2015 5:44 pm

Re: Using SMS and Twilio to control things...any delays?

Post by rdagger »

rskup wrote: Sun Nov 06, 2022 11:29 am Thanks for the info. I probably should have added I'm fine with "seconds", my concern is more along the lines of minutes or worse like messages not showing up at all.

For the last couple days I've been testing Hologram and I've been having no delays (meaning just a few seconds no more) using the Hologram dashboard to send text messages to a SIM7000 breakout board I have.

However, I've been hearing about Twilio and was curious about their service.
All the text messages sent via Twilio have made it to Adafruit IO. Not all of the messages from Adafruit IO have made it to my CircuitPython board. However, I think that was because I had the qos set at 2 which is probably not supported. I've lowered the qos to 1 and it's been working for 24 hours. I also reverted from CircuitPython 8 beta to 7 because of reliability issues. I will be testing multiple configurations over the next week.

User avatar
jwcooper
 
Posts: 1004
Joined: Tue May 01, 2012 9:08 pm

Re: Using SMS and Twilio to control things...any delays?

Post by jwcooper »

We also now support sending sms via IO actions. IO+ is a requirement.

This would solve a few cases where the io -> feed -> webhook doesn't work due to xml support needed.

User avatar
rdagger
 
Posts: 88
Joined: Mon Nov 30, 2015 5:44 pm

Re: Using SMS and Twilio to control things...any delays?

Post by rdagger »

Unfortunately, the Adafruit IO MQTT does not appear to be reliable. After 3 days the CircuitPython 7 QT Py ESP32-S2 stopped receiving MQTT publications from Adafruit IO. The code is still running but the MQTT is dead. I have an identical CircuitPython 8.0.0-beta.4 board that I activated last night. I'll see if that is any better.

Next, I'll probably try programmatically performing a soft reboot every night.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”