Custom Device handler for Samsung OCF TV?

Hello I am new to smart things and am very excited to get into some custom automations.

Unfortunately my knowledge for developing custom code is weak at the moment.

What I wanted to achieve was to create a custom device handler for my Samsung OCF TV. I would like to use the OCF as a start, but would rather be in control of all code as I’m finding some small tweaks need to be made. For example I’m finding my TV status does not toggle on/off all the time in smartthings ide.

Is there anyone who could quickly scratch up code that would mimic the existing Samsung OCF TV device handler?

Here’s a summary of the device handler I’d like to start with:

Attributes: n, icv, dmv, di, pi, mnmn, mnml, mnmo, mndt, mnpv, mnos, mnhw, mnfv, mnsl, st, vid

Commands: postOcfCommand

Thanks!

It might be worth doing a site search for Samsung tv, there are many threads on the subject, upshot is on does not work

Thanks Mike.
I’ve searched the site for Samsung TV and didn’t find much useful information. Also I searched for Device handlers and found one forum that gives some guidance. When I tried to do it myself it didn’t work. I suspect this is a function of how old the post was as smaththings seems to have changed significantly in the past few years.

All I need is some basic guidance on where to start. As shown below wgere can u find a resources that helps me fill in the “TODO” parts

def parse(String description) {
log.debug “Parsing ‘${description}’”
// TODO: handle ‘n’ attribute
// TODO: handle ‘icv’ attribute
// TODO: handle ‘dmv’ attribute
// TODO: handle ‘di’ attribute
// TODO: handle ‘pi’ attribute
// TODO: handle ‘mnmn’ attribute
// TODO: handle ‘mnml’ attribute
// TODO: handle ‘mnmo’ attribute
// TODO: handle ‘mndt’ attribute
// TODO: handle ‘mnpv’ attribute
// TODO: handle ‘mnos’ attribute
// TODO: handle ‘mnhw’ attribute
// TODO: handle ‘mnfv’ attribute
// TODO: handle ‘mnsl’ attribute
// TODO: handle ‘st’ attribute
// TODO: handle ‘vid’ attribute

}

// handle commands
def postOcfCommand() {
log.debug “Executing ‘postOcfCommand’”
// TODO: handle ‘postOcfCommand’ command
}

If your tv is relatively new then the Smartthings app should find your Tv and give you full control, on will work once you have switched the Tv on via the remote control, this ability stops working after a length of time, if this happens then you need to use the remote again

The Smartthings classic app these days is hit and miss on working but mostly it does not work

Its a 2016 model. Everything works great in the smartthings app. Would you happen to know where I could find more support on the device handlers?

The issue is the Tv firmware, 2016 models worked perfect in the old app for a short time but due to updates in fw integration broke, we eventually got integration back but on has always been an issue, no dth can help im afraid

One link of many on the subject

Fido, have you tried to create your own DTH?

No i dont code, i am a user who has tried every trick in the book to get on off working, and the are many others that have tried the same

Once it was clear the fw was at fault we all gave up

What fw version are you referring to? The current version is 1250

I have a UE65KU6020 the current version for that is 1231.1

Uk spec Tv

Updates were pushed to all Tvs even if update was switched off in Tv settings which really upset users