Package de.malkusch.broadlinkBulb
Class BroadlinkBulbFactory
java.lang.Object
de.malkusch.broadlinkBulb.BroadlinkBulbFactory
Discovers or builds BroadlinkBulb devices.
E.g. discover all devices:
var factory = new BroadlinkBulbFactory();
var lights = factory.discover();
for (var light : lights) {
light.turnOn();
}
- Author:
- malkusch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConnect to a known devicebuild(InetAddress target) Connect to a known devicediscover()Discovers all devices in the LAN.Discovers all devices in the LAN.discover(InetAddress source) Discovers all devices in the LAN.
-
Constructor Details
-
BroadlinkBulbFactory
public BroadlinkBulbFactory()
-
-
Method Details
-
discover
Discovers all devices in the LAN.- Returns:
- Throws:
IOException
-
discover
Discovers all devices in the LAN. This discovery is limited to one network device.- Parameters:
source- The source Ip address of a network interface- Throws:
IOException
-
discover
Discovers all devices in the LAN. This discovery is limited to one network device.- Parameters:
source- The source Ip address of a network interface- Throws:
IOException
-
build
Connect to a known device- Parameters:
target- hostname- Throws:
IOException
-
build
Connect to a known device- Parameters:
target- The device's ip address- Throws:
IOException
-