softypit / esp32_mqtt_eq3

esp32-based mqtt node to control EQ-3 BLE TRVs
145 stars 48 forks source link

NTP not working #60

Open pmknowles opened 3 years ago

pmknowles commented 3 years ago

NTP doesn't appear to connect. I have 2 ESP32s. The first is like this image `

Mon Jul 19 13:18:16 1965 - {"trv":"00:1A:22:12:5F:88","temp":"17.0","offsetTemp":"0.0","valve":"100% open","mode":"manual","boost":"inactive","window":"closed","state":"unlocked","battery":"GOOD"}

Mon Jul 19 13:18:05 1965 - {"trv":"00:1A:22:12:65:8A","error":"Device unavailable"} Mon Jul 19 13:17:29 1965 - {"trv":"00:1A:22:12:5F:88","error":"TRV not available"} Mon Jul 19 13:17:19 1965 - 00:1A:22:12:5F:88 unlock Mon Jul 19 13:16:59 1965 - 00:1A:22:12:65:8A unlock Mon Jul 19 13:16:39 1965 - 00:1A:22:12:65:B2 unlock Mon Jul 19 13:16:04 1965 - WiFi connected'

The second one I tried to put Timezone in image

This gives ` Thu Jan 1 05:24:09 1970 - {"trv":"00:1A:22:12:65:45","temp":"15.0","offsetTemp":"0.0","valve":"94% open","mode":"manual","boost":"inactive","window":"closed","state":"unlocked","battery":"GOOD"}

Thu Jan 1 05:23:57 1970 - 00:1A:22:12:65:45 unlock Thu Jan 1 05:23:51 1970 - {"trv":"00:1A:22:12:65:E0","error":"Device unavailable"} Thu Jan 1 05:23:37 1970 - 00:1A:22:12:65:E0 unlock Thu Jan 1 05:21:24 1970 - WiFi connected

` I'm not sure what's going on.

softypit commented 2 years ago

When using manual IP settings it was not possible to configure dns servers on pre 1.63 code. Hence referencing ntp servers by name does not work. When using DHCP or specifying ntp server by ipv4 address this is not an issue. With 1.63 it is possible to configure dns server addresses when using manual IP settings which will fix this issue.