I made two modification of the standard Z-Wave Contact device so it can be used as a Smoke or a Carbon Monoxide sensor for those that are hard wiring their sensors in. The smoke device type also will appear in Smart Home Monitor as a available device. I did this because of recently adding my Kidde Smoke & CO sensors into some contact switches project I did here:
Either pull from the GitHub or add my GitHub to your IDE. Hopefully someone finds them useful.
Just tried this using Ecolink Door sensor and Smoke code in this chain creating the device handler. It seems to work but for some reason the state/status does not change in the tiles and battery shows as “–”. I was able to add to SHM and it does trigger the events and activity shows up but the tile or right now status never changes from “Clear”? I basically paired the device as the Ecolink Door sensor then edited the device type in the My Devices tab to the new device type. Like I mentioned it recognizes the changing state but doesn’t update the device status. Did I miss something?
Are you pulling from GitHub or copying and pasting whats above? If from GitHub it should be working correctly (there were some tweaks thanks to another member) but the above might be outdated.
Also with the sensors if you read my original thread I had issues pulling them in. I would try to remove them, exclude them from the network, make sure you are within a couple feet of your hub, and add them back in. Once back in reassign my device type and it should come up correctly with a status and battery level.
Ok. So first clean it out. Remove the sensor from SHM then go into the IDE and switch the EcoLink devices back to the default handler or any generic door/window contact handler. Then go to My Device Handlers and delete out the old custom device. Click Settings and add a repository with the above information. Then on that same page click Update from Repo -> Smartthings_VSeven. Under the New should be both my handlers. Select both, check the Publish checkbox, and Execute Update. Then go into your devices and reassign to the new one.
Let me know if you have any issues and/or if it worked correctly. You should get a Clear/Alarm status along with the battery level.
Thanks Allan, Did all that and have linked and published your Repo in my Device Handlers. Even removed the actual device and re-paired. With default device handler I get battery level and status changes when open/close contact. Everything works as expected. Changing to your handler I do get battery level now but the “Right now” status never changes from “clear” with gray background in the UI. If I go to “Recently” it does show the status changes as I open/close the contacts just not in the “Right Now” tiles or under “MyHome/Things” tab in the UI. Tim/
Yes I saw another comments about cover and have kept it closed at all times when testing. Also put a couple wires on the inputs closed cover and shorted. As I mentioned everything seems to work except the UI visual status doesn’t change. The actual states changes are recognized by the system. It seems to be something with the UI state, or presentation of the state.
Figured it out. Think when another member updated my device type for the multistate tile instead of the old tile I was using he used “clear” and “smoke” for the two states while on my original I used the “clear” and “detected” which is what the tile needs. So internally it still trips SHM and shows in the history but the tile wasn’t updating.
I fixed it…update your device from the repo and you should see it say smoke.
Yeah…I tested it with a magnet so the actual alarm didn’t go off (sleeping baby). But all the lights in the house turned on and the ceiling fans turned off as expected so it was a good reminder of how its setup at least
The real solution is for SmartThings (@Zach_Varberg ?) to accept the CO capability into Smart Home Monitor instead of faking the sensors to be smoke. With that said if you give me the exact device type name it lists for the device (Under My Devices) I’ll convert it over.
Naw…its a lot easier then that. You juat replace the “contact” parts with “smoke” parts and leave the rest of the DTH intact. Where it makes the open call you change it to clear and when it makes the closed call you change it to smoke.
Give me a couple hours to get to my laptop and ill post something.
Thanks for your work with this project. I would like to do the same, but was wondering if I had to buy the exact door sensors you used, or if I could go with the cheaper Monoprice Garage Door sensor Product # 11987
(has dry contacts)? Would your code work with that sensor (or how hard would it be for me to make that sensor work)?
I have had issues with the monoprice sensors, namely with them not reporting back to closed when a door opened. Happened pretty frequently to the point I got rid of all of them. YMMV.
With that said you might be able to use the same code since most contact sensors are the same. I.e. my code is based on the standard SmartThings DTH for a contact sensor so any contact sensor “should” work if it uses the standard DTH.