Blackymas / NSPanel_HA_Blueprint

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

Page Utilities ― Line Direction only works for Groups 1 & 2 #1964

Closed finch6 closed 6 months ago

finch6 commented 6 months ago

TFT Version

4.3.1

ESPHome Version

4.3.1

Blueprint Version

4.3.1

Panel Model

US

What is the bug?

The Line Direction indicator only works for Groups 1 & 2. It doesn't work for any of the other Groups (3,4,5 or 6) and I also can't get it working for the Main Line Direction either.

Even if I use and entity from Group 1 or 2, that I know works, to the Line Direction Reference, its doesn't make any of the other groups or main line indicator work.

My Groups: Group 1 ― House Group 2 ― Flat Group 3 ― Grid Group 4 ― No Used Group 5 ― Battery Group 6 ― Home

https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/42886484/614850bf-a69d-44cb-8662-d41fec6868a5

Below is the Blueprint yaml ― you can see that I have set all of the Groups Line Direction Reference to sensor.sunsynk_pv_power_1, yet only Group 1 & 2 show movement.

Steps to Reproduce

No response

Your Panel's YAML

utilities_enabled: true
    utilities_page01_grid_label: Solar
    utilities_page01_grid_icon: mdi:solar-power
    utilities_page01_grid_value1: sensor.sunsynk_pv_power
    utilities_page01_grid_value2: sensor.sunsynk_pv_energy
    utilities_page01_grid_color:
      - 255
      - 170
      - 0
    utilities_page01_home_label: SunSynk
    utilities_page01_home_icon: mdi:meter-electric-outline
    utilities_page01_home_value1: sensor.sunsynk_load_power
    utilities_page01_home_value2: sensor.sunsynk_temperature
    utilities_page01_group01_label: House
    utilities_page01_group01_icon: mdi:solar-power-variant
    utilities_page01_group01_value1: sensor.sunsynk_pv_power_1
    utilities_page01_group01_value2: sensor.sunsynk_pv_current_1
    utilities_page01_group01_color:
      - 255
      - 170
      - 0
    utilities_page01_group01_line_reference: sensor.sunsynk_pv_power_1
    utilities_page01_group02_label: Flat
    utilities_page01_group02_icon: mdi:solar-power-variant
    utilities_page01_group02_value1: sensor.sunsynk_pv_power_2
    utilities_page01_group02_value2: sensor.sunsynk_pv_current_2
    utilities_page01_group02_color:
      - 255
      - 170
      - 0
    utilities_page01_group02_line_inverted: true
    utilities_page01_group02_line_reference: sensor.sunsynk_pv_power_2
    utilities_page01_group03_label: Grid
    utilities_page01_group03_icon: mdi:transmission-tower
    utilities_page01_group03_value1: sensor.sunsynk_grid_power_ct
    utilities_page01_group03_value2: sensor.sunsynk_grid_energy_in
    utilities_page01_group03_color:
      - 58
      - 136
      - 254
    utilities_page01_group03_line_reference: sensor.sunsynk_pv_power_1
    utilities_page01_group05_label: Battery
    utilities_page01_group05_icon: mdi:home-battery-outline
    utilities_page01_group05_value1: sensor.sunsynk_battery_state_of_charge
    utilities_page01_group05_value2: sensor.sunsynk_battery_power
    utilities_page01_group05_color:
      - 255
      - 106
      - 0
    utilities_page01_group05_line_inverted: false
    utilities_page01_group05_line_reference: sensor.sunsynk_pv_power_1
    utilities_page01_group06_label: Home
    utilities_page01_group06_icon: mdi:home-lightning-bolt-outline
    utilities_page01_group06_value1: sensor.sunsynk_load_power_essential
    utilities_page01_group06_value2: sensor.sunsynk_load_energy
    utilities_page01_group06_color:
      - 0
      - 199
      - 252
    utilities_page01_group06_line_reference: sensor.sunsynk_load_power
    utilities_page01_main_line_reference: sensor.sunsynk_pv_power_1
    utilities_page01_main_line_inverted: false

ESPHome Logs

No response

Home Assistant Logs

No response

edwardtfn commented 6 months ago

Do you have any error message related to this automation on your Home Assistant logs?

finch6 commented 6 months ago

Hi @edwardtfn,

There is this error ― completely forgot to look here in the beginning 🤦🏼‍♂️

Logger: homeassistant.components.automation.nspanel_update
Source: helpers/script.py:1805
integration: Automation (documentation, issues)
First occurred: 16:00:33 (22 occurrences)
Last logged: 16:30:22

NSPanel Update: Maximum number of runs exceeded

When I checked first it said 16 occurrences and the last was at 16:00. Went to the panel, opened the Utilities Page, back to the Home Screen and then opened the Utilities Page again. Second time I opened it it took a while to load the "artifacts". Now its on 22... That would make sense for the 3 lines that aren't moving (opened twice so 6 more occurrences were added)? If I understand it correctly?

Screenshot 2024-03-22 at 16 31 49
edwardtfn commented 6 months ago

It's good that you shared this message. I will have to investigate it. The system limits to 50 concurrent instances of the Blueprint running. That was a huge number, we never expected to see this message, which shows something is starting with the blueprint but it is taking to log to finish, either due to some slowness or some wait that never triggers. I don't remember of any wait on the utilities page and wouldn't expect multiple calls to construct that page, so I don't think this message is related to that. Unless something is too slow when building the other lines. I will investigate this.

finch6 commented 6 months ago

I will play around with this tomorrow and clear the Home Assistant logs and then access the Utilities Page again on the NSPanel.

edwardtfn commented 6 months ago

Quick question... how often those sensors used in the utilities dashboard updates their values?

edwardtfn commented 6 months ago

I believe this is fixed in dev. That will be released soon.