Ghawken / HomeKitLink-Siri

8 stars 3 forks source link

Garage Door Opener opening… #4

Closed Ghawken closed 2 years ago

Ghawken commented 2 years ago

On startup of HomeKit app. Likely getter issue - Garage door remains Opening…

boisy commented 2 years ago

Yes, I'm seeing this too Glenn. Here's what I see in the logs:

HomeKitLink Siri Error Error in setter callback Traceback (most recent call last): File "plugin.py", line 1843, in Plugin_setter_callback indigo.device.turnOn(accessoryself.indigodeviceid) TypeError: device "Left Garage Door" class type MultiIODevice is not compatible with action turnOn/turnOff/toggle/lock/unlock/open/close

Ghawken commented 2 years ago

Thanks - it was the last device I added support for - and obviously didn’t finish it.

Although - I think what you are seeing is a different error, altogether.

What is the device that you are trying to control? If it doesn’t support turnOn/turnOff - then Garage Door controller, or Switch, or Lightbulb won’t work.

Can you post the print out of the python reference for the device?
Right click device in Indigo that controlling - copy python reference and then in scripting shell print the reference. Depending on the device - will probably need custom support.

boisy commented 2 years ago

>>> print (indigo.devices[501156211]) # "Left Garage Door" address : 50.50.7D analogInputCount : 0 analogInputs : [] batteryLevel : None binaryInputCount : 1 binaryInputs : [False] binaryOutputCount : 1 binaryOutputs : [False] buttonGroupCount : 1 configured : True description : The left garage door deviceTypeId : displayStateId : binaryOutputsAll displayStateImageSel : PowerOff displayStateValRaw : 0 displayStateValUi : 0 enabled : True energyAccumBaseTime : None energyAccumTimeDelta : None energyAccumTotal : None energyCurLevel : None errorState : folderId : 6587014 globalProps : MetaProps : (dict) com.GlennNZ.indigoplugin.HomeKitLink-Siri : (dict) HomeKit_audioSelector : false (bool) HomeKit_bridgeUniqueID : 735518 (integer) HomeKit_deviceSensor : binaryOutput1 (string) HomeKit_deviceSubtype : GarageDoor (string) HomeKit_publishDevice : true (bool) HomeKit_tempSelector : false (bool) homekit-name : Left Garage Door (string) id : 501156211 lastChanged : 2022-05-05 08:43:37 lastSuccessfulComm : 2022-05-05 08:43:37 model : I/O-Linc Controller name : Left Garage Door ownerProps : emptyDict : (dict) pluginId : pluginProps : emptyDict : (dict) protocol : Insteon remoteDisplay : True sensorInputCount : 0 sensorInputs : [] sharedProps : com.indigodomo.indigoserver : (dict) states : States : (dict) binaryInput1 : off (on/off bool) binaryInput1.ui : open (string) binaryInputsAll : 0 (string) binaryOutput1 : off (on/off bool) binaryOutputsAll : 0 (string) subModel : subType : supportsAllLightsOnOff : False supportsAllOff : True supportsStatusRequest : True version : 65

Ghawken commented 2 years ago

What actual hardware device is it? I’ll have to format that output to make sense of it… when back at PC

May need to have custom support for it - or use a Masquerade Relay device or Virtual device in place for usage.

Found with a better look: I/O-Linc Controller name

boisy commented 2 years ago

Yes, sorry. It's an Insteon GarageLinc controller.

Ghawken commented 2 years ago

Sounds like that should be supported as a GarageDoor…. Insteon never been available in this country (I believe) so hence supporting not easy. Would have though would work as a Indigo Relay device…. Obviously not.

Could Masquerade it (and that may need to be answer for some cases) But will have a look at Indigo base class and see if can add support

boisy commented 2 years ago

HomeKit Bridge did support this, so I know it's possible. Let me know how I can help provide any additional details.

Ghawken commented 2 years ago

Well - anything is possible - and indeed this version is far more open than previous (in that ANY sensor device can be supported) But as said will have a look

For interests sake - how do you get Indigo to open Garage Door? Action group - Binary Output? Or something similar

boisy commented 2 years ago

It's actually built into Indigo. See the attached screenshot.

Screen Shot 2022-05-05 at 8 14 06 PM

Ghawken commented 2 years ago

Yep - saw it was a MultiIO device - not one I have. But as it is Indigo - based on those principles I wrote - should try to support it natively. Issue will be for Homekit - which binary output to activate…. Always 1 easy enough, but may not be ideal.

boisy commented 2 years ago

In the case of GarageLinc, it is always 1. I think the GarageLinc is a special case of the IOLinc which can handle more than one binary output control.

Ghawken commented 2 years ago

Great - that’ll make it easier

Ghawken commented 2 years ago

Try 0.2.24+ Latest Version Hard to test - but think it will support above.

Although doesn't seem plain sailing for prior: ](https://github.com/indigodomo/HomeKit-Bridge/issues/121)

boisy commented 2 years ago

Just tried it, getting this:

May 6, 2022 at 9:58:10 AM HomeKitLink Siri Error Error in setter callback Traceback (most recent call last): File "plugin.py", line 1867, in Plugin_setter_callback indigo.device.setBinaryOutput(accessoryself.indigodeviceid, index=1, value=True) AttributeError: 'DeviceCmds' object has no attribute 'setBinaryOutput'

Ghawken commented 2 years ago

Thanks - i think that is a typo - quick fix coming Yep - that error at least is fixed in 0.2.25 - should be there now.

I’m am trying to find a virtual device,or SDK to mimic a multiIOdevice to aid in this… no luck as yet. Unfortunately can’t create Insteon devices easily for testing…

boisy commented 2 years ago

Thanks.I just installed the new version. Different error in the log:

HomeKitLink Siri Error Error in setter callback Traceback (most recent call last): File "plugin.py", line 1867, in Plugin_setter_callback indigo.iodevice.setBinaryOutput(accessoryself.indigodeviceid, index=1, value=True) plugin_base.PluginBase.InvalidParameter: output binary index out-of-range

boisy commented 2 years ago

Update: I changed index=1 to index=0 for both cases on lines 1867 and 1869, and it works!

Ghawken commented 2 years ago

Thanks will update and check the device update code as well (this is the bit that updates HomeKit all when device is changed in indigo)

Apparently this is a legacy device type that indigo has been thinking of deprecating in favour of relays. Just would take long to recode. Hopefully will get garage working - any other iodevices will need to be virtual devices etc

Ghawken commented 2 years ago

Should be fixed in latest. Also I believe I have fixed the opening… closing.. pending bit that was the issue I was seeing

boisy commented 2 years ago

Yep, just grabbed it. Nice work, Glenn. I've been running your plugin in a separate home from the HomeKit Bridge for testing. It's time to abandon HomeKit Bride, I think!