Modified by john.fullman@gmail.com
*/
metadata
{
definition (name: “Aeon Multisensor 4 Gen5 (Configurable)”, namespace: “john.fullman”, author: "john.fullman@gmail.com")
{
capability "Motion Sensor"
capability "Temperature Measurement"
capability "Relative Humidity Measurement"
capability "Illuminance Measurement"
capability "Configuration"
command "logconfig"
capability "Sensor"
capability "Battery"
capability “Refresh”
fingerprint deviceId: "0x0701", inClusters: "0x5E,0x86,0x72,0x59,0x85,0x73,0x71,0x84,0x80,0x30,0x31,0x70,0x98,0x7A", outClusters:"0x5A"
}
preferences
{
//realtime reporting
input “ReportRealTime”, “bool”, title: “Should values be reported in realtime as they move past thresholds?”, required: true, displayDuringSetup: true, defaultValue: false
input “ReportTemperatureRT”, “decimal”, title: “Report threshold temperature (degrees):”, required: true, displayDuringSetup: true, defaultValue: 1.8
input “ReportHumidityRT”, “decimal”, title: “Report threshold for humidity (%):”, required: true, displayDuringSetup: true, defaultValue: 1.0
input “ReportIlluminanceRT”, “decimal”, title: “Report threshold for illuminance (LUX):”, required: true, displayDuringSetup: true, defaultValue: 100.0
input “ReportBatteryRT”, “decimal”, title: “Report threshold for battery (%):”, required: true, displayDuringSetup: true, defaultValue: 5.0
//motion
input "MotionStopMinutes", "number", title: "Minutes until no-motion is reported:", required: true, displayDuringSetup: true, defaultValue: 4
input "MotionStopSeconds", "number", title: "Seconds until no-motion is reported:", required: true, displayDuringSetup: true, defaultValue: 0
//group 1
input "ReportInterval1", "number", title: "Report Group 1 items every x minutes:", required: true, displayDuringSetup: true, defaultValue: 30
input "ReportTemperature1", "bool", title: "Report temperature in Group 1?", required: true, displayDuringSetup: true, defaultValue: true
input "ReportHumidity1", "bool", title: "Report humidity in Group 1?", required: true, displayDuringSetup: true, defaultValue: true
input "ReportIlluminance1", "bool", title: "Report illuminance in Group 1?", required: true, displayDuringSetup: true, defaultValue: true
input "ReportBattery1", "bool", title: "Report battery level in Group 1?", required: true, displayDuringSetup: true, defaultValue: true
//group 2
input "ReportInterval2", "number", title: "Report Group 2 items every x minutes:", required: true, displayDuringSetup: true, defaultValue: 30
input "ReportTemperature2", "bool", title: "Report temperature in Group 2?", required: true, displayDuringSetup: true, defaultValue: false
input "ReportHumidity2", "bool", title: "Report humidity in Group 2?", required: true, displayDuringSetup: true, defaultValue: false
input "ReportIlluminance2", "bool", title: "Report illuminance in Group 2?", required: true, displayDuringSetup: true, defaultValue: false
input "ReportBattery2", "bool", title: "Report battery level in Group 2?", required: true, displayDuringSetup: true, defaultValue: false
//group 3
input "ReportInterval3", "number", title: "Report Group 3 items every x minutes:", required: true, displayDuringSetup: true, defaultValue: 30
input "ReportTemperature3", "bool", title: "Report temperature in Group 3?", required: true, displayDuringSetup: true, defaultValue: false
input "ReportHumidity3", "bool", title: "Report humidity in Group 3?", required: true, displayDuringSetup: true, defaultValue: false
input "ReportIlluminance3", "bool", title: "Report illuminance in Group 3?", required: true, displayDuringSetup: true, defaultValue: false
input "ReportBattery3", "bool", title: "Report battery level in Group 3?", required: true, displayDuringSetup: true, defaultValue: false
//battery
input "ReportLowBattery", "bool", title: "Report low battery warnings", required: true, displayDuringSetup: true, defaultValue: true
}
simulator
{
status “no motion” : "command: 9881, payload: 00300300"
status “motion” : “command: 9881, payload: 003003FF”
for (int i = 0; i <= 100; i += 20) {
status "temperature ${i}F": new physicalgraph.zwave.Zwave().securityV1.securityMessageEncapsulation().encapsulate(
new physicalgraph.zwave.Zwave().sensorMultilevelV2.sensorMultilevelReport(
scaledSensorValue: i, precision: 1, sensorType: 1, scale: 1)
).incomingMessage()
}
for (int i = 0; i <= 100; i += 20) {
status "humidity ${i}%": new physicalgraph.zwave.Zwave().securityV1.securityMessageEncapsulation().encapsulate(
new physicalgraph.zwave.Zwave().sensorMultilevelV2.sensorMultilevelReport(scaledSensorValue: i, sensorType: 5)
).incomingMessage()
}
for (int i in [0, 20, 89, 100, 200, 500, 1000]) {
status "illuminance ${i} lux": new physicalgraph.zwave.Zwave().securityV1.securityMessageEncapsulation().encapsulate(
new physicalgraph.zwave.Zwave().sensorMultilevelV2.sensorMultilevelReport(scaledSensorValue: i, sensorType: 3)
).incomingMessage()
}
for (int i in [0, 5, 10, 15, 50, 99, 100]) {
status "battery ${i}%": new physicalgraph.zwave.Zwave().securityV1.securityMessageEncapsulation().encapsulate(
new physicalgraph.zwave.Zwave().batteryV1.batteryReport(batteryLevel: i)
).incomingMessage()
}
status "low battery alert": new physicalgraph.zwave.Zwave().securityV1.securityMessageEncapsulation().encapsulate(
new physicalgraph.zwave.Zwave().batteryV1.batteryReport(batteryLevel: 255)
).incomingMessage()
status "wake up" : "command: 8407, payload: "
}
tiles
{
standardTile(“motion”, “device.motion”) {
state “active”, label:‘motion’, icon:“st.motion.motion.active”, backgroundColor:"#53a7c0"
state “inactive”, label:‘no motion’, icon:“st.motion.motion.inactive”, backgroundColor:"#ffffff"
}
valueTile(“temperature”, “device.temperature”, inactiveLabel: false) {
state “temperature”, label:’${currentValue}°’,
backgroundColors:[
[value: 32, color: “#153591”],
[value: 44, color: “#1e9cbb”],
[value: 59, color: “#90d2a7”],
[value: 74, color: “#44b621”],
[value: 84, color: “#f1d801”],
[value: 92, color: “#d04e00”],
[value: 98, color: “#bc2323”]
]
}
valueTile(“humidity”, “device.humidity”, inactiveLabel: false) {
state “humidity”, label:’${currentValue}% humidity’, unit:""
}
valueTile(“illuminance”, “device.illuminance”, inactiveLabel: false) {
state “luminosity”, label:’${currentValue} lux’, unit:“lux”
}
valueTile(“battery”, “device.battery”, inactiveLabel: false, decoration: “flat”) {
state “battery”, label:’${currentValue}% battery’, unit:""
}
standardTile(“configure”, “device.configure”, inactiveLabel: false, decoration: “flat”) {
state “configure”, label:’’, action:“configure”, icon:“st.secondary.configure”
}
standardTile(“logconfig”, “device.logconfig”)
{
state “default”, label: “log config”, action: “logconfig” //, inactiveLabel: true
}
standardTile(“refresh”, “device.refresh”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:’’, action:“refresh.refresh”, icon:“st.secondary.refresh”
}
main(["motion", "temperature", "humidity", "illuminance"])
details(["motion", "temperature", "humidity", "illuminance", "battery", "configure", "logconfig", "refresh"])
}
}