From HFML-FELIX Wiki
The following commands will install the necessary python packages to make a linux daemon that communicates via MQTT.
Linux
[edit | edit source]pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/linux_daemon.git pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/felix_mqtt.git pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/mqtt_daemon.git
Raspberry Pi with Bullseye distro
[edit | edit source]sudo apt-get install python-is-python2 python-dev-is-python2 wget https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/python2.7/-/raw/main/get-pip.py
sudo python2 get-pip.py sudo python2 -m pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/felix_mqtt.git sudo python2 -m pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/felix_mqtt.git sudo python2 -m pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/mqtt_daemon.git sudo CFLAGS="-fcommon" pip install RPi.GPIO
on raspberry pi's the package may generate the error in pidfile.py of an empty super() class call.
to fix this issue:
cd /usr/local/lib/python2.7/dist-packages/daemon
nano pidfile.py
Change the 2 empty super() calls with the following arguments:
super(TimeoutPIDLockFile, self).init(path, args, *kwargs)
super(TimeoutPIDLockFile, self).acquire(timeout, args, *kwargs)
Afterwards check if there is no file with the name run, cause this inhibits the daemon from creating the directory run
Windows
[edit | edit source]python -m pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/windows_daemon.git python -m pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/felix_mqtt.git python -m pip install git+https://feloperator-felix:rEKWf5fu2A4MZBRqmacV@gitlab.science.ru.nl/felix/mqtt_daemon.git