joBr99 / nspanel-lovelace-ui

Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota.
GNU General Public License v3.0
895 stars 190 forks source link

[BUG] Release 4.3.2 seems to ignore sleepBrightness #1006

Closed Ambrotos closed 1 year ago

Ambrotos commented 1 year ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. I believe there might be a regression between 4.3.2 and 4.3.1 of the TFT firmware. I have set my panel display to turn off after 30 seconds of inactivity. This worked fine for months until I updated to the recent 4.3.2 release. I updated the app in HACS, restarted AppDaemon, and then updated the nspanel firmware. Afterwards you can see the LCD dim slightly after 30 seconds to ~80%, but never to 0% as configured in my .yaml. If I manually call the nspanel_upload_tft service and downgrade the nspanel to run 4.3.1 firmware, the LCD properly dims to 0 after 30 seconds. I've restarted AppDaemon multiple times, rebooted HAOS completely, but the only thing that resolves the issue is to downgrade the nspanel firmware to 4.3.1.

REQUESTED INFORMATION

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

- [ ] Go to Settings>Add-ons>AppDaemon>Log (or the output of your TS script) and then, provide the output of the log during your issue/bug occurs:

Log output here: 2023-10-31 12:40:00.408549 INFO nspanel-1: Sending MQTT Message: time~12:40~ 2023-10-31 12:41:00.405710 INFO nspanel-1: Sending MQTT Message: time~12:41~ 2023-10-31 12:42:00.407030 INFO nspanel-1: Sending MQTT Message: time~12:42~ 2023-10-31 12:43:00.406628 INFO nspanel-1: Sending MQTT Message: time~12:43~ 2023-10-31 12:43:05.551242 INFO nspanel-1: MQTT callback for: {'topic': 'nspanel/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,swipeUp"}'} 2023-10-31 12:43:05.554647 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,swipeUp 2023-10-31 12:43:05.558666 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: swipeUp; value: None 2023-10-31 12:43:07.893104 INFO nspanel-1: MQTT callback for: {'topic': 'nspanel/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,swipeUp"}'} 2023-10-31 12:43:07.899533 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,swipeUp 2023-10-31 12:43:07.907891 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: swipeUp; value: None 2023-10-31 12:43:10.487796 INFO nspanel-1: MQTT callback for: {'topic': 'nspanel/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,swipeUp"}'} 2023-10-31 12:43:10.491177 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,swipeUp 2023-10-31 12:43:10.494876 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: swipeUp; value: None 2023-10-31 12:43:11.907583 INFO nspanel-1: MQTT callback for: {'topic': 'nspanel/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,swipeUp"}'} 2023-10-31 12:43:11.908399 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,swipeUp 2023-10-31 12:43:11.909857 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: swipeUp; value: None 2023-10-31 12:43:13.078088 INFO nspanel-1: MQTT callback for: {'topic': 'nspanel/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,buttonPress2,screensaver,bExit,5"}'} 2023-10-31 12:43:13.085465 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,bExit,5 2023-10-31 12:43:13.092121 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: bExit; value: 5 2023-10-31 12:43:13.133274 INFO nspanel-1: Sending MQTT Message: pageType~cardEntities 2023-10-31 12:43:13.137805 INFO nspanel-1: Sending MQTT Message: timeout~30 2023-10-31 12:43:13.153931 INFO nspanel-1: Sending MQTT Message: entityUpd~Home State~button~navigate.uuid.0fnQpQ4DEY~���~65535~Alarm Keypad~Press~button~navigate.uuid.GXiWA8EDRz~���~65535~Electricity~Press~text~binary_sensor.exterior_sensors~���~17299~Exterior~Closed~switch~input_boolean.do_not_disturb~���~17299~DND~0~text~sensor.boiler_local_return_temp~���~17299~Hot Water~68��C 2023-10-31 12:43:35.562972 INFO nspanel-1: MQTT callback for: {'topic': 'nspanel/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,sleepReached,cardEntities"}'} 2023-10-31 12:43:35.567259 INFO nspanel-1: Received Message from Screen: event,sleepReached,cardEntities 2023-10-31 12:43:35.571233 INFO nspanel-1: Button Press Event; entity_id: cardEntities; button_type: sleepReached; value: None 2023-10-31 12:43:35.577133 INFO nspanel-1: Sending MQTT Message: pageType~screensaver 2023-10-31 12:43:35.588546 INFO nspanel-1: Sending MQTT Message: timeout~30 2023-10-31 12:43:35.625143 INFO nspanel-1: Sending MQTT Message: weatherUpdate~���~38066~Home~4.5��C~���~38066~Tue~5.1��C~���~38066~Wed~3.9��C~���~38066~Thu~7.1��C~~~���~31728~Fri~10.9��C 2023-10-31 12:43:35.628333 INFO nspanel-1: Sending MQTT Message: statusUpdate~~



### TO REPRODUCE
_Steps to reproduce the behavior:_
Upgrade HACS app and TFT firmware to recent 4.3.2 release. Firmware appears to now ignore the sleepBrightness configuration value.

### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._
After the sleepTimeout has expired, LCD should dim to the configured sleepBrightness, in this case 0%.

### SCREENSHOTS
_If applicable, add screenshots/pictures to help explain your problem._
N/A

### ADDITIONAL CONTEXT
_Add any other context about the problem here._
_Please note here in case you are using ioBroker_
I'm running esphome on my nspanel not tasmota. I followed the instructions [here](https://github.com/sairon/esphome-nspanel-lovelace-ui). Also, I'm running this on an Intel NUC with HAOS 11.1, running HA 2023.10.5 if that matters.

### PANEL / FIRMWARE VERION
_Please add the Panel/Firmware Version you are using (EU, US-L or US-P)_
US-P
joBr99 commented 1 year ago

Version 4.3.2 was a Backend only change - there is no difference between the tft of 4.3.1 and 4.3.2

joBr99 commented 1 year ago

image

Ambrotos commented 1 year ago

Well then I'm even more puzzled. I'll do another round of flasing/testing, but when I was experimenting yesterday I could reliably reproduce it by upgrading to 4.3.2, and fix it by downgrading to 4.3.1. In all cases, I restart AppDaemon between tests, but I didn't always completely restart HA.

Does the backend check the version reported by the TFT firmware at all?

Should I even be running 4.3.2? I notice that the manual upgrade instructions on the 4.3.2 release still point to URLs for 4.3.1 TFT firmware.

joBr99 commented 1 year ago

The backend checks the version of the firmware and also asks you to update if there is an update available.

However there doesn't have to be an updated firmware every release. The current version of the firmware is "53" and this version number didn't change since 4.3.1 - no need to update the firmware if there are only backend side changes.

https://github.com/joBr99/nspanel-lovelace-ui/blob/main/apps/nspanel-lovelace-ui/nspanel-lovelace-ui.py#L30