Skip to content

Commit

Permalink
[tr064] Add support for PPP connections (#9222)
Browse files Browse the repository at this point in the history
* add PPP external IP
* fix connection status
* fix PPP uptime

Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Signed-off-by: Christian Grasser <info@christiangrasser.at>
  • Loading branch information
J-N-K authored and Christian Grasser committed Dec 7, 2020
1 parent 7a140ab commit 07beff4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions bundles/org.openhab.binding.tr064/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ This is an optional parameter and multiple values are allowed.
| `tamEnable` | `Switch` | | Enable/Disable the answering machine with the given index. |
| `tamNewMessages` | `Number` | | The number of new messages of the given answering machine. |
| `uptime` | `Number:Time` | | Uptime |
| `pppUptime` | `Number:Time` | | Uptime (if using PPP) |
| `wanAccessType` | `String` | x | Access Type |
| `wanConnectionStatus` | `String` | | Connection Status |
| `wanPppConnectionStatus` | `String` | | Connection Status (if using PPP) |
| `wanIpAddress` | `String` | x | WAN IP Address |
| `wanPppIpAddress` | `String` | x | WAN IP Address (if using PPP) |
| `wanMaxDownstreamRate` | `Number:DataTransferRate` | x | Max. Downstream Rate |
| `wanMaxUpstreamRate` | `Number:DataTransferRate` | x | Max. Upstream Rate |
| `wanPhysicalLinkStatus` | `String` | x | Link Status |
Expand Down
20 changes: 18 additions & 2 deletions bundles/org.openhab.binding.tr064/src/main/resources/channels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,18 +244,34 @@
serviceId="urn:WANIPConnection-com:serviceId:WANIPConnection1"/>
<getAction name="GetInfo" argument="NewExternalIPAddress"/>
</channel>
<channel name="wanPppIpAddress" label="WAN PPP-IP Address">
<item type="String"/>
<service deviceType="urn:dslforum-org:device:WANConnectionDevice:1"
serviceId="urn:WANPPPConnection-com:serviceId:WANPPPConnection1"/>
<getAction name="GetInfo" argument="NewExternalIPAddress"/>
</channel>
<channel name="wanConnectionStatus" label="Connection Status">
<item type="String"/>
<service deviceType="urn:dslforum-org:device:WANConnectionDevice:1"
serviceId="urn:WANIPConnection-com:serviceId:WANIPConnection1"/>
<getAction name="GetInfo" argument="NewConnectionStatus"/>
</channel>
<channel name="wanPppConnectionStatus" label="Connection Status">
<item type="String"/>
<service deviceType="urn:dslforum-org:device:WANConnectionDevice:1"
serviceId="urn:WANPPPConnection-com:serviceId:WANPPPConnection1"/>
<getAction name="GetInfo" argument="NewConnectionStatus"/>
</channel>
<channel name="uptime" label="Uptime">
<item type="Number:Time" unit="s" statePattern="%d s"/>
<service deviceType="urn:dslforum-org:device:WANConnectionDevice:1"
serviceId="urn:WANIPConnection-com:serviceId:WANIPConnection1"/>
<getAction name="GetInfo" argument="NewUptime"/>
</channel>


<channel name="pppUptime" label="Uptime">
<item type="Number:Time" unit="s" statePattern="%d s"/>
<service deviceType="urn:dslforum-org:device:WANConnectionDevice:1"
serviceId="urn:WANPPPConnection-com:serviceId:WANPPPConnection1"/>
<getAction name="GetInfo" argument="NewUptime"/>
</channel>
</channels>

0 comments on commit 07beff4

Please sign in to comment.