Skip to main content Link Search Menu Expand Document (external link)

RollershutterItem

This class extends the RollershutterItem type with additional methods

MethodDescriptionExample
up?Returns true if item state == UPputs "#{item.name} is up" if item.up?
down?Returns true if item state == DOWNputs "#{item.name} is down" if item.down?
upSend UP command to itemitem.up
downSend DOWN command to itemitem.down
stopSend STOP command to itemitem.stop
moveSend MOVE command to itemitem.move
positionGets the position of the rollershutterputs "#{item.name} is at #{item.position} percent"

Examples

Roll up all Rollershutters in a group

Shutters.up

Log a warning for all rollershutters that are not up

Shutters.reject(&:up?).each do |item|
  logger.warn("#{item.id} is not rolled up!")
end

Set rollershutter to a specified position

Example_Rollershutter << 40