这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.
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
10 changes: 10 additions & 0 deletions bundles/binding/org.openhab.binding.fritzboxtr064/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ It has been tested on:
* getting new messages per TAM
* getting missed calls for the last x days
* getting DSL/WAN statistics for monitoring connection quality
* reboot

## Prerequisites

Expand Down Expand Up @@ -61,6 +62,7 @@ Switch fboxWifi24 "2,4GHz Wifi" {fritzboxtr064="wifi24Sw
Switch fboxWifi50 "5,0GHz Wifi" {fritzboxtr064="wifi50Switch"}
Switch fboxGuestWifi "Guest Wifi" {fritzboxtr064="wifiGuestSwitch"}
Contact cFboxMacOnline "Presence (WiFi) [%s]" {fritzboxtr064="maconline:11-11-11-11-11-11" }
Switch fboxReboot "Reboot" {fritzboxtr064="reboot"}

// WAN statistics

Expand Down Expand Up @@ -155,4 +157,12 @@ then

// do something with callerName
end

rule "Reboot Fritzbox on Connectionloss"
when
// to be determined externally
Item internetConnection changed from ON to OFF
then
sendCommand("fboxReboot", ON)
end
```
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ public Map<ItemConfiguration, String> getTr064Values(Collection<ItemConfiguratio
continue;
}

if (itemMap.getReadServiceCommand() == null) {
logger.debug("skipping {}, read command is null", itemMap);
continue;
}
// determine which url etc. to connect to for accessing required value
Tr064Service tr064service = determineServiceByItemMapping(itemMap);

Expand Down Expand Up @@ -869,6 +873,11 @@ protected String parseValueFromSoapBody(ItemConfiguration itemConfiguration, SOA
.itemArgumentName("NewEnable").readServiceCommand("GetDeflection")
.writeServiceCommand("SetDeflectionEnable").build();
addItemMap(callDeflection);

// reboot
SingleItemMap reboot = SingleItemMap.builder().itemCommand("reboot")
.serviceId("urn:DeviceConfig-com:serviceId:DeviceConfig1").writeServiceCommand("Reboot").build();
addItemMap(reboot);
}

private void addItemMap(ItemMap itemMap) {
Expand Down