
Parts required:
- 107x87x59mm Plastic Electronics Project DIN Rail PLC Box
- NodeMCU ESP8266 Development Board (ESP12)
- HLK-PM01 5VDC 3W power supply (HLK)
- Fuse N400mA 250VAC 5x20mm + fuse socket (Bizt/400mA)
- Varistor for 275V (VDR/275V)
- 5x7 cm Prototype Paper
- 5x7cm Double-Side Protoboard Prototype PCB Board
- 1x3 Matrix Array Key Membrane Switch Keypad 36x55mm (BTN-L,BTN-R,BTN-M)
- 5V 1-Channel Relay Module with Optocoupler Level (RELÉ)
- AC 250V 3A 2 Pin ON/OFF I/O SPST Snap in Mini Rocker Switch (Kapcsoló)
- 2 Poles/2 Pin 2.54mm/0.1" PCB Universal Screw Terminal Block
- AM2320 Digital Temperature and Humidity Sensor (AM2320)
- OLED 1.3" White LCD 4PIN Display Module I2C Interface 128x64 (OLED)
Wiring:

230V AC arrives from left (Line,Neutral) and "Kazán kontaktus" is 2wire that controls the boiler. (either Normally Open start/stop signal, or if boiler is old, it can control 230VAC)
ESP12 pinout:
- RX (GPIO3/D9) = BTN-M (Menu button)
- D1 (GPIO5/SCL) = OLED SDA + AM2320 SDA (it is only reversed for easy soldering)
- D2 (GPIO4/SDA) = OLED SCL + AM2320 SCL (it is only reversed for easy soldering)
- D5 (GPIO14) = Relay IN
- D6 (GPIO12) = BTN-M (Left button)
- D7 (GPIO13) = BTN-R (Right button)
Inside:
I developed P168 ThermoLED ESPEasy plugin for easy usage:
https://github.com/enesbcs/ESPEasyPlugi ... rmOLED.ino
Complete ESPEasy firmware can be downloaded from here:
https://drive.google.com/file/d/1SVa6bv ... sp=sharing
P168 features :
- Displays and use current temperature from specified Device/Value (can be a Dummy for example)
- Displays and maintains setpoint value
- on power down/up this plugin maintains and reloads RELAY and SETPOINT values from SPIFFS
- Supports 3 buttons, LEFT, RIGHT and MODE selection (MODE button cycles modes below,
LEFT/RIGHT increases-decreases setpoint OR timeout (Mode sensitive)
- one output relay need to be specified, currently only HIGH level active supported
- 3 mode is available:
- 0 or X: set relay permanently off no matter what
- 1 or A: set relay ON if current temperature below setpoint, and set OFF when
temperature+hysteresis reached - comparison made at setted Plugin interval (AUTO MODE)
- 2 or M: set relay ON for specified time in minutes (MANUAL ON MODE), after timeout, mode switch to "A"
List of commands :
- oledframedcmd,[OLED_STATUS] Inherited command from P036 status can be:
[off/on/low/med/high]
- thermo,setpoint,[target_temperature] Target setpoint, only used in Mode "A"
- thermo,heating,[RELAY_STATUS] Manually forcing relay status [off/on]
- thermo,mode,[MODE],[TIMEOUT] Set to either mode X/A/M, if M selected,
then TIMEOUT can be specified in minutes
Command Examples :
- /control?cmd=thermo,setpoint,23 Set target setpoint to 23 Celsius
- /control?cmd=thermo,mode,1 Set mode to AUTOMATIC so it starts to maintain setpoint temperature
- /control?cmd=thermo,mode,2,5 Starts pre-heat for 5 minute, does not care about TEMP, then go to AUTO mode after timeout
- /control?cmd=thermo,mode,0 Switch heating off, absolutely do nothing until further notice
ESPEasy device settings:
P168 control plugin settings:
Sample rules:The code above makes it possible to use it's own AM2320 settings as default or if nothing sends to it a remote update.Code: Select all
on System#Boot do event,loctemp endon on loctemp do TaskValueSet,3,1,[homero#Temperature] TaskValueSet,3,2,0 endon on exttemp do TaskValueSet,3,1,%eventvalue% TaskValueSet,3,2,1 timerSet 1,180 endon on Rules#Timer=1 do event,loctemp endon on homero#Temperature do if [glob#external]=0 TaskValueSet,3,1,[homero#Temperature] endif endon
Remote temperature can be sent by the following URL:
http://THERMOSTAT_IPADDRESS/control?cmd=event,exttemp=21.5