class Cisco::DNASpaces

Included Modules

Defined in:

cisco/dna_spaces.cr
cisco/dna_spaces/sensor_interface.cr

Constant Summary

IOT_SENSORS = {SensorType::Presence, SensorType::PeopleCount, SensorType::Humidity, SensorType::AirQuality, SensorType::SoundPressure, SensorType::Temperature}
NO_MATCH = [] of Interface::Sensor::Detail

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def activate #

[View source]
def check_ownership_of(mac_address : String) : OwnershipMAC | Nil #

Will return nil or {"location": "wireless", "assigned_to": "bob123", "mac_address": "abcd"}


[View source]
def cleanup_caches : Nil #

[View source]
def device_locations(zone_id : String, location : String | Nil = nil) #

Will return an array of devices and their x, y coordinates


[View source]
def devices(&) #

[View source]
def format_mac(address : String) #

[View source]
def format_username(user : String) #

[View source]
def get_location_info(location_id : String) #

[View source]
def get_map_details(map_id : String) #

[View source]
def inspect_state #

[View source]
def locate_mac(address : String) #

[View source]
def locate_user(email : String | Nil = nil, username : String | Nil = nil) #

============================= Locatable interface


[View source]
def locations(&) #

[View source]
def macs_assigned_to(email : String | Nil = nil, username : String | Nil = nil) : Array(String) #

Will return an array of MAC address strings lowercase with no seperation characters abcdeffd1234 etc


[View source]
def on_load #

[View source]
def on_unload #

[View source]
def on_update #

[View source]
def seen_locations #

[View source]
def sensor(mac : String, id : String | Nil = nil) : Interface::Sensor::Detail | Nil #
Description copied from module PlaceOS::Driver::Interface::Sensor

return the specified sensor details


[View source]
def sensors(type : String | Nil = nil, mac : String | Nil = nil, zone_id : String | Nil = nil) : Array(Interface::Sensor::Detail) #
Description copied from module PlaceOS::Driver::Interface::Sensor

return an array of sensor details zone_id can be ignored if location is unknown by the sensor provider mac_address can be used to grab data from a single device (basic grouping)


[View source]
def update_monitoring_status(running : Bool = true) : Nil #

This provides the DNA Spaces dashboard with stream consumption status


[View source]
def user_lookup(&) #

[View source]
def user_lookup(user_id : String) #

[View source]