[GH-ISSUE #28] Feature Request: event stream #28

Closed
opened 2026-03-03 16:43:00 +03:00 by kerem · 4 comments
Owner

Originally created by @robzr on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/nickustinov/itsyhome-macos/issues/28

Originally assigned to: @nickustinov on GitHub.

I've been playing with the API and CLI app. It's awesome. Finally, I have an easy to use CLI UI for HomeKit. The JSON output is a really nice touch. The further I can get from Home Assistant / HomeKit Controller, the happier I am - especially if I can do it with a very native UNIX/shell UI.

What would be an amazing and powerful addition would be some way of getting a JSON event stream from HomeKit. My dream ask is either writing to a named FIFO, or TCP listener, configurable from ItsyHome UI, that publishes an event stream, filtered server-side with jq queries (via SwiftJQ perhaps?). A TCP server on 127.0.0.1 could be tunneled over ssh to offload auth/access issues. Netcat could be used (or an ityshome CLI command?) to pipe the events into a shell/jq script. This would unlock automations and integrations with other APIs that currently requires something like Home Assistant with all the headaches that brings.

Originally created by @robzr on GitHub (Feb 7, 2026). Original GitHub issue: https://github.com/nickustinov/itsyhome-macos/issues/28 Originally assigned to: @nickustinov on GitHub. I've been playing with the API and CLI app. It's awesome. Finally, I have an easy to use CLI UI for HomeKit. The JSON output is a really nice touch. The further I can get from Home Assistant / HomeKit Controller, the happier I am - especially if I can do it with a very native UNIX/shell UI. What would be an amazing and powerful addition would be some way of getting a JSON event stream from HomeKit. My dream ask is either writing to a named FIFO, or TCP listener, configurable from ItsyHome UI, that publishes an event stream, filtered server-side with jq queries (via SwiftJQ perhaps?). A TCP server on 127.0.0.1 could be tunneled over ssh to offload auth/access issues. Netcat could be used (or an `ityshome` CLI command?) to pipe the events into a shell/jq script. This would unlock automations and integrations with other APIs that currently requires something like Home Assistant with all the headaches that brings.
kerem 2026-03-03 16:43:00 +03:00
Author
Owner

@nickustinov commented on GitHub (Feb 8, 2026):

@robzr Hi! I have seen HA event stream, but what is Homekit event stream? Can you point me to specific Apple docs describing such thing?

<!-- gh-comment-id:3866589871 --> @nickustinov commented on GitHub (Feb 8, 2026): @robzr Hi! I have seen HA event stream, but what is Homekit event stream? Can you point me to specific Apple docs describing such thing?
Author
Owner

@robzr commented on GitHub (Feb 8, 2026):

Event stream in the general/conceptual sense, I think (not a Swift programmer and I don't know the HomeKit API) it would be hooking into HMHomeDelegate for accessory status changes (which I think you're already doing now to update the menu bar status) and transforming each event into one line JSON objects that could be written out to a file/TCP stream. Basically, a simple service for streaming events as they happen to clients in the UNIX shell or general purpose scripting languages. I'd be happy to write up example clients in a few languages, including shell scripts.

Writing every single event out without filtering them might be pretty noisy. But that could easily be piped through jq (in shell), or natively in a scripting language like Python or Ruby, and avoid the complexity of providing an interface for filtering events in itsyhome-macos.

<!-- gh-comment-id:3868564316 --> @robzr commented on GitHub (Feb 8, 2026): Event stream in the general/conceptual sense, I think (not a Swift programmer and I don't know the HomeKit API) it would be hooking into HMHomeDelegate for accessory status changes (which I think you're already doing now to update the menu bar status) and transforming each event into one line JSON objects that could be written out to a file/TCP stream. Basically, a simple service for streaming events as they happen to clients in the UNIX shell or general purpose scripting languages. I'd be happy to write up example clients in a few languages, including shell scripts. Writing every single event out without filtering them might be pretty noisy. But that could easily be piped through **jq** (in shell), or natively in a scripting language like Python or Ruby, and avoid the complexity of providing an interface for filtering events in **itsyhome-macos**.
Author
Owner

@nickustinov commented on GitHub (Feb 9, 2026):

Added in 2.0.0

<!-- gh-comment-id:3870740751 --> @nickustinov commented on GitHub (Feb 9, 2026): Added in 2.0.0
Author
Owner

@robzr commented on GitHub (Feb 11, 2026):

Unreal! Thanks man. I see this is steadily climbing the chart in App Store utilities - nice work! Can't wait to tinker with the event stream.

<!-- gh-comment-id:3882239252 --> @robzr commented on GitHub (Feb 11, 2026): Unreal! Thanks man. I see this is steadily climbing the chart in App Store utilities - nice work! Can't wait to tinker with the event stream.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/itsyhome-macos#28
No description provided.