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.

CC3100BOOST: CC3100-FR6989-email-via-IFTTT, and other Key Functions

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

CC3100-FR6989-email-via-IFTTT, and other Key Functions

This post is to share with TI and other E2E TI customers a working send email via IFTTT. The TI CC3100 SMPT example 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. (See other long post on CC3100 SDK1.3.0 email to try and fix it.) The attached 216 page MS Word document has detailed step by step documentation, on how to set the ability to send an email via a http POST to IFTTT. In addition, the document also outlines other key functions that other TI customers may find as a useful base code example to build your own applications.

  1. Send 128 byte variable measurements / status via IFTTT email
  2. Get Time from SNTP time server
  3. Manually set Real Time Clock
  4. Up to 120 LCD messages displayed; long scrolled messages, measurements. Status, etc
  5. Via Setting adjust the display time per message, or single step through all messages
  6. 12 User Settings with Scroll through value options for each setting (No of settings easily made smaller or larger)
  7. LMT01 temperature Sensor Optimized timing to read second burst of pulses (Up to 6 sensors)
  8. Analog to Digital Converter reading of multiple inputs (Initialization, A/D trigger, Busy detect, Interrupt Handler)

We have attached a complete Code Composer exported application. The code will run, but of course without the custom designed interface electronics and sensors the input measurements are not valid. The application is only shared to show in detail various functions and how they are linked together. We hope that you will find various subsets of this code which we have developed and optimized over the last 9 years a useful framework to help start / build your specific application. We encourage other users to likewise share generic type code. Please leave a comment if you have found this useful.

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

  • BV6.8 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
  • Fc3h8.3S1149 is Attic Fan cycles 3, 8.3 hours ON, Fan last Started at 11:49 AM
  • Ps15.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. On May 1, 2023 we were pleased to share the CC3100 – F5529 solution with other TI customers / users. We now also have a working solution for the CC3100-FR6989 and are 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:
    • BV6.8 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
    • Fc3h8.3S1149 is Attic Fan cycles 3, hours on 8.3, Started 11:49 AM
    • Ps15.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

L HinzCC3100-FR6989-email-via-IFTTT-TI-post-V1.0-6-28-2023.docxGen-Amp_wMPU_IFTTT-Email-FR6989-V5.0TI-Whtpp-6-28-2023.zip

CC3100-FR6989-email-via-IFTTT and Other Functions 216 page MS Word document

Code Composer Studio Archived FR6989 - CC3100 Application ZIP file

Comments welcomed,

L Hinz