Relay for the LED lighting
Relay for the power supply unit
collectd Python plugin script
Use Python3 interpreter! It's not tested with old legacy Python 2.X. Please not that this script does not work by calling it manually with "python relay_states.py" because the register_* functions lead to execution error if not called by collectd.
Create plugin file
Note that the states are written into /var/lib/Repetier-Server because the scripts to turn on/off PSU and LEDs are mostly called by Repetier Server frontend. Repetier Server cannot access directory /opt so just write the files to the user "repetierserver" home directory
Configure collectd to add the script
Add the following lines to the end of the config (or at the according place where Python plugins are put)
The following warning can be safely ignored
Check out if values from collectd correctly flow into InfluxDB
If you have access to the influxdb server you can run on the server directly (localhost)
If you want to send a remote curl command, do the following
Grafana query testing
some example queries
Purge old data
If you want to reset data you can send some API call for example.
Add some retention policy to keep clean your harddrive (optional)
Collecting a lot of data results in huge amount of needed memory. To avoid this think about adding some auto-clean policy (called retention policy) in InfluxDB.
This configuration is not part of Hangprinter project. At the moment the InfluxDB we use is one of the instances that FabLab Chemnitz uses. It's configured to keep 14 days of data.