GPIO port control by threshold in temperature
As I understand it, the signal from the temperature sensor goes via the EmonTX to the EmonHub via MQTT (at least that’s what I see in the log) and is sent by the EmonHub to EmonCMS.
It is also possible to have the RaspberryPi switch a GPIO, that is well known.
Now I would like to have GPIO 17 switched on using the MQTT of the temperature. I’ve read a lot but I’m not out yet.
It is my intention to set off a buzzer (GPIO 17) for 30 seconds if the temperature exceeds a certain value (TempH).
It looks like this.
-
GPIO 17 gets voltage at a fixed temperature (TempH = 60ºC) and after 5 seconds automatically becomes powerless.
-
GPIO 17 may only become active again after the sensor has dropped 10ºC in relation to the set temperature (TempL = TempH - 10).
-
I connect an Optocoupler to GPIO 17
-
Optocoupler switches on a delay relay when live
-
Delay relay switches buzzer on and switches off after 30 seconds.
I would like the actions that are done to be visible in EmonCMS as well and to be stored in a CSV.
Who can help me with this?
Translated with DeepL Translate: The world's most accurate translator (free version)