DeviceBit platform also provides function of Email auto-sending. The real-time measuring information of your sensor can be automatically sent to Twitter, emailed to the specified email address, or sent to a designated mobile phone number by SMS. Twitter content can also be customized according to different measured values. An example of Twitter auto-sending will be illustrated below. The sending mode of email or SMS is basically the same. You can select Twitter, email or SMS in the final auto-sending settings. So far, only Twitter is supported.
Setting steps:
Step 1 Set up variables. Click on ***IOT applications*** on the top, go to the menu on the left, and click on ***Variables Settings***. Different Twitter sending content is defined according to different system variables or the measured value range of the sensor.
![](http://upload-images.jianshu.io/upload_images/5875248-8ef9af439b9bdef9.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.1 Variable Settings
First, set different Twitter content, ***Good morning, Good afternoon*** or ***Good evening*** according to the system variable ***Hour***. Click on ***Add Expressions***, and fill in the information as follows:
![](http://upload-images.jianshu.io/upload_images/5875248-ae3e3e28352508cc.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.2 Hour Settings
Note the ***Type ***select*** System Variables ***. The system variables including the*** hour , date ,*** and **time***. Select ***Hour*** here. ***Decimal Places*** leave blank, for decimal is not involved here. Tick Yes at ***Whether to output text?*** Then, click on ***Test***, we can see that the current time is 11 o’clock, and the text is ***Good Morning***! (For the time is at the range 8-12)
![](http://upload-images.jianshu.io/upload_images/5875248-5000f900e0419e7a.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.3 Test For Hour
Next, set up ***Date*** in the same way. Settings for date are very simple. Ignore ***Enable text*** ***output*** for there is no need to set it. The settings and test results are as follows:
![](http://upload-images.jianshu.io/upload_images/5875248-ba3d9f7e48a134d1.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.4 Settings &Test For Date
Finally, set the Twitter text according to different measured humidity values. Here, select ***Sigle Sensor*** for ***Type,*** select ***My Device*** and ***Humidity*** for ***Reference Value***. Since all the values are integers, the decimal places do not need to be set. If the measured values are decimals, you can set the decimal places here. The format is .0, .00 and so on. The logical relationship between the output text and the value range is as follows, and you can define it by yourself. Then, click on ***Test*** to check the result.
![](http://upload-images.jianshu.io/upload_images/5875248-f4d3d0d11a0d50f8.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.5 Settings & Test For Humidity
The above settings for variables are complete. Of course, there are more settings for more complex logical relationships. You can select ***Sensor Group*** for Type, and ***Average*** or ***Sum*** and so on for ***Synthetic Pattern***. You can select multiple sensors and do more researches by yourself.
![](http://upload-images.jianshu.io/upload_images/5875248-613c109cc69fa982.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.6 More Complex Settings
Step2 Edit text: Click on ***Text Edit ->Add Sending Content***
![](http://upload-images.jianshu.io/upload_images/5875248-bbd1abc4397ca166.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.7 Text Edit
The settings and test result are as follows.
![](http://upload-images.jianshu.io/upload_images/5875248-0e79e95388fdd14c.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.8 Settings & Test For Text
The returned content for [[ ]] is the returned value of the system variable in [[ ]], the measured value of the sensor in [[ ]], or the more complex logic operation result of the measured values of the sensor in [[ ]]. For example, the returned content for [[date]] is the current date. While, the content for the two braces {{}} is the Twitter Text corresponding with the value range of the variable in {{}}. For example, in the following picture, the current humidity is 57%. According to the previous logic relationship set for the value range from 41 to 70, the returned text content for {{Humidity}} is ***It is comfortable!*** After setting, you can click on ***Test*** to see whether the settings are correct.
Step3 Set up auto-sending settings. This step is very simple. Click on ***Sending Scheme ->Add Auto-sending Settings***. Select ***Email*** for the ***Sending Type***, and there will be a blank column for you to fill in the E-mail address. Select ***Every Day*** for the ***Repeat Type***. Tick the time, for example 8:00, 16:00, and 20:00. Then the text content will be sent to Email automatically at 8:00am, 16:00pm, and 20:00pm everyday!
![](http://upload-images.jianshu.io/upload_images/5875248-d22e4c31c3a598ee.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Pic.9 Auto-sending Settings For E-mail
- DeviceBit User Manual
- Quick Start
- 1. Add A Device
- 2. Add a new sensor or controller
- 3. Data Upload Simulation
- 4. WeChat Alert
- 5. Email Alert
- 6. Data Reports
- 7. Account Settings
- 8. WeChat
- 9. Email Auto-sending
- 10. Email Report
- 11. Control Scheme
- 12. Trigger
- 13. MQTT
- 14. Modbus
- 15. Agent
- 16. Credits
- DeviceBit Open Source Tutorials
- 1. DIY WiFi Particles Monitor
- 2. DIY WiFi Particles & HCHO Monitor
- 3. DIY GPRS Particles Monitor
- 4. GPRS Particles Kit V0.1
- 5. WiFi Socket
- Applicaton Doc
- DTU Tutorial 1: Overview
- DTU Tutorial 2: Using DTU to connect JSY-149 single-phase meter to DeviceBit
- DTU Tutorial 3: Using Python+Openwrt DIY DTU & Connect DeviceBit
- DTU Tutorial 4 DIY Low-cost DeviceBit GPRS DTU
- DTU Tutorial 5: DIY Low-cost DeviceBit WIFI DTU
- DeviceBit Other Platform