OpenHAB2 is a great tool. I have a several BME280 inside my flat. They are monitoring my sleeping room, living room and my kitchen.
This is my items
configuration:
The idea was to send me a Telegram message if the temperature is blow a certain threshold.
Since I'm a lazy guy, I do not like to configure a new rule for every sensor. That's why I build a alerting feature via groups.
The idea was that the threshold could be configured via the items
file or with a input box on my sitemap.
To work with groups I had to create two new groups to group the Switch Item
if the alarm is active and the threshold of every sensor:
For every temperature sensor I need a Switch Item and a String Item that hold the information:
We have set the threshold for the kitchen at 18°C!
At first we need a rule to set the alarm switch on and off:
Now the state of the alarm is set to the Switch Item of every sensor. Let's now send a Telegram message: