class

PlaceOS::Driver::Interface::Sensor::Detail

Inherits JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

Constructors

new(type : PlaceOS::Driver::Interface::Sensor::SensorType, value : Float64, last_seen : Int64, mac : String, id : Nil | String, name : Nil | String, raw : Nil | String = nil, loc : PlaceOS::Driver::Interface::Sensor::Location | Nil = nil, status : PlaceOS::Driver::Interface::Sensor::Status = Status::Normal, limit_high : Float64 | Nil = nil, limit_low : Float64 | Nil = nil, resolution : Float64 | Nil = nil, module_id : Nil | String = nil, binding : Nil | String = nil, unit : Nil | String = nil, modifier : Nil | String = nil, building : Nil | String = nil, level : Nil | String = nil)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

binding
Source
binding=(binding : String | Nil)
Source
building
Source
building=(building : String | Nil)
Source
id=(id : String | Nil)
Source
last_seen
Source
last_seen=(last_seen : Int64)
Source
lat=(lat : Float64 | Nil)
Source
level
Source
level=(level : String | Nil)
Source
limit_high
Source
limit_high=(limit_high : Float64 | Nil)
Source
limit_low
Source
limit_low=(limit_low : Float64 | Nil)
Source
loc

unadjusted location if the sensor platform has this information

Source
loc=(loc : Location | Nil)

unadjusted location if the sensor platform has this information

Source
location

Resolved location data, generated by Area Management:

Source
lon=(lon : Float64 | Nil)
Source
mac

the id can be optional if the mac address represents a single value

Source
mac=(mac : String)

the id can be optional if the mac address represents a single value

Source
modified_type
Source
modifier
Source
modifier=(modifier : String | Nil)
Source
module_id

binding details if interested in live updates

Source
module_id=(module_id : String | Nil)

binding details if interested in live updates

Source
name

name is some useful human itentifying information about the sensor i.e. "lobby motion detector" or "Globalsat LS-113P"

Source
name=(name : String | Nil)

name is some useful human itentifying information about the sensor i.e. "lobby motion detector" or "Globalsat LS-113P"

Source
raw

raw is a human readable original value i.e. Temperature is always celsius but the sensor may be reporting Fahrenheit so an example raw string would be "88.2°F"

Source
raw=(raw : String | Nil)

raw is a human readable original value i.e. Temperature is always celsius but the sensor may be reporting Fahrenheit so an example raw string would be "88.2°F"

Source
resolution
Source
resolution=(resolution : Float64 | Nil)
Source
s2_cell_id
Source
s2_cell_id=(s2_cell_id : String | Nil)
Source
seen_at
Source
status
Source
status=(status : Status)
Source
type
Source
type=(type : SensorType)
Source
unit

The unit type string as supported by crunits

Source
unit=(unit : String | Nil)

The unit type string as supported by crunits

Source
value
Source
value=(value : Float64)
Source
x

percentage coordinates from top-left when coordinates_from == nil

Source
x=(x : Float64 | Nil)

percentage coordinates from top-left when coordinates_from == nil

Source
y=(y : Float64 | Nil)
Source