Skip to content
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
985b54b
[ddwrt] New OH4/5 dd-wrt binding
ballle98 Feb 24, 2025
25a9344
add ssh support
ballle98 Apr 11, 2025
08294ef
add ssh key support
ballle98 May 27, 2025
e54fc5e
create all the ddwrt items and classes
ballle98 Jul 31, 2025
a661f5a
cleanup after 5.1.x rebase
ballle98 Sep 15, 2025
972b160
refactor into api and handler directories added device handler
ballle98 Oct 7, 2025
17c2fbd
cleanup log in device handler and added constants for config items
ballle98 Oct 14, 2025
89beded
significant refactor added discovery for devices
ballle98 Dec 17, 2025
e5144c0
DDWRTDevice that is seperate from DDWRTDeviceThingHandler
ballle98 Jan 6, 2026
5401541
ddwrt: introduce SshAuthSession and capture SSH welcome banner
ballle98 Jan 14, 2026
2550cb7
ddwrt: Reduce connection timeout from 60 sec to 1
ballle98 Jan 14, 2026
bc9a18b
ddwrt: Add session recovery, device lookup by hostname/IP, and failed…
ballle98 Feb 6, 2026
e4dc554
ddwrt: Add radio, wireless client, and firewall rule thing types with…
ballle98 Feb 12, 2026
a7a9896
ddwrt: Refactor device initialization with MOTD-based detection, per-…
ballle98 Feb 16, 2026
9af9316
ddwrt: Add syslog event parsing, SSH config resolution, and bridge on…
ballle98 Feb 26, 2026
9247259
ddwrt: Thread-safe wireless client cache, DHCP/hosts caching, MAC ran…
ballle98 Mar 25, 2026
2c4ff65
ddwrt: Event-driven cache updates, OUI hostname generation, discovery…
ballle98 Mar 30, 2026
d48723d
ddwrt: Complete README documentation
ballle98 Mar 31, 2026
7cf59ee
[ddwrt] Fix naming conventions and addon metadata
ballle98 Mar 31, 2026
7dc91e7
ddwrt: Add unit tests for DD-WRT binding
ballle98 Mar 31, 2026
0e604d4
[ddwrt] Rebase to main, update dependencies and copyright headers
ballle98 Apr 2, 2026
420a733
[ddwrt] Review checklist fixes: static analysis, resilience, and config
ballle98 Apr 2, 2026
0d6fc80
[ddwrt] Fix whitespace formatting in bundles/pom.xml
ballle98 Apr 3, 2026
8e1b7ec
[ddwrt] omit the password from discovery properties
ballle98 Apr 8, 2026
d7c689c
[ddwrt] Sample configuration parameters comment misleading
ballle98 Apr 8, 2026
2e72162
[ddwrt] update DDWRTNetworkCache.clearAll()
ballle98 Apr 8, 2026
91fd567
[ddwrt] cleanup binding name
ballle98 Apr 8, 2026
4827221
[ddwrt] remove unneeded variable
ballle98 Apr 8, 2026
559343f
[ddwrt] reduce imports
ballle98 Apr 8, 2026
ed4ac61
[ddwrt] reduce imports
ballle98 Apr 8, 2026
3408500
[ddwrt] logger.info to logger.debug
ballle98 Apr 8, 2026
f1fc1d1
[ddwrt] logger.info to logger.debug
ballle98 Apr 8, 2026
79f4732
[ddwrt] replace trim().isEmpty() with isBlank()
ballle98 Apr 8, 2026
b28138e
[ddwrt] Address PR #18282 review feedback
ballle98 Apr 9, 2026
982fa20
[ddwrt] Two-tier SSH backoff and user config improvements
ballle98 Apr 15, 2026
ce1a24c
[ddwrt] Add semantic tags and keywords, rename assoclist channel, cle…
ballle98 Apr 18, 2026
7fcf55d
[ddwrt] Fix logging and remove MAC wireless client property
ballle98 Apr 19, 2026
86af2cf
[ddwrt] Convert firmware from property to channel
ballle98 Apr 24, 2026
fb426ee
Apply suggestion from @Copilot
ballle98 Apr 24, 2026
958a657
[ddwrt] Add ARP cache improvements and wireless client inbox deduplic…
ballle98 Apr 30, 2026
052fafc
[ddwrt] Change wireless client to client
ballle98 May 4, 2026
41bc680
[ddwrt] Fix Copilot review comments and radio name formatting
ballle98 May 6, 2026
0535cd3
[ddwrt] Added strict host key checking configuration option
ballle98 May 8, 2026
508bba8
[ddwrt] Device online channel is not being updated when reboot is tri…
ballle98 May 9, 2026
dce87ec
[ddwrt] AP association is not clearing when device is not on network
ballle98 May 15, 2026
7c7585a
[ddwrt] Probe CPU temp source once and cache for unambiguous parsing
ballle98 May 17, 2026
5bee75d
[ddwrt] Fix Copilot review comments
ballle98 May 17, 2026
74fdb4f
[ddwrt] Fixed review comments and compiler warnings
ballle98 May 18, 2026
1e22478
[ddwrt] Improve client counting: ARP-based totals, wireless/wired spl…
ballle98 May 23, 2026
046ced2
[ddwrt] fix reverse DNS lookups
ballle98 May 27, 2026
8fd0024
[ddwrt] fix for EdDSA / Ed25519 SSH failure
ballle98 May 29, 2026
37ed247
[ddwrt] DHCP event: possible DNS-rebind attack detected should not be…
ballle98 Jun 10, 2026
bc27d08
[ddwrt] move WAN IP and gateway only channels from device to network
ballle98 Jun 15, 2026
50ba6bf
[ddwrt] Apply suggestions from code review
ballle98 Jun 19, 2026
463a348
[ddwrt] Apply suggestions from code review
ballle98 Jun 19, 2026
3a85fb9
[ddwrt] Fix code review comments
ballle98 Jun 19, 2026
963bfcb
[ddwrt] Apply suggestions from code review
ballle98 Jun 21, 2026
f542c80
[ddwrt] Address PR review comments
ballle98 Jun 23, 2026
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
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
/bundles/org.openhab.binding.dali/ @rs22
/bundles/org.openhab.binding.danfossairunit/ @pravussum
/bundles/org.openhab.binding.dbquery/ @lujop
/bundles/org.openhab.binding.ddwrt/ @ballle98
/bundles/org.openhab.binding.deconz/ @J-N-K
/bundles/org.openhab.binding.denonmarantz/ @jwveldhuis
/bundles/org.openhab.binding.deutschebahn/ @soenkekueper
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@
<artifactId>org.openhab.binding.dbquery</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.ddwrt</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.deconz</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.ddwrt/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This content is produced and maintained by the openHAB project.

