Hogar Touch Panel Switch - Has anyone written a device handler for this?

I have searched the forum but drawing blanks on this one.

Its a Hogar HG-TS10 multi switch. Looking to purchase it shortly but need to confirm that i’ll be able to use it before purchasing…

Thanks

1 Like

Nice device! :sunglasses: It’s using multi channel association. This didn’t used to work well with SmartThings, but now it works OK, although you will need custom code to set each button correctly.


You should be able to use the device type handler for the 24 function Fibaro handheld remote as a starting place.

You’ll also probably need the Z wave Tweaker to set the associations to begin with

All of which is to say that it’s not going to work straight out of the box, but it looks like someone should be able to create a custom device type handler which will be able to work with it once you set the associations appropriately.

3 Likes

Thanks for the useful information this is really helpful.

I have the switch and as expected it doesn’t work out of the box nor does it work with the Fibraro device handler that you suggested.

I have had a bit of play with the zwave tweaker but I really don’t know what I am doing. I would quite like to learn to code my own device handlers but would need some support on how to do this. Could you suggest how I may pursue this interest?

Maybe there is someone else out there that is already working on this that might be able to give me some pointers on how to proceed?

1 Like

Sorry for any confusion, I didn’t mean that the Fibaro device type handler would work with it, just that it would be a place to start looking at code that you would then adapt for the Hogar.

The following thread is a good starting place:

After that if you start your own thread in the developer section under writing device types they will probably be several other community members who’ll be glad to help you. :sunglasses:

https://community.smartthings.com/c/developers/writing-device-types

1 Like

Hope it’s ok to ask, where did you get it from?
Thanks

I struggled a bit getting it as Hogar don’t make it obvious on their site that they sell them…

Contact Hogar and they will supply you with one http://hogarcontrols.com/

Also, they have just released a ST device handler for it :):slight_smile: although the device handler still needs some work.

1 Like

Hi @sporadic_kit could you please give the link to show their ST devices handler. I have Hogar 4 gangs touch switch.

Will paste it here

“metadata {
definition (name: " Lumi 10SW Zwave”, namespace: “lumi”, author: “phuclm”) {
capability “Switch”
capability “Polling”
capability “Configuration”
capability “Refresh”
capability “Zw Multichannel”

attribute "switch1", "string"
attribute "switch2", "string"
attribute "switch3", "string"
attribute "switch4", "string"
attribute "switch5", "string"
attribute "switch6", "string"
attribute "switch7", "string"
attribute "switch8", "string"
attribute "switch9", "string"
attribute "switch10", "string"

attribute "allSwitch", "string"  

command "on1"
command "off1"
command "on2"
command "off2"
command "on3"
command "off3"
command "on4"
command "off4"
command "on5"
command "off5"
command "on6"
command "off6"
command "on7"
command "off7"
command "on8"
command "off8"
command "on9"
command "off9"
command "on10"
command "off10"

command "onAll"
command "offAll"

fingerprint mfr: "0293", prod: "0003", model: "001A"

}

simulator {
    // TODO: define status and reply messages here
}

tiles {
    standardTile("switch1", "device.switch1", canChangeIcon: true) {
        state "on", label: "switch1", action: "off1", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch1", action: "on1", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch2", "device.switch2", canChangeIcon: true) {
        state "on", label: "switch2", action: "off2", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch2", action: "on2", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch3", "device.switch3", canChangeIcon: true) {
        state "on", label: "switch3", action: "off3", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch3", action: "on3", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch4", "device.switch4", canChangeIcon: true) {
        state "on", label: "switch4", action: "off4", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch4", action: "on4", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch5", "device.switch5", canChangeIcon: true) {
        state "on", label: "switch5", action: "off5", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch5", action: "on5", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch6", "device.switch6", canChangeIcon: true) {
        state "on", label: "switch6", action: "off6", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch6", action: "on6", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch7", "device.switch7", canChangeIcon: true) {
        state "on", label: "switch7", action: "off7", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch7", action: "on7", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch8", "device.switch8", canChangeIcon: true) {
        state "on", label: "switch8", action: "off8", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch8", action: "on8", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch9", "device.switch9", canChangeIcon: true) {
        state "on", label: "switch9", action: "off9", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch9", action: "on9", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
    standardTile("switch10", "device.switch10", canChangeIcon: true) {
        state "on", label: "switch10", action: "off10", icon: "st.switches.light.on", backgroundColor: "#79b821"
        state "off", label: "switch10", action: "on10", icon: "st.switches.light.off", backgroundColor: "#ffffff"
    }
            
    
    
    standardTile("refresh", "device.refresh", inactiveLabel: false, decoration: "flat") {
        state "default", label:"", action:"refresh.refresh", icon:"st.secondary.refresh"
    }

    standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat") {
        state "default", label:"", action:"configure", icon:"st.secondary.configure"
    }

    standardTile("onall", "device.allSwitch", canChangeIcon: true) {
        state "on", label: "on all", action: "onAll", icon: "st.lights.multi-light-bulb-on", backgroundColor: "#ffffff"
    }
    standardTile("offall", "device.allSwitch", canChangeIcon: true) {
        state "off", label: "off all", action: "offAll", icon: "st.lights.multi-light-bulb-off", backgroundColor: "#ffffff"
    }
    standardTile("allSwitch", "device.allSwitch", canChangeIcon: true) {
        state "on", label: "ALL", action: "offAll", icon: "st.lights.multi-light-bulb-on", backgroundColor: "#79b821", nextState:"off"
        state "off", label: "ALL", action: "onAll", icon: "st.lights.multi-light-bulb-off", backgroundColor: "#ffffff", nextState:"on"
    }

    main(["allSwitch"])
    details(["switch1","switch2","switch3","switch4","switch5",
            "switch6","switch7","switch8","switch9","switch10",
            "onall","offall","allSwitch","refresh","configure"]
    )
}

}

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

