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
882 stars 191 forks source link

[Feature Request] Add support for setting temperature range #124

Closed kambiumdt closed 2 years ago

kambiumdt commented 2 years ago

Great job!!

I have a few trobles.

I have a this config of my climatefrom ebusd, with this config:

climate:

On the screen i see current temp OK, but when i try set any temp (always default is set to 0 on display - really its set to 21 or 22) nothing have change:(

2.

I have added the translate addon, but on the screen its still Press, shuold be Naciśnij - in polish.

Is a chance to add a Polish characters, as: ą ć ę ż ź ń ó ł ś

thanks! cv press

joBr99 commented 2 years ago

hey, please post a picture of the status of your climate object from the HA developer tools, destination temperature is called temperature in homeassistant, zero is the default value in case it doesn't exist

dest_temp = int(get_attr_safe(entity, "temperature", 0)*10)

update to the current development version and it should support polish chars

kambiumdt commented 2 years ago

obraz

joBr99 commented 2 years ago

yeah, tempeature is null, that's the problem

what is displayed in the Homeassistant GUI?

kambiumdt commented 2 years ago

obraz

kambiumdt commented 2 years ago

i set the temp day/night via mqtt request from automation

kambiumdt commented 2 years ago

after update to newest ver, polish chars its ok, but these error:

2022-04-04 22:02:17.917978 INFO nspanel-1: Loaded config: {'panelRecvTopic': 'tele/tasmota_0CA7E0/RESULT', 'panelSendTopic': 'cmnd/tasmota_0CA7E0/CustomSend', 'updateMode': 'auto-notify', 'sleepTimeout': 20, 'sleepBrightness': [{'time': '6:00:00', 'value': 20}, {'time': '23:00:00', 'value': 1}], 'locale': 'pl_PL', 'screensaver': {'entity': 'weather.dom'}, 'cards': [{'type': 'cardGrid', 'title': 'LED', 'entities': [{'entity': 'switch.piwnica_lampka', 'icon': 'lightbulb'}, {'entity': 'input_button.test'}]}, {'type': 'cardEntities', 'entities': [{'entity': 'scene.rmf_fm'}, {'entity': 'input_button.test'}]}, {'type': 'cardThermo', 'name': 'CO', 'title': 'CO', 'entity': 'climate.c681dcfa'}, {'type': 'cardThermo', 'entity': 'climate.cv'}, {'type': 'cardLight', 'title': 'Swiatla', 'entities': [{'entity': 'light.aga'}, {'entity': 'light.wlodek'}]}]}
2022-04-04 22:02:17.920870 INFO nspanel-1: Created Card cardGrid with pos 0 and id cardGrid_unknown
2022-04-04 22:02:17.923594 INFO nspanel-1: Created Card cardEntities with pos 1 and id cardEntities_unknown
2022-04-04 22:02:17.927270 INFO nspanel-1: Created Card cardThermo with pos 2 and id cardThermo_unknown
2022-04-04 22:02:17.930338 INFO nspanel-1: Created Card cardThermo with pos 3 and id cardThermo_unknown
2022-04-04 22:02:17.933314 INFO nspanel-1: Created Card cardLight with pos 4 and id cardLight_unknown
2022-04-04 22:02:17.936117 INFO nspanel-1: Created Card unknown with pos None and id unknown_unknown
2022-04-04 22:02:17.945249 INFO nspanel-1: Sending MQTT Message: pageType~pageStartup
2022-04-04 22:02:17.988971 INFO nspanel-1: Current time 22:02:17.984320
2022-04-04 22:02:17.994449 INFO nspanel-1: Current time 22:02:17.991424
2022-04-04 22:02:17.999536 INFO nspanel-1: Setting dim value to {'time': '6:00:00', 'value': 20}
2022-04-04 22:02:18.046843 INFO nspanel-1: Started
2022-04-04 22:02:18.054530 INFO AppDaemon: App initialization complete
2022-04-04 22:02:18.153569 INFO nspanel-1: Sending MQTT Message: weatherUpdate~18~4.2��C~wt.~12~10.0��C~��r.~12~17.6��C~czw.~18~17.4��C~pt.~20~12.3��C
2022-04-04 22:02:18.178183 INFO nspanel-1: Update Pre-Check failed Tasmota Driver Version: 3 Panel Version: None
2022-04-04 22:02:18.250622 INFO nspanel-1: Received Message from Screen: event,startup,30,eu
2022-04-04 22:02:18.256946 INFO nspanel-1: Update Pre-Check sucessful Tasmota Driver Version: 3 Panel Version: 30
2022-04-04 22:02:18.266925 INFO nspanel-1: Startup Event
2022-04-04 22:02:18.275255 INFO nspanel-1: Sending MQTT Message: time~22:02
2022-04-04 22:02:18.288873 INFO nspanel-1: Sending MQTT Message: date~poniedzia��ek, 4 kwietnia 2022
2022-04-04 22:02:18.293746 INFO nspanel-1: Sending MQTT Message: timeout~20
2022-04-04 22:02:18.303234 INFO nspanel-1: Sending MQTT Message: dimmode~20
2022-04-04 22:02:18.314515 INFO nspanel-1: Sending MQTT Message: pageType~screensaver
2022-04-04 22:02:18.336916 INFO nspanel-1: Sending MQTT Message: weatherUpdate~18~4.2��C~wt.~12~10.0��C~��r.~12~17.6��C~czw.~18~17.4��C~pt.~20~12.3��C
2022-04-04 22:02:25.786128 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,bExit,1
2022-04-04 22:02:25.793696 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: bExit; value: 1 
2022-04-04 22:02:25.797817 INFO nspanel-1: Started rendering of page 0 with type cardGrid
2022-04-04 22:02:25.808891 INFO nspanel-1: Sending MQTT Message: pageType~cardGrid
2022-04-04 22:02:25.831907 INFO nspanel-1: Sending MQTT Message: entityUpd~LED~1|1~switch~switch.piwnica_lampka~1~63142~Piwnica-lampka~1~button~input_button.test~3~17299~test~Press
2022-04-04 22:02:30.372691 INFO nspanel-1: Received Message from Screen: event,buttonPress2,cardGrid,bNext
2022-04-04 22:02:30.375486 INFO nspanel-1: Button Press Event; entity_id: cardGrid; button_type: bNext; value: None 
2022-04-04 22:02:30.381018 INFO nspanel-1: Started rendering of page 1 with type cardEntities
2022-04-04 22:02:30.387485 INFO nspanel-1: Sending MQTT Message: pageType~cardEntities
2022-04-04 22:02:30.404914 INFO nspanel-1: Sending MQTT Message: entityUpd~unknown~1|1~button~scene.rmf_fm~10~17299~rmf-fm~Activate~button~input_button.test~3~17299~test~Press
2022-04-04 22:02:35.000935 INFO nspanel-1: Received Message from Screen: event,buttonPress2,cardEntities,bNext
2022-04-04 22:02:35.003716 INFO nspanel-1: Button Press Event; entity_id: cardEntities; button_type: bNext; value: None 
2022-04-04 22:02:35.006578 INFO nspanel-1: Started rendering of page 2 with type cardThermo
2022-04-04 22:02:35.010494 INFO nspanel-1: Sending MQTT Message: pageType~cardThermo
2022-04-04 22:02:35.030636 INFO nspanel-1: Sending MQTT Message: entityUpd~c681dcfa~1|1~climate.c681dcfa~240~250~~160~300~10~~~~~~~~~~~~~~~~~~~~~29~1024~0~auto~31~11487~0~cool~26~60897~1~dry~30~35921~0~fan_only~28~64512~0~heat~27~35921~0~off
2022-04-04 22:02:36.380317 INFO nspanel-1: Received Message from Screen: event,buttonPress2,cardThermo,bNext
2022-04-04 22:02:36.384157 INFO nspanel-1: Button Press Event; entity_id: cardThermo; button_type: bNext; value: None 
2022-04-04 22:02:36.388063 INFO nspanel-1: Started rendering of page 3 with type cardThermo
2022-04-04 22:02:36.391463 INFO nspanel-1: Sending MQTT Message: pageType~cardThermo
2022-04-04 22:02:36.406662 INFO nspanel-1: Sending MQTT Message: entityUpd~CV~1|1~climate.cv~212~0~~70~350~10~~~~~~~~~~~~~~~~~~~~~29~1024~1~auto~28~64512~0~heat~31~11487~0~cool~27~35921~0~off

CV - empty CV gree - empty

other card - empty :(

joBr99 commented 2 years ago

doesn't look like you also updated the appdaemon app to the development version

updateing this file should be enough or just update to main in hacs and restart appdaemon

https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/apps/nspanel-lovelace-ui/luibackend/icon_mapping.py

joBr99 commented 2 years ago

image

the thermostat is build for one temperature, no clue what to do with two target temperatures high/low

kambiumdt commented 2 years ago

any solutions in future with thermo?

in hacs i update to main - reload - still the same with page

i get by hand thes files - still empty :(

kambiumdt commented 2 years ago

the cardEntities type work OK - Grid, Thermo - empty

kambiumdt commented 2 years ago
cards:
  - type: cardGrid
    title: LED
    entities:
      - entity: switch.piwnica_lampka
        icon: lightbulb

- entity: light.wled_laz

- entity: light.wled

- entity: light.aga

- entity: light.wlodek

- entity: input_button.test

- entity: input_boolean.example_item

  - type: cardEntities
    title: testowa
    entities:
      - entity: scene.rmf_fm
      - entity: input_button.test
      - entity: switch.piwnica_lampka

on page cardEntities - all showing OK on page cardGrid - empty

joBr99 commented 2 years ago

i can confirm that the thermostat page is broken in the current development version, also for me

joBr99 commented 2 years ago

fixed, update the firmware and thermostat page will be back to normal

kambiumdt commented 2 years ago

cool!! :)

but cardGrid still empty :(

:)

kambiumdt commented 2 years ago

its a chance, to change first position of weateher (as 1,2,3,4) of the temp from any other sensor? In my case, its a outside sensor of temp.

joBr99 commented 2 years ago

cardgrid should now also fixed

currently you can only override the last ones without loosing a date of the forecast

joBr99 commented 2 years ago

If you want to override outside temperature create a template weather provider https://www.home-assistant.io/integrations/weather.template/

kambiumdt commented 2 years ago

YUPPI!

All fines!! :)

THX :)

