Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[satel] Add support for event type 32 #8444

Merged
merged 1 commit into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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