-
Notifications
You must be signed in to change notification settings - Fork 0
TCS Setup
This is a Raspberry Pi (currently model 3 B plus) which performs these functions:
- constantly reading telescope position via encoders, via EIB 741 device
- give commands to Axor motor drivers via Modbus / serial connection
- run HTTP API service for ASCOM drivers to connect to
- run control loop for telescope positioning
sudo apt update && sudo apt full-upgrade
https://github.com/petrockblog/PowerBlock#powerblock-driver
sudo passwd root # enable root login
logout # cannot rename while logged in
Log in as root.
usermod -l dagor pi
usermod -m -d /home/dagor dagor
Log in as dagor
passwd
sudo raspi-config
- set auto-login in Boot Options.
- add en.UTF-8 locale (choose ANSI-C as default when prompted)
https://github.com/pyenv/pyenv-installer
`curl https://pyenv.run | bash``
cat <<'EOF' >> ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
EOF
Logout, login.
Version 3.8.5 at the time or writing
Install requirements for Python (see https://github.com/pyenv/pyenv/wiki/Common-build-problems for latest)
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
List available versions:
pyenv install -l | grep 3\.8
Install Python:
pyenv install 3.8.5
TODO, we are actually still using 2.7 😊
Clone the repo
git clone https://github.com/astrohr/dagor_tca
TODO there is a bunch of other stuff in this repo, need to split it up, see Issue #114
cd dagor_tca
pyenv virtualenv 3.8.5 tca
pyenv local tca
sudo apt install libgeos-dev
pip install -r requirements.txt
sudo useradd dagor
sudo usermod -a -G dialout dagor
sudo su dagor
cd /home/dagor
curl https://pyenv.run | bash
cat <<'EOF' >> ~/.bashrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
EOF
exit
# as pi again
cd /home/dagor/.pyenv/versions/
sudo ls -s /home/pi/.pyenv/versions/tca
sudo su dagor
pynev local tca
exit
Copy files from existing server:
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_rsa_key.pub
/home/dagor/.ssh/authorized_keys
This is optional, to prevent ssh warnings about different server hashes.
TODO:
- Run API as a service
- Run positioning loop as a service