Hofei90 / pwm_fan_control_pi4

Software zur Steuerung eines PWM Lüfters für Betrieb mit dem Raspberry Pi 4
MIT License
13 stars 3 forks source link

Further possible features #4

Open mlang-de opened 3 years ago

mlang-de commented 3 years ago

The first two points I will try to add in future. Meets this your ideas or should I stay in my own forked repo? One more question, is it possible to take part of the hacktoberfest 2020 with your repo? https://hacktoberfest.digitalocean.com/hacktoberfest-update :)

br

Hofei90 commented 3 years ago
  • Control fan with external temperature sensor

  • Control multiple fans (one fan with rpi temp sensor + one fan with ext. temp sensor)

If I find both points a very good idea, which can gladly flow into the repo. Since I do all this as a hobby, I hope that I will understand my own repository afterwards, how it works ;)

But I'm glad that other people can use it as well.

* Email notification (ICE, daily, ...)

Which data do you want to send via email?

ICE tells me nothing now

To the last point with the Hacktoberfest I will let you know this morning, I want to read up on it briefly.

mlang-de commented 3 years ago

Since I do all this as a hobby, I hope that I will understand my own repository afterwards, how it works ;)

To be honest, I am not a python programmer normally, more C and C++. So I guess the implementation will be the readable and understandable one :)

Via email I think on an average temperature (daily) or some logged events (in future). ICE = In case of emergency, of some desired temperature will reached, an email will be sent immendantly. Simple things for the beginning :)

Hofei90 commented 3 years ago

Zum Thema Hacktoberfest, darauf verzichte ich erstmal. Aber danke für die "Einladung". Die voraussichtliche Zunahme an Spam (wie auf der Website von Hacktoberfest oder auf Twitter zu lesen) sprechen dagegen.

Die Vorgeschlagenen Features können aber gerne Implementiert werden. Gerade bei der Temperatur jedoch denke ich muss aufgepasst werden, dass man keine schon bereits vorhandenen Tools versucht zu ersetzen. Rein die Temperatur als eMail finde ich ist ok, z.B. aber daraus noch einen Graphen zu erstellen, würde mir jetzt z.B sofort Grafana einfallen was das viel besser kann als wir.

EDIT (englische Übersetzung hinzugefügt):

On the subject of Hacktoberfest, I'll do without that for now. But thanks for the "invitation". The expected increase of spam (as you can read on the website of Hacktoberfest or on Twitter ) speaks against it.

But the suggested features can be implemented. But especially with the temperature I think you have to be careful not to try to replace already existing tools. Just the temperature as eMail I think is ok, but to create a graph out of it, I would immediately think of Grafana what it can do much better than we can.

mlang-de commented 3 years ago

"Hacktoberfest" ok, schade, verstehe ich aber ^^.

"Gerade bei der Temperatur jedoch denke ich muss aufgepasst werden" Ich würde so oder so gucken was es an python module gibt und diese verwenden, wenn dies gemeint ist?

"Rein die Temperatur als eMail finde ich ist ok, z.B. aber daraus noch einen Graphen zu erstellen, würde mir jetzt z.B sofort Grafana einfallen was das viel besser kann als wir." Bevor ich so etwas selbst implementiere, würde ich immer zuerst den Weg über verfügbare, bereits funktioniere Lösungen wählen. z.B. https://realpython.com/python-send-email/ --> email package

Hofei90 commented 3 years ago

Ahh es geht doch in Deutsch auch - war gar nicht meine Absicht, hatte es aber vergessen zu übersetzen.

Ich würde so oder so gucken was es an python module gibt und diese verwenden, wenn dies gemeint ist?

ich meinte damit, dass es nicht zu sehr Richtung Monitoring Tool wie Prometheus und/oder Node Exporter geht, sondern einfach eine simple Mittlung über min/avg/max Wert ist ok, aber alles andere denke ich können andere Tools besser. Die Temperatur wird schon erfasst, sonst würde sich die Lüfter nicht steuern lassen. https://github.com/Hofei90/pwm_fan_control_pi4/blob/master/fan_control.py#L72 Diese würde ich mithilfe von Peewee in eine sqlite Datenbank schreiben, wahlweise in den RAM oder Datei mit einstellbarer Samplerate. Daten jedoch nur für die letzten 48h aufbehalten. Ebenso könnte man da noch die Betriebsstunde des Lüfters und die RPM miterfassen.

Als zusätzlichen Benachrichtigungsweg fällt mir noch Telegram ein, hier habe ich mir schon eine simple API erstellt die bei verschiedenen Projekten bei mir zum Einsatz kommt.


Ahh it works in German too - was not my intention at all, but I forgot to translate it.

I would look anyway what python modules are available and use them, if this is what you mean?

i meant that it's not too much about monitoring tools like Prometheus and/or Node Exporter, just a simple averaging by min/avg/max value is ok, but everything else i think other tools are better. The temperature is already recorded, otherwise the fans would not be controllable. https://github.com/Hofei90/pwm_fan_control_pi4/blob/master/fan_control.py#L72 I would write these to a sqlite database using Peewee, either in RAM or in a file with an adjustable sample rate. But I would only keep data for the last 48h. You could also record the operating hours of the fan and the RPM.

As an additional way of notification I can think of Telegram, here I have already created a simple API which is used in several projects.