Class: MQTT::Homie::Device::Firmware
Class Method Summary
collapse
Methods inherited from HomieObject
#initialize, #topic
included
Class Method Details
.default_fw_name ⇒ Object
17
18
19
|
# File 'lib/mqtt/homie/device.rb', line 17
def default_fw_name
uname.sysname rescue uname.caption rescue "Unknown"
end
|
.default_fw_version ⇒ Object
21
22
23
|
# File 'lib/mqtt/homie/device.rb', line 21
def default_fw_version
uname.release rescue uname.build_number rescue "Unknown"
end
|
.uname ⇒ Object
25
26
27
|
# File 'lib/mqtt/homie/device.rb', line 25
def uname
@uname ||= Sys::Uname.uname
end
|