This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100SDK: CC3100-F5529-email-via-IFTTT

Part Number: CC3100SDK
Other Parts Discussed in Thread: CC3100, , CC3100BOOST

This post is to share with TI and other E2E TI customers a working send email via IFTTT as an alternativeCC3100-F5529-email-via-IFTTT-TI-post-V1.0-5-17-2023.docx to the TI CC3100 example that has worked for 8 years, but as of Jan 2023 no longer works, and to date even TI have not been able to or wish to fix it for the CC3100. The attachment has detailed step by step documentation, on how to set this up. Our whole 13K lines of detailed application code is not included, but all the detailed code for GetTime and Send Email via IFTTT is included. We encourage other users to likewise share generic type code.

1      Micro Application Status via Email Extremely Valuable

The ability to get Micro Application data values /status several times a day, or an email when an alarm or special event has occurred, is extremely valuable for both Product Development Optimization and On going in Service Data. The big benefit of email is that the data can be received on a Smartphone or PC any place in the world.

We find 128 bytes can send the values / status of a lot of key parameters. I am not sure if there is an IFTTT character limit, it is mainly a micro limit of only 1K of RAM and 128K of FLASH.  The micro does not need to send long Parameter / Measurement variable names. One or two characters is plenty as one can soon quickly read it and mentally fill in the words represented by one or two characters.

 Example values of the data from my applications

  • 2 is battery voltage is 6.8 volts
  • AT1056382 is Attic temperature last 24 hrs is: Max 105 Deg F, Min 63 Deg F, Current is 82 Deg F
  • 3S1149 is Attic Fan cycles 3, 8.3 hours ON, Fan last Started at 11:49 AM
  • 3r9.5 is Pool pump: Starting amps 15.3 amps, Running is 9.5 amps

2      TI CC3100 Email example as of 1-28-2023 No Longer Works

TI CC3100 “Send Email” has worked perfectly for 8 years from 2014 until January 27, 2023 using Gmail as the server to send the email. In mid-2022 Gmail and other mail services increased security to require AP passwords. After implementing AP Password, “CC3100 Send Email” again worked. In January 2023 GMAIL, Outlook.com, AOL.com all made some type of security enhancement to block less secure IOT micro’s from sending Emails.

For over 3 months we have had near daily dialog on the TI E2E form “CC3100SDK: CC3100 SDK-Ver-1.3.1 Email No Longer Works” to see if we could help TI fix THEIR CC3100 Send Email example. (My post typo should be  Ver 1.3.0 but can’t correct it.) TI E2E people have been very pleasant to work with, but no one in TI have actually taken a CC3100BOOST and a F5529 or FR6989 micro and tried to fix the TI send email example. It would still be nice if someday this was fixed, but for now this is “a waste of time and resources exercise in futility”!

We now have a working “Send Email” alternative solution using the “IFTTT” service. We are pleased to share this CC3100 – F5529 solution with other TI customers / users. If/when we get a working solution for the CC3100-FR6989 we will be pleased to share that as well.

3      Working IFTTT “If this, then, that” Send Email Solution

3.1     IFTTT Service

IFTTT means ‘If this, then that.’ It is an open-source service that gives the user the freedom to program a response to an event according to their likes. One can create an applet which are chains of conditional statements by a combination of several app services and add triggering parameters.

The IFTTT service is free to use, but you will have to create an account. First go to the following website: https://ifttt.com/

A detailed step by step guide is outlined below on how to set up the IFTTT service, so that when an http PUT call is made to “maker.ifttt.com”, it will send an email to the email address defined, and with the email body message of the characters defined for the various values.

maker.ifttt.com/.../ xxxxMyKEYxxxxx?value1=74.5

3.2     IFTTT http PUT call

I have created a file called “emailAndGetTime.c” and “emailAndGetTime.h” that is 95% all TI CC3100 merged examples of 1) GetTime, 2) Send Email, 3) http_client, and added my function calls from main.c to start these functions.

A single http call with an attached very long URI is all that is required. The Host name is hard a coded for my use, and I defined 214 character string for the URI.

#define HOST_NAME              "maker.ifttt.com"

char PUT_REQUEST_URI[214] = "/trigger/SendEmailV2/with/key/ xxxxxxMyIFTTTKeyxxxxxx?value1=LHProd15CharNam&value2=1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567-ZX";

The URI contains multiple elements

  • Trigger is SendEmail2 so it calls the IFTTT service I created called “SendEmail2”
  • Key is the unique user/password key you get when setting up your IFTTT service
  • Value 1: is the name of the event that is included in the Subject line of the Email from IFTTT. My code overwrites this with each applications specific product name.
  • Value2: is two 64 byte data strings from my application. When SendIFTTTemail function is called the code overwrites all those 0123456789’s with the values of the data from my application. For example:
    1. 2 is battery voltage is 6.8 volts
    2. AT1056382 is Attic temperature last 24 hrs is: Max 105 Deg F, Min 63 Deg F, Current is 82 Deg F
    3. 3S1149 is Attic Fan cycles 3, hours on 8.3, Started 11:49 AM
    4. 3r9.5 is Pool pump starting amps 15.3 amps, running is 9.5 amps

We find 128 bytes can send the values / status of a lot of key parameters. I am not sure if there is an IFTTT limit, it is mainly a micro limit of only 1K of RAM and 128K of FLASH.

3.3     IFTT Email Received example

From: Webhooks via IFTTT <action@ifttt.com>
Sent: Sunday, May 14, 2023 12:57 PM
To: my email address
Subject: The event named "LwGrAtticFnHVAC" occurred on the Maker Webhooks service SendEmailV2

What: SendEmailV2
When: May 14, 2023 at 12:56PM
Extra Data: LAtFnHVA-M05D14-T1256-S791R712-CD015-F647-P00-G08m38-G08478c00x-A08376-E07973-I7774-R08973-F0t000S1145-H07648c15hy000t017e84-08-ZX

Comments welcomed,

L Hinz