SmartThings Community

Repurpose Monoprice garage door tilt sensor as a dog food bin alert?

I have a Monoprice garage door tilt sensor that I would like to repurpose as a dog food bin alert. I would at least like alerts that record when the bin was last opened. Ideally it would remind me to do it before I left in the morning and before I go to bed at night (feed twice a day).

My first problem I guess is that open and close orientation is reverse of a garage door. I tried Has Barkley Been Fed but I’m not getting any alerts.

Do you use webCoRE? This comes to mind:

1 Like

I have played around with Webcore a very little bit, I’ll have to look into it more.

The tilt sensor I’d like to use is currently using the Z-Wave Door/Window Sensor DTH. It works fine for what I need except open/close is reversed from what I need. How can I capture the device handler code to reverse the open and close alerts?

I’ve moved the thread to Writing Device Types because that’s the help I need fundamentally. I originally figured I could take the Z-Wave Door/Window Sensor DH and just swap the open/close labels but after viewing it appears significantly more complex.

I’ve also tried creating from example but I’m not getting the results I expect.
I had tried changing:
simulator {
status “open”: “command: 2001, payload: FF”
status “closed”: “command: 2001, payload: 00”
status “wake up”: "command: 8407, payload: "
}
to:
simulator {
status “closed”: “command: 2001, payload: FF”
status “open”: “command: 2001, payload: 00”
status “wake up”: "command: 8407, payload: "
}

Since this is the first time I’ve tried anything like this I should probably describe what I’ve done. I created a new device handler using the Z-Wave Door/Window Sensor device handler. I modified only the name (name: “Dog Food Bin Lid”), save publish and assigned it to the device. I confirmed the new device handler was working but still in reverse of what I need. I then went back into the handler code and reversed the status tag for each payload (as show above), save and publish. The device is still alerting in reverse of what I need.

One thing I’m not sure of is if I change and save the handler do I need to republish? And if I republish do I need to do anything else to get the changes to take effect?

Thanks in advance.