Closed zanaca closed 10 months ago
please update to the development version, I don't have this issue so I think it is already fixed
https://docs.nspanel.pky.eu/faq/#how-to-upgrade-from-a-release-to-the-current-development-version
I have just updated to the last oficial release I can confirm the error still happening.
I am attaching new pictures to help clarify the problem. I have updated the values to help "counting" the string, the sensor values are really the values shown in the picture bellow
Print from the sensor states
apps.yaml (the nspannel only)
nspanel-livingroom:
module: nspanel-lovelace-ui
class: NsPanelLovelaceUIManager
config:
panelRecvTopic: 'nspanel-livingroom/tele/RESULT'
panelSendTopic: 'nspanel-livingroom/cmnd/CustomSend'
updateMode: 'auto-notify'
model: 'us-p'
sleepTracking: True
sleepTimeout: 20
sleepBrightness:
- time: 'sunrise + 1:00:00'
value: 8
- time: 'sunset'
value: 1
locale: 'pt_BR' # used for translations in translations.py and for localized date if babel python package is installed
screensaver:
entity: weather.forecast_home
weatherOverrideForecast2:
entity: sensor.nspanel_livingroom_analog_temperature1
name: Ambiente
icon: home-thermometer
weatherOverrideForecast3:
entity: sensor.climate_ar_sala_temperature
name: Configurada
icon: home-thermometer
weatherOverrideForecast4:
entity: climate.ar_sala
name: Status
icon: air-conditioner
key: clima
theme:
autoWeather: true
background: [0, 0, 0]
cards:
- type: cardGrid
entities:
- entity: light.luz_sala
icon: lightbulb
name: Luz do teto
- entity: switch.ventilador
icon: fan
name: Ventilador
- entity: light.luz_do_corredor
name: Luz do corredor
- entity: light.luz_cozinha
name: Luz da cozinha
- entity: button.tv
name: TV
icon: mdi:television-classic
color: '{{iif(states("binary_sensor.tv_sala")=="on", "[255,255,0]", "[54,95,140]")}}'
title: Sala
- type: cardThermo
entity: climate.ar_sala
title: Ar condicionado
- type: cardEntities
title: Locomoção
entities:
- entity: input_boolean.away_mode
name: Modo viagem
icon: beach
- entity: sensor.casa_para_itaborai
name: Ida Itaboraí
icon: car
- entity: sensor.casa_para_leblon
name: Ida p/ Leblon
icon: car
- type: cardQR
title: WiFi convidados
qrCode: "WIFI:S:{{states('sensor.guest_wifi_ssid')}};T:WPA;P:{{states('sensor.guest_wifi_password')}};;"
entities:
- name: Rede
entity: sensor.guest_wifi_ssid
icon: wifi
- entity: sensor.guest_wifi_password
name: Senha
icon: key
Actual picture of the living room nspannel, showing the cut out values for the qrcode (if you scan the qrcode will see the actual values, the same from the first print, besides the "1234" version written on screen)
For the record, I do have Babel installed for the l10n.
Thanks,
After the steps above, I changed the values to "broken clouds" as you tested. Watching the appdaemon logs I see the same problem as before, strings cut down.
2023-08-21 23:24:35.479211 INFO nspanel-livingroom: Sending MQTT Message: pageType~cardQR
2023-08-21 23:24:35.493080 INFO nspanel-livingroom: Sending MQTT Message: timeout~20
2023-08-21 23:24:36.137539 INFO nspanel-livingroom: Sending MQTT Message: entityUpd~WiFi convidados~button~navigate.uuid.H9oRUcokos~���~65535~Locomo����o~Pressione~button~navigate.uuid.CwVY20yltO~���~65535~unknown~Pressione~WIFI:S:broken clouds;T:WPA;P:broken clouds;;~text~sensor.guest_wifi_ssid~���~17299~Rede~brok ~text~sensor.guest_wifi_password~���~17299~Senha~brok
2023-08-21 23:24:55.809205 INFO nspanel-room2: MQTT callback for: {'topic': 'nspanel-livingroom/tele/RESULT', 'wildcard': None, 'payload': '{"CustomRecv":"event,sleepReached,cardQR"}'}
2023-08-21 23:24:55.816998 INFO nspanel-room2: Received Message from Screen: event,sleepReached,cardQR
And it print "brok" on screen.
2023-08-21 23:38:19.293003 INFO AppDaemon: AppDaemon Version 4.4.2 starting
2023-08-21 23:38:19.295647 INFO AppDaemon: Python version is 3.10.11
Please restart appdaemon and look for this message in the startup log:
2023-08-22 16:53:37.295918 INFO nspanel-kueche: Started (v4.2.0)
Either your files didn't update or you didn't restart appdaemon.
If the line says 4.2.0 please check if the bug is still there, otherwise check the version you have in nspanel-lovelace-ui.py
.
Current appdaemon version:
2023-08-23 00:02:08.005549 INFO nspanel-livingroom: Started (v4.2.0)
"Bug" still there:
password and ssid as brok
Version at line 31 of nspanel-lovelace-ui.py:
version = "v4.2.0"
MD5 checksum of nspanel-lovelace-ui.py:
md5sum nspanel-lovelace-ui.py
-> 97e9205339c9c9a26017a5d37e8809ad nspanel-lovelace-ui.py
Here is the "problem": https://github.com/joBr99/nspanel-lovelace-ui/blob/main/apps/nspanel-lovelace-ui/luibackend/pages.py#L303
I removed the [:4]
and now the string is full length.
If the reason for that cut is texts off screen, when you have l10n active, the texts may go "crazy". At the screen-saver the translation of the full date is much wider than the screen itself (in portuguese), the text goes off screen in left and right.
Perhaps a function to dynamically cut/marquee text based on model and (X,Y) position of the element on screen?
o.O why did it work in my test with US-P a couple of weeks ago
Please try with this change:
~https://github.com/joBr99/nspanel-lovelace-ui/commit/cf1acdefffce23cb0839178f0a6c2a10fc365461~
https://github.com/joBr99/nspanel-lovelace-ui/commit/11106eb77817d035d6809bf7abd9b09d2a8ad00b
I cannot remember why this was added, but I guess to limit it on cardEntities, there is less space for test on us-p than on the landscape versions.
PROBLEM DESCRIPTION
Values from entities for cardQR are shown split if the origin is a
sensor
and notiText
. The values on qrCode as well is in fully form, but the written values are truncatedWhen using iText values, everything works as expected, but if the value is fetch from a sensor, they show only first four bytes
REQUESTED INFORMATION
[X] Provide your apps.yaml (or your config):
Note the "space" in SSID name, it works as iText and inside the qrCode. The commented entity line does now exists really, are shown here just as example.
[X] 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:
The logs from docker container probably does not handle utf-8 well
TO REPRODUCE
EXPECTED BEHAVIOUR
The shown text entities should be
aLan Convidados
for Rede entity andv3rY%5ecR37
for Senha entity.SCREENSHOTS
If applicable, add screenshots/pictures to help explain your problem.
ADDITIONAL CONTEXT
As log shows, the "compiled" content are
aLan
for Rede andv3rY
for Senha, just for the written "entities". The qrCode is OK.PANEL / FIRMWARE VERION
Last version from US-P