diff options
Diffstat (limited to 'client/AndroidClients/LightingController/src/com/lightingcontroller/Zigbee/ZigbeeDevice.java')
-rwxr-xr-x[-rw-r--r--] | client/AndroidClients/LightingController/src/com/lightingcontroller/Zigbee/ZigbeeDevice.java | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/client/AndroidClients/LightingController/src/com/lightingcontroller/Zigbee/ZigbeeDevice.java b/client/AndroidClients/LightingController/src/com/lightingcontroller/Zigbee/ZigbeeDevice.java index 4ff3119..8076bca 100644..100755 --- a/client/AndroidClients/LightingController/src/com/lightingcontroller/Zigbee/ZigbeeDevice.java +++ b/client/AndroidClients/LightingController/src/com/lightingcontroller/Zigbee/ZigbeeDevice.java | |||
@@ -62,8 +62,6 @@ public class ZigbeeDevice { | |||
62 | public boolean hasColourable = false; | 62 | public boolean hasColourable = false; |
63 | public boolean hasDimmable = false; | 63 | public boolean hasDimmable = false; |
64 | public boolean hasSwitchable = false; | 64 | public boolean hasSwitchable = false; |
65 | public boolean hasThermometer = false; | ||
66 | public boolean hasPowerUsage = false; | ||
67 | public boolean hasOutSwitch = false; | 65 | public boolean hasOutSwitch = false; |
68 | public boolean hasOutLeveL = false; | 66 | public boolean hasOutLeveL = false; |
69 | public boolean hasOutColor = false; | 67 | public boolean hasOutColor = false; |
@@ -374,22 +372,37 @@ public class ZigbeeDevice { | |||
374 | default: Type = "Unknown Device"; Name="Unknown"; | 372 | default: Type = "Unknown Device"; Name="Unknown"; |
375 | } | 373 | } |
376 | } | 374 | } |
377 | 375 | ||
378 | //String notification = "New "+Type+" connected!"; | 376 | if(!_deviceName.isEmpty()) |
379 | //ZigbeeNotification.showNotification(notification); | 377 | { |
378 | Name = _deviceName; | ||
379 | } | ||
380 | } | 380 | } |
381 | 381 | ||
382 | public void updateDevice(ZigbeeDevice device) | ||
383 | { | ||
384 | Name = device.Name; | ||
385 | Type = device.Type; | ||
386 | ProfileId = device.ProfileId; | ||
387 | DeviceId = device.DeviceId; | ||
388 | NetworkAddr = device.NetworkAddr; | ||
389 | hasColourable = device.hasColourable; | ||
390 | hasDimmable = device.hasDimmable; | ||
391 | hasSwitchable = device.hasSwitchable; | ||
392 | hasOutLeveL = device.hasOutLeveL; | ||
393 | hasOutScene = device.hasOutScene; | ||
394 | hasOutGroup = device.hasOutGroup; | ||
395 | } | ||
396 | |||
382 | public void addCluster(boolean in, int ClusterId) | 397 | public void addCluster(boolean in, int ClusterId) |
383 | { | 398 | { |
384 | if (in) | 399 | if (in) |
385 | { | 400 | { |
386 | switch (ClusterId) | 401 | switch (ClusterId) |
387 | { | 402 | { |
388 | case (0x0402): hasThermometer = true; break; | ||
389 | case (0x0006): hasSwitchable = true; break; | 403 | case (0x0006): hasSwitchable = true; break; |
390 | case (0x0008): hasDimmable = true; break; | 404 | case (0x0008): hasDimmable = true; break; |
391 | case (0x0300): hasColourable = true; break; | 405 | case (0x0300): hasColourable = true; break; |
392 | case (0x0702): hasPowerUsage = true; break; | ||
393 | } | 406 | } |
394 | } else | 407 | } else |
395 | { | 408 | { |