* Project home: https://www.openhab.org

== Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

== Source Code

https://github.com/openhab/openhab-addons
437 changes: 437 additions & 0 deletions bundles/org.openhab.binding.ddwrt/README.md

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions bundles/org.openhab.binding.ddwrt/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>5.2.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.ddwrt</artifactId>

<name>openHAB Add-ons :: Bundles :: ddwrt Binding</name>

<properties>
<bnd.importpackage>org.apache.tomcat.jni;resolution:="optional",org.bouncycastle.*;resolution:="optional",sun.security.x509;resolution:="optional"</bnd.importpackage>
<sshd.version>2.17.1</sshd.version>
<eddsa.version>0.3.0</eddsa.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-osgi</artifactId>
<version>${sshd.version}</version>
</dependency>
<!-- For ed25519 support -->
<dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<version>${eddsa.version}</version>
</dependency>
</dependencies>

</project>
11 changes: 11 additions & 0 deletions bundles/org.openhab.binding.ddwrt/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.ddwrt-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-binding-ddwrt" description="DD-WRT Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle dependency="true">mvn:org.apache.sshd/sshd-osgi/2.17.1</bundle>
<bundle dependency="true">mvn:net.i2p.crypto/eddsa/0.3.0</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.ddwrt/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
* Copyright (c) 2010-2026 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.ddwrt.internal;