I be try with template - its a good thiks :)

joBr99 commented 2 years ago

is adjusting of the temperature working?

you can probably fix the display of target temperature by adding temperature_state_topic or temperature_state_template to your mqtt config, this would allow you to display at least one of the setpoint temperatures

kambiumdt commented 2 years ago

well.... :) On now: in room is 17 degree - sensor.temp On display i see 17degree as current temp, and as set. when i setup temp on lovelace to 22, on display still 17 as set temp. when i try to set any other temp as SET, its looks like the nextion send too fast the set of temp. When i set the temp on display VERY fast, then i can set the temp ok, but on display the set temp still back to current temp.

joBr99 commented 2 years ago

Is there an error in the AppDeamon log while setting the temperature?

kambiumdt commented 2 years ago

log from appdemon - for AC when change the temp:

entityUpd~c681dcfa~1|1~climate.c681dcfa~240~220~~160~300~10~~~~~~~~~~~~~~~~~~~~~���~1024~0~auto~���~11487~0~cool~���~60897~0~dry~���~35921~0~fan_only~���~64512~0~heat~���~35921~1~off
2022-04-05 20:26:36.906809 INFO nspanel-1: Received Message from Screen: event,buttonPress2,climate.c681dcfa,tempUpd,250
2022-04-05 20:26:36.909247 INFO nspanel-1: Button Press Event; entity_id: climate.c681dcfa; button_type: tempUpd; value: 250 
2022-04-05 20:26:37.252445 INFO nspanel-1: Started rendering of page 2 with type cardThermo
2022-04-05 20:26:37.264899 INFO nspanel-1: Sending MQTT Message: entityUpd~c681dcfa~1|1~climate.c681dcfa~240~250~~160~300~10~~~~~~~~~~~~~~~~~~~~~���~1024~0~auto~���~11487~0~cool~���~60897~0~dry~���~35921~0~fan_only~���~64512~0~heat~���~35921~1~off
2022-04-05 20:26:40.076295 INFO nspanel-1: Started rendering of page 2 with type cardThermo
2022-04-05 20:26:40.100219 INFO nspanel-1: Sending MQTT Message: entityUpd~c681dcfa~1|1~climate.c681dcfa~0~0~~160~300~10~~~~~~~~~~~~~~~~~~~~~���~1024~0~auto~���~11487~0~cool~���~60897~0~dry~���~35921~0~fan_only~���~64512~0~heat~���~35921~0~off

