HA event bus + WebSocket integration for real-time chore/task #514
ryan-winkler
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there,
I'm building Meitheal, an HA addon that pulls Grocy chores and tasks into a unified task board. Bidirectional sync works, but right now we're stuck polling /api/chores and /api/tasks on a timer because there's no push mechanism from Grocy's side.
I'm really looking to solidify this relationship between Grocy and mine, and though that the following could help out a bunch:
When a chore is executed or a task is completed/created, fire an event on the HA event bus. Even something generic would be great:
yaml
event_type: grocy_state_changed
data:
entity_type: chore # chore | task | shopping_list
action: executed # executed | completed | created | deleted
entity_id: 5
name: "Clean kitchen"
The Supervisor API already supports POST /core/api/events/{event_type} — so this is just a matter of Grocy calling it when mutations happen. Other addons and automations could subscribe instantly instead of polling.
Right now, if another addon wants to talk to Grocy's API, you need to manually grab an API key from Grocy's UI and paste it into settings. It'd be brilliant if addons running on the same Supervisor could authenticate automatically — maybe via a shared secret or the Supervisor's internal service discovery. The HA WebSocket API pattern is a good reference for how inter-addon communication could work without manual token exchange.
Let me know if you have any questions or concerns!
Beta Was this translation helpful? Give feedback.
All reactions