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

[network] Add configuration parameter for using iOS wake-up #16259

Merged
merged 6 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ public class NetworkHandlerConfiguration {
public Integer retry = 1;
public Integer refreshInterval = 60000;
public Integer timeout = 5000;
public boolean assumeiOsDevice = true;
lsiepel marked this conversation as resolved.
Show resolved Hide resolved
public Set<String> networkInterfaceNames = Set.of();
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ void initialize(PresenceDetection presenceDetection) {
}
presenceDetection.setServicePorts(Set.of(port));
} else {
// It does not harm to send an additional UDP packet to a device,
// therefore we assume all ping devices are iOS devices. If this
// does not work for all users for some obscure reason, we can make
// this a thing configuration variable.
presenceDetection.setIOSDevice(true);
presenceDetection.setIOSDevice(handlerConfiguration.assumeiOsDevice);
// Hand over binding configurations to the network service
presenceDetection.setUseDhcpSniffing(configuration.allowDHCPlisten);
presenceDetection.setUseIcmpPing(configuration.allowSystemPings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
reduces the load when arping and Wake-on-LAN are used. All interfaces are used when left empty.</description>
<advanced>true</advanced>
</parameter>

<parameter name="assumeiOsDevice" type="boolean" required="true">
lsiepel marked this conversation as resolved.
Show resolved Hide resolved
<label>Assume iOs Device</label>
lsiepel marked this conversation as resolved.
Show resolved Hide resolved
<default>true</default>
<description>Set to true if the device presence detection should be performed for an iOS device like iPhone or
iPads. An additional port knock is performed before a ping.</description>
lsiepel marked this conversation as resolved.
Show resolved Hide resolved
<advanced>true</advanced>
</parameter>

</config-description>
</thing-type>

Expand Down