Thank you for the hard work on the 2.x alarmdecoder binding. I am excited to see this migration!!
I setup the serial bridge and was able to get the basic contacts working. But I am not able to get the KeyPad items working. I am able to see the raw messages come in for the KeyPad text but its not updating the thing.
After looking at the code seems like the KPM messages are missing the â!KPMâ prefix check and assume it comes without a prefix. Do you think the serial and ipbridge get keypad messages differently?
I created a PR that should enable messages with and without the prefix. After looking at the docs seems like its a CONFIGBIT setting in the device. The messages with the prefix works with the old alarmdecoder1 binding so I suspect most have the CONFIGBIT enabled.
Hi Dave. Thanks for the PR! Yes, there is a config option to make the alarm decoder prefix the keypad messages with â!KPM:â. I think it defaults to off, but you are right that the binding should really support it in either mode. I didnât think the V1 binding had supported the prefixed messages, so I figured that the new one was at least no worse than the old one. .
Sorry I didnât reply sooner, but my electricity was knocked out for a few days by tropical storm Isaias.
I am trying to migrate from Openhab2 to Openhab3, the alarmdecoder items were at the top of sitemap, so they were the first issue I ran into. I can get alarm status, so I know it is connected/initialized, but I cannot figure out how to arm the alarm.
It seems I can send command through command, but not through intcommand?
However, I donât see any sending occuring when connected to AlarmDecoder over telnet. Iâm open for doing this differently. It seems the intention of the updated binding was not through the intcommand, so if there is a better way, let me know. Any help is appreciated!
I posted a reply over the weekend, but it seems to have been lost when the forum crashed. Were you able to get this working? It may help to enable debug or trace level logging for the alarmdecoder binding.
Thanks for the response! I had not tried checking the binding logging, but I just did, and I donât see anything useful. In trace, I see the bus messages, but I donât see a send when I click the switch.
If I send an invalid message to the keypad like:
KeypadCmd.sendCommand("s")
I do see an error:
21:49:59.544 [INFO ] [ecoder.internal.handler.KeypadHandler] - Invalid characters in command.
So I know that is at least attempting to send, but I assume it isnât mapped correctly.
I switched back to openhab2, and I can see the send valid send/arm when I enable logging. Interesting that debug shows the bus messages when debug is enabled in openhab2, but trace needs to be enabled for openhab3 to show bus messages.
Hi. Itâs probably best to use the "commandâ channel for testing rather than the âintcommandâ channel. The âintcommandâ channel just allows you to map integers to command characters using the âcommandMappingâ string, which defaults to: â0=0,1=1,2=2,3=3,4=4,5=5,6=6,7=7,8=8,9=9,10=*,11=#â. This is mainly for backward compatibility. The âcommandâ channel will allow you to send a string with multiple characters.
In either case, the characters that you can actually send are limited to â0-9,*,#,<,>â. In addition, the characters A-H will be translated to special keys 1-8. If you try to send anything else, you should see the log message: âInvalid characters in command. Ignoring command: {}â.
If you were using the old openhab1 binding under openHAB 2.x, the binding code is around 90% different, so you should expect different behavior from it.
Wow, that is quite the change, why did it have to change so much?
So my understanding is a need to send an âsâ to the bus to arm the alarm. Do you have any recommendation on how to do that?
I tried all the special keys (A-H) and I hear noises on the keypad, but none of them seem to arm the alarm. I think one of them turned the doorchime on/off.
It looks like âsâ is a deprecated command for arming DSC alarms. According to the Alarm Decoder docs, you should use special keys instead. It seems like key 4 (D) or key 5 (E). See the AD protocol docs here. If there is a number sequence you can punch in on the keypad to arm the alarm, you can also send that as a command string.
Wow, that is quite the change, why did it have to change so much?
Yeah, it turned out to be about the worst possible case for a V1 to V2/V3 port. There was nothing wrong with the original V1 code, it just turned out to be hard to port. The overall structure needed to change because it uses a bridge and things model. Then all of the channels needed to be redefined to work with the V2 channel/item model. Then discovery needed to be added. Then because it was old code, the serial library it was using was deprecated and needed to change, and it needed changes to meet new coding standards, and null annotations needed to be added, etc., etc.
I donât want to discourage anyone from attempting other V1 ports, though. In most cases it is a lot easier.
It seeems to work now. I never considered tht my AlarmDecoder was very out of date. After updating, sending a âDâ arms the alarm in stay mode as exepected. Thanks for the help! And all the hard work updating the binding!