Komplexně zpracovaný příklad na modul Olimex ESP32-POE s displayem, 3D tištěným držákem a firmwarem ESPEasy zpracoval mikrom
a nechávám ho od něj v angličtině tak jak ho poslal.
Autor příkladu: https://mikrom.cz/
Kontakt na autora: mikrom@mikrom.cz
Olimex ESP32-POE
https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware
Wi-Fi is always meh, so I really like this with POE functionality!
3D printed bracket and few computer screws (use brown paper insulated washers for ESP board!).
Model at Printables.com: https://www.printables.com/cs/model/414827-rack-environment-monitoring-bracket
Direct download: Model for print 3MF
https://github.com/letscontrolit/ESPEasy/releases
Just download and flash correct BIN file via micro-USB and do initial setup via the serial console:
ESP_Easy_mega_20221105_display_ESP32_4M316k_ETH.bin
Useful links:
https://www.letscontrolit.com/wiki/index.php/Tutorial_Rules
https://espeasy.readthedocs.io/en/latest/Rules/Rules.html
https://espeasy.readthedocs.io/en/latest/Reference/Command.html
https://www.letscontrolit.com/wiki/index.php/EasyNotifications
Do not forget to change YourAPHere
and YourPasswordHere
# Factory reset Reset # Wifi (powered via USB it will connect to the wifi) WifiSSID YourAPHere WifiKey YourPasswordHere WifiConnect
Now you should be able to connect vias the Wi-Fi and do the basic setup.
Set Generic HTTP controller where data will be sent:
Controller Hostname: domena-pro-zapis.tmep.cz
Controller Publish: /index.php?temp=[HTU#Temperature]&humV=[HTU#Humidity]
Add two devices. Environment sensor, and LCD2004 display. (You can use I2C Scanner under Tools tab to get correct addresses).
Select correct I2C address, output data Temp / Hum.
Interval is very important – how often data will be measured (send to the controller, rules triggered)
With Formula, you can do a basic calibration.
You can setup e-mail notifications here (or if you are using TMEP.cz/TMEP.eu portal, you can use them there).
Just use a standard values as for any SMTP:
Here some magic s done. Timer is used just for looping two screens on the display (Datetime, Temp, Hum / IP, MAC). Last two functions are for triggering notifications.
The code is pretty self-explanatory.
// https://www.letscontrolit.com/wiki/index.php/Tutorial_Rules // https://espeasy.readthedocs.io/en/latest/Rules/Rules.html // https://espeasy.readthedocs.io/en/latest/Reference/Command.html // http://<espeasyip>/control?cmd=<command> On System#Boot Do LoopTimerSet,1,10 // LoopTimerSet,<timernr>,<timeInSeconds> Endon On Rules#Timer=1 Do // When Timer1 expires, do... => every 10s If [int#1]=0 Let,1,1 LCDCmd,clear LCD,1,1,"{substring:0:10:%lcltime%} %systm_hm%" LCD,2,1,"T:[HTU#Temperature]{D}C H:[HTU#Humidity]%" Else Let,1,0 LCDCmd,clear LCD,1,1,"IP:%ip%" // Shorter the MAC address A8:03:2A:F8:AB:EC -> A8032AF8ABEC LCD,2,1,"MAC:{substring:0:2:"%mac%"}{substring:3:5:"%mac%"}{substring:6:8:"%mac%"}{substring:9:11:"%mac%"}{substring:12:14:"%mac%"}{substring:15:17:"%mac%"}" Endif Endon On [HTU#Temperature]>25 Do Notify,1 Endon On [HTU#Humidity]>40 Do Notify,1 Endon