import java.util.HashSet;
import java.util.Objects;
import java.util.Set;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link DDWRTBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author Lee Ballard - Initial contribution
*/
@NonNullByDefault
public class DDWRTBindingConstants {

private DDWRTBindingConstants() {
}

private static final String BINDING_ID = "ddwrt";

// List of all Thing Type UIDs
public static final ThingTypeUID BRIDGE_TYPE_NETWORK = new ThingTypeUID(BINDING_ID, "network");
public static final ThingTypeUID THING_TYPE_DEVICE = new ThingTypeUID(BINDING_ID, "device");
public static final ThingTypeUID THING_TYPE_RADIO = new ThingTypeUID(BINDING_ID, "radio");
public static final ThingTypeUID THING_TYPE_CLIENT = new ThingTypeUID(BINDING_ID, "client");
public static final ThingTypeUID THING_TYPE_FIREWALL_RULE = new ThingTypeUID(BINDING_ID, "firewall-rule");

public static final Set<ThingTypeUID> DISCOVERABLE_THING_TYPES_UIDS = Objects
.requireNonNull(Set.of(THING_TYPE_DEVICE, THING_TYPE_RADIO, THING_TYPE_CLIENT, THING_TYPE_FIREWALL_RULE));

public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = new HashSet<>(DISCOVERABLE_THING_TYPES_UIDS);
static {
SUPPORTED_THING_TYPES_UIDS.add(BRIDGE_TYPE_NETWORK);
}

// List of network (bridge) channel ids
public static final String CHANNEL_TOTAL_CLIENTS = "total-clients";
public static final String CHANNEL_WIRELESS_CLIENTS = "wireless-clients";
public static final String CHANNEL_WIRED_CLIENTS = "wired-clients";
public static final String CHANNEL_DHCP_LEASES = "dhcp-leases";
public static final String CHANNEL_DHCP_REMAINING = "dhcp-remaining";
public static final String CHANNEL_WAN_IP = "wan-ip";
public static final String CHANNEL_WAN_IN = "wan-in";
public static final String CHANNEL_WAN_OUT = "wan-out";

// List of common channel ids
public static final String CHANNEL_ONLINE = "online";
public static final String CHANNEL_UPTIME = "uptime";

// List of device channel ids
public static final String CHANNEL_DEVICE_WIRELESS_CLIENTS = "device-wireless-clients";
public static final String CHANNEL_CPU_LOAD = "cpu-load";
public static final String CHANNEL_CPU_TEMP = "cpu-temp";
public static final String CHANNEL_IF_IN = "if-in";
public static final String CHANNEL_IF_OUT = "if-out";
public static final String CHANNEL_REBOOT = "reboot";

// List of radio channel ids
public static final String CHANNEL_ENABLED = "enabled";
public static final String CHANNEL_CHANNEL = "channel";
public static final String CHANNEL_SSID = "ssid";
public static final String CHANNEL_MODE = "mode";
public static final String CHANNEL_CLIENT_COUNT = "client-count";
public static final String CHANNEL_ASSOCLIST = "assoc-list";

// List of client channel ids
public static final String CHANNEL_MAC_ADDRESS = "mac-address";
public static final String CHANNEL_HOSTNAME = "hostname";
public static final String CHANNEL_IP_ADDRESS = "ip-address";
public static final String CHANNEL_AP = "ap";
public static final String CHANNEL_AP_MAC = "ap-mac";
public static final String CHANNEL_SIGNAL = "signal";
public static final String CHANNEL_SNR = "snr";
public static final String CHANNEL_RX_RATE = "rx-rate";
public static final String CHANNEL_TX_RATE = "tx-rate";
public static final String CHANNEL_LAST_SEEN = "last-seen";
public static final String CHANNEL_CONNECTION_TYPE = "connection-type";

// List of firewall rule channel ids
public static final String CHANNEL_DESCRIPTION = "description";

// Syslog follower health
public static final String CHANNEL_SYSLOG_CONNECTED = "syslog-connected";

// List of syslog event channel ids (modeled after logreader binding)
public static final String CHANNEL_LAST_WARNING_EVENT = "last-warning-event";
public static final String CHANNEL_LAST_ERROR_EVENT = "last-error-event";
public static final String CHANNEL_WARNING_EVENTS = "warning-events";
public static final String CHANNEL_ERROR_EVENTS = "error-events";
public static final String CHANNEL_LAST_DHCP_EVENT = "last-dhcp-event";
public static final String CHANNEL_LAST_WIRELESS_EVENT = "last-wireless-event";
public static final String CHANNEL_WARNING_EVENT = "warning-event";
public static final String CHANNEL_ERROR_EVENT = "error-event";
public static final String CHANNEL_DHCP_EVENT = "dhcp-event";
public static final String CHANNEL_WIRELESS_EVENT = "wireless-event";

// List of all configuration parameters
public static final String HOSTNAME = "hostname";
public static final String HOSTNAMES = "hostnames";
public static final String PORT = "port";
public static final String USER = "user";
public static final String PASSWORD = "password";
Comment thread
ballle98 marked this conversation as resolved.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2010-2026 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.ddwrt.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* Configuration for a DD-WRT client thing.
*
* @author Lee Ballard - Initial contribution
*/
@NonNullByDefault
public class DDWRTClientConfiguration {

public String hostname = "";
public String mac = "";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2010-2026 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.ddwrt.internal;

import org.eclipse.jdt.annotation.NonNullByDefault;

/**
* The {@link DDWRTDeviceConfiguration} class contains fields mapping thing configuration parameters for
* {@link DDWRTDeviceThingHandler}.
*
* @author Lee Ballard - Initial contribution
*/
@NonNullByDefault
public class DDWRTDeviceConfiguration {

public String hostname = "";
public String user = "root";
public boolean useSystemUser = false;
public String password = "";
public int port = 0;
public int refreshInterval = 3;
public String syslogPriority = "warning";

/**
* Returns the effective username for SSH connections.
* When {@link #useSystemUser} is true, returns empty string so the SSH client
* resolves from ~/.ssh/config or the system username.
*/
public String getEffectiveUser() {
return useSystemUser ? "" : user;
}
}
Loading
Loading