8. Sharing and lending

The idea

The Emkay on the bedroom tablet runs in a browser. It hears, understands and answers by itself – but a browser can't reach the IKEA hub on the network. The Raspberry Pi by the router can. With peers, the Pi lends the home, the tablet borrows it, and "turn off the light in the living room" works on the tablet.

That makes Emkay a middle way between standing alone and being a satellite:

The house lends what belongs to the household, My Emkay carries what belongs to you, and the thinking stays on each Emkay.

An Emkay borrows a tool the browser doesn't have – hardware, the network, a key, a lot of computing power – never the thinking itself.

The house lends the home, its music, the family calendar and a big model; an Emkay borrows them over WebRTC on the LAN, sending only the command and getting the answer

What can be lent, and what can't

Lent Never lent
the home (lights, heat, blinds, sensors) what was heard, or audio
a search in the house's music the session, the intent pipeline
the family calendar and lists configuration and settings
a question to the house's model installing anything
a person's own accounts – those are My Emkay's

The rules

Two kinds of group

A device can be in one of each, and looks in My devices first.

The house is its own meeting place

Devices find each other through sealed files in a storage. For the house that storage is the house itself – Emkay Home serves it at https://<house>/peers-store/. No GitHub, no account; the address and certificate are the ones the Emkays already trust from being added.

What the house lends

The home

The house lends ovos.home – every brand it knows, in one home (chapter 9). An Emkay with its own home plugin uses its own instead.

Music

The house searches its own media (local files, a NAS, Jellyfin, radio) and the Emkay plays it. Both sides are OVOS' new media providers: the house runs a small lender that asks its providers, and the Emkay has a provider that asks the house. Streams come from the house's own https address, one track per token, so no share or Jellyfin key reaches the Emkay.

The calendar and lists

The family calendar, the shopping list and the household's schedules are the house's, lent with peers. Your own calendar is yours and follows you with My Emkay. "What are we doing today?" answers once, from both. More in chapter 11.

The house's assistant

The house can run a large model (Ollama, on a GPU). Each Emkay can turn on Ask the house's assistant when I don't know under Where should Emkay think? – off by default, and the switch says that the text of what you asked is sent to the house.

It is done the OVOS way, so any OVOS with peers can use it: ovos-peer-persona-plugin makes each persona the house lends a persona on the Emkay. The Emkay's own pipeline still decides; the house's persona only answers what nothing on the Emkay knew. Turning on Local only turns the switch off.

On the bus

ovos.peers.get              {} -> devices, what this device lends and borrows
ovos.peers.changed          (sent) a device came, went, or lends something else
ovos.peers.offer.update     {"ns", "offer": bool, "groups"?}   what this device lends
ovos.peers.borrow.update    {"ns", "borrow": bool, "from"?}    what it borrows, and from whom
ovos.peers.permit           {"device", "ns", "groups"}         what a device in the house may do here
ovos.peers.house.pair       {} -> {"code"}                     the code to join the house (show it as a QR)
ovos.peers.house.join       {"code"}
ovos.peers.house.leave      {}
ovos.peers.test             {} -> {"ok"}: ask every lender something harmless

An offer names a namespace, its requests by group, its events, and optionally which message answers a request (answers), how long it may take (timeout) and whether a device must turn it on first (opt_in – the assistant is). The full design: SPEC.md and docs/LENDING.md.

In the menus

Repos: ovos-PHAL-plugin-peers · ovos-peer-persona-plugin