class Philips::Hue

Included Modules

Defined in:

philips/hue.cr

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def app_key : String #

[View source]
def client_key : String #

[View source]
def device_list #

[View source]
def lighting_level?(area : Area | Nil = nil) #
Description copied from module PlaceOS::Driver::Interface::Lighting::Level

return the current level


[View source]
def lighting_scene?(area : Area | Nil = nil) #

[View source]
def on_update #

[View source]
def register #

[View source]
def resource_details(resource : Resource, id : String | Nil = nil) #

[View source]
def rgb_to_cie(r : UInt8, g : UInt8, b : UInt8) : Tuple(Float64, Float64) #

convert RGB to CIE which is used by Hue


[View source]
def scene_list #

[View source]
def scenes : Array(String) #

[View source]
def set_light_colour(light_id : Int32, r : UInt8 = 0_u8, g : UInt8 = 0_u8, b : UInt8 = 0_u8) #

[View source]
def set_light_level(light_id : String, level : UInt32, resource : Resource = Resource::Light) #

[View source]
def set_lighting_level(level : Float64, area : Area | Nil = nil, fade_time : UInt32 = 1000_u32) #
Description copied from module PlaceOS::Driver::Interface::Lighting::Level

level between 0.0 and 100.0, fade in milliseconds


[View source]
def set_lighting_scene(scene : UInt32, area : Area | Nil = nil, fade_time : UInt32 = 1000_u32) #

================== Lighting Interface


[View source]
def set_scene(scene_id : String) #

[View source]