Over the last few days I have been experimenting with one of those small “Smart Weather Clock” displays. At first glance, they look like fairly closed devices: they show the time, weather information and not much else.
But the obvious question was:
Can this be reused for something more interesting?
The goal was not to assume it could be modified. The first step was to open the device, identify the hardware, look for documentation, understand the boot pins, and check whether there was a realistic way to load alternative firmware.
Inside, I found an ESP8266 / ESP-12F module and an ST7789 240x240 display. From there, the work was about locating the right documentation, identifying the possible flashing pins, and validating the wiring.
Useful references during the process:
ESP-12F Product Specification:https://aithinker-static.oss-cn-shenzhen.aliyuncs.com/docs/_media_old/esp-12f_product_specification_en.pdfESP-12 reference / Blakadder:https://templates.blakadder.com/ESP-12.htmlReference video:https://www.youtube.com/watch?v=wyolY1OwSxc
The critical part was identifying the required pins to boot the ESP-12F into flashing mode:
GND -> GNDGPIO15 -> GNDGPIO0 -> GND only during boot to enter flashing modeRXD0 -> receives TX from the USB-TTL adapterTXD0 -> goes to RX on the USB-TTL adapterEN -> 3.3VVCC -> 3.3V
The simplified flashing wiring is:
EN / CH_PD = 3.3VVCC = 3.3VGPIO15 = GNDGPIO0 = GND during bootGND = common GNDTX USB-TTL -> RXD0 ESPRX USB-TTL -> TXD0 ESP
For the initial flashing process, I used Tasmotizer to load Tasmota onto the ESP8266. Once Tasmota was running and available through the web interface, the next step was to investigate whether the display itself could be controlled in a useful way.
One of the key findings was that Tasmota Display provided exactly what was needed for this use case: a small web server and the ability to send HTTP commands to write messages directly to the screen.
That made it possible to integrate the device with Domoticz.
Final goal:
Show power consumption.
Show 5G router information.
Show indoor and outdoor temperature/humidity.
Turn the display off at night.
Show IP address, connected WiFi, date and time on boot.
Use it as a small auxiliary status display for home automation.
Final procedure after installing Tasmota.
First, upgrade through minimal:
http://ota.tasmota.com/tasmota/release-14.1.0/tasmota-minimal.bin.gz
Then load the display build:
http://ota.tasmota.com/tasmota/release-14.1.0/tasmota-display.bin.gz
Set the module as Generic:
Module 18
GPIO assignment:
Backlog GPIO0 800; GPIO1 0; GPIO2 1024; GPIO3 0; GPIO4 0; GPIO5 448; GPIO12 5730; GPIO13 704; GPIO14 736; GPIO15 768; GPIO16 0; GPIO17 0; DisplayModel 17; Restart 1
ST7789 display descriptor:
Rule3 :H,ST7789,240,240,16,SPI,1,*,*,*,*,*,*,*,40 :S,2,1,3,0,80,30 :I 01,A0 11,A0 3A,81,55 36,81,00 21,80 13,80 29,A0 :o,28 :O,29 :A,2A,2B,2C :R,36 :0,C0,00,50,00 :1,A0,50,00,01 :2,00,00,00,02 :3,60,00,00,03 :i,20,21 #
Enable the display:
DisplayModel 17Restart 1
Display settings that worked correctly:
Backlog DisplayMode 0; DisplayInvert 1; DisplayRotate 2; Dimmer 100; DisplayText [z]; DisplayText [x20y40s2Ci15]Hello
Allow external HTTP calls:
SO128 1
Example HTTP request to write text to the display:
http://IP_TASMOTA/cm?cmnd=Backlog%20DisplayMode%200%3B%20DisplayInvert%201%3B%20DisplayRotate%202%3B%20Dimmer%20100%3B%20DisplayText%20%5Bz%5D%3B%20DisplayText%20%5Bx20y40s2Ci15%5DHello_WORLD
I also added a boot rule so the display shows useful diagnostic information when it starts: IP address, connected WiFi, date/time and boot status.
Rule1 ON Time#Initialized DO Backlog Status 5; Status 11; RuleTimer1 3 ENDON ON StatusNET#IPAddress DO Var1 %value% ENDON ON StatusSTS#Wifi#SSId DO Var2 %value% ENDON ON Rules#Timer=1 DO Backlog DisplayMode 0; DisplayInvert 1; DisplayRotate 2; Dimmer 100; Power ON; DisplayText [z]; DisplayText [x10y10s2Ci3]TASMOTA; DisplayText [x10y50s2Ci15]IP %var1%; DisplayText [x10y90s2Ci4]WIFI %var2%; DisplayText [x10y130s2Ci6]%timestamp%; DisplayText [x10y175s2Ci15]Boot OK ENDONRule1 1
From that point on, Domoticz can write to the display through HTTP requests and periodically update it with the information I want to show.
The interesting part of this project was not only the final result, but the process itself:
It is not always about buying more hardware. Sometimes it is about understanding better the hardware already in front of you.
From a small, apparently closed weather clock to an auxiliary home automation display.





No hay comentarios:
Publicar un comentario