Page 1 of 1

How to see if device is included with or without encryption?

PostPosted: Wed Apr 18, 2018 10:14 am
by Frakke
Hi All,

Can I somehow see if a device is added with or without encryption?

Regards

Re: How to see if device is included with or without encrypt

PostPosted: Wed Apr 18, 2018 10:31 am
by Colorado4Wheeler
I believe if the 'zwEncryptClassCmdMap' property is populated then it is:

Code: Select all
indigo.server.log(unicode(indigo.device[YOUR_DEVICE_ID].ownerProps))

Re: How to see if device is included with or without encrypt

PostPosted: Wed Apr 18, 2018 10:51 am
by Frakke
Colorado4Wheeler wrote:
I believe if the 'zwEncryptClassCmdMap' property is populated then it is:

Code: Select all
indigo.server.log(unicode(indigo.device[YOUR_DEVICE_ID].ownerProps))


Hmm, i'm gettings this error:
Code: Select all
mbedded script: 'DeviceCmds' object does not support indexing

Re: How to see if device is included with or without encrypt

PostPosted: Wed Apr 18, 2018 10:59 am
by DaveL17
Typo fixed here. Device should be devices.
Code: Select all
indigo.server.log(unicode(indigo.devices[YOUR_DEVICE_ID].ownerProps))

Re: How to see if device is included with or without encrypt

PostPosted: Wed Apr 18, 2018 11:01 am
by Frakke
DaveL17 wrote:
Typo fixed here. Device should be devices.
Code: Select all
indigo.server.log(unicode(indigo.devices[YOUR_DEVICE_ID].ownerProps))


Yes, then I'm gettings this one?
Code: Select all
embedded script: 'key id 42 not found in database'


42 is the address of a Z-Wave device.

Re: How to see if device is included with or without encrypt

PostPosted: Wed Apr 18, 2018 11:08 am
by DaveL17
You should use the Indigo device ID, which is found by right-clicking on said device -- instead of the Z-Wave node ID which it seems like you're using. :D

Re: How to see if device is included with or without encrypt

PostPosted: Tue Apr 24, 2018 12:56 am
by Frakke
DaveL17 wrote:
You should use the Indigo device ID, which is found by right-clicking on said device -- instead of the Z-Wave node ID which it seems like you're using. :D


Yes.. :roll:

I think it's this one:
Code: Select all
 zwEncryptionStatusStr : Supported but not Enabled (string)

Re: How to see if device is included with or without encrypt

PostPosted: Tue Apr 24, 2018 3:30 am
by DaveL17
According to C4W above, you should examine 'zwEncryptClassCmdMap'. What is the value of that property?

Re: How to see if device is included with or without encrypt

PostPosted: Tue Apr 24, 2018 3:36 am
by Frakke
DaveL17 wrote:
According to C4W above, you should examine 'zwEncryptClassCmdMap'. What is the value of that property?

Nothing useful i'm afraid:
Code: Select all
zwEncryptClassCmdMap : (dict)


So, I think this one is the correct one:
Code: Select all
zwEncryptionStatusStr : Supported but not Enabled (string)

Re: How to see if device is included with or without encrypt

PostPosted: Tue Apr 24, 2018 5:37 am
by DaveL17
I don't have any encrypted devices, but it looks like that one is not added with encryption.

Re: How to see if device is included with or without encrypt

PostPosted: Tue Apr 24, 2018 8:33 am
by Colorado4Wheeler
I was replying to the question as to if it had been added with or without encryption, if zwEncryptClassCmdMap is empty then it's not currently encrypted, but zwEncryptionStatusStr shows that it can be.

Re: How to see if device is included with or without encrypt

PostPosted: Tue Apr 24, 2018 4:25 pm
by matt (support)
Colorado4Wheeler wrote:
I was replying to the question as to if it had been added with or without encryption, if zwEncryptClassCmdMap is empty then it's not currently encrypted, but zwEncryptionStatusStr shows that it can be.

That is correct. Here is a slightly preferred technique (less likely to break in the future) to get both states:

Code: Select all
supportEncryption = "c152" in dev.ownerProps["zwClassCmdMap"]
usingEncryption = len(dev.ownerProps["zwEncryptClassCmdMap"]) > 0