More info here:
openhab:master
← LuckyMallari:master
opened 07:40PM - 20 Jan 17 UTC
Overview of LRR Support : http://www.alarmdecoder.com/wiki/index.php/LRR_Support…
Alarm Decoder LRR Protocol : http://www.alarmdecoder.com/wiki/index.php/Protocol#LRR
Sample usage:
Item MUST be in this format:
**String sAlarmLRR "LLR Msg: [%s]" (gAlarmPanel) {alarmdecoder="LRR:00#text"}**
ITEMS:
```
String sAlarmLRR "LLR Msg: [%s]" (gAlarmPanel) {alarmdecoder="LRR:00#text"}
String sAlarmLRR_lastUser "Last User: [%s]" (gAlarmPanel)
String sAlarmLRR_lastEvent "Last Event: [%s]" (gAlarmPanel)
DateTime sAlarmLRR_lastEventDateTime "" (gAlarmPanel)
String sAlarmLRR_lastPartition "Last Partition: [%s]" (gAlarmPanel)
```
RULES:
```
import java.util.Map;
import java.util.HashMap;
import com.google.common.collect.ImmutableMap
val Map<String, String> UserList = ImmutableMap.<String, String>builder()
.put("001", "Installer")
.put("002", "Master")
.put("003", "User1")
.put("004", "User2")
.build()
rule "LRR Parser"
when
Item sAlarmLRR received update
then
var String msg = sAlarmLRR.state.toString();
var String[] parts = msg.split(",");
if (parts.length != 3) {
logError("rules", "sAlarmLRR rule parsing error.");
} else {
logInfo("rules", "Parsing sAlarmLRR==> " + msg);
var String user = UserList.get(parts.get(0));
var String partition = parts.get(1);
var String event = transform("MAP", "alarm_LRR_eventmap.map", parts.get(2).toString);
postUpdate(sAlarmLRR_lastUser, user);
postUpdate(sAlarmLRR_lastPartition, partition);
postUpdate(sAlarmLRR_lastEvent, event);
postUpdate(sAlarmLRR_lastEventDateTime, new DateTimeType());
}
end
```
Just waiting for the pull request to be merged…
Basically, this enhancement using the AlarmDecoder LRR protocol can inform you of certain specific events such as:
Which user ARMED the alarm.
Which user DISARMED the alarm.
If an ALARM (sticky bit) was set
If there was a fire
etc etc
I linked them onto items, and display it on my Habpanel “alarm” page, so I can quickly glance to see who did what with the alarm.
Demo of my “Alarm” page
Habpanel Widgets:
Keypad Widget:
Dashboard Widget:
Alarm Dashboard Widget:
Alarm_Dashboard_LuckyMallari.widget.json (8.1 KB)
Configuration (in widget itself):
Unfortunately, you cannot pass an object literal in settings, so configuration will happen inside an ng-init. You will have to modify the code to edit configuration:
Pre-Configuration:
You must have a group of items tied to your sensors (switch, string, date, etc)…
The widget goes through that group to display the state of the items in that group.
Here’s a sample of my items :
Not…
1 Like
RayMYP
(Ray)
October 15, 2017, 11:59am
2
Your Alarm page looks good.
Are they custom widgets/templates you’ve got on the right? The dashboard and last known presence are interesting and I have been thinking about doing something along those lines. Is it something you can share or point me at if already online somewhere?
Thanks
Sorry for the LAAATE reply. Im using a combination of the motion sensors (hooked to the Alarm) and security camera motion trigger (BlueIris server). Whenever any of them are triggered, I have rule that updates the DateTime item. That’s how I know the last motion detected.
I haven’t made any changes since it’s been working 100%. I know you posted 9 months ago so if you still want some rules code, just let me know.
RayMYP
(Ray)
December 17, 2017, 1:40pm
4
Appreciate the response but more like 9 weeks since I posted rather than 9 months so not as long as you think
I was only after the GUI side as it happens. Rules I’ve got or can write no problem but your ‘Dashboard’ summary item on the right looks way nicer than any other widget I’ve written or modified so if you’re happy to share that then great.
Thanks
9 weeks lol thought it was 9 months. (9 months was when I last posted it) I’ll export the widget and share it here.
Just before I export the dashboard, just want to know if you are also interested with my “visual” dashboard (above)
RayMYP
(Ray)
December 17, 2017, 11:30pm
7
Looks good so if you’re happy to share then yes please. Plenty of others I’m sure will like a few more examples and ideas.