in addiition i have a device handler for the qubino weather station… currently the device is not even showing up under devices… Any idea why…Anyway here is the first part of the current code with tiles, that again will have to be all converted to custom capabilities
metadata {
definition (name: “Qubino Weatherstation V2”, namespace: “LGK-Apps”, author: “Kristjan Jamšek, kahn@lgk.com”) {
capability “Configuration” //Needed for configure() function to set MultiChannel Lifeline Association Set
capability “Temperature Measurement” //Used on main tile, needed in order to have the device appear in capabilities lists, mirrors temperatureCh1 attribute states
capability “Relative Humidity Measurement” //Needed in order to have the device appear in capabilities lists, mirrors humidityCh1 attribute states
capability “Sensor” // - Tagging capability
capability “Health Check”
attribute "temperatureCh1", "number" // temperature attribute for Ch1 Temperature reported by device's endpoint 1
attribute "windDirection", "number" // wind direction attribute for Wind Gauge - Direction reported by device's endpoint 2
attribute "windVelocity", "number" // wind velocity attribute for Wind Gauge - Velocity reported by device's endpoint 3
attribute "windGust", "number" // wind gust velocity attribute for Wind Gauge - Wind gust reported by device's endpoint 4
attribute "windTemperature", "number" // wind temperature attribute for Wind Gauge - Temperature reported by device's endpoint 5
attribute "windChillTemperature", "number" // wind chill temperature attribute for Wind Gauge - Wind Chill reported by device's endpoint 6
attribute "rainRate", "number" // rain rate attribute for Rain Sensor data reported by device's endpoint 7
attribute "humidityCh1", "number" // humidity attribute for Ch1 Humidity reported by device's endpoint 8
attribute "temperatureCh2", "number" // temperature attribute for Ch2 Temperature reported by device's endpoint 9
attribute "humidityCh2", "number" // humidity attribute for Ch2 Humidity reported by device's endpoint 10
attribute "setConfigParams", "string" // attribute for tile element for setConfigurationParams command
attribute "setAssocGroups", "string" // attribute for tile element for setAssociations command
/* lgk last update times. */
attribute "lastUpdateWind", "string"
attribute "lastUpdateCh1", "string"
attribute "lastUpdateCh2", "string"
attribute "lastUpdateRain", "string"
attribute "windMaxDate", "string"
attribute "tempMaxDate", "string"
attribute "tempMinDate", "string"
attribute "rainMaxDate", "string"
attribute "maxOutdoorTemp", "number"
attribute "minOutdoorTemp", "number"
attribute "maxRain", "number"
attribute "maxWindGust", "number"
attribute "windMaxDateStr", "string"
attribute "tempMaxDateStr", "string"
attribute "tempMinDateStr", "string"
attribute "rainMaxDateStr", "string"
command "setConfigurationParams" // command to issue Configuration Set command sequence according to user's preferences
command "setAssociations" // command to issue Association Set command sequence according to user's preferences
command "resetMaxMin" // lgk reset them
fingerprint mfr:"0159", prod:"0007", model:"0053" //Manufacturer Information values for Qubino Weatherstation
}
simulator {
// TESTED WITH PHYSICAL DEVICE - UNNEEDED
}
tiles(scale: 2) {
multiAttributeTile(name:"temperature", type:"generic", width:6, height:4, canChangeIcon: false) {
tileAttribute("device.temperature", key: "PRIMARY_CONTROL") {
attributeState("default", label:'${currentValue} °F', unit: "°F", icon: "st.Weather.weather2",
backgroundColors:[
[value: 1, color: "#c8e3f9"],
[value: 10, color: "#dbdee2"],
[value: 20, color: "#c0d2e4"],
[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"]
])
}
tileAttribute("device.windChillTemperature", key: "SECONDARY_CONTROL") {
attributeState("default", label:'Wind Chill ${currentValue} °F', unit:"°F")
}
}
/*
tiles(scale: 2) {
valueTile("temperature", "device.temperature") {
state("temperature", label:'${currentValue} °F', unit:"°F", icon: "st.Weather.weather2", backgroundColors: [
// Celsius Color Range
[value: 0, color: "#153591"],
[value: 7, color: "#1e9cbb"],
[value: 15, color: "#90d2a7"],
[value: 23, color: "#44b621"],
[value: 29, color: "#f1d801"],
[value: 33, color: "#d04e00"],
[value: 36, color: "#bc2323"],
// Fahrenheit Color Range
[value: 40, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 92, color: "#d04e00"],
[value: 96, color: "#bc2323"]
])
}
*/
valueTile("humidity", "device.humidity") {
state("humidity", label:'${currentValue} %', unit:"%", display:false)
}
standardTile("temperatureCh1", "device.temperatureCh1", width: 3, height: 2) {
state("temperatureCh1", label:'Temp. Ch1:\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
backgroundColors:[
[value: 1, color: "#c8e3f9"],
[value: 10, color: "#dbdee2"],
[value: 20, color: "#c0d2e4"],
[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"]
])
}
standardTile("windDirection", "device.windDirection", width: 3, height: 2) {
state("windDirection", label:'Wind Dir.:\n${currentValue}', unit: "", icon: 'st.Outdoor.outdoor20')
}
standardTile("windVelocity", "device.windVelocity", width: 3, height: 2) {
state("windVelocity", label:'Wind Vel.:\n${currentValue} mph', unit:"mph", icon: 'st.Weather.weather1',
backgroundColors: [
[value: 0, color: "#90d2a7"],
[value: 5, color: "#44b621"],
[value: 10, color: "#f1d801"],
[value: 20, color: "#d04e00"],
[value: 30, color: "#bc2323"]
]
)
}
standardTile("windGust", "device.windGust", width: 3, height: 2) {
state("windGust", label:'Wind Gust:\n${currentValue} mph', unit:"mph", icon: 'st.Weather.weather1',
backgroundColors: [
[value: 0, color: "#90d2a7"],
[value: 5, color: "#44b621"],
[value: 10, color: "#f1d801"],
[value: 20, color: "#d04e00"],
[value: 30, color: "#bc2323"]
]
)
}
standardTile("windTemperature", "device.windTemperature", width: 3, height: 2) {
state("windTemperature", label:'Outdoor Temp.\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
backgroundColors:[
[value: 1, color: "#c8e3f9"],
[value: 10, color: "#dbdee2"],
[value: 20, color: "#c0d2e4"],
[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"]
])
}
standardTile("windChillTemperature", "device.windChillTemperature", width: 3, height: 2) {
state("windChillTemperature", label:'Wind Chill:\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
backgroundColors:[
[value: 1, color: "#c8e3f9"],
[value: 10, color: "#dbdee2"],
[value: 20, color: "#c0d2e4"],
[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"]
])
}
standardTile("rainRate", "device.rainRate", width: 3, height: 2) {
state("rainRate", label:'Rain: ${currentValue} inches/h', unit:"inches/h", icon: 'st.Weather.weather10')
}
standardTile("humidityCh1", "device.humidityCh1", width: 3, height: 2) {
state("humidityCh1", label:'Hum. Ch1:\n${currentValue} %', unit:"%", icon: 'st.Weather.weather12',
backgroundColors : [
[value: 01, color: "#724529"],
[value: 11, color: "#724529"],
[value: 21, color: "#724529"],
[value: 35, color: "#44b621"],
[value: 49, color: "#44b621"],
[value: 50, color: "#1e9cbb"]
]
) }
standardTile("temperatureCh2", "device.temperatureCh2", width: 3, height: 2) {
state("temperatureCh2", label:'Temp. Ch2:\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
backgroundColors:[
[value: 1, color: "#c8e3f9"],
[value: 10, color: "#dbdee2"],
[value: 20, color: "#c0d2e4"],
[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"]
])
}
standardTile("humidityCh2", "device.humidityCh2", width: 3, height: 2) {
state("humidityCh2", label:'Hum. Ch2:\n${currentValue} %', unit:"%", icon: 'st.Weather.weather12',\
backgroundColors : [
[value: 01, color: "#724529"],
[value: 11, color: "#724529"],
[value: 21, color: "#724529"],
[value: 35, color: "#44b621"],
[value: 49, color: "#44b621"],
[value: 50, color: "#1e9cbb"]
] )
}
// lgk reset max/min
standardTile("resetMaxMin", "device.resetMaxMin", decoration: "flat", width: 2, height: 2) {
state("resetMaxMin", label:'reset Max/Min', action:'resetMaxMin', icon: "st.secondary.tools")
}
standardTile("setConfigParams", "device.setConfigParams", decoration: "flat", width: 2, height: 2) {
state("setConfigParams", label:'Set configuration', action:'setConfigurationParams', icon: "st.secondary.tools")
}
standardTile("setAssocGroups", "device.setAssocGroups", decoration: "flat", width: 2, height: 2) {
state("setAssocGroups", label:'Set associations', action:'setAssociations', icon: "st.secondary.tools")
}
// lgk main max
valueTile("maxWindGust", "device.maxWindGust", width: 3, height: 1) {
state "default", label: 'Max Wind Gust:\n ${currentValue} mph' }
valueTile("maxOutdoorTemp", "device.maxOutdoorTemp", width: 3, height: 1) {
state "default", label: 'Max Outdoor Temp:\n ${currentValue} °F' }
valueTile("minOutdoorTemp", "device.minOutdoorTemp", width: 3, height: 1) {
state "default", label: 'Min Outdoor Temp:\n ${currentValue} °F' }
valueTile("maxRain", "device.maxRain", width: 3, height: 1) {
state "default", label: 'Max Rain:\n ${currentValue} inches/h' }
// lgk status tiles
valueTile("windMaxDate", "device.windMaxDate", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Date/Time:\n ${currentValue}'
}
valueTile("tempMaxDate", "device.tempMaxDate", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Date/Time:\n ${currentValue}'
}
valueTile("tempMinDate", "device.tempMinDate", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Date/Time:\n ${currentValue}'
}
valueTile("rainMaxDate", "device.rainMaxDate", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Date/Time:\n ${currentValue}'
}
// lgk status tiles
valueTile("windMaxDateStr", "device.windMaxDateStr", width: 3, height: 1, decoration: "flat") {
state "default", label: '${currentValue}'
}
valueTile("tempMaxDateStr", "device.tempMaxDateStr", width: 3, height: 1, decoration: "flat") {
state "default", label: '${currentValue}'
}
valueTile("tempMinDateStr", "device.tempMinDateStr", width: 3, height: 1, decoration: "flat") {
state "default", label: '${currentValue}'
}
valueTile("rainMaxDateStr", "device.rainMaxDateStr", width: 3, height: 1, decoration: "flat") {
state "default", label: '${currentValue}'
}
// lgk status tiles
valueTile("statusWind", "device.lastUpdateWind", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Wind Last Update: ${currentValue}'
}
valueTile("statusCh1", "device.lastUpdateCh1", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Ch1 Last Update: ${currentValue}'
}
valueTile("statusCh2", "device.lastUpdateCh2", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Ch2 Last Update: ${currentValue}'
}
valueTile("statusRain", "device.lastUpdateRain", width: 3, height: 1, decoration: "flat") {
state "default", label: 'Rain Last Update: ${currentValue}'
}
main("temperature")
details(["temperatureCh1", "humidityCh1", "temperatureCh2", "humidityCh2","windDirection", "windVelocity", "windGust", "windTemperature",
"windChillTemperature", "rainRate", "tempMinDateStr", "tempMaxDateStr", "windMaxDateStr", "rainMaxDateStr",
"statusCh1", "statusCh2", "statusWind", "statusRain", "resetMaxMin","setConfigParams", "setAssocGroups"])
}