My in-laws bought some solar panels with hoymiles micro inverters. So I had no other choice but to build an OpenDTU based monitoring device from their large stack of (ore mountain) handicraft pieces:
- ESP32 D1 Mini (small form factor was key, two separate 3.3v lines would be better though)
- SSD1306 LCD
- CMT2300A
- SMA pigtail
- dupont wire
- very short micro usb-b extension cable to extend the esp32 port to the "case"
Get latest release of OpenDTU and esptool.py
:
curl -LO https://github.com/tbnobody/OpenDTU/releases/latest/download/opendtu-generic_esp32.factory.bin
esptool.py --port /dev/ttyUSB0 --chip esp32 --before default_reset \
--after hard_reset write_flash --flash_mode dout --flash_freq 40m --flash_size detect 0x0 \
opendtu-generic_esp32.factory.bin
nmcli device wifi rescan
ssid=$(nmcli -t device wifi list | grep -i opendtu | cut -d":" -f8)
nmcli con add con-name opendtu type wifi ssid $ssid wifi-sec.psk openDTU42 wifi-sec.key-mgmt wpa-psk
nmcli con up opendtu
firefox http:https://192.168.4.1/
- set admin password
- set actual wifi to join
- upload profile as pin layout in configuration management
- verify devices are present (display should show something, CMT2300A should be listed as configured in Info -> System)
- configure mqtt
- configure and sync ntp
- check auto-update
Use these to generate a device profile or use the one in profiles/
An early version used ESP32 devkit, but it turned out to be too big for the "case":
The base was initially a metal hatch with a key hole, because the house served as a children's piggybank with a coin slot in the back. I 3D printed a new base that is slightly larger in diameter than the hole so I could just wedge it into place without the need for any screws, nails or glue.
For an antenna (this is the CMT2300A / 800MHz antenna, not wifi) I drilled a hole in the chimney and glued a regular rp-sma/u.fl pigtail into it:
The ~ 1" SSD1306 is perfect as it looks like a solar panel, but the font is quite small (for the in-laws at least):
Biggest challenge actually was to find a short micro usb cable and fit it properly into the case to serve as a micro usb port. I did not want a fixed cable hanging out of the case all the time, so a usb extension was the way to go. I ended up singificantly triming down the 20cm cable and hot-glued the usb socket into the back of the house (not pictured, amounted to 75% of the complete project ;) )