Ecolink Garage Door Tilt Sensor Problems

@4caulders Do i have to create a new device? I see no other way to edit in the IDE?

I created a device and then copied the code from the smartthings z-wave door/window sensor, then added the extra metadata from the multisensor, leaving everything else the same.

I am sorry, I am new to ST. I looked it up under my IDE account I can Edit device but where am I suppose to be adding the metadata? Am I creating new device type under “My Device Types” tab?

Update: I tried different way; I edited “Z-Wave Door/Window Sensor” in “My Devices” tab by changing type to “SmartSense Garage Door Multi”. Right after updating device it showed garage door icon in my ST app under “Things”. It now has choice to select open close icon or garage door icon.

Is this going to interfere with anything or going to bug the ST app?

Update: never mind, this quick fix option doesn’t work, it shows icon correctly as I wanted with garage door but does not show when garage open or close.

I copied and paste this:
metadata {
// Automatically generated. Make future change here.
definition (name: “Z-Wave Door/Window Sensor Garage”, namespace: “smartthings”, author: “SmartThings”) {
capability "Three Axis"
capability "Contact Sensor"
capability "Acceleration Sensor"
capability "Signal Strength"
capability "Temperature Measurement"
capability "Contact Sensor"
capability "Sensor"
capability “Battery”

fingerprint deviceId: "0x2001", inClusters: "0x30,0x80,0x84,0x70,0x85,0x86,0x72"

}

to “New Device Type” and it doesn’t work, what am I doing wrong here? Tried to add all listed types but when creating “new device type” can’t find anywhere to copy code from z-wave door/window sensor.

Can you explain this step?

Do I create “new device” or “new device type”?

Yes sorry create a new device type. Then use it for your tilt sensor.

OK, that what I did but how and where do I copy code from for Ecolink “z-wave window/door sensor”. In devices I didn’t find any way how to copy full code for “z-wave window/door sensor”, I can only create add capability for new device but cant find anywhere original code to copy from. When I create new device type and just add capability it does not work, it looks like original I need original code for z-wave window/door sensor".
Can you help with this steps?

Perhaps you can provide copy of this code. Thank you in advance.

Log into IDE and go to My Device Types, click on the device you made. In the upper right corner click on Device Type Examples and find Z-wave Door/Window sensor and click on it. Click on Overwrite and it will replace what you had with its code. Then add the metadata from the earlier post, click save and then Publish for me. Then go to your device and edit it to use the newly created device type you made.

You can try to copy and paste this into your device type then save and publish

/** * Z-Wave Door/Window Sensor * * Author: SmartThings * Date: 2013-11-3 */

// for the UI
metadata {
// Automatically generated. Make future change here.
definition (name: “Z-Wave Door/Window Sensor Garage”, namespace: “smartthings”, author: “SmartThings”) {
capability "Three Axis"
capability "Contact Sensor"
capability "Acceleration Sensor"
capability "Signal Strength"
capability "Temperature Measurement"
capability "Contact Sensor"
capability "Sensor"
capability “Battery”

	fingerprint deviceId: "0x2001", inClusters: "0x30,0x80,0x84,0x70,0x85,0x86,0x72"
}

// simulator metadata
simulator {
	// status messages
	status "open":  "command: 2001, payload: FF"
	status "closed": "command: 2001, payload: 00"
}

// UI tile definitions
tiles {
	standardTile("contact", "device.contact", width: 2, height: 2) {
		state "open", label: '${name}', icon: "st.contact.contact.open", backgroundColor: "#ffa81e"
		state "closed", label: '${name}', icon: "st.contact.contact.closed", backgroundColor: "#79b821"
	}
    valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
		state "battery", label:'${currentValue}% battery', unit:""
	}


	main "contact"
	details(["contact", "battery"])
}

}

def parse(String description) {
def result = null
if (description.startsWith(“Err”)) {
result = createEvent(descriptionText:description)
} else if (description == “updated”) {
if (!state.MSR) {
result = [
response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4*3600, nodeid:zwaveHubNodeId)),
response(zwave.manufacturerSpecificV2.manufacturerSpecificGet()),
]
}
} else {
def cmd = zwave.parse(description, [0x20: 1, 0x25: 1, 0x30: 1, 0x31: 5, 0x80: 1, 0x84: 1, 0x71: 3, 0x9C: 1])
if (cmd) {
result = zwaveEvent(cmd)
}
}
return result
}

def sensorValueEvent(value) {
if (value) {
createEvent(name: “contact”, value: “open”, descriptionText: “$device.displayName is open”)
} else {
createEvent(name: “contact”, value: “closed”, descriptionText: “$device.displayName is closed”)
}
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)
{
sensorValueEvent(cmd.sensorValue)
}

def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd)
{
sensorValueEvent(cmd.sensorState)
}

