Fabian-Schmidt / esphome-truma_inetbox

ESPHome component to remote control Truma CP Plus Heater
GNU General Public License v3.0
39 stars 8 forks source link

DS1307 RTC? #14

Closed 7wells closed 1 year ago

7wells commented 1 year ago

Hi Fabian and other users!

Do you use a DS1307 RTC attached to a Raspberry Pi and could share some details about wiring and setting it up? Thanks for your time and help!

Fabian-Schmidt commented 1 year ago

I have a DS1307 attached to my ESP as real time source. The Truma component does not need a real time source. If a real time source is provided it will update the time of the CP Plus.

7wells commented 1 year ago

DS1307-SDA goes to ESP-GPIO 14 and DS1307-SCL to ESP-GPIO 27 according to https://github.com/Fabian-Schmidt/esphome-truma_inetbox/blob/main/truma.yaml

i2c:
  sda: 14
  scl: 27
  scan: false
  id: i2c_bus_a

I'm not sure whether these are internal pins and how to figure them out on my ESP32. Thanks for your patience and help!

Fabian-Schmidt commented 1 year ago

That depends what kind of ESP32 device you have. The pin number is the pin on the chip of the ESP32 the manufacturer of the board can label them differently. If you configure the board correctly you can use the naming your board manufacturer uses. See https://esphome.io/components/esp32.html

7wells commented 1 year ago

Hi Fabian, sorry to bother you again! ;)

I just flashed (fresh) my ESP32, see a warning about the crystal's frequency being off, and wonder if this is related to the attached DS1307 RTC, or is it the crystal of the ESP32 itself and the reason why we should (or could) make good use of an RTC.

========================= [SUCCESS] Took 18.88 seconds =========================
INFO Successfully compiled program.
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting............
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 41.01MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz

I understand that my question is very likely not related to your project and hope that you have a moment to reply nevertheless. Thank you! :)

7wells commented 1 year ago

PS - It was maybe just a hiccup, as now the warning is gone:

======================== [SUCCESS] Took 129.82 seconds ========================
INFO Successfully compiled program.
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
Fabian-Schmidt commented 1 year ago

The Crystal warning has no relationship to the DS107 RTC or anything of ESP Home (and this component). The Crystal oscillator is an Electromechanical component on the ESP32 board. It might be impacted by temperature and movement etc. Typically not this strong. It might be a cheap quality. If you have issues with Wifi or Bluetooth connection / reception this might cause it. As the crystal is used to generate the Wifi/Bt frequencies.

7wells commented 1 year ago

Thanks for letting me know!

Indeed I have poor/ temporarily no WiFi connectivity and shall test with my other ESP32 (same manufacturer, though).

This can be closed. ;)