Zipato keypad - resolved

well I don't know where the 0x at the beginning of the newCode string is coming from then, but it shouldn't be there.
You're creating a raw zwave command, this is a string, composed of a sequence of hex byte characters.
0x is not required in this context.

thanks @mike.maxwell for the quick reply

ok, so if I hardCode the string then it works (even with the 0x) so
def newCode = 0x8f153e0c720001040000

if I use my handler (below) to create new code (with or without the 0x). it sets newCode to 0x8f153e0c720001040000 but the command doesn't work.

def convertCode (code) {
debug "Converting code $code"
//code = "256"
def newCode = "0x"
def indexStart = 0
def indexEnd = code.indexOf(',')
for (int i = 0; i < 10; i++){

def byteDec = code[indexStart+1..indexEnd-1] as int

codeByte = Integer.toHexString(byteDec) 
if (byteDec < 15) {newCode = "$newCode" + "0"}
newCode = "$newCode" + "$codeByte"

indexStart = indexEnd + 1
indexEnd = code.indexOf(',',indexEnd +1)

}

I think that my handler is creating an ascii string and not raw hex but I don't know how to convert it. log.debug of "Code = $newCode" when hardcoded give the result 679085061807431020183552 and log.debug of "Code = $newcode" when run through my handler gives the string of 0x8f153e0c720001040000 which tells me that Hubitat needs to know that it is in HEX format: I tried "newCode = newCode as hex" but that would have been too easy!

Thanks again for your help

Just updated the driver, but seeing this again.

dev:43602019-05-22 07:35:38.915 pm errorjava.util.IllegalFormatConversionException: x != org.codehaus.groovy.runtime.GStringImpl on line 546 (associate1)

Any further tips?
Brilliant work BTW :+1:

I just tried @mike.maxwell suggestion of def newCode = ""

Prior I got this: dev:43602019-05-22 07:39:40.526 pm debugnewCode = 0x8f373859bc5001040000

Now I get this: dev:43602019-05-22 07:43:57.820 pm debugnewCode = 8f373859bc5001040000

Any use to you?

Hi @Royski

OK it's a bit manual at the moment. Once you get your 8F code you need to edit the driver, and paste it in place of my 8f code. You then need to comment out the call to convertcode and then re assign your fob and it should work.

I think I am missing one line of code to convert my string to a hex string for the box, à bit like the "as int" command

Using this method I have associated my 6 keyfobs. It's not a driver that can be used on public release like this but it does what I need

1 Like

GOT IT WORKING!!!!

Thanks to @cometfish for the final piece to the jigsaw

1 Like

Hate to restart this topic but I have one of these keypads and would like to use it with HE, has anyone completely got this to work?

I'm using one to arm and disarm safety monitor. Three tags associated without too much issue, and they all can arm or disarm the system.

I read this thread for hours trying to work out how to hard code the tags to the keypad in the driver, but in the end I recall the latest community driver for this device just, well, worked.

The driver by @mhutchy is the one I'm using.

Thanks.

Thx C.J. could you point me to that driver please.

Pretty sure the driver I used is just the one linked in post number 8 in this thread, which is dated 2019 when you open the code.

Thanks.

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