Ghawken / HomeKitLink-Siri

8 stars 3 forks source link

Server device can be created with no on/off controls #8

Closed durosity closed 2 years ago

durosity commented 2 years ago

Describe the bug Server device can be created with no on/off controls as per attached screenshot

To Reproduce Steps to reproduce the behavior: 1: Create new server device 2: Exit Config window by clicking cancel without adding any devices to be published 3: Edit device and publish an device

Expected behavior On/Off buttons should be available to turn server on/off

Screenshots How it shows:

Screenshot 2022-05-06 at 20 32 32

Device Information batteryLevel : None buttonGroupCount : 0 configured : True description : deviceTypeId : homeKitBridgeDevice displayStateId : Status displayStateImageSel : PowerOn displayStateValRaw : Operational displayStateValUi : Operational enabled : True energyAccumBaseTime : None energyAccumTimeDelta : None energyAccumTotal : None energyCurLevel : None errorState : folderId : 0 globalProps : MetaProps : (dict) com.GlennNZ.indigoplugin.HomeKitLink-Siri : (dict) HomeKit_publishDevice_2 : true (bool) altName : Door (string) audioSelector : false (bool) bridgeUniqueID : 549226 (integer) deviceId : 1396191405 (string) deviceSensor : onOffState (string) deviceSubtype : GarageDoor (string) doorbellId : (string) enablePublishFields : true (bool) isDeviceSelected : true (bool) selectdevice_or_AG : device (string) showALL : true (bool) showSubtypes : true (bool) tempSelector : false (bool) id : 214445379 lastChanged : 2022-05-06 21:16:00 lastSuccessfulComm : 2022-05-06 21:16:00 model : HomeKitLink-Siri Bridge name : Garage - HomeKitLink ownerProps : com.GlennNZ.indigoplugin.HomeKitLink-Siri : (dict) HomeKit_publishDevice_2 : true (bool) altName : Door (string) audioSelector : false (bool) bridgeUniqueID : 549226 (integer) deviceId : 1396191405 (string) deviceSensor : onOffState (string) deviceSubtype : GarageDoor (string) doorbellId : (string) enablePublishFields : true (bool) isDeviceSelected : true (bool) selectdevice_or_AG : device (string) showALL : true (bool) showSubtypes : true (bool) tempSelector : false (bool) pluginId : com.GlennNZ.indigoplugin.HomeKitLink-Siri pluginProps : emptyDict : (dict) protocol : Plugin remoteDisplay : True sharedProps : com.indigodomo.indigoserver : (dict) states : States : (dict) QRCode :

HomeKitLink Siri

Indigo Plugin: Scan this QR Code to add HomeKitLink Siri Bridge to HomeKit

(string) Status : Operational (string) pincode : 084-99-439 (string) uniqueID : 549226 (string) subModel : subType : supportsAllLightsOnOff : False supportsAllOff : False supportsStatusRequest : False version : None

If Camera Stream Related N/A

Additional context N/A

durosity commented 2 years ago

Just to add the device works, just doesn't have the controls.

Ghawken commented 2 years ago

Yes that is expected behaviour. It’s not a Relay device in Indigo, hence no On/Off controls - which don’t completely make sense. This was a executive decision - about how the threading/asyncio code runs to some extent as well.

To disable the bridge and all aspects of it, use the enable/disable communication checkbox - this runs Indigos deviceStart and deviceStop which is more appropriate. Also sticks after plugin restart.

durosity commented 2 years ago

Ah, understood.