class Milight::V6::Controller
Controller
for the Mi-Light WiFi iBox.
Public Class Methods
new(host = "<broadcast>", port = 5987, wait: 0.1)
click to toggle source
# File lib/milight/v6/controller.rb, line 15 def initialize(host = "<broadcast>", port = 5987, wait: 0.1) @socket = Milight::V6::Socket.new(host, port) @command = Milight::V6::Command.new(@socket, wait: wait) end
Public Instance Methods
all()
click to toggle source
Select all zones.
# File lib/milight/v6/controller.rb, line 21 def all Milight::V6::All.new(@command) end
bridge()
click to toggle source
Select the bridge lamp.
# File lib/milight/v6/controller.rb, line 31 def bridge Milight::V6::Bridge.new(@command) end
to_s()
click to toggle source
# File lib/milight/v6/controller.rb, line 35 def to_s "Mi-Light Wifi iBox Controller. IP address: #{@socket.host}" end
zone(zone_id)
click to toggle source
Select a specific zone.
# File lib/milight/v6/controller.rb, line 26 def zone(zone_id) Milight::V6::Zone.new(@command, zone_id) end