Please, find attached a small how to how to send a Mail with Timestamp and Alarm value.
This is does with VariableDevice and Mail
{
"class": "VariablesDevice",
"id": "zeitstempel1",
"name": "Zeitstempel_Sensor_1",
"variables": [
{
"name": "zeitstempel1",
"expression": "\"Es ist {date(\"hh:mm:ss DD-MM-YYYY\")} und die Raumtemperatur ist zu hoch. Sie liegt bei $raumtemp_1.temperature °C \"",
"type": "string"
}
]
},
The VaribaleDevice is creating the text message which will be send out by following rule:
{
"id": "raumtemp-zu-hoch-1",
"name": "Raumtemp_zu_hoch_1",
"rule": "if Alarm EIN/AUS is turned on and $raumtemp_1.temperature >= $Alarm_Schaltpunkt_EIN.temperatureSetpoint then send mail to:\"test@gmail.com\" subject:\"Pimatic - Raumüberwachung Sensor 1\" html:\"$zeitstempel1.zeitstempel1\"",
"active": true,
"logging": true
},
The Alarmpoint can be set via DummyHeatingThermostat as follow.
{
"class": "DummyHeatingThermostat",
"id": "Alarm_Schaltpunkt_EIN",
"name": "Alarm Schaltunkt Temperatur",
"guiShowModeControl": false,
"guiShowPresetControl": false
},
The Temperature is taken by DS18B20 Sensors as follow:
{
"name": "Raumtemperatur 1",
"id": "raumtemp_1",
"class": "DS18B20Sensor",
"hardwareId": "28-00000xxxxxx",
"interval": 20000
},
Hope somebody can use this as well - have fun with that!!
Best regards
HeinMueck