app demon log for Central Heating when change the dest. temp.

2022-04-05 20:27:01.012503 INFO nspanel-1: Sending MQTT Message: time~20:27
2022-04-05 20:27:12.775823 INFO nspanel-1: Received Message from Screen: event,buttonPress2,screensaver,bExit,1
2022-04-05 20:27:12.778300 INFO nspanel-1: Button Press Event; entity_id: screensaver; button_type: bExit; value: 1 
2022-04-05 20:27:12.780766 INFO nspanel-1: Started rendering of page 2 with type cardThermo
2022-04-05 20:27:12.783473 INFO nspanel-1: Sending MQTT Message: pageType~cardThermo
2022-04-05 20:27:12.797919 INFO nspanel-1: Sending MQTT Message: entityUpd~c681dcfa~1|1~climate.c681dcfa~0~0~~160~300~10~~~~~~~~~~~~~~~~~~~~~���~1024~0~auto~���~11487~0~cool~���~60897~0~dry~���~35921~0~fan_only~���~64512~0~heat~���~35921~0~off
2022-04-05 20:27:30.193964 INFO nspanel-1: Received Message from Screen: event,buttonPress2,cardThermo,bNext
2022-04-05 20:27:30.201015 INFO nspanel-1: Button Press Event; entity_id: cardThermo; button_type: bNext; value: None 
2022-04-05 20:27:30.209421 INFO nspanel-1: Started rendering of page 3 with type cardThermo
2022-04-05 20:27:30.219557 INFO nspanel-1: Sending MQTT Message: pageType~cardThermo
2022-04-05 20:27:30.245793 INFO nspanel-1: Sending MQTT Message: entityUpd~CV~1|1~climate.cv~213~0~~70~350~10~~~~~~~~~~~~~~~~~~~~~���~1024~1~auto~���~64512~0~heat~���~11487~0~cool~���~35921~0~off
2022-04-05 20:27:31.874421 INFO nspanel-1: Received Message from Screen: event,buttonPress2,climate.cv,tempUpd,223
2022-04-05 20:27:31.877605 INFO nspanel-1: Button Press Event; entity_id: climate.cv; button_type: tempUpd; value: 223
joBr99 commented 2 years ago

found a bug in the thermostat page in the display firmware, just pushed a fix for it, run

FlashNextion http://nspanel.pky.eu/lui.tft

in the tasmota console and give it another try

kambiumdt commented 2 years ago

on AC its OK !

On Central Heating i must try as you wrote with template - but TIME TIME TIME....:))))

THX!

joBr99 commented 2 years ago

current development version supports setting a temperature range

image