Cannot publish a SecuritySpy camera to HomeKit

Posted on
Fri Jan 27, 2023 11:12 am
papamac offline
User avatar
Posts: 131
Joined: Jan 29, 2014

Cannot publish a SecuritySpy camera to HomeKit

I'm having trouble publishing a SecuritySpy camera to HomeKit. It is a Hikvision HS-2CD2425FWD-IW Network Cube Camera. It is currently online and working with the SecuritySpy app and has a Cynical SecuritySpy plugin device to monitor it and control it in Indigo. I selected an existing HKLS bridge device and opened it for editing. I selected the Cynical SecuritySpy plugin device, checked publish device, named the HimeKit device, and pressed save device. I saved the HKLS bridge device and observed the HKLS plugin restart in the log. I logged the camera device attributes and verified that the global HomeKit properties were added (see below). All seems to have gone well.

Code: Select all
Jan 27, 2023 at 9:59:57 AM
   Script                          address : fr-camera (2)
batteryLevel : None
buttonGroupCount : 0
configured : True
description : Hikvision HS-2CD2425FWD-IW Network Cube Camera
deviceTypeId : camera
displayStateId : state
displayStateImageSel : NoImage
displayStateValRaw : passive
displayStateValUi : passive
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 1254823010
globalProps : MetaProps : (dict)
     com.GlennNZ.indigoplugin.HomeKitLink-Siri : (dict)
          HomeKit_audioSelector : false (bool)
          HomeKit_bridgeUniqueID : 145623 (integer)
          HomeKit_deviceSubtype : SecuritySpyCamera (string)
          HomeKit_inverseSelector : false (bool)
          HomeKit_publishDevice : true (bool)
          HomeKit_tempSelector : false (bool)
          homekit-name : Family Room Camera (string)
     org.cynic.indigo.securityspy : (dict)
          address : fr-camera (2) (string)
          description :  (string)
          hostdev : 35883023 (integer)
          subaddress : 2 (string)
          version_ : 3 (integer)
          xaddress : 35883023@2 (string)
id : 930331422
lastChanged : 2023-01-26 17:15:24
lastSuccessfulComm : 2023-01-26 17:15:24
model : Camera
name : fr-camera
ownerProps : org.cynic.indigo.securityspy : (dict)
     address : fr-camera (2) (string)
     description :  (string)
     hostdev : 35883023 (integer)
     subaddress : 2 (string)
     version_ : 3 (integer)
     xaddress : 35883023@2 (string)
pluginId : org.cynic.indigo.securityspy
pluginProps : emptyDict : (dict)
protocol : Plugin
remoteDisplay : True
sharedProps : com.indigodomo.indigoserver : (dict)
states : States : (dict)
     actions : off (on/off bool)
     height : 1080 (integer)
     motion : off (on/off bool)
     recording : off (on/off bool)
     sensitivity : 50 (integer)
     state : passive (string)
     state.active : false (bool)
     state.disconnected : false (bool)
     state.passive : true (bool)
     state.preparing : false (bool)
     state.unavailable : false (bool)
     type : Network Hikvision (string)
     width : 1920 (integer)
subModel :
subType :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : None
   Schedule                        autoFans
   Action Group                    autoFans


Nevertheless, the camera device did not appear in the Home app. I checked the bridge status in the Home app and it was OK, but did not show that the camera device device had been added. Also note that this bridge device has successfully worked with HomeKit for other devices.

I know that some of you have been successful in publishing SecuritySpy devices. I'm sure that I'm doing something wrong, but I can't figure out what it is. If any of you have ideas, please help.

Thanks,

papamac

Posted on
Mon Apr 03, 2023 10:27 pm
GlennNZ offline
User avatar
Posts: 1555
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: Cannot publish a SecuritySpy camera to HomeKit

Sorry - must have missed this.

There are SO…. many factors at play here that it does make troubleshooting difficult.

If you can’t see the camera at all in Homekit - then you would expect some form of error within HomeKitLink Bridge startup.

Are the other bridge devices there? eg. has the whole bridge failed?

Will need a bridge startup debug log to make sense of whether camera accessory being correctly added.

You will need to run the unquarantine xattr command (if haven’t already) to unquarantine the ffmpeg binary. (this includes both intel and apple silicon versions)

Other factors can depend on the camera setup with SecuritySpy - but an error should result regarding.

Turn debug on
Restart the Bridge and see if can post output.

I’ll see if can look at it before away, otherwise will be an extra week or 2.

Glenn


Sent from my iPad using Tapatalk

Posted on
Wed May 24, 2023 10:31 am
papamac offline
User avatar
Posts: 131
Joined: Jan 29, 2014

Re: Cannot publish a SecuritySpy camera to HomeKit

I solved the problem. :)

After some debugging I found that HKLS was not successfully logging in to the Security Spy server. Although it had a correct username, password, and URL, it didn't seem to like my complex password (25 random letters, numbers and special characters). I changed the password and it worked, but I didn't take the time figure out why the initial one didn't work. I didn't see any problems in the code... the complex password should have worked.

Anyway, I finally have 8 HomeKit cameras working!

Going forward, it would be helpful to see a warning when this error occurs rather than a debug log entry that is buried in a million other debug logs. Also, the exception message is misleading: it currently reads "Exception Camera offline" when the error is actually inability to login to the SS Server, or perhaps inability to access XML data. When you have some spare time (LOL), you may want to look at lines 1281-1285 (v0.6.5) in plugin.py, method get_CameraOptions and see if this can improved.
Code: Select all
                try:
                    response = requests.get(ssSystem, timeout=5)  # Pull XML data
                except:
                    self.logger.debug("Exception Camera offline",exc_info=True)
                    return None

Thanks again for your help with this and especially for your dedication to HKLS.

David

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest