Zemismart zigbee remote

Hi all,

I took a punt on this, hoping this may be usable.

https://amzn.eu/d/eFpjWJG

Anyone managed to get this working please?

TiA!

Did you try the [RELEASE] Tuya Scene Switch TS004F driver (w/ healthStatus) ?

Here also @Inge_Jones could probably help.

Ah yes, I got rid of the button but I still have the driver code. I never did get it to github but I can try to share another way. What's best for copying raw code from the Hubitat driver editor?

You can copy and paste the code here.

Then select the code only in your post and use the cog wheel tool to hide it into a section. Like this :

Summary

/**

  • Scene switch TS004F driver for Hubitat Elevation hub.
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at:
  •  http://www.apache.org/licenses/LICENSE-2.0
    
  • Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
  • on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
  • for the specific language governing permissions and limitations under the License.
  • The inital version was based on ST DH "Zemismart Button", namespace: SangBoy, author: YooSangBeom
  • ver. 1.0.0 2021-05-08 kkossev - SmartThings version
  • ver. 2.0.0 2021-10-03 kkossev - First version for Hubitat in 'Scene Control'mode - AFTER PAIRING FIRST to Tuya Zigbee gateway!
  • ver. 2.1.0 2021-10-20 kkossev - typos fixed; button wrong event names bug fixed; extended debug logging; added experimental switchToDimmerMode command
  • ver. 2.1.1 2021-10-20 kkossev - numberOfButtons event bug fix;
  • ver. 2.2.0 2021-10-20 kkossev - First succesfuly working version with HE!
  • ver. 2.2.1 2021-10-23 kkossev - added "Reverse button order" preference option
  • ver. 2.2.2 2021-11-17 kkossev - added battery reporting capability; added buttons handlers for use in Hubutat Dashboards; code cleanup
  • ver. 2.2.3 2021-12-01 kkossev - added fingerprint for Tuya Remote _TZ3000_pcqjmcud
  • ver. 2.2.4 2021-12-05 kkossev - added support for 'YSR-MINI-Z Remote TS004F'
  • ver. 2.3.0 2022-02-13 kkossev - added support for 'Tuya Smart Knob TS004F'
  • ver. 2.4.0 2022-03-31 kkossev - added support for 'MOES remote TS0044', singleThreaded: true; bug fix: debouncing timer was not started for TS0044
  • ver. 2.4.1 2022-04-23 kkossev - improved tracing of debouncing logic code; option [overwrite: true] is set explicitely on debouncing timer restart; debounce timer increased to 1000ms
  • ver. 2.4.2 2022-05-07 kkossev - added LoraTap 6 button Scene Controller; device.getDataValue bug fix;
  • ver. 2.4.3 2022-09-18 kkossev - added TS0042 Tuya Zigbee 2 Gang Wireless Smart Switch; removed 'release' event for TS0044 switches (not supported by hardware); 'release' digital event bug fix.
  • ver. 2.4.4 2022-10-22 kkossev - _TZ3000_vp6clf9d fingerprint correction; importURL changed to dev. branch; added _TZ3000_w8jwkczz and other TS0041, TS0042, TS0043, TS004 fingerprints
  • ver. 2.4.5 2022-10-27 kkossev - added icasa ICZB-KPD18S 8 button controller.
  • ver. 2.4.6 2022-11-20 kkossev - added TS004F _TZ3000_ja5osu5g - 1 button!; isTuya() bug fix
  • ver. 2.4.7 2022-12-22 kkossev - added TS004F _TZ3000_rco1yzb1 LIDL Smart Button SSBM A1; added _TZ3000_u3nv1jwk
  • ver. 2.5.0 2023-01-14 kkossev - bug fix: battery percentage remaining automatic reporting was not configured, now hardcoded to 8 hours; bug fix: 'released'event; debug info improvements; declared supportedButtonValues attribute
  • ver. 2.5.1 2023-01-20 kkossev - battery percentage remaining HomeKit compatibility
  • ver. 2.5.2 2023-01-28 kkossev - _TZ3000_vp6clf9d (TS0044) debouncing; added Loratap TS0046 (6 buttons);
  • ver. 2.6.0 2023-01-28 kkossev - added healthStatus; Initialize button is disabled;
  • ver. 2.6.1 2023-02-05 kkossev - added _TZ3000_mh9px7cq; isSmartKnob() typo fix; added capability 'Health Check'; added powerSource attribute 'battery'; added dummy ping() code; added _TZ3000_famkxci2
  • ver. 2.6.2 2023-02-06 kkossev - (dev. branch) added Konke button model: 3AFE280100510001 ;
  •                               - TODO: calculate battery % from Voltage event for Konke button!
    
  •                               - TODO: add Advanced options; TODO: debounce timer configuration; add 'auto revert to scene mode' option
    

*/

