Remap the pins to support serial console for ad2pi:
- Code: Select all
scp timlegge@remoteserver:/pi3-miniuart-bt-overlay.dtb ./
sudo cp pi3-miniuart-bt-overlay.dtb /
sudo vi /boot/config.txt
add the following to the end of the file
dtoverlay=pi3-miniuart-bt-overlay
force_turbo=1
sudo nano /lib/systemd/system/hciuart.service
Replace ttyAMA0 with ttyS0
I admit it Unicode and languages confuse me:
- Code: Select all
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
Apply updates and install requirements:
- Code: Select all
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libssl-dev telnet git
Clone the git repository and install:
- Code: Select all
git clone https://github.com/nutechsoftware/ser2sock.git
cd ser2sock/
./configure
make
sudo cp ser2sock /usr/local/bin/
sudo cp -R etc/ser2sock /etc/
sudo cp init/ser2sock /etc/init.d/
sudo update-rc.d ser2sock defaults
Configure ser2sock to run as the pi user:
- Code: Select all
sudo sed -i 's/^EXTRA_START_ARGS=.*$/EXTRA_START_ARGS=\"--chuid pi:dialout\"/g' /etc/init.d/ser2sock
Start daemon:
- Code: Select all
sudo /etc/init.d/ser2sock start
Testing:
Verify that you can connect to the ad2pi:
- Code: Select all
telnet 127.0.0.1 10000
Type a C and press enter <Enter>
You should see:
- Code: Select all
!CONFIG>ADDRESS=18&CONFIGBITS=0109&LRR=N&EXP=NNNNN&REL=NNNN&MASK=ffffffff&DEDUPLICATE=N
In addition at this point you should see messages from the panel that look familiar like: ****DISARMED**** Ready to Arm "
Repeat for the hostname: telnet alarmdecoder.local and you should get the same results
Test sending data to the Panel:
Via telnet you should be able to send data to the panel. Using the number keys send the code to arm or disarm - You must send each digit one at a time by pressing the enter key after each digit.
Troubleshooting:
If you are unable to send data to the panel to arm or disarm you likely do not have the key pad address enabled (Ademco Vista). You can verify on the Vista 20P by using a working panel:
1) enter programming mode
2) For keypad address 18 enter: #191
The keypad should report '01' or above (ie. not '00' which is disabled) followed by two digits signifying the sound
Tim