Packages

Discover, monitor and control Belkin WeMo devices on your local network

Current section

Files

Jump to
ex_wemo lib wemo application.ex
Raw

lib/wemo/application.ex

defmodule WeMo.Application do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
# List all child processes to be supervised
children = [
supervisor(Registry, [:duplicate, WeMo.Registry, []]),
supervisor(Task.Supervisor, [[name: WeMo.TaskSupervisor]]),
supervisor(WeMo.InsightSupervisor, []),
supervisor(WeMo.LightSwitchSupervisor, []),
supervisor(WeMo.SwitchSupervisor, []),
supervisor(WeMo.CoffeeMakerSupervisor, []),
supervisor(WeMo.HumidifierSupervisor, []),
worker(WeMo.HTTPRouter, []),
worker(WeMo.Client, []),
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: WeMo.Supervisor]
Supervisor.start_link(children, opts)
end
end