//Reports
def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
//createEvent([name: “allSwitch”, value: cmd.value ? “on” : “off”])
}

def zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd)
{
def map = [name: “switch$cmd.sourceEndPoint”]

def encapsulatedCommand = cmd.encapsulatedCommand([0x25: 1, 0x20: 1])

if (encapsulatedCommand && cmd.commandClass == 50) 
{
    log.debug "Commandclass is Meter!"  
    zwaveEvent(encapsulatedCommand, cmd.sourceEndPoint)
} 
else
{
   switch(cmd.commandClass) {
      case 32: // "0x20" - Basic
         if (cmd.parameter == [0]) {
            map.value = "off"
         }
         if (cmd.parameter == [255]) {
            map.value = "on"
         }
         createEvent(map)
         break
      case 37: // "0x25" - Switch Binary
         if (cmd.parameter == [0]) {
            map.value = "off"
         }
         if (cmd.parameter == [255]) {
            map.value = "on"
         }
         createEvent(map)
         break
    }
}

}

def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv1.ManufacturerSpecificReport cmd) {
log.debug(“ManufacturerSpecificReport ${cmd.inspect()}”)
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
// Handles all Z-Wave commands we aren’t interested in
[:]
}

/*****************************************************************************************************/
// handle commands

def refresh() {
delayBetween([
log.debug(“refreshing s1”),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:1, commandClass:37, command:2).format(),
log.debug(“refreshing s2”),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:2, commandClass:37, command:2).format(),
log.debug(“refreshing s3”),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:3, commandClass:37, command:2).format(),
log.debug(“refreshing s4”),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:4, commandClass:37, command:2).format(),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:5, commandClass:37, command:2).format(),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:6, commandClass:37, command:2).format(),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:7, commandClass:37, command:2).format(),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:8, commandClass:37, command:2).format(),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:9, commandClass:37, command:2).format(),
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:10, commandClass:37, command:2).format()
])
}

def poll() {
log.debug “Executing ‘poll’”
delayBetween([
//zwave.switchBinaryV1.switchBinaryGet().format(),
// zwave.manufacturerSpecificV1.manufacturerSpecificGet().format()
])
}

def enableEpEvents(enabledEndpoints) {
log.debug “Lumi4-enabledEndpoints”
state.enabledEndpoints = enabledEndpoints.split(",").findAll()*.toInteger()
null
}

def configure() {
log.debug “configure”

// currently hard-coded to four button switch
enableEpEvents("1,2,3,4,5,6,7,8,9,10")

// not sure the association is needed
// documentation says last group is automatically associated
// with controller node id by default, will test
//commands([
//    //zwave.multiChannelAssociationV2.multiChannelAssociationGet(groupingIdentifier:3),
//    zwave.multiChannelAssociationV2.multiChannelAssociationSet(groupingIdentifier:3, nodeId:zwaveHubNodeId)
//], 800)

}

def on1() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:1, commandClass:37, command:1, parameter:[255]).format()
}
def off1() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:1, commandClass:37, command:1, parameter:[0]).format()
}

def on2() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:2, commandClass:37, command:1, parameter:[255]).format()
}
def off2() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:2, commandClass:37, command:1, parameter:[0]).format()
}

def on3() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:3, commandClass:37, command:1, parameter:[255]).format()
}
def off3() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:3, commandClass:37, command:1, parameter:[0]).format()
}

def on4() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:4, commandClass:37, command:1, parameter:[255]).format()
}
def off4() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:4, commandClass:37, command:1, parameter:[0]).format()
}

def on5() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:5, commandClass:37, command:1, parameter:[255]).format()
}
def off5() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:5, commandClass:37, command:1, parameter:[0]).format()
}

def on6() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:6, commandClass:37, command:1, parameter:[255]).format()
}
def off6() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:6, commandClass:37, command:1, parameter:[0]).format()
}

def on7() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:7, commandClass:37, command:1, parameter:[255]).format()
}
def off7() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:7, commandClass:37, command:1, parameter:[0]).format()
}

def on8() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:8, commandClass:37, command:1, parameter:[255]).format()
}
def off8() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:8, commandClass:37, command:1, parameter:[0]).format()
}

def on9() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:9, commandClass:37, command:1, parameter:[255]).format()
}
def off9() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:9, commandClass:37, command:1, parameter:[0]).format()
}

def on10() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:10, commandClass:37, command:1, parameter:[255]).format()
}
def off10() {
zwave.multiChannelV3.multiChannelCmdEncap(sourceEndPoint:0, destinationEndPoint:10, commandClass:37, command:1, parameter:[0]).format()
}

def onAll() {
log.debug(“all on”)
//zwave.basicV1.basicSet(value: 0xFF).format()

delayBetween([
	on1(),
    on2(),
    on3(),
    on4(),
    on5(),
    on6(),
    on7(),
    on8(),
    on9(),
    on10()
])

}

def offAll() {
log.debug(“all off”)
//zwave.basicV1.basicSet(value: 0x00).format()

delayBetween([
	off1(),
    off2(),
    off3(),
    off4(),
    off5(),
    off6(),
    off7(),
    off8(),
    off9(),
    off10()
])

}"

It didn’t paste right. Remove the " at the start and the " at the end

Thank you so much. Let me try.

Please paste it to github

Personal Message me I will send it you direct

Hi! Can you send the code to me? Thanks!

any information about Hogar controls touch switch, Please reach out to sangram.swain@hogarcontrols.com
Thank you,
Sangram