| .idea | ||
| clima-compressor-remote-receiver.py | ||
| clima-compressor-testsender.py | ||
| libpio.h | ||
| libpio.so | ||
| LICENSE.txt | ||
| README.md | ||
This repository is designed for a Raspberry Pi1 running raspbian (June 2017) with a Intellisys PIO-Interface and contains:
- A script to watch WAMP and set a relais to interrupt the ESHL clima inverter
- A script to write wo WAMP to test set setting of the ESHL clima inverter
Prerequisites
To install the necessary prerequisites on the Pi, do
sudo sudo apt-get install -y build-essential libssl-dev libffi-dev python-dev htop screen git
sudo pip3 install crossbar
Download
Important: the script must run as user root so it's best to do everything as root.
Just fetch the scripts via
cd ~ # go to home directory
git clone https://gogs.univ-exp.com/ESHL/clima-compressor-remote.git
Running the remote receiver script
Start the sending script with:
./clima-compressor-remote-receiver.py
At the beginning of the script set the corresponding variables for WAMP:
wamp_URL = "String"wamp_realm = "String"wamp_topic_compressor_set_state = "String"wamp_topic_compressor_get_state = "String"
and for the Databases InfluxDB:
influx_host = "String"influx_port = INTEGERinflux_user = "String"influx_password = "String"influx_dbname = "String"influx_update_interval = INTEGERin seconds, default5
also check the variables
compressor_ESHL_timeout = INTEGERin seconds default30*60
The timeout sets the inverter to default mode after no other state has been set.
Running the script as a system service
For the ESHL you might want to start the scripts automatically as a service.
The sensor-data sending script
Just paste the following to a terminal. Be aware that you might change the location of the script in ExecStart, depending on the user you have downloaded it with. For debugging just comment out the second ExecStart and use the firt one. This will generate a Logfile of the output which might become rather big.
# generate the systemd file
sudo tee /etc/systemd/system/clima-compressor-receiver.service << EOF
[Unit]
Description=clima compressor receiver daemon
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /root/clima-compressor-remote/clima-compressor-remote-receiver.py
ExecStop=/usr/bin/pkill -f clima-compressor-remote-receiver.py
Restart=always
[Install]
WantedBy=multi-user.target
EOF
# update systemd
sudo systemctl daemon-reload
# enable the file for autostart
sudo systemctl enable clima-compressor-receiver.service
# start the daemon
sudo systemctl start clima-compressor-receiver.service
ESHL Info
Password for the users pi and root is well known (the same as for sparta)
License
Author Stefan Maier
Licence GNU GPLv3