def version() { "2.6.2" }
def timeStamp() {"2023/02/06 12:02 PM"}

@Field static final Boolean debug = false
@Field static final Integer healthStatusCountTreshold = 4

import groovy.transform.Field
import hubitat.helper.HexUtils
import hubitat.device.HubMultiAction
import groovy.json.JsonOutput

metadata {
definition (name: "Tuya Scene Switch TS004F", namespace: "kkossev", author: "Krassimir Kossev", importUrl: "https://raw.githubusercontent.com/kkossev/Hubitat/development/Drivers/Tuya%20TS004F/TS004F.groovy", singleThreaded: true ) {

capability "Refresh"
capability "PushableButton"
capability "DoubleTapableButton"
capability "HoldableButton"
capability "ReleasableButton"
capability "Battery"
capability "PowerSource"
capability "Configuration"
capability "Health Check"

,......

Summary

/**

*/
import hubitat.zigbee.zcl.DataType

metadata {
definition (name: "Inges Zemismart Zigbee 6-Button Remote", namespace: "Inge Jones", author: "Inge Jones") {
capability "Actuator"
capability "Battery"
capability "PushableButton"
capability "HoldableButton"
capability "DoubleTapableButton"
capability "Configuration"
capability "Refresh"
capability "Sensor"
capability "Health Check"
fingerprint inClusters: "0000,0004,0005,EF00", outClusters: "0019,000A", manufacturer: "_TZE200_zqtiam4u", model: "TS0601"
}
preferences {
input name: "debugEnable", type: "bool", title: "Enable debug logging", defaultValue: false
}
}

private sendButtonNumber() {
def remoteModel = device.getDataValue("model")
switch(remoteModel){
case "TS0601":
sendEvent(name: "numberOfButtons", value: 6, isStateChange: true)
break
}
}

def installed() {
sendButtonNumber()
state.start = now()
}

def updated() {
sendButtonNumber()
}

def refresh() {
return zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, getAttrid_Battery())
}

def configure() {
sendButtonNumber()
//log.debug "Configuring Reporting, IAS CIE, and Bindings."
def cmds = []

return
       zigbee.enrollResponse() +
       readDeviceBindingTable() // Need to read the binding table to see what group it's using            
       cmds

}

def parse(String description) {
//log.debug "description is $description"
if ((description?.startsWith("catchall:")) || (description?.startsWith("read attr -"))) {
def parsedMap = zigbee.parseDescriptionAsMap(description)
if (debugEnable){
log.debug("Message Map: '$parsedMap'")
}
//switch(parsedMap.sourceEndpoint) {
switch(parsedMap.data[2]) {
case "01":
button = "1"
break
case "02":
button = "2"
break
case "03":
button = "3"
break
case "04":
button = "4"
break
case "05":
button = "5"
break
case "06":
button = "6"
break
case "0A":
button = "10"
break
}
if (button == "10")
{
def batCap = zigbee.convertHexToInt(parsedMap.data[9])
if (debugEnable) {
log.debug "Battery level = ${batCap}"
}
sendEvent(name:"battery", value: batCap)
}
else if (button != null) {
switch(parsedMap.data[6]) {
case "00":
buttonState = "pushed"
break
case "01":
buttonState = "doubleTapped"
break
case "02":
buttonState = "held"
break
}

        if (debugEnable) {
            log.debug("button = "  + button + " buttonState = " + buttonState)
        }
        sendEvent(name: buttonState, value: button, descriptionText: "Button $button was $buttonState",isStateChange:true)
    }
}
return

}

2 Likes

Cheers lads - works a treat. Quality is a bit wank to be honest, and the 'hold' seems to be sporadic at best, but I suspect this isn't down to the driver.

Many thanks!

1 Like

Well yeah, like I say I threw mine out. It had the feel of a Christmas cracker toy.

Any suggestions on a substitute?

Don't fancy entering the giddy heights of picos etc, as I have better things to spend my pennies on than a button for a thousand quid.

Ta! =)

I use these a lot now - only 4 buttons tho. https://www.amazon.co.uk/gp/product/B08J3TMGJH/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Vesternet have a selection of more-than-4-button but they don't all have the full three button actions.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.