Maxime Alves LIRMM@home 2feadd38e3 [orders] fix assignation variable, fix appel à write_coil | 3 jaren geleden | |
---|---|---|
config | 3 jaren geleden | |
db | 3 jaren geleden | |
docs | 4 jaren geleden | |
logs/bug/30 | 3 jaren geleden | |
pyheatpump | 3 jaren geleden | |
staging/dev | 3 jaren geleden | |
tests | 3 jaren geleden | |
.gitignore | 3 jaren geleden | |
LICENSE | 4 jaren geleden | |
MANIFEST.in | 4 jaren geleden | |
Pipfile | 3 jaren geleden | |
Pipfile.lock | 4 jaren geleden | |
README.md | 4 jaren geleden | |
poetry.lock | 4 jaren geleden | |
pyproject.toml | 4 jaren geleden | |
pytest.ini | 4 jaren geleden | |
setup.cfg | 4 jaren geleden | |
setup.py | 4 jaren geleden | |
tox.ini | 4 jaren geleden |
Projet de remplacement du “RPiPasserelle” d’Otec.
pysqlite3 umodbus starlette uvicorn pytest requests
Initialize a database in the home directory of your system user.
sqlite3 -init ./db/pyheatpump.sql /var/run/pyheatpump/pyheatpump.sqlite3
Create a configuration file in /etc/pyheatpump.ini
.
[heatpump]
mac_address = 00:00:00:00:00:00
database = /var/run/pyheatpump/pyheatpump.sqlite3
[supervisor]
scheme = https
host = supervision-test.gteo.fr
port = 8081
post_path = /Symfony/web/app_dev.php/boardws/insert
get_path = /Symfony/web/app_dev.php/boardws/orders
interval = 10000
heatpump_id = 42
[api]
host = 0.0.0.0
port = 80
Fetch manually to initialize the data.
pyheatpump fetch
Insert the init files into the right locations.
cp -t /etc/init.d conf/pyheatpump
chmod +x /etc/init.d/pyheatpump
rc-update add default pyheatpump
rc-service pyheatpump start
cp ./conf/pyheatpump.systemd.socket /etc/systemd/system/pyheatpump.socket
cp ./conf/pyheatpump.systemd.service /etc/systemd/system/pyheatpump.service
systemctl daemon-reload
systemctl enable pyheatpump
systemctl start pyheatpump
Enable the cron task / systemd timer for the automatic fetch and supervise tasks.
cat conf/pyheatpump.cron >> /etc/crontab
cp ./conf/pyheatpump.systemd.timer /etc/systemd/system/pyheatpump.timer
Depending of which staging environment you attended to use, please check the dedicated directory in staging
. You’ll find their a README and an install file that will help you further.