-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bridge discovery is implemented via mDNS, local IP addresses are checked. If a GET returns the public SHC information, then this shcIpAddress is reported as a discovered bridge. Devices are always discovered after successful pairing, but a manual scan is also possible. Added unit tests for Bridge and Device Discovery. Signed-off-by: Gerd Zanker <[email protected]>
- Loading branch information
1 parent
6daddb7
commit ea1fdb2
Showing
10 changed files
with
958 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...main/java/org/openhab/binding/boschshc/internal/devices/bridge/dto/PublicInformation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) 2010-2023 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.boschshc.internal.devices.bridge.dto; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Public Information of the controller. | ||
* | ||
* Currently, only the ipAddress is used for discovery. More fields can be added on demand. | ||
* | ||
* Json example: | ||
* { | ||
* "apiVersions":["1.2","2.1"], | ||
* ... | ||
* "shcIpAddress":"192.168.1.2", | ||
* ... | ||
* } | ||
* | ||
* @author Gerd Zanker - Initial contribution | ||
*/ | ||
public class PublicInformation { | ||
public PublicInformation() { | ||
this.shcIpAddress = ""; | ||
this.shcGeneration = ""; | ||
} | ||
|
||
public List<String> apiVersions; | ||
public String shcIpAddress; | ||
public String shcGeneration; | ||
} |
Oops, something went wrong.