emsesp / EMS-ESP32

ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
https://emsesp.github.io/docs
GNU Lesser General Public License v3.0
610 stars 104 forks source link

Problem with daylight time in Australia #2142

Open VlastiBroucek opened 4 hours ago

VlastiBroucek commented 4 hours ago

DESCRIPTION

Problem with daylight time starting/ending in Australia

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  {
    "System Info": {
        "version": "3.6.5",
        "uptime": "000+00:06:57.467",
        "uptime (seconds)": 417,
        "platform": "ESP32",
        "arduino": "ESP32 Arduino v2.0.14",
        "sdk": "v4.4.6-dirty",
        "free mem": 156,
        "max alloc": 107,
        "used app": 2240,
        "free app": 320,
        "partition": "boot",
        "reset reason": "Power on reset / APP CPU reset by PRO CPU"
    },
    "Network Info": {
        "network": "Ethernet",
        "hostname": "ems-esp",
        "TxPower setting": 0,
        "static ip config": false,
        "enable IPv6": true,
        "low bandwidth": false,
        "disable sleep": false,
        "enable MDNS": true,
        "enable CORS": false,
        "AP provision mode": "disconnected",
        "AP security": "wpa2",
        "AP ssid": "ems-esp"
    },
    "NTP Info": {
        "NTP status": "disconnected",
        "enabled": false,
        "server": "time.cloudflare.com",
        "tz label": "Australia/Hobart"
    },
    "OTA Info": {
        "enabled": false,
        "port": 8266
    },
    "MQTT Info": {
        "MQTT status": "connected",
        "MQTT publishes": 388,
        "MQTT queued": 0,
        "MQTT publish fails": 0,
        "MQTT connects": 1,
        "enabled": true,
        "client id": "esp32-d767b4fc",
        "keep alive": 60,
        "clean session": false,
        "entity format": 1,
        "base": "ems-esp",
        "discovery prefix": "homeassistant",
        "discovery type": 0,
        "nested format": 1,
        "ha enabled": true,
        "mqtt qos": 0,
        "mqtt retain": false,
        "publish time heartbeat": 60,
        "publish time boiler": 10,
        "publish time thermostat": 10,
        "publish time solar": 10,
        "publish time mixer": 10,
        "publish time other": 60,
        "publish time sensor": 10,
        "publish single": false,
        "publish2command": false,
        "send response": false
    },
    "Syslog Info": {
        "enabled": false
    },
    "Sensor Info": {
        "temperature sensors": 3,
        "temperature sensor reads": 249,
        "temperature sensor fails": 0,
        "analog sensors": 0,
        "analog sensor reads": 0,
        "analog sensor fails": 0
    },
    "API Info": {
        "API calls": 0,
        "API fails": 0
    },
    "Bus Info": {
        "bus status": "connected",
        "bus protocol": "HT3",
        "bus telegrams received (rx)": 856,
        "bus reads (tx)": 279,
        "bus writes (tx)": 100,
        "bus incomplete telegrams": 0,
        "bus reads failed": 0,
        "bus writes failed": 0,
        "bus rx line quality": 100,
        "bus tx line quality": 100
    },
    "Settings": {
        "board profile": "E32V2",
        "locale": "en",
        "tx mode": 3,
        "ems bus id": 11,
        "shower timer": false,
        "shower alert": false,
        "hide led": false,
        "notoken api": false,
        "readonly mode": false,
        "fahrenheit": false,
        "dallas parasite": false,
        "bool format": 1,
        "bool dashboard": 1,
        "enum format": 1,
        "analog enabled": true,
        "telnet enabled": true,
        "max web log buffer": 100,
        "web log buffer": 100
    },
    "Devices": [
        {
            "type": "boiler",
            "name": "Condens 2500/Logamax/Logomatic/Cerapur Top/Greenstar/Generic HT3",
            "device id": "0x08",
            "product id": 95,
            "version": "12.16",
            "entities": 69,
            "handlers received": "0x10 0x11 0x15 0x1C 0x18 0x19 0x34 0x04",
            "handlers fetched": "0x14 0x16 0x33",
            "handlers pending": "0xBF 0xC2 0x1A 0x35 0x2A",
            "handlers ignored": "0x23"
        },
        {
            "type": "thermostat",
            "name": "RC200/CW100",
            "device id": "0x18",
            "product id": 157,
            "version": "43.02",
            "entities": 42,
            "handlers received": "0x06 0xA2 0x031D",
            "handlers fetched": "0x02A5 0x02B9 0x02AF 0x029B 0x0291 0x02F5 0x023A",
            "handlers pending": "0xA3 0x12 0x13 0x02A6 0x02BA 0x02B0 0x029C 0x0472 0x02A7 0x02BB 0x02B1 0x029D 0x0473 0x02A8 0x02BC 0x02B2 0x029E 0x0474 0x02A9 0x02BD 0x02B3 0x029F 0x0475 0x02AA 0x02BE 0x02B4 0x02A0 0x0476 0x02AB 0x02BF 0x02B5 0x02A1 0x0477 0x02AC 0x02C0 0x02B6 0x02A2 0x0478 0x02CE 0x0468 0x02D0 0x0469 0x02D2 0x04",
            "handlers ignored": "0xBF"
        },
        {
            "type": "controller",
            "name": "HT3",
            "device id": "0x09",
            "product id": 95,
            "version": "12.16",
            "entities": 0
        }
    ]
}

