MCOHome MH9 CO2/Temp/RH Sensor Device Handler

A few months back I bought a MCOHome MH9 Z-Wave sensor for my lounge. It’s basically a mains powered CO2, Temperature, and Humidity with a display.

http://www.mcohome.com/show_list.php?id=15&sid=51

Like an idiot, I forgot to check if it had a DH, and the company doesn’t seem interested in helping.
So at long last, I have gotten around to trying my hand at a DH. I am not a programmer but do have some idea, however, I seem to have fallen already and need some help, please!

The Unit is already connected to my Z Wave network and I have the Raw Description:

networkSecurityLevel: ZWAVE_LEGACY_NON_SECURE
zw:L type:2101 mfr:015F prod:0901 model:3102 ver:1.04 zwv:3.67 lib:05 cc:31,9E,70,71,85,72,86

I don’t believe I have a problem with metadata or tiles but my next hurdle is to view the “parse data” so I can decide what data I need to extract.

I managed to copy/paste/modify the following together in the hope it would dump that data into the log:

def parse(String description) {
def result = null
def cmd = zwave.parse(description, [0x31: 3])
if (cmd) {
result = zwaveEvent(cmd)
log.debug “Parsed {cmd} to {result.inspect()}”
} else {
log.debug “Non-parsed event: ${description}”
}
return result
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
return createEvent(descriptionText: “{device.displayName}: {cmd}”)
}

This returns:

Parsed BasicReport(value: 92) to [‘descriptionText’:Sensor - Lounge CO2: BasicReport(value: 92), ‘linkText’:‘Sensor - Lounge CO2’, ‘isStateChange’:false, ‘displayed’:false]

I don’t understand why its only giving me CO2 readings and not Temperature and RH as well. I am not sure if the code above is wrong or if I need to change the unit set up in some way ( I am pretty sure its setup by default to transmit all the readings when they change).

All I am after is the 3 values been displayed (no setup and battery isn’t necessary) so I can use them in Webcore to trigger some events and InfluxDB so I can display them using Grafana. I don’t care if they are received at set intervals or when they change as I can deal with either.

Any help appreciated. Thanks
Neil

id suges monioring for a while, or change location, most devie only send data when a change occurs, so unless there is significant temp or humidity change you wont see anthing

also looking at you code, the Non-parsed events will show on the log.debug but not in the event only the cmd defined at the begining will

It is here now ! You can find a working device handler at:

List of useful Custom Device Handlers for SmartThings : Aeotec Help Desk , or:

https://shop.zwave.eu/media/unknown/1b/e9/c5/ST-MCOEMH9CO2-DH.txt

Thanks to Ravil Rubashkin !

Thanks for the DTH. I use the DTH to my satisfaction for quite some time with this device. However, the transition to Edge architecture makes this DTH obsolete. The generic SmartThings driver is of no use. Has anyone already developed a proper driver for this? I tried MCOHome support and they just refer to SmartThings not being compatible with their device. I can’t imagine that owners of this device just throw it out of the window because of a lack of device driver. Anyone?