keypad-firmware icon indicating copy to clipboard operation
keypad-firmware copied to clipboard

Not sure how to simulate key presses. Please help

Open ComputerGuy99 opened this issue 2 years ago • 6 comments

I have always wanted to create a virtual keypad for my Honeywell Vista 20P alarm system that would allow me to monitor it and program it using a computer. I found devices such as the envisalink and alarm decoder online that claim to offer such functionality, however their high cost and closed source software made me lose interest immediately. I was looking for an open source option that I could extend and modify as my needs change and grow. I came across your project very recently and after seeing the code it looked very promising so I decided to try it out. I was able to compile your code and load in onto an arduino nano and it appears to be working fine. I connected pin D12 on the arduino to the yellow wire of the keypad bus via a 5V VRM and I connected pin D11 to the green wire of the keypad bus using a diode as outlined in the instructions. When I open up the serial monitor in the Arduino GUI I see the "Starting vista keypad bus" message followed by various messages of type unknown. I see a message of type display every few seconds which gives some information about the status of the system however that information often is incorrect based on the status my keypad is showing. I also receive F6 messages every minute or so of the form "kp ack addr = x" where x is always a random negative or positive number. I've tried to convert this number to decimal to see if there is any pattern but couldn't find anything. Note: I have disabled (set to zone type 0) all zones and only have the arduino and a 6150 fixed display keypad set to address 17 attached to my alarm panel. I have tried changing the address of the Arduino using TT+kpaddr= y where y is the address I want to set and this appears to be working correctly. However, I am not sure what commands I need to send in order to simulate key presses on a keypad or to change or view programing or show more detailed system status as can be seen on a 6160 or 6139 alphanumeric keypad. Any help would be appreciated. I have tried looking online and there doesn't seem to be a lot of technical information covering these alarm systems online. All I was able to find was a copy of the compass software and a pdf on another github page covering the formatting of F6 and F7 messages. I have attached screen shots of my output from the serial monitor. Thank you so much for sharing your code. I really appreciate the effort that was put into this project. Arduino Display Message Arduino F6 message Arduino Startup

ComputerGuy99 avatar Jan 24 '22 18:01 ComputerGuy99

you should be able to just write to the arduino serial any numbers between 0-9. I think the special keys like * and # are A,B and pressing both is 'C' or 'D'.

if you have a linux/unix machine, the USB serial should be available as /dev/ttyAMA{0-9} or /dev/ttyUSB{0-9}

you might have to set the correct speed of the port with a tool like stty

stty -F $serialPort cs8 115200 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

Where $serialPort is the location of the /dev/ttyAMA or /dev/ttyUSB

But, slowly typing numbers into the serial terminal of adruino IDE should cause your panel to respond.

That seems like too many unknown bytes. I think you need a diode on the green line and some other resistors.

I seem to have lost the domain name with all the hardware docs. I'll see if I can't throw them into a PDF or github site or something.

markkimsal avatar Jan 24 '22 20:01 markkimsal

https://github.com/TANC-security/keypad-firmware/blob/master/docs/Self-Monitoring%20_%20Notifications%20From%20Your%20Home%20Security%20System.pdf

markkimsal avatar Jan 24 '22 20:01 markkimsal

you might be able to bypass the opto couplers, but you need to somehow shift the panel's 5v voltage to 3.3v, or use a 5v arduino. The opto couplers are powered by the arduino and isolated from the panel's voltage. Ensure somethings are pulled to ground with some high value resistors so they're not floating. I'm not very good at this electronics, but this is the setup that i finally got stable. the last thing you want is a couple bits being random and getting an alarm text message sent to your phone when there's actually no problem.

markkimsal avatar Jan 24 '22 20:01 markkimsal

I have some examples here you can also look at. My code is written for the ESP8266/ESP32 platform. Even though it is technically setup for HomeAssistant, the vista library can be used standalone. Mark's circuit is good except as I noted on my github page, you have to be selective in the optocouplers you use due to signal issues. I tend to find the simpler transistor version more stable and also it puts less load on the bus. The code is based on this version in Mark's library here but adapted to the ESP.

Just a shout out to Mark for providing this code! Helped tremendously in my project!

https://github.com/Dilbert66/esphome-vistaECP

Dilbert66 avatar Jan 24 '22 21:01 Dilbert66

Thank you so much for the quick reply. I will try typing raw numbers into the arduino IDE. If you could somehow share the hardware documentation you have I would really appreciate that Mark. I tried to visit the domain and sadly it is down on my end as well. I don't have any optocouplers so I am limited to playing around with different combinations of resistors, diodes, and transistors depending on what I can find in my parts bin. Also to Dilbert66, I did check out your repository and one other one as well. I am so happy to see that others are also building on Mark's project. I have been wanting to do something like this for many years but as a computer science student without much real world coding experience my abilities are very limited in terms of what I can do. I am hoping to extend this project further to allow programming of Honeywell Vista alarm to be performed in a similar manner to what the compass software allows but without the need for a dial up modem

ComputerGuy99 avatar Jan 24 '22 22:01 ComputerGuy99

I'm not a hardware or EE guy, so definitely do whatever you can to get it running.

markkimsal avatar Feb 03 '22 14:02 markkimsal