ios – HomeKit doesn’t present HomePod Equipment and Providers


I’ve a number of HomePods in my home (each HomePod Minis and second technology HomePod) which have humidity and temperature sensors. Within the House app I can clearly see the HomePods and their associated temperature and humidity service.

Nevertheless, when I attempt to programmatically entry these equipment from the HomeKit Swift SDK, they don’t present up. I’ve tried each getting equipment and companies straight (see each code examples under).

Getting Equipment:

func findAccessories(homeId: UUID) {
        guard let gadgets = houses.first(the place: {$0.uniqueIdentifier == homeId})?.equipment else {
            print("ERROR: No Accent not discovered!")
            return
        }
        equipment = gadgets
}

Getting Providers:

func findTempServices(homeId: UUID) {
        guard let tempServices = houses.first(the place: {$0.uniqueIdentifier == homeId})?.servicesWithTypes([HMServiceTypeTemperatureSensor, HMServiceTypeHumiditySensor, HMServiceTypeSpeaker, HMAccessoryCategoryTypeBridge]) else {
            print("ERROR: No Providers discovered!")
            return
        }
        companies = tempServices
}

Are HomePods merely not supported within the HomeKit SDK (this isn’t documented anyplace) or is the a unique strategy to entry them?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles