HomeKit

User z-wave and zigbee drivers are directly supported by HomeKit integration.

2 Likes

How come user virtual devices aren't? Seems like there shouldn't be an issue with the apple agreement...

There's no universal way to tell that a driver is a virtual one. We can selectively (and manually) flag our own drivers as "virtual" because we own the code and know that they are.

So no way to just flag all code as good or does that break discerning allowed from not allowed devices?

You could create:
capability Virtual

and have it be honor system, like

capability Sensor
capability Actuator

or have it function as a disable of Async etc. to prevent LAN drivers.

Any reason why this one doesn’t show up then?

Apple only allows builtin devices to show up in Homekit. Ok so I guess this changed for user devices but virtual devices did not make it for some reason.

Could a command or something that we could add in the code be used for this purpose so that our virtual devices could be added?

Virtual switches show up in HomeKit for me.

Community virtual devices vs builtin that show up in Homekit

Both the inbuilt virtual and a custom driver thermostats work fine for me :

@gopher.ny is the "supportedThermostatFanModes" an obligatory attribute for the HomeKit integration (even if the thermostat does not support any fans, like the eTRVs for example) ?

1 Like

I'll have to revisit that. Can you point me to the source code for the driver?

I don't see a way to do that and to enforce Apple's "no IP based devices" rule, which is mandatory for getting HomeKit certification, at the same time.

@gopher.ny Would it be possible to create a Hubitat driver that is a virtual presence switch driver. The community one from @ogiewon shows up for me in Homekit, but I don’t want to move this automation off of Homebridge to the HomeKit beta to have the user driver stop working.
Edit: actually, the virtual driver must have stopped being included with one of the recent updates.

1 Like

Probably, can I get a link to the community one? If @ogiewon doesn't mind, I'm really good at copy/paste engineering...

2 Likes

Here's an alternative:

2 Likes

@gopher.ny can you tag this one as good? I don't think @cwilson08 would mind...

metadata {
definition (name: "Virtual contact with Switch", namespace: "cwilson08", author: "cwwilson08") {
capability "Sensor"
capability "Contact Sensor"
capability "Switch"
}
}

def on() {
sendEvent(name: "contact", value: "closed")
sendEvent(name: "switch", value: "on")
}

def off() {
sendEvent(name: "contact", value: "open")
sendEvent(name: "switch", value: "off")
}

def installed() {
}

+1. I have this exposed via Homebride for our presence given I can't get the native homekit (beta) integration to see these devices.

Thank you @gopher.ny !

1 Like

@gopher.ny Would it be possible to get HSM and modes too or are those in the forbidden list? Thanks!

I don’t mind at all.

1 Like