TO REPRODUCE

This might be rather complex to explain. I have first noticed this issue on 6 October when most Australian states moved to daylight saving time.

  1. the thermostat time did not change, even though I had NTP set up and believe correctly working
  2. I tried all possible advice from various previous issues to no avail. When I finally managed change the time, I got flooded with:
    thermostat time correction from ntp

    in my log files.

So, I looked at thermostat and it has DLS setting that is supposed to change thermostat time to from daylight saving times automatically and it was set to OFF. After turning it to ON, I somehow managed to get time in thermostat and EMS-ESP same and the messages about correction finally stopped.

However, at the same moment, I have noticed that according to the manual, my CR50 thermostat seems to be hard wired for Europe, since the manual states that DLS option does:

Activate or deactivate automatic changeover between summer and winter time.
If ON is set, the time of day is automatically changed from 02:00 to 03:00 (on the last Sunday in March and from 03:00 to 02:00 on
the last Sunday in October).

Lo and behold, thermostat changed time one hour back today (last Sunday of October) and I cannot get it back to all synchronised with NTP turned on. If I have it ON, I get again flooded with the messages mentioned above. So, it is currently off.

I think, but did not leave it running long enough to confirm 100%, that NTP is somehow trying to move time to one hour back in the thermostat because after a while it was behind the time of the EMS-ESP. So, it seems there is somewhere incorrectly set daylight saving flag?

Could it be read only "hc1 summer mode (hc1/summermode)" which shows as "winter"? But it has been showing as winter all the time...

EXPECTED BEHAVIOUR

To be honest, I am not sure what I expect. Ideally, that NTP changes correctly thermostat time in line with EMS-ESP device. Probably with DLS parameter on thermostat in OFF???

SCREENSHOTS

If applicable, add screenshots to help explain your issue.

ADDITIONAL CONTEXT

Happy to provide whatever you need, just please let me know what you need.

(Please remember to close the issue when it has been addressed)

VlastiBroucek commented 2 hours ago

I looked at the thermostat:

Thermostat: RC200/CW100 (DeviceID:0x18, ProductID:157, Version:43.02) (42)
  date/time (datetime): 27.10.2024 13:18
  damped outdoor temperature (dampedoutdoortemp): -10.0 °C
  dhw mode (wwmode): comfort
  dhw circulation pump mode (wwcircmode): auto
  dhw charge duration (wwchargeduration): 60
  dhw charge (wwcharge): off
  dhw circuit 1 extra (wwextra1): 0 °C
  dhw disinfecting (wwdisinfecting): off
  dhw disinfection day (wwdisinfectday): tu
  dhw disinfection time (wwdisinfecttime): 120
  hc1 selected room temperature (seltemp): 21.0 °C
  hc1 current room temperature (currtemp): 22.7 °C
  hc1 mqtt discovery current room temperature (haclimate): roomTemp
  hc1 mode (mode): auto
  hc1 mode type (modetype): comfort
  hc1 eco temperature (ecotemp): 18.5 °C
  hc1 manual temperature (manualtemp): 26.0 °C
  hc1 comfort temperature (comforttemp): 21.0 °C
  hc1 summer temperature (summertemp): 17 °C
  hc1 design temperature (designtemp): 45 °C
  hc1 offset temperature (offsettemp): 0 °C
  hc1 min flow temperature (minflowtemp): 25 °C
  hc1 max flow temperature (maxflowtemp): 54 °C
  hc1 room influence (roominfluence): 3 °C
  hc1 room influence factor (roominflfactor): 4.0
  hc1 current room influence (curroominfl): 0.0 °C
  hc1 nofrost mode (nofrostmode): room
  hc1 nofrost temperature (nofrosttemp): 5 °C
  hc1 target flow temperature (targetflowtemp): 0 °C
  hc1 heating type (heatingtype): floor
  hc1 set summer mode (summersetmode): auto
  hc1 summer mode (summermode): winter
  hc1 control mode (controlmode): room
  hc1 program (program): prog 1
  hc1 temporary set temperature automode (tempautotemp): -1.0 °C
  hc1 fast heatup (fastheatup): 0 %
  hc1 switch-on optimization (switchonoptimization): off
  hc1 reduce mode (reducemode): reduce
  hc1 no reduce below temperature (noreducetemp): -31 °C
  hc1 off/reduce switch temperature (reducetemp): 5 °C
  hc1 cooling (coolingon): off
  hc1 control device (control): RC310

and tried to change summer mode from AUTO to SUMMER, using "hc1 set summer mode (summersetmode): . However, this did not change it in hc1 summer mode (summermode):