SensorsΒΆ
The type sensor is used to mark things that read one or more values.
if(thing.matches('type:sensor') {
console.log('Sensor values:', thing.values());
}
if(thing.matches('type:sensor', 'cap:temperature')) {
console.log('Temperature:', thing.temperature());
}
Capabilities
cap:atmospheric-pressure- read atmospheric pressurecap:carbon-dioxide- read carbon dioxide levelcap:carbon-monoxide- read carbon monoxide levelcap:contact- contact sensingcap:illuminance- read illuminancecap:motion- motion sensingcap:pm2.5- read PM2.5 density (air quality)cap:pm10- read PM10 density (air quality)cap:power-consumed- read power consumedcap:power-load- read the current power loadcap:relative-humidity- read humidity of aircap:temperature- read temperaturecap:voltage- read voltage of something