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());
}
cap:atmospheric-pressure
- read atmospheric pressurecap:carbon-dioxide-detection
- detect abnormal CO2 levelscap:carbon-dioxide-level
- read carbon dioxide levelcap:carbon-monoxide-detection
- detect abnormal CO levelscap:carbon-monoxide-leve
- read carbon monoxide levelcap:contact-detection
- contact sensingcap:illuminance
- read illuminancecap:motion-detection
- 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:smoke-detection
- detect smokecap:temperature
- read temperaturecap:voltage
- read voltage of somethingcap:water-detection
- detect water