Skip to content

Commit

Permalink
Minor Fixes and Tidy Up
Browse files Browse the repository at this point in the history
Minor fixes and tidy up.
  • Loading branch information
autolog committed Sep 2, 2019
1 parent 80e3288 commit 3166ef5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Alexa-Hue Bridge.indigoPlugin/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>PluginVersion</key>
<string>3.0.32</string>
<string>3.0.34</string>
<key>ServerApiVersion</key>
<string>2.0</string>
<key>IwsApiVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


<Device type="relay" id="emulatedHueBridge">
<Name>Emulated Hue Bridge [Devices]</Name>
<Name>Emulated Hue Bridge [Alexa Devices]</Name>
<ConfigUI>
<Field type="textfield" id="port" defaultValue="auto" hidden="false">
<Label>Port:</Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# DEVICE_LIMIT = 5 # TESTING (30-JUL-2017)
DEVICE_LIMIT = 20 # Imposed by the built-in Hue support in Alexa
EMULATED_HUE_BRIDGE_TYPEID = 'emulatedHueBridge' # See definition in Devices.xml
EMULATED_HUE_BRIDGE_MODEL = 'Emulated Hue Bridge [Alexa Devices]' # See definition in Devices.xml
ECHO_DEVICE_TYPEID = 'echoDevice' # See definition in Devices.xml
ECHO_DEVICE_TIMER_LIMIT = 15.0 # In seconds - the amount of time an Echo device will show active after a command is received

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<?xml version="1.0"?>
<MenuItems>
<MenuItem id="checkRateLimit" hidden="true">
<Name>Check Rate Limit</Name>
<CallbackMethod>checkRateLimit</CallbackMethod>
</MenuItem>
</MenuItems>
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs):
self.globals['portList'].append(int(dev.address)) # Do this regardless whether device enabled or not
except:
pass
# Fix to make model names consistent #
if dev.model != EMULATED_HUE_BRIDGE_MODEL:
dev.model = EMULATED_HUE_BRIDGE_MODEL
dev.replaceOnServer()


self.generalLogger.debug(u"PORTLIST @Plugin INIT: {}".format(self.globals['portList']))

# Set Plugin Config Values
Expand Down Expand Up @@ -1056,7 +1062,7 @@ def alexaDevicesListGlobal(self, filter, valuesDict, typeId, ahbDevId):
alexaDeviceName = alexaDeviceData['name'].replace(',',' ').replace(';',' ')
self.globals['alexaDevicesListGlobal'][alexaDeviceNameKey] = int(alexaHueBridgeId)
alexaDeviceListKey = alexaDeviceNameKey + '|' + alexaDeviceName + '|' + str(alexaHueBridgeId)
alexaDeviceListKey = str(u'{}|{}|{}'.format(alexaDeviceNameKey, alexaDeviceName, alexaHueBridgeId))
alexaDeviceListKey = u'{}|{}|{}'.format(alexaDeviceNameKey, alexaDeviceName, alexaHueBridgeId)
allocatedAlexaDevicesListGlobal.append((alexaDeviceListKey, alexaDeviceName))

for alexaDeviceNameKey, alexaDeviceData in self.globals['alexaHueBridge'][ahbDevId]['publishedAlexaDevices'].iteritems():
Expand Down

0 comments on commit 3166ef5

Please sign in to comment.