Skip to content

rveznaver/hktimer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hktimer

Open-Source HomeKit Timer Switch

A simple HomeKit-compatible timer that can be controlled via both HomeKit and an HTTP API. When the timer expires, it automatically turns on a virtual HomeKit switch.

Usage

# Build and run
go build
./hktimer

# Run with custom port
./hktimer -port 8080

HTTP API

Get timer status:

curl http://localhost:30001/timer

Set timer (seconds):

curl -X PUT http://localhost:30001/timer \
  -H "Content-Type: application/json" \
  -d '{"seconds": 300}'

Timer range: 0 to 2,592,000 seconds (30 days)

Testing

go test ./...

Requirements

  • Go 1.24+
  • macOS or Linux

About

Open-Source HomeKit Cron Switch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages