shimmeringbee / controller

Implementation of home automation controller (a.k.a hub and gateway), initially focusing on Zigbee devices, written in Go.

Home Page:https://shimmeringbee.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Output Layers

pwood opened this issue · comments

Output layers are a concept that allow multiple different interfaces/internal controller applications to share capabilites on devices, with each application having a priority.

Use case 1 (dual demand):

  • User switches on light in bathroom, this also asserts an extration fan should be on, fan goes on.
  • The environmental system sees high humidity in the bathroom, and asserts the fan should be on.
  • User switches off the light in bathroom, asserts the fan to be off, the fan remains on because the humidity is still too high.
  • Humidity drops below a water mark, asserts fan to be off, fan goes off.

Use case 2 (conflicting demand):

  • User switches on light, light asserts on, warm white. Light turns on to warm white.
  • Alarm system goes into alarm, asserts light red. Light turns red.
  • Alarm system cleans alarm, unasserts light red. Light results to be warm white.

To Do

  • Add Go interfaces to controller for stack and layer.
  • Pass stack and layer to HTTP interface.
  • Implement dumb pass thru layer.
  • Allow selection of layer and retention policy to HTTP interface (default HTTP layer is http).
  • Implement resolving layers, intercepting capabilities that have an output to a device.
  • Enable creation of multiple layers in configuration, with priority assigned by order.