# software-di-controllo

OARPAF Instrument Control Software

# System dependencies:

Maybe I'll trop these:
```
sudo apt install gnuplot gnupot-x11
```

## Python dependencies:

```
# For the core routines:
pip3 install requests loguru astropy
pip3 install gnuplotlib pyvantagepro # maybe I'll drop these.

# For the API interface:
pip3 install flask flask-restx flask-cors
# Tested with flask==3.0.2 flask-restx==1.3.0 flask-httpauth==4.8.0 flask-apscheduler==1.13.1 werkzeug-3.0.1

./app.py --noweb
./app.py --noweb port hostname_or_ip
# http://server:port/api

# for the web pages:
pip3 install flask flask-socketio flask-httpauth

./app.py
./app.py port hostname_or_ip
# http://server:port/api
# http://server:port/web

```

## git configuration on observatory pc

To push directly on observatory pc (for people without access to INAF repo)

```
# on obseravatory pc
git config receive.denyCurrentBranch updateInstead

# on local machine
git remote add machine user@machine:software-di-controllo
git push machine main
```

## Dome board:

```
sudo apt-get install python-dev libusb-dev swig libwxgtk3.0-gtk3-dev
git clone https://github.com/rm-hull/k8055.git
cd k8055

sed -i.bak 's/CC = gcc/CC = g++/' Makefile
sed -i.bak 's/\t/    /g' pyk8055/pyk8055.py
sed -i.bak 's/IOError, "Could not open device"/IOError("Could not open device")/g' pyk8055/pyk8055.py

make all
sudo make install
make pylib k8055gui
sudo make pyinstall guiinstall
```

# Dome software + Alpaca driver:
```
git clone https://github.com/lfini/SW-OPC-2.git
```


## Siemens modbus interface

```
sudo apt install gnuplot gnupot-x11
sudo /home/zap/MBB/mbb -w 9000 -i 22000 -l /home/zap/MBB/mbb.log 10.185.119.248
```


# Branches:

- main
- dev

<!-- [![Latest Release](https://www.ict.inaf.it/gitlab/davide.ricci/software-di-controllo/-/badges/release.svg)](https://www.ict.inaf.it/gitlab/davide.ricci/software-di-controllo/-/releases) -->


