Skip to content

Commit

Permalink
Version 0.12.04 (Beta 12 Build 4)
Browse files Browse the repository at this point in the history
Release Notes
==========
* Added ability to use invert on devices utilizing the new
onStateToFullBrightness special action - this completes the ability to
fully use Doors, Windows and Coverings with a relay device in either
native or inverted mode
* Notes below this point were from a wonky Build 3, just leaving them
in the release notes so they are not lost when the Release 3 is removed
from Git (otherwise once we go public the plugin store will complain
that the plist is incorrect)
* Fixed bug in setting characteristic values where converting from
boolean to an integer could result in no value if there was not a
validValues attribute in the characteristic
* Added special function 'onStateToFullBrightness' designed to allow
relay devices to be controlled on HomeKit services that use 0-100 scale
(such as brightness).  Directly created to allow Windows and Doors the
ability to be used as On/Off switches in order to utilize the device
type and icon.
* Added ability for relay devices to act as window coverings (also uses
onStateToFullBrightness)

Known Issues
---------------
* FRESH INSTALLATION ISSUE: It seems fairly universal that the first
server you add does not work until you restart the plugin (this likely
has been resolved in Beta 9, needs tested to be sure)
* Nest thermostats (perhaps others) will appear to hang in HomeKit when
changing temperature setpoints because of how the Nest plugin operates,
the changes will be implemented but the Indigo UI will show timeout
errors
* Need to remove API port from the plugin config and autodetect it
instead when building the server configuration
* The current API is not locked to Localhost but will need to be prior
to being publicly released for security purposes
* Changing the port on a running server will result in the plugin
reporting that the port is in use when it's only in use by the
currently running server (resolve by stopping the server before
attempting to manually change any HB settings)
* Errors getting smoke detector working as [reported by Different
Computers](http://forums.indigodomo.com/viewtopic.php?p=154957#p154957)
* Removing a device from Indigo that is part of a server will cause a
bunch of errors when that server starts, need to add better device
presense checking in code as well as delete detection

Wish List
---------------
* Dev device wishlist: Camera RTP Stream Management, Lock Management
* Add a feature to read in HBB and Alexa items to build a cache of
already used alias names
* Redo complications to be a selectable list of different complications
or the ability to not use one at all
  • Loading branch information
Colorado Four Wheeler authored and Colorado Four Wheeler committed Feb 24, 2018
1 parent 766dab2 commit 6c01450
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Release Notes
==========

Version 0.12.03 (Beta 12 Build 3)
Version 0.12.04 (Beta 12 Build 4)
==========
* Added ability to use invert on devices utilizing the new onStateToFullBrightness special action - this completes the ability to fully use Doors, Windows and Coverings with a relay device in either native or inverted mode
* Notes below this point were from a wonky Build 3, just leaving them in the release notes so they are not lost when the Release 3 is removed from Git (otherwise once we go public the plugin store will complain that the plist is incorrect)
* Fixed bug in setting characteristic values where converting from boolean to an integer could result in no value if there was not a validValues attribute in the characteristic
* Added special function 'onStateToFullBrightness' designed to allow relay devices to be controlled on HomeKit services that use 0-100 scale (such as brightness). Directly created to allow Windows and Doors the ability to be used as On/Off switches in order to utilize the device type and icon.
* Added ability for relay devices to act as window coverings (also uses onStateToFullBrightness)
Expand Down
2 changes: 1 addition & 1 deletion EPS HomeKit 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>0.12.02</string>
<string>0.12.04</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 @@ -1417,19 +1417,38 @@ def special_invertedOnState (self, classes, sourceDict, getter, characteristic,
def special_onStateToFullBrightness (self, classes, sourceDict, getter, characteristic, isOptional = False):
try:
obj = indigo.devices[self.objId]

onValue = 100
offValue = 0

if self.invertOnState:
onValue = 0
offValue = 100

if "onState" in dir(obj):
if obj.onState:
self.setAttributeValue (characteristic, 100)
self.characterDict[characteristic] = 100
self.setAttributeValue (characteristic, onValue)
self.characterDict[characteristic] = onValue
else:
self.setAttributeValue (characteristic, 0)
self.characterDict[characteristic] = 0
self.setAttributeValue (characteristic, offValue)
self.characterDict[characteristic] = offValue
else:
self.setAttributeValue (characteristic, 0)
self.characterDict[characteristic] = 0
self.setAttributeValue (characteristic, offValue)
self.characterDict[characteristic] = offValue

self.actions.append (HomeKitAction(characteristic, "equal", 0, "device.turnOff", [self.objId], 0, {self.objId: "attr_onState"}))
self.actions.append (HomeKitAction(characteristic, "between", 1, "device.turnOn", [self.objId], 100, {self.objId: "attr_onState"}))
if self.invertOnState:
# Remove all default actions or we'll end up just appending these on top and they won't get fired
newactions = []
for a in self.actions:
if not a.default: newactions.append(a)

self.actions = newactions

self.actions.append (HomeKitAction(characteristic, "equal", 0, "device.turnOn", [self.objId], 0, {self.objId: "attr_onState"}))
self.actions.append (HomeKitAction(characteristic, "between", 1, "device.turnOff", [self.objId], 100, {self.objId: "attr_onState"}))
else:
self.actions.append (HomeKitAction(characteristic, "equal", 0, "device.turnOff", [self.objId], 0, {self.objId: "attr_onState"}))
self.actions.append (HomeKitAction(characteristic, "between", 1, "device.turnOn", [self.objId], 100, {self.objId: "attr_onState"}))

except Exception as e:
self.logger.error (ext.getException(e) + "\nFor object id {} alias '{}'".format(str(self.objId), self.alias.value))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ def devTest (self):
#eps.api.stopServer ()
#eps.api.run (self.pluginPrefs.get('apiport', '8558'))

x = eps.homekit.getServiceObject (145155245, 1794022133, "service_Window")
indigo.server.log (unicode(x))
#x = eps.homekit.getServiceObject (145155245, 1794022133, "service_Window")
#x.invertOnState = True
#if x.invertOnState: x.setAttributesv2()
#indigo.server.log (unicode(x))

#x = eps.homekit.getServiceObject (361446525, 1794022133, "service_Fanv2")
#indigo.server.log (unicode(x))
Expand Down Expand Up @@ -157,7 +159,7 @@ def devTest (self):
def onAfter_startup (self):
try:
# Only uncomment this when new characteristics have been added so the class lookup can be printed
eps.homekit.printClassLookupDict()
#eps.homekit.printClassLookupDict()

# Start the httpd listener
eps.api.startServer (self.pluginPrefs.get('apiport', '8558'))
Expand Down

0 comments on commit 6c01450

Please sign in to comment.