Hi,
I wondering would someone be able to help me with this one. I have a samotech dimmer and its working perfectly other than not reporting “on” status when using the manual push button. It reports "off"and will report “on” when dimming with a long press but only occasionally when switching on from off.
euwest1.api.smartthings.com/user/show)**
Save
Publish
IDE Settings
Simulator
1
/**
2
- Copyright 2015 SmartThings
3
4
- Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except
5
- in compliance with the License. You may obtain a copy of the License at:
6
7
8
9
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
10
- on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
11
- for the specific language governing permissions and limitations under the License.
12
13
*/
14
15
metadata {
16
definition (name: “Dimmer Zi88gbee”, namespace: “smartthings”, author: “SmartThings”, ocfDeviceType: “oic.d.light”, runLocally: true, minHubCoreVersion: ‘000.019.00012’, executeCommandsLocally: true, genericHandler: “Zigbee”) {
17
capability “Actuator”
18
capability “Configuration”
19
capability “Refresh”
20
capability “Switch”
21
capability “Switch Level”
22
capability “Health Check”
23
capability “Light”
24
25
// Generic
26
fingerprint profileId: “0104”, deviceId: “0101”, inClusters: “0006, 0008, 0b05, 0003, 0000, 0019, 0005, 0004”, deviceJoinName: “Light” //Generic Dimmable Light
27
28
29
}
30
31
tiles(scale: 2) {
32
multiAttributeTile(name:“switch”, type: “lighting”, width: 6, height: 4, canChangeIcon: true){
33
tileAttribute (“device.switch”, key: “PRIMARY_CONTROL”) {
34
attributeState “on”, label:’${name}’, action:“switch.off”, icon:“st.switches.light.on”, backgroundColor:"#00A0DC", nextState:“turningOff”
35
attributeState “off”, label:’${name}’, action:“switch.on”, icon:“st.switches.light.off”, backgroundColor:"#ffffff", nextState:“turningOn”
36
attributeState “turningOn”, label:’${name}’, action:“switch.off”, icon:“st.switches.light.on”, backgroundColor:"#00A0DC", nextState:“turningOff”
37
attributeState “turningOff”, label:’${name}’, action:“switch.on”, icon:“st.switches.light.off”, backgroundColor:"#ffffff", nextState:“turningOn”
38
}
39
tileAttribute (“device.level”, key: “SLIDER_CONTROL”) {
40
attributeState “level”, action:“switch level.setLevel”
41
}
42
}
43
standardTile(“refresh”, “device.refresh”, inactiveLabel: false, decoration: “flat”, width: 2, height: 2) {
44
state “default”, label:"", action:“refresh.refresh”, icon:“st.secondary.refresh”
45
}
46
main “switch”
47
details([“switch”, “refresh”])
48
}
49
}
50
51
// Parse incoming device messages to generate events
52
def parse(String description) {
53
log.debug “description is $description”
54
55
def event = zigbee.getEvent(description)
56
if (event) {
57
if (event.name==“level” && event.value==0) {}
58
else {
59
sendEvent(event)
60
}
61
} else {
62
def descMap = zigbee.parseDescriptionAsMap(description)
63
if (descMap && descMap.clusterInt == 0x0006 && descMap.commandInt == 0x0) {
64
if (descMap.data[0] == “00”) {
65
log.debug "ON/OFF REPORTING CONFIG RESPONSE: " + cluster
66
sendEvent(name: “checkInterval”, value: 60 * 12, displayed: false, data: [protocol: “zigbee”, hubHardwareId: device.hub.hardwareID])