com.swttt.homekit icon indicating copy to clipboard operation
com.swttt.homekit copied to clipboard

Sensative strips shown as switches

Open jahnkenneth opened this issue 5 years ago • 10 comments

Hello,

Today suddenly all my Sensative strips (contact sensors) shows up as switches in Home. Have tried excluding and including them, to no avail. Any ideas? :-)

jahnkenneth avatar Jan 07 '20 16:01 jahnkenneth

The Sensative app was updated 5 hours ago, so I guess there were some (internal) changes that are causing this behaviour.

robertklep avatar Jan 07 '20 17:01 robertklep

This is the answer I got from the developer:

«Hmm, that's odd. Nothing was changed about the device class. Possibly, the tamper alarm capability was added on update, if you initially added the Strips with a version prior to 2.0.1 (more than a year ago).»

My Strips was added just a few months ago...

jahnkenneth avatar Jan 07 '20 17:01 jahnkenneth

It's not just the device class that Homeykit looks at, it's also the capabilities. Homeykit hasn't been updated for quite a while now, so I can only attribute any changes in its behaviour to external causes.

robertklep avatar Jan 07 '20 17:01 robertklep

@jahnkenneth made a good point: the new Sensative app version added maintenance actions. It's new homey functionality. In the metadata, these appear as a "button" type capability.

For example, the Strips Guard (a contact sensor) capabilities list now looks like this:

"capabilities": [
    "alarm_contact",
    "alarm_tamper",
    "measure_battery",
    "alarm_battery",
    "button.reset_tamper_alarm"
],

Since HomeyKit doesn't know about maintenance actions (yet), this looks like a device that has a button; hence it's now shown as a switch, I'm guessing 🙂

As far as I can tell, the only way to tell maintenance actions apart from a "regular" button, is to call the getCapabilityOptions(capabilityId) method (on Device) which should have a maintenanceAction: true property.

Thorarin avatar Jan 07 '20 21:01 Thorarin

@Thorarin Any luck? Or would it be possible for me to «downgrade» to the previous version via CLI?

jahnkenneth avatar Jan 07 '20 22:01 jahnkenneth

@Thorarin Any luck? Or would it be possible for me to «downgrade» to the previous version via CLI?

You could downgrade, but it's not really a solution because other developers might also start adding maintenance actions left and right. I've made a pull request for HomeyKit that makes it ignore maintenance actions.

Thorarin avatar Jan 07 '20 23:01 Thorarin

Hopefully @robertklep will fix this soon, eventhough he has moved on from Homey :-)

jahnkenneth avatar Jan 07 '20 23:01 jahnkenneth

I have now downgraded to the previous version, but HomeyKit still shows it as a switch... Have tried excluding and including it in the settings... What to do?

jahnkenneth avatar Jan 08 '20 17:01 jahnkenneth

You probably have to re-pair the device.

robertklep avatar Jan 08 '20 20:01 robertklep

Normally, you would, yes. The "problem" is that capabilities are persisted by Homey once added, so downgrading alone has no effect. See https://github.com/Thorarin/com.sensative/issues/25 to install a special version that removes the existing capabilities, so you don't have to re-pair the devices.

Thorarin avatar Jan 08 '20 20:01 Thorarin