HomeiOS Developmentios - HomeKit doesn't present HomePod Equipment and Providers

ios – HomeKit doesn’t present HomePod Equipment and Providers


I’ve a number of HomePods in my home (each HomePod Minis and second era 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 providers instantly (see each code examples under).

Getting Equipment:

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

Getting Providers:

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

Are HomePods merely not supported within the HomeKit SDK (this isn’t documented wherever) or is the a special solution to entry them?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments