A demo written in Swift for HomeKit. Works with HomeKit Simulator.
This project tends to follow the latest Swift release so please make sure you compile with latest version of Xcode.
The official sample for HomeKit can be find at here.
A demo wrote in Swift for HomeKit. Works with HomeKit Simulator
License: MIT License
A demo written in Swift for HomeKit. Works with HomeKit Simulator.
This project tends to follow the latest Swift release so please make sure you compile with latest version of Xcode.
The official sample for HomeKit can be find at here.
when you pair for the first time then the accessories are getting detected but next time after pair verify, client disconnects. I am using HAT to test my accessories.
And even after commenting out the 6-7 erroneous lines (which have to do with setup of light characteristics), the application fails to start.
It was working fine on Xcode 6.0.x and iOS 8.0.x
Hi,
this problem occurs only on iPads (testet on iPad third Generation and the iPad Air Simulator).
On iPhones the room assignment works well.
我看苹果发布会上演示过这么一个东西,但是似乎文档没有描述怎么做的。
do you plan to update this thing to swift 2.0 ? perhaps adding events? :)
i am getting several errors like: TriggersAndActionsViewController.swift:34:27: Operand of postfix '?' should have optional type; type is 'UILabel'
It's a little difficult to type values...
Hello KhaosT,
I am working on a Demo iOS application based on HomeKit API's.
I am facing a problem in updating Scene(ActionSet), looking for your help.
Here is the complete details of that problem,Please take a look.
https://discussions.apple.com/message/27487922#27487922
Thanks.
Hi,
Initially this HomeKit-Demo project was working successfully with your HAP-NodeJS on both my mac and rPi. I could add a Home and see the example Accessory 1 with i button. Pressing the i button worked as well and you could see the HAP-NodeJS responding.
Then it started fiddling with the HomeKit-Demo app (just pressing buttons in the app) and suddenly it seemed to stop working. First I added the Accessory 1 using the pincode. Then the Accessory seemed unresponsive, so I deleted it. After this it did not return in the app, so after a few time restarting the app and node I deleted the room as well. Still no luck. When I start the server now on either my mac or rPi and start the app using the iOS simulator there is no Accessory 1 displayed and it keeps scanning. The node returns this:
HAP-NodeJS starting...
TCP server accepting connection on port: 51822
HAP Server is listening
New Session 49445
Server Connection Established 54738
Server Disconnected
Client Disconnected
Do you have an idea of what could have gone wrong? I did not change anything to the code yet. Only one change of .oltica to get the app to sign.
Thank you very much for your help and of course for providing these cool examples!
Roy
Hi!
I want to use a mechanical switch and a relay (homekit), if I turn on the light using the switch, how can I make the state change in the homekit accessory?
thanks!
god job.!
Is there any plan to add the GarageOpener system to the WatchExtension?
在模拟器上也出现过类似的错误,部署到真机上之后就一直这样。
2014-08-05 03:01:53.328 HomeKitDemo[161:2613] New Home nil
2014-08-05 03:01:53.329 HomeKitDemo[161:2613] DidSetPrimaryHome
I get the following error and have no clue how to resolve it...
target specifies product type 'com.apple.product-type.application.watchapp', but there's no such product type for the 'iphoneos' platform
any idea would be appreciated.
It used to work, then I took a pause of about two weeks. Now, when I try to find the device it doesn't appear in the list, although the HAT simulator displays it. I am using the latest HomeKitDemo version. Any ideas please ?
Hello, thanks for this awesome demo! Unfortunately, I am having issues getting it to work, I am on iOS 8 on an iPhone 6. Whenever I try to add a home (or the 'Add a new home' dialogue pops up) Xcode reports:
2014-09-24 15:09:39.428 HomeKitDemo[7478:563300] DidUpdateHomes:<HMHomeManager: 0x1780a98a0>
2014-09-24 15:09:39.431 HomeKitDemo[7478:563300] No Primary Home, try to setup one
2014-09-24 15:09:39.431 HomeKitDemo[7478:563300] No Home is available, ask user to add one.
2014-09-24 15:09:53.010 HomeKitDemo[7478:563300] Failed adding home, Error:Error Domain=HMErrorDomain Code=77 "The operation couldn’t be completed. (HMErrorDomain error 77.)"
Any reason why it is doing this? Thanks!
Hi,
I've added an action named "Good night", but I cannot execute this when using siri. Am I correct that this should be possible? If so, is this simply not implemented in ios yet, or is something else causing this.
As always thanks for your feedback.
Roy
Playing around with the HomeKit bridge simulator now means the app thinks I have 3 lights & bridges, but only 1 which is connected and works.
The app doesn't have a way to delete or remove old and removed accessories.
Multiple devices, no change.
How can I implement an event Trigger that will be available in the iOS 9 SDK ?? instead of adding a timer to turn on a light, I need to turn it on if the motion sensor detects any movements.
Some help plz
Guys,
Thanks for the work so far, I have the BitBridge iOS app working and communicating to my Homekit Accessory simulator on OS X. I was able to control the fake lights using the BitBridge iOS app manually or by talking to Siri.
But how or where can we add code to be able to send commands to a Raspberry Pi, or Homeseer to actually be able to turn lights or devices ON or OFF.
I looked at the iOS app but don;t want to muck things up.
I have a Raspberry Pi with Siri Proxy working on it or I can use HTTP commands and send them to Homeseer server on my network to control devices. I'm sorry for the questions, just getting my feet wet.
Hi,
I am able to successfully create a action set, but when I am trying to execute a action set using the below code, I am getting a error (error:Error Domain=HMErrorDomain Code=2 "The operation couldn’t be completed. (HMErrorDomain error 2.)"):
@IBAction func executeActionSet(sender: AnyObject) {
if let currentHome = self.homeManager.primaryHome {
println(self.currentActionSet?.actions.count)
currentHome.executeActionSet(self.currentActionSet) {
error in
if error != nil {
NSLog("Failed executing action set, error:(error)")
}
}
}
}
I am not sure what that error means, any help is appreciated.
Thanks,
Swetha.
Hi,
Most probably the issue is on my side, but do you have an idea why I receive those errors (in the iPhone console):
Mar 18 12:50:58 iPhone homed[2548] : Treating OSStatus -25300 (errSecItemNotFound) as Generic error
Mar 18 12:51:00 iPhone BTServer[61] : ATT Failed to locate GATT primary service on device "8E2938FA-2EA4-36BA-4FC9-F9941CFF34B4"
Mar 18 12:51:00 iPhone homed[2548] : Treating OSStatus -25300 (errSecItemNotFound) as Generic error
Mar 18 12:52:07 iPhone homed[2548] : ### [HAP Accessory Server BTLE] Failed converting from BTLE UUID to internal: 0000FED3-0000-1000-8000-00805F9B34FB
Mar 18 12:52:07 iPhone homed[2548] : ### Unable to parse BTLE service
Mar 18 12:52:07 iPhone homed[2548] : [HAP Service Discovery] Failed HAP service discovery on accessory server <HAPAccessoryServerBTLE: 0x145e488f0>
Peripheral: <CBPeripheral: 0x145d54bf0, identifier = 8E2938FA-2EA4-36BA-4FC9-F9941CFF34B4, name = HAP Light, state = connected>
State: Performing HAP Service Discovery
with error: Error Domain=HMErrorDomain Code=66 "The operation couldn’t be completed. (HMErrorDomain error 66.)"
Mar 18 12:52:07 iPhone homed[2548] : ### [HAP Accessory Server BTLE] Failed converting from BTLE UUID to internal: 0000FED2-0000-1000-8000-00805F9B34FB
Regards,
Lucian
Could anybody upload the app to Apple's App Store? I don't have a iOS Developer License, but I would like to test and use that app.
Does the Triggers and Action Sets portion of this application work? I'm not sure if Im doing something wrong or that section is not complete.
When I try and add an action set it lets me name it, but when I go into the action set I am not able to add any actions, the option to execute my empty action set leads me to believe there is someway to get the create actions within the action set but its not clear how.
One simply question .... But this work on only 3G Connection ?
Hi, just wanted to have a look at your demo but during compilation i got the following error code:
/BetterHomeKit/AccessoryViewController.swift:64:28: 'HMErrorCode' cannot be constructed because it has no accessible initializers
Have you tested your app since the release of iOS 8.0 because it seams that apple is still working and changing on the framework.
Hi! Great work so far!
I'm sadly not able to add an discovered accessory on iOS. After entering the pin it simply is not available in my list of accessories.
The log says:
Handle Remove Pairing Info
Client Disconnected
Server Disconnected
New Session 64011
Server Connection Established 51784
Start Pair M1
Start Pair M3
Start Pair M5
An Error Occured on client side connection, { [Error: This socket has been ended by the other party] code: 'EPIPE' }
Server Disconnected
Client Disconnected
any hints? thanks
Hi,
This might be a long shot, and I respect that you want to support all normal characteristics first, but who knows.
I use your app to support development of my homekit bridge. It works very nice!
One of my features requires the use of a custommade "Execute" characteristic, similar to the identify-characteristic.
This bridge therefore has a custommade service with, among others, the "execute"-characteristic. The custom service is showing up ok and all characteristics are shown in your app. Unfortunately, the (boolean, write-only) characteristic is not written to when clicked.
In your code, I see that you check the metadata of a characteristic. For booleans, the first check you do is whether the value of the characteristic is not nil. Could you extend that code, so that for a write-only characteristic, it works like identify, and just writes true? A write-only characteristic will never have a value.
Thanks in advance
i try to set one users ,but if i Enter the iCloud address i have this error
HomeKitDemo[1776:100159] Add user failed: Error Domain=HMErrorDomain Code=3 "The operation couldn’t be completed. (HMErrorDomain error 3.)"
Cant think of anything it might be other than some iCloud clusterfuck. Tried on both and iCloud and non-icloud enabled device.
Per https://developer.apple.com/library/ios/documentation/HomeKit/Reference/HomeKit_Framework/, Apple says that we should be able to say: “Siri, turn on the kitchen lights.”
I've added two lights to a "Living Room" Room, which work on their own when I ask the generic "Siri, turn on the lights". When I ask to turn on the living room lights, Siri times out and says I can't help you right now.
Any ideas what could be causing this, or is it something on iOS that isn't quite ready yet?
Power switches work fine, even when iPhone is turned off. When other HomeKit app changes the light power state it is not updated on the Watch and I have to switch it twice to make an action. I have no idea if the error is watchOS2 related or it's a bug in the app itself. It's updated correctly on the iPhone.
I am using Xcode 7 to compile, but it looks the swift version changed quite a bit
When i try to connect to a real hardware accessory, and entering the correct homekit PIN, i get the following error in the console:
HomeKitDemo[6072:741973] Error Domain=HMErrorDomain Code=52 "Failed with OSStatus code -6700 (kUnknownErr)" UserInfo=0x7fafdc9002d0 {NSLocalizedDescription=Failed with OSStatus code -6700 (kUnknownErr)}
what is the Problem with this error?
I have now installed HAP-NodeJS in my office and added a second Home with a room "office".
Asking Siri to switch off the lights by naming the second home: "switch off light " work's.
But "switch off light" does not work, Siri says the devices are not responding.
I suspect that Siri does not recognize that it's in a different home and tries to address the primary home or so. So somehow I need to tell Siri that I am in a different home or set the device up in a way that it concludes this.
Anyone any idea or experience?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.