class Xovis::SensorAPI

Included Modules

Defined in:

xovis/sensor_api.cr

Constant Summary

NO_MATCH = [] of Interface::Sensor::Detail
TYPES = {"line-counts" => SensorType::QueueSize, "zone-occupancy-counts" => SensorType::PeopleCount, "zone-in-out-counts" => SensorType::Counter}

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def capacity_data #

[View source]
def count_data #

[View source]
def device_status #

Combined /info and /info/status


[View source]
def get_logs #

[View source]
def get_token #

Alternative to using basic auth, but here really only for testing with postman


[View source]
def is_alive? #

[View source]
def on_update #

[View source]
def reset_count #

[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]