Projet de remplacement du "RPiPasserelle" d'Otec.
Find a file
Maxime Alves LIRMM@home e895baedbc [route][config] fix GET /mac
2020-09-16 01:29:41 +02:00
config added systemd init files 2020-09-16 00:28:02 +02:00
db [db] remove non-working trigger to manage it into python code 2020-08-02 21:20:06 +02:00
docs [doc] /config/{last_update,mac_address} 2020-09-15 23:49:54 +02:00
pyheatpump [route][config] fix GET /mac 2020-09-16 01:29:41 +02:00
tests [route][config] fix GET /mac 2020-09-16 01:29:41 +02:00
.gitignore added db file to gitignore 2020-07-26 21:27:03 +02:00
LICENSE Initial commit 2020-07-05 15:56:42 +02:00
MANIFEST.in [deps] package with setuptools 2020-08-03 12:11:15 +02:00
poetry.lock [deps] added netifaces module 2020-08-03 06:26:09 +02:00
pyproject.toml [deps] package with setuptools 2020-08-03 12:11:15 +02:00
pytest.ini [tests] logging tests to pytest.log 2020-08-02 12:56:01 +02:00
README.md [doc] update readme 2020-08-03 17:26:59 +02:00
setup.cfg [deps] package with setuptools 2020-08-03 12:11:15 +02:00
setup.py [deps] added HTML template to dependencies 2020-08-03 14:28:44 +02:00
tox.ini [deps] package with setuptools 2020-08-03 12:11:15 +02:00

pyHeatpump

Projet de remplacement du "RPiPasserelle" d'Otec.

Dependencies

pysqlite3 umodbus starlette uvicorn pytest requests

Install

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