Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.44k stars 258 forks source link

Incorrect Time Display on NSPanel with Firmware Version 4.1.1 #1300

Closed n1kDon closed 11 months ago

n1kDon commented 11 months ago

Issue Description: I have three NSPanel displays running different versions of the firmware. Two of them are on version 3.4, and one is on the latest version 4.1.1. I've noticed that the NSPanel running firmware 4.1.1 is displaying the time incorrectly—it's one hour early compared to the correct time and compared to the other two panels running the older firmware version. All are manged with the same homeassistant running on docker with different blueprint versions selected.

Troubleshooting Steps Taken: Checked and confirmed that the time zone settings are correct in ha. Restarted the NSPanel and ha.

Firmware Version: 4.1.1 Time Zone: Berlin (GMT+1)

edwardtfn commented 11 months ago

Please take a look at this: https://github.com/Blackymas/NSPanel_HA_Blueprint/wiki/(EN)-Customization#enforce-time-zone

Anzic23 commented 11 months ago

in my case, forcing the addition of a time zone did not help. Time is delayed by 3 hours. 4.1 and 4.1.1 config:

###### CHANGE ME START ######

  device_name: "nspanelus" 
  wifi_ssid: !secret wifi_ssid
  wifi_password: !secret wifi_password

  nextion_update_url: "http://192.168.1.38:8123/local/nspanelus.tft" # URL to local tft File
#  nextion_update_url: "https://raw.githubusercontent.com/Blackymas/NSPanel_HA_Blueprint/main/nspanel_us.tft" # URL to Github

##### CHANGE ME END #####

time:
  - id: !extend time_provider
    timezone: "Europe/Moscow"

##### DO NOT CHANGE ANYTHING! #####

packages:
  ##### download esphome code from Github
  remote_package:
    url: https://github.com/Blackymas/NSPanel_HA_Blueprint
    ref: main
    files:
      - nspanel_esphome.yaml # Core package
      - nspanel_esphome_advanced.yaml # activate advanced (legacy) elements - can be useful for troubleshooting
    refresh: 300s

##### DO NOT CHANGE ANYTHING! #####

in logs i see: [21:36:41][C][homeassistant.time:010]: Home Assistant Time:

After re-flashing the time is shown correctly in the log: [21:41:38][C][homeassistant.time:010]: Home Assistant Time:

[21:42:58][D][script.check_versions:2068]: ESPHome version: 4.1.1 [21:42:58][D][script.check_versions:2069]: TFT version: 4.1.1 [21:42:58][D][script.check_versions:2071]: Blueprint version: 4.1.1

but after a reboot, the time is lost again and the ESPHome firmware is rolled back to 4.1 :( : [21:44:07][D][api:102]: Accepted 192.168.1.38 [21:44:07][D][api.connection:1050]: Home Assistant 2023.11.2 (192.168.1.38): Connected successfully [21:44:07][D][time:045]: Synchronized time: 2023-11-21 18:44:07 [21:44:07][D][main:068]: System clock synchronized

[21:45:27][D][script.check_versions:2049]: ESPHome version: 4.1 [21:45:27][D][script.check_versions:2050]: TFT version: 4.1.1 [21:45:27][D][script.check_versions:2052]: Blueprint version: 4.1.1

edwardtfn commented 11 months ago

but after a reboot, the time is lost again and the ESPHome firmware is rolled back to 4.1 :(

This looks like some other issue... Could you please share your ESPHome yaml? Please remove any sensitive info before sharing. Sorry, the yaml is already there.

edwardtfn commented 11 months ago

@Anzic23, in your case I believe the issue is related to the use of the advanced package. It includes framework esp-idf, however for the change of framework it's recommended to flash via serial/usb otherwise you can have partitioning issues and your panel could boot in an older firmware (with older settings).

Please try adding this to your yaml:

esp32:
  framework:
    type: arduino

This will force it to arduino. If you have plans to flash it by serial/usb, then remove those lines before. esp-idf have a better memory management than arduino, but changing those requires flash via usb/serial.

Anzic23 commented 11 months ago

@edwardtfn Thank you! Adding the code to the config helped!

edwardtfn commented 11 months ago

@n1kDon, are you still facing this issue or should we close this?

n1kDon commented 11 months ago

thats funny, I uploaded the change in the yaml 10 minutes ago, now the time is correct, thanks!