Skip to content

Commit

Permalink
Changed link to HAP - documentation in DocC
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMisfit68 committed Apr 7, 2024
1 parent 3a454c1 commit 5c2a2b6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Hapinest.docc/HAPiNest.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HAPiNest is a my personal Home-automation system compatible with Apples HomeKit
![The HAPiNest icon](icon_256x256.png)


The program implements the [HomeKit Accessory Protocol (HAP)](https://github.com/TheMisfit68/HAPiNest/blob/develop/Hapinest.docc/Resources/HAP-Specification-Non-Commercial-Version.pdf).
The program implements the [HomeKit Accessory Protocol (HAP)](./Resources/HAP-Specification-Non-Commercial-Version.pdf).

It serves as a HomeKit bridge that bundles different HomeKit accessories.
Those accessories can be controlled with Apples Home app (or any other HomeKit-client).
Expand Down
42 changes: 40 additions & 2 deletions ToDo.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,46 @@ Check doubleclick interval of the programmable switches (e.g. for the lights in
- [ ] Bundle ClibYASDI as a binary package by creating a new binary-target for the package (do not includec zip-archive in git, upload to seperate server LFS)

## Longterm MacOS xx
- [ ] include support for Matter instead of only HAP once the docmentation for Matter(support) improves and rename the project accordingly
- [ ] Refactor TizenDriver (=Websocket) to Async/Await when available.
- [ ] Refactor Milightdriver (=UDP-socket) to Async/Await when available.

copilot example:
import Foundation

// Create a URL for the WebSocket endpoint
guard let url = URL(string: "ws://127.0.0.1:8080") else {
fatalError("Invalid URL")
}

// Create a WebSocket task
let socketTask = URLSession.shared.webSocketTask(with: url)

// Start the task
socketTask.resume()

// A function to receive messages asynchronously
func receiveMessages() async throws {
for try await message in socketTask.messages {
switch message {
case .string(let text):
print("Received string: \(text)")
case .data(let data):
print("Received data: \(data)")
@unknown default:
fatalError("Received an unknown message type")
}
}
}

// Call the function to start receiving messages
Task {
do {
try await receiveMessages()
} catch {
print("Error: \(error)")
}
}
- [ ] Use SwiftData as the persistent store for all dbase-based Apps.

- [ ] include support for Matter instead of only HAP once the docmentation for Matter(support) improves and rename the project accordingly
- [ ] Refactor Milightdriver (=UDP-socket) to Async/Await when available.

0 comments on commit 5c2a2b6

Please sign in to comment.