class Vergesense::LocationService

Included Modules

Defined in:

vergesense/location_service.cr

Constant Summary

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

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def check_ownership_of(mac_address : String) : OwnershipMAC | Nil #
Description copied from module PlaceOS::Driver::Interface::Locatable

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


[View source]
def device_locations(zone_id : String, location : String | Nil = nil) #
Description copied from module PlaceOS::Driver::Interface::Locatable

array of devices and their x, y coordinates


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

=================================== Locatable Interface functions


[View source]
def macs_assigned_to(email : String | Nil = nil, username : String | Nil = nil) : Array(String) #
Description copied from module PlaceOS::Driver::Interface::Locatable

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


[View source]
def on_load #

[View source]
def on_update #

[View source]
def sensor(mac : String, id : String | Nil = nil) : Detail | Nil #

=================================== Sensor Interface functions


[View source]
def sensors(type : String | Nil = nil, mac : String | Nil = nil, zone_id : String | Nil = nil) : Array(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]