Skip to content

Commit

Permalink
[satel] Event log changes. Added support for event type 32 (openhab#8444
Browse files Browse the repository at this point in the history
)

Besides that there are some minor changes in the examples section of README file.

Signed-off-by: Krzysztof Goworek <krzysztof.goworek@gmail.com>
  • Loading branch information
druciak authored and markus7017 committed Sep 18, 2020
1 parent d360756 commit bd8a6a5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bundles/org.openhab.binding.satel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ The result of this action is compatible with channels of `event-log` thing and c
Usage:

```
val actions = getActions("satel", "satel:event-log:home:EventLog")
val actions = getActions("satel", "satel:event-log:home")
val eventRec = actions.readEvent(-1)
logInfo("EventLog", eventRec.get("description"))
```
Expand All @@ -307,11 +307,12 @@ Bridge satel:ethm-1:home [ host="192.168.0.2", refresh=1000, userCode="1234", en
Thing zone BedroomPIR [ id=2 ]
Thing output KitchenLamp [ id=1 ]
Thing shutter KitchenWindow [ upId=2, downId=3 ]
Thing system System [ ]
Thing event-log EventLog [ ]
Thing output Siren [ id=17, wireless=true ]
Thing atd-100 KitchenTemp [ id=10, refresh=30 ]
}
Thing satel:system:home "System" (satel:ethm-1:home) []
Thing satel:event-log:home "Event log" (satel:ethm-1:home) []
```

### satel.items
Expand All @@ -327,9 +328,9 @@ Switch BEDROOM_TAMPER "Bedroom PIR tampered" (Satel) { channel="satel:zone:home:
Switch BEDROOM_TAMPER_M "Bedroom PIR tamper memory" (Satel) { channel="satel:zone:home:BedroomPIR:tamper_alarm_memory" }
Switch KITCHEN_LAMP "Kitchen lamp" (Satel) { channel="satel:output:home:KitchenLamp:state" }
Rollershutter KITCHEN_BLIND "Kitchen blind" (Satel) { channel="satel:shutter:home:KitchenWindow:shutter_state" }
Switch SYSTEM_TROUBLES "Troubles in the system" (Satel) { channel="satel:system:home:System:troubles" }
Switch SYSTEM_TROUBLES "Troubles in the system" (Satel) { channel="satel:system:home:troubles" }
String KEYPAD_CHAR ">" <none> (Satel)
String USER_CODE "User code" (Satel) { channel="satel:system:home:System:user_code" }
String USER_CODE "User code" (Satel) { channel="satel:system:home:user_code" }
Switch SIREN_LOBATT "Siren: low battery level" (Satel) { channel="satel:output:home:Siren:device_lobatt" }
Switch SIREN_NOCOMM "Siren: no communication" (Satel) { channel="satel:output:home:Siren:device_nocomm" }
Number:Temperature KITCHEN_TEMP "Kitchen temperature [%.1f °C]" <temperature> (Satel) { channel="satel:atd-100:home:KitchenTemp:temperature" }
Expand Down Expand Up @@ -413,7 +414,7 @@ rule "Send event log"
when
Item Alarms changed to ON
then
val actions = getActions("satel", "satel:event-log:home:EventLog")
val actions = getActions("satel", "satel:event-log:home")
if (null === actions) {
logInfo("EventLog", "Actions not found, check thing ID")
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ public Optional<EventLogEntry> readEvent(int eventIndex) {
+ DETAILS_SEPARATOR + "ip: " + readEventCmd.getSource() + "."
+ (readEventCmd.getObject() * 32 + readEventCmd.getUserControlNumber()) + eventDetails;
break;
case 32:
eventDetails = getDeviceDescription(DeviceType.PARTITION, readEventCmd.getPartition())
+ DETAILS_SEPARATOR + getDeviceDescription(DeviceType.ZONE, readEventCmd.getSource());
break;
default:
logger.info("Unsupported device kind code {} at index {}", eventDesc.getKind(),
readEventCmd.getCurrentIndex());
Expand Down

0 comments on commit bd8a6a5

Please sign in to comment.