mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[sonyprojector] fix mac address (#16972)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
287afde891
commit
3d9023ca51
@ -320,6 +320,14 @@ public class SonyProjectorSdcpConnector extends SonyProjectorConnector {
|
||||
* @throws SonyProjectorException in case of any problem
|
||||
*/
|
||||
public String getMacAddress() throws SonyProjectorException {
|
||||
return new String(getSetting(SonyProjectorItem.MAC_ADDRESS), StandardCharsets.UTF_8);
|
||||
String macAddress = "";
|
||||
byte[] macBytes = getSetting(SonyProjectorItem.MAC_ADDRESS);
|
||||
for (byte macByte : macBytes) {
|
||||
if (!macAddress.isEmpty()) {
|
||||
macAddress = macAddress + "-";
|
||||
}
|
||||
macAddress = macAddress + Integer.toHexString(macByte);
|
||||
}
|
||||
return macAddress.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user