Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bouke/my-home
My DIY Homekit setup in Swift
https://github.com/bouke/my-home
swift-hap
Last synced: 3 months ago
JSON representation
My DIY Homekit setup in Swift
- Host: GitHub
- URL: https://github.com/bouke/my-home
- Owner: Bouke
- License: mit
- Created: 2016-08-31T18:40:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-29T08:05:47.000Z (about 4 years ago)
- Last Synced: 2024-09-16T15:47:16.932Z (4 months ago)
- Topics: swift-hap
- Language: Swift
- Size: 23.4 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
My DIY Homekit setup in Swift
=============================This repository is both a showcase of my [HAP](https://github.com/Bouke/HAP) package and implementation of my DIY Homekit setup. It shows how to add Homekit to an internet-connected thermostat (Essent / ICY e-thermostaat).
[![Build Status](https://travis-ci.org/Bouke/My-Home.svg?branch=master)](https://travis-ci.org/Bouke/My-Home)
## Build
### MacOS
Install libsodium (used for Curve25519 and Ed25519):
brew install libsodium
And then build and run the project itself:
swift build -c release
### Linux
Install dependencies:
sudo apt install openssl libssl-dev libsodium-dev libcurl4-openssl-dev
And then build and run the project itself:
swift build -c release
## Run
ICY_USERNAME=... ICY_PASSWORD=... swift run -c release
## Install
To run as a service, create the following file at `/etc/systemd/system/my-home.service`:
```
[Unit]
Description=my-home
Wants=network-online.target
After=network-online.target[Service]
ExecStart=/home/pi/my-home/.build/release/my-home
User=pi
Restart=on-failure
RestartSec=30
Environment=ICY_USERNAME=...
Environment=ICY_PASSWORD=...
WorkingDirectory=/home/pi[Install]
WantedBy=multi-user.target
```