P1 - EXAMPLES Once Avior has been configured by adding the MAC address of the BLE sensors and the Bluetooth interface has been activated as OBSERVER the temperature will be read periodically. |
EXAMPLE 1 |
||
Every hour on working days (except Saturday and Sunday) it sends an email with the temperature value measured by the BLE 1 radio sensor. |
||
SCH**00 SCHEDULED AT **:00 |
||
$D16(12345 WEEKDAY ( 12345 |
||
AT#EMAIL=mark@home.com,"$H11: $H12°C - $H15%" |
||
trigger event occurs every hour at minute 00 (**00) . The first condition checked is that the current day is included among those indicated 12345, i.e. from Monday to Friday. The first action contains the command that sends an EMAIL to the address mark@home.com with the subject: |
EXAMPLE 2 |
||
At the end of each measurement period of the BLE 3 temperature sensor, suppose set to 60 minutes (i.e. 1 hour), we upload the all new values to cloud and store in a file the average temperature value measured by the BLE radio sensor to which we have assigned the name ColdRoom. |
||
BA3 BLE TEMPERATURE 3 |
||
AT#CON |
||
AT#AFILE=S:LOGS/$H31.txt,T,"$D14 $D15: $H32°C" |
||
trigger event is the end of the measurement period of the BLE 3 sensor. The first action contains the command that forces the upload of all changed parameters to cloud (if the measured temperature has changed the value will be sent). The second action contains the command that appends a line containing: to the ColdRoom.txt file ($H31 that is the name assigned to sensor 3) in the LOGS folder of the S unit: (SD card): |
EXAMPLE 3 |
||
Send an email if the sensor 1 is not working properly. |
||
BA3 BLE TEMPERATURE 3 |
||
$H32 } 55 BLE TEMPERATURE AVERAGE } 55 |
||
AT#EMAIL=mark@home.com,"$H11: failure" |
||
trigger event is the end of the measurement period of the BLE 3 sensor. The first condition to check is that the temperature measured by the BLE 3 sensor is higher than 55 ° C, which is the maximum measurable: if the sensor does not work this value is equal to 100. We use the threshold operator } because we want this condition occurs only the first time and not every time the voltage is lower than the set value, as would happen using the comparison operator >. The first action contains the command that sends an EMAIL to the address mark@home.com with the subject $H31: failure. |
EXAMPLE 4 |
||
Send an email when the battery is low. |
||
BA3 BLE TEMPERATURE 3 |
||
$H35 { 15 BLE BATTERY LEVEL { 15 |
||
AT#EMAIL=mark@home.com,"$H11: low battery" |
||
trigger event is the end of the measurement period of the BLE 3 sensor. The first condition to check is that the charge level of the battery inside BLE 3 sensor is falling under 15 %. We use the threshold operator { because we want this condition occurs only the first time and not every time the battery is lower than the set value, as would happen using the comparison operator <. The first action contains the command that sends an EMAIL to the address mark@home.com with the subject $H31: low battery. |