class

App::Trigger

Inherits App::Base < ActionController::Base < ActionController::Responders < ActionController::Route::Builder < Reference < Object

a controller for manually activating the trigger

Constants

IO_CHIP_PATH = Path[ENV["IO_CHIP_PATH"]? || "/dev/gpiochip0"]
OPENAPI = YAML.parse(File.exists?("openapi.yml") ? File.read("openapi.yml") : "{}")

this file is built as part of the docker build

PARSER_LIST = ["application/json"]

a controller for manually activating the trigger

RELAY_TRIGGER_LINE = (ENV["RELAY_TRIGGER_LINE"]? || "26").to_i
RESPONDER_LIST = ["application/json", "application/yaml", "text/html"]

a controller for manually activating the trigger

Class methods

activate(hash_parts : Hash(String | Symbol, Nil | Bool | Int32 | Int64 | Float32 | Float64 | String | Symbol) | Nil = nil, **tuple_parts)

Helper methods for performing redirect_to calls

activate_for(time : Time::Span)
Source
base_route

Helper for obtaining base route

io_chip
Source
mutex
Source
trigger_relay
Source

Instance methods

activate(relay_time : Int32 = 500) : Nil

change the state of the chicken door

Source
base_route(*args, **options)

Helper for obtaining base route

base_route(*args, **options, &)

Helper for obtaining base route

manual_state(state : State) : Nil

change the state of the chicken door

Source
openapi

returns the OpenAPI representation of this service

Source

Nested types