def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd)
{
def result = []
if (cmd.notificationType == 0x06 && cmd.event == 0x16) {
result << sensorValueEvent(1)
} else if (cmd.notificationType == 0x06 && cmd.event == 0x17) {
result << sensorValueEvent(0)
} else if (cmd.notificationType == 0x07) {
if (cmd.v1AlarmType == 0x07) { // special case for nonstandard messages from Monoprice door/window sensors
result << sensorValueEvent(cmd.v1AlarmLevel)
} else if (cmd.event == 0x01 || cmd.event == 0x02) {
result << sensorValueEvent(1)
} else if (cmd.event == 0x03) {
result << createEvent(descriptionText: “$device.displayName covering was removed”, isStateChange: true)
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4*3600, nodeid:zwaveHubNodeId))
if(!state.MSR) result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
} else if (cmd.event == 0x05 || cmd.event == 0x06) {
result << createEvent(descriptionText: “$device.displayName detected glass breakage”, isStateChange: true)
} else if (cmd.event == 0x07) {
if(!state.MSR) result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
result << createEvent(name: “motion”, value: “active”, descriptionText:"$device.displayName detected motion")
}
} else if (cmd.notificationType) {
def text = “Notification $cmd.notificationType: event ${([cmd.event] + cmd.eventParameter).join(”, ")}"
result << createEvent(name: “notification$cmd.notificationType”, value: “$cmd.event”, descriptionText: text, displayed: false)
} else {
def value = cmd.v1AlarmLevel == 255 ? “active” : cmd.v1AlarmLevel ?: "inactive"
result << createEvent(name: “alarm $cmd.v1AlarmType”, value: value, displayed: false)
}
result
}

def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd)
{
def result = [createEvent(descriptionText: “${device.displayName} woke up”, isStateChange: false)]
if (!state.lastbat || (new Date().time) - state.lastbat > 5360601000) {
result << response(zwave.batteryV1.batteryGet())
result << response(“delay 1200”)
}
if (!state.MSR) {
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4
3600, nodeid:zwaveHubNodeId))
result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
result << response(“delay 1200”)
}
result << response(zwave.wakeUpV1.wakeUpNoMoreInformation())
result
}

def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [ name: “battery”, unit: “%” ]
if (cmd.batteryLevel == 0xFF) {
map.value = 1
map.descriptionText = "${device.displayName} has a low battery"
map.isStateChange = true
} else {
map.value = cmd.batteryLevel
}
state.lastbat = new Date().time
[createEvent(map), response(zwave.wakeUpV1.wakeUpNoMoreInformation())]
}

def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
def result = []

def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)
log.debug "msr: $msr"
updateDataValue("MSR", msr)

retypeBasedOnMSR()

result << createEvent(descriptionText: "$device.displayName MSR: $msr", isStateChange: false)
result

}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
createEvent(descriptionText: “$device.displayName: $cmd”, displayed: false)
}

def retypeBasedOnMSR() {
switch (state.MSR) {
case “0086-0002-002D”:
log.debug(“Changing device type to Z-Wave Water Sensor”)
setDeviceType(“Z-Wave Water Sensor”)
break
case “011F-0001-0001”: // Schlage motion
case “014A-0001-0001”: // Ecolink motion
case “0060-0001-0002”: // Everspring SP814
case “0060-0001-0003”: // Everspring HSP02
log.debug(“Changing device type to Z-Wave Motion Sensor”)
setDeviceType(“Z-Wave Motion Sensor”)
break

}

}

1 Like

thank you. I will try to do it now.

it didn’t work.

I think I have pretty good idea now I need to copy “tile” code for icons from multisensor sample device.

I will update the post.

Update: Still can’t figure it out, it didn’t work for me. It is only shows garage door icon in Locks and Doors, but it did showed it from beginning.In the “Things” it shows that open close contact icon, very anoing and confusing with rest of my contract devices.

If any one has solution for this please post on how to show “Z-Wave Door/Window Sensor” in “Things” as garage sensor icon.

Final update: I got this icon working by replacing “tile” in device type code with following:

tiles {
standardTile(“contact”, “device.contact”, width: 2, height: 2) {
state(“open”, label:’${name}’, icon:“st.doors.garage.garage-open”, backgroundColor:"#ffa81e")
state(“closed”, label:’${name}’, icon:“st.doors.garage.garage-closed”, backgroundColor:"#79b821")
}

Icon is now displaying garage door in “Things” menu screen (in iOS app)

Thank you DANNY C. You gave me a pretty good idea and it helped a lot.

1 Like

I just got a brand new Ecolink Tilt sensor and the App won’t see it at all. There’s even an official device type in the app now and it still won’t see it.

Same experience as vitamincm. I did fix that though with some help from here. Use the phone app, start the exclude device routine, and remove and re-install the battery. For some reason it seems that the sensor installs, but just never shows up as a thing. This will remove the device (at least it did for me). Then I could add it using the specific device type as vitamincm said.

The problem I now have is that except for battery strength, it doesn’t seem to actually ever send any communications. Well the occasional cover open when I try resetting the battery. So I have some significant concerns about the device. I think I like the idea of kit bashing a normal Aeon door and window sensor to fit a garage door. I will probably try one round of returning and seeing if a replacement works any better. But if I have any problems, seeing all the issue here I don’t think this one is ready for prime time yet.

1 Like

I have mine working but I wish I could change the original ST code so it would run local on my V2 hub. Is there a way to edit the original and still run local?

Unless it an official device handler then no. You can always submit the modified handler and see if it gets included.

I did just that, I am not holding my breath as it takes forever or never reviewed.

The laugh about this complete think is that the EcoLink is a Garage door sensor and that is what it was made to do. Not a Door and Window. So there should be a device type just for that. i submitted the change to be approved, but who knows if 1. It will be approved, 2. how long it will take before it is even looked at and 3. if once it is looked at and they see it is one of their own ST device types that was modified will they accept it. So I don’t expect it to be anytime soon. I am running it as the Z-Wave door and window as I want it to run local.

Just got mine. It pairs but doesn’t communicate. What’s the most up to date device type info? Thanks.

Same here @dawgonking Tried several device handlers; one had a working tamper and no door open/close, others had working open/closed with no tamper. Like @joelw135 noted, you can use a stock DTH for local control (and put up with the icon not being a garage door) -or- spin your own to run in the cloud with more a complete feature set…

That being said, it seems to work!

YMMV :blush: