mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 15:34:26 +01:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d536957255 | ||
|
|
b4fe08ba43 | ||
|
|
e4a4917932 | ||
|
|
d17f8c636c | ||
|
|
9fc6ccf901 | ||
|
|
4f760da1aa | ||
|
|
ac2df9e431 | ||
|
|
cd4d68d590 | ||
|
|
2fd5363131 | ||
|
|
c2df6a953a |
@@ -1,4 +1,4 @@
|
|||||||
+++ /dev/fd/62 2022-12-21 20:15:25.252534958 +0000
|
+++ /dev/fd/62 2022-12-23 15:58:39.712878570 +0000
|
||||||
+I/n2t-out/Program.s.txt
|
+I/n2t-out/Program.s.txt
|
||||||
++ HMI/US/portrait/n2t-out/Program.s.txt
|
++ HMI/US/portrait/n2t-out/Program.s.txt
|
||||||
+I/n2t-out/cardEntities.txt
|
+I/n2t-out/cardEntities.txt
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ pageStartup
|
|||||||
19 Component(s)
|
19 Component(s)
|
||||||
181 Line(s) of event code
|
181 Line(s) of event code
|
||||||
129 Unique line(s) of event code
|
129 Unique line(s) of event code
|
||||||
|
screensaver
|
||||||
|
45 Component(s)
|
||||||
|
410 Line(s) of event code
|
||||||
|
298 Unique line(s) of event code
|
||||||
popupShutter
|
popupShutter
|
||||||
25 Component(s)
|
25 Component(s)
|
||||||
398 Line(s) of event code
|
398 Line(s) of event code
|
||||||
@@ -50,10 +54,6 @@ cardMedia
|
|||||||
57 Component(s)
|
57 Component(s)
|
||||||
660 Line(s) of event code
|
660 Line(s) of event code
|
||||||
325 Unique line(s) of event code
|
325 Unique line(s) of event code
|
||||||
screensaver
|
|
||||||
45 Component(s)
|
|
||||||
410 Line(s) of event code
|
|
||||||
298 Unique line(s) of event code
|
|
||||||
cardQR
|
cardQR
|
||||||
32 Component(s)
|
32 Component(s)
|
||||||
425 Line(s) of event code
|
425 Line(s) of event code
|
||||||
|
|||||||
@@ -126,9 +126,9 @@ Text t10
|
|||||||
Disable release event after dragging: 0
|
Disable release event after dragging: 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
Opacity : 127
|
Opacity : 127
|
||||||
x coordinate : 49
|
x coordinate : 53
|
||||||
y coordinate : 240
|
y coordinate : 245
|
||||||
Width : 225
|
Width : 215
|
||||||
Height : 2
|
Height : 2
|
||||||
Effect : load
|
Effect : load
|
||||||
Effect Priority : 0
|
Effect Priority : 0
|
||||||
@@ -576,10 +576,10 @@ Text tIcon1
|
|||||||
Disable release event after dragging: 0
|
Disable release event after dragging: 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
Opacity : 127
|
Opacity : 127
|
||||||
x coordinate : 8
|
x coordinate : 0
|
||||||
y coordinate : 227
|
y coordinate : 227
|
||||||
Width : 33
|
Width : 45
|
||||||
Height : 30
|
Height : 45
|
||||||
Effect : load
|
Effect : load
|
||||||
Effect Priority : 0
|
Effect Priority : 0
|
||||||
Effect Time : 300
|
Effect Time : 300
|
||||||
@@ -589,7 +589,7 @@ Text tIcon1
|
|||||||
Font ID : 1
|
Font ID : 1
|
||||||
Back. Color : 0
|
Back. Color : 0
|
||||||
Font Color : 17299
|
Font Color : 17299
|
||||||
Horizontal Alignment : center
|
Horizontal Alignment : left
|
||||||
Vertical Alignment : center
|
Vertical Alignment : center
|
||||||
Input Type : character
|
Input Type : character
|
||||||
Text :
|
Text :
|
||||||
@@ -606,10 +606,10 @@ Text tIcon2
|
|||||||
Disable release event after dragging: 0
|
Disable release event after dragging: 0
|
||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
Opacity : 127
|
Opacity : 127
|
||||||
x coordinate : 282
|
x coordinate : 275
|
||||||
y coordinate : 227
|
y coordinate : 227
|
||||||
Width : 33
|
Width : 45
|
||||||
Height : 30
|
Height : 45
|
||||||
Effect : load
|
Effect : load
|
||||||
Effect Priority : 0
|
Effect Priority : 0
|
||||||
Effect Time : 300
|
Effect Time : 300
|
||||||
@@ -619,7 +619,7 @@ Text tIcon2
|
|||||||
Font ID : 1
|
Font ID : 1
|
||||||
Back. Color : 0
|
Back. Color : 0
|
||||||
Font Color : 17299
|
Font Color : 17299
|
||||||
Horizontal Alignment : center
|
Horizontal Alignment : right
|
||||||
Vertical Alignment : center
|
Vertical Alignment : center
|
||||||
Input Type : character
|
Input Type : character
|
||||||
Text :
|
Text :
|
||||||
@@ -817,7 +817,7 @@ Text tNotifyHead
|
|||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
Opacity : 127
|
Opacity : 127
|
||||||
x coordinate : 0
|
x coordinate : 0
|
||||||
y coordinate : 257
|
y coordinate : 272
|
||||||
Width : 320
|
Width : 320
|
||||||
Height : 58
|
Height : 58
|
||||||
Effect : load
|
Effect : load
|
||||||
@@ -847,7 +847,7 @@ Text tNotifyText
|
|||||||
Send Component ID : disabled
|
Send Component ID : disabled
|
||||||
Opacity : 127
|
Opacity : 127
|
||||||
x coordinate : 0
|
x coordinate : 0
|
||||||
y coordinate : 315
|
y coordinate : 330
|
||||||
Width : 320
|
Width : 320
|
||||||
Height : 58
|
Height : 58
|
||||||
Effect : load
|
Effect : load
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -3,19 +3,65 @@ import json
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
keys = {
|
keys = {
|
||||||
'frontend.ui.card.light.brightness': 'lights.Brightness',
|
'frontend.ui.card.light.brightness': 'lights.Brightness',
|
||||||
# 'frontend.ui.card.light.brightness': 'lights.Color',
|
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
|
||||||
'frontend.ui.card.light.color_temperature': 'lights.Temperature',
|
'backend.component.binary_sensor.state.window.off': 'window.closed',
|
||||||
'backend.component.binary_sensor.state.window.off': 'window.closed',
|
'backend.component.binary_sensor.state.window.on': 'window.opened',
|
||||||
'backend.component.binary_sensor.state.window.on': 'window.opened',
|
'backend.component.binary_sensor.state.door.off': 'door.closed',
|
||||||
'backend.component.binary_sensor.state.door.off': 'door.closed',
|
'backend.component.binary_sensor.state.door.on': 'door.opened',
|
||||||
'backend.component.binary_sensor.state.door.on': 'door.opened',
|
'frontend.ui.card.lock.lock': 'lock.LOCK',
|
||||||
'frontend.ui.card.lock.lock': 'lock.LOCK',
|
'frontend.ui.card.lock.unlock': 'lock.UNLOCK',
|
||||||
'frontend.ui.card.lock.unlock': 'lock.UNLOCK',
|
'frontend.ui.card.cover.position': 'blinds.Position',
|
||||||
'frontend.ui.card.cover.position': 'blinds.Position',
|
'frontend.ui.card.climate.currently': 'thermostat.Currently',
|
||||||
'frontend.ui.card.climate.currently': 'thermostat.Currently',
|
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
|
||||||
'frontend.ui.panel.config.devices.entities.state': 'thermostat.State',
|
'frontend.ui.card.climate.operation': 'thermostat.Action',
|
||||||
'frontend.ui.card.climate.operation': 'thermostat.Action',
|
|
||||||
|
'frontend.ui.card.button.press': 'button.press',
|
||||||
|
'frontend.ui.card.script.run': 'script.run',
|
||||||
|
'frontend.ui.card.scene.activate': 'scene.activate',
|
||||||
|
'frontend.ui.card.vacuum.actions.start_cleaning': 'vacuum.start_cleaning',
|
||||||
|
'frontend.ui.card.vacuum.actions.return_to_base': 'vacuum.return_to_base',
|
||||||
|
'frontend.ui.card.cover.tilt_position': 'blinds.tilt_position',
|
||||||
|
'frontend.ui.card.fan.speed': 'fan.speed',
|
||||||
|
'frontend.ui.card.timer.actions.start': 'timer.start',
|
||||||
|
'frontend.ui.card.timer.actions.pause': 'timer.pause',
|
||||||
|
'frontend.ui.card.timer.actions.cancel': 'timer.cancel',
|
||||||
|
'frontend.ui.card.timer.actions.finish': 'timer.finish',
|
||||||
|
'frontend.state_badge.alarm_control_panel.armed': 'alarm_control_panel.armed',
|
||||||
|
'frontend.state_badge.alarm_control_panel.armed_away': 'alarm_control_panel.armed_away',
|
||||||
|
'frontend.state_badge.alarm_control_panel.armed_custom_bypass': 'alarm_control_panel.armed_custom_bypass',
|
||||||
|
'frontend.state_badge.alarm_control_panel.armed_home': 'alarm_control_panel.armed_home',
|
||||||
|
'frontend.state_badge.alarm_control_panel.armed_night': 'alarm_control_panel.armed_night',
|
||||||
|
'frontend.state_badge.alarm_control_panel.armed_vacation': 'alarm_control_panel.armed_vacation',
|
||||||
|
'frontend.state_badge.alarm_control_panel.arming': 'alarm_control_panel.arming',
|
||||||
|
'frontend.state_badge.alarm_control_panel.disarmed': 'alarm_control_panel.disarmed',
|
||||||
|
'frontend.state_badge.alarm_control_panel.disarming': 'alarm_control_panel.disarming',
|
||||||
|
'frontend.state_badge.alarm_control_panel.pending': 'alarm_control_panel.pending',
|
||||||
|
'frontend.state_badge.alarm_control_panel.triggered': 'alarm_control_panel.triggered',
|
||||||
|
'frontend.state_attributes.climate.hvac_action.cooling': 'hvac_action.cooling',
|
||||||
|
'frontend.state_attributes.climate.hvac_action.drying': 'hvac_action.drying',
|
||||||
|
'frontend.state_attributes.climate.hvac_action.fan': 'hvac_action.fan',
|
||||||
|
'frontend.state_attributes.climate.hvac_action.heating': 'hvac_action.heating',
|
||||||
|
'frontend.state_attributes.climate.hvac_action.idle': 'hvac_action.idle',
|
||||||
|
'frontend.state_attributes.climate.hvac_action.off': 'hvac_action.off',
|
||||||
|
'frontend.ui.card.alarm_control_panel.arm_away': 'alarm_control_panel.arm_away',
|
||||||
|
'frontend.ui.card.alarm_control_panel.arm_custom_bypass': 'alarm_control_panel.arm_custom_bypass',
|
||||||
|
'frontend.ui.card.alarm_control_panel.arm_home': 'alarm_control_panel.arm_home',
|
||||||
|
'frontend.ui.card.alarm_control_panel.arm_night': 'alarm_control_panel.arm_night',
|
||||||
|
'frontend.ui.card.alarm_control_panel.arm_vacation': 'alarm_control_panel.arm_vacation',
|
||||||
|
'frontend.ui.card.alarm_control_panel.clear_code': 'alarm_control_panel.clear_code',
|
||||||
|
'frontend.ui.card.alarm_control_panel.code': 'alarm_control_panel.code',
|
||||||
|
'frontend.ui.card.alarm_control_panel.disarm': 'alarm_control_panel.disarm',
|
||||||
|
'backend.component.climate.state._.off': 'climate.off',
|
||||||
|
'backend.component.climate.state._.heat': 'climate.heat',
|
||||||
|
'backend.component.climate.state._.cool': 'climate.cool',
|
||||||
|
'backend.component.climate.state._.heat_cool': 'climate.heat_cool',
|
||||||
|
'backend.component.climate.state._.auto': 'climate.auto',
|
||||||
|
'backend.component.climate.state._.dry': 'climate.dry',
|
||||||
|
'backend.component.climate.state._.fan_only': 'climate.fan_only',
|
||||||
|
'backend.component.timer.state._.active': 'timer.active',
|
||||||
|
'backend.component.timer.state._.idle': 'timer.idle',
|
||||||
|
'backend.component.timer.state._.paused': 'timer.paused',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -51,7 +97,8 @@ def lookup(path_frontend_file, path_backend_file, lookupstr):
|
|||||||
if k in res:
|
if k in res:
|
||||||
res = res[k]
|
res = res[k]
|
||||||
if type(res) is not str:
|
if type(res) is not str:
|
||||||
print("Warning result is not a String")
|
print(f"Warning result is not a String: {lookupstr}")
|
||||||
|
res = ""
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def get_translation(locale, lookupstr):
|
def get_translation(locale, lookupstr):
|
||||||
@@ -69,5 +116,5 @@ for src, dst in keys.items():
|
|||||||
|
|
||||||
#print(json.dumps(out, indent=4, ensure_ascii=False))
|
#print(json.dumps(out, indent=4, ensure_ascii=False))
|
||||||
|
|
||||||
with open("ioBroker_NSPanel_locales.json", "wb") as text_file:
|
with open("ioBroker_NSPanel_locales_beta.json", "wb") as text_file:
|
||||||
text_file.write(json.dumps(out, indent=4, ensure_ascii=False).encode('utf8'))
|
text_file.write(json.dumps(out, indent=4, ensure_ascii=False).encode('utf8'))
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class NsPanelLovelaceUIManager(hass.Hass):
|
|||||||
# eu version
|
# eu version
|
||||||
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
|
desired_display_firmware_url = f"http://nspanel.pky.eu/lovelace-ui/github/nspanel-{version}.tft"
|
||||||
|
|
||||||
desired_tasmota_driver_version = 6
|
desired_tasmota_driver_version = 7
|
||||||
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"
|
desired_tasmota_driver_url = "https://raw.githubusercontent.com/joBr99/nspanel-lovelace-ui/main/tasmota/autoexec.be"
|
||||||
|
|
||||||
mode = cfg.get("updateMode")
|
mode = cfg.get("updateMode")
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2410
ioBroker/ioBroker_NSPanel_locales_beta.json
Normal file
2410
ioBroker/ioBroker_NSPanel_locales_beta.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -153,6 +153,7 @@ class Nextion : Driver
|
|||||||
if (self.flash_mode==1)
|
if (self.flash_mode==1)
|
||||||
var strv = msg[0..-4].asstring()
|
var strv = msg[0..-4].asstring()
|
||||||
if string.find(strv,"comok 2")>=0
|
if string.find(strv,"comok 2")>=0
|
||||||
|
tasmota.delay(50)
|
||||||
log("FLH: Send (High Speed) flash start")
|
log("FLH: Send (High Speed) flash start")
|
||||||
self.flash_start_millis = tasmota.millis()
|
self.flash_start_millis = tasmota.millis()
|
||||||
#self.sendnx(string.format("whmi-wris %d,115200,res0",self.flash_size))
|
#self.sendnx(string.format("whmi-wris %d,115200,res0",self.flash_size))
|
||||||
@@ -162,6 +163,7 @@ class Nextion : Driver
|
|||||||
self.sendnx(string.format("whmi-wris %d,%d,res0",self.flash_size,self.flash_proto_baud))
|
self.sendnx(string.format("whmi-wris %d,%d,res0",self.flash_size,self.flash_proto_baud))
|
||||||
end
|
end
|
||||||
if self.flash_proto_baud != 115200
|
if self.flash_proto_baud != 115200
|
||||||
|
tasmota.delay(50)
|
||||||
self.ser.deinit()
|
self.ser.deinit()
|
||||||
self.ser = serial(17, 16, self.flash_proto_baud, serial.SERIAL_8N1)
|
self.ser = serial(17, 16, self.flash_proto_baud, serial.SERIAL_8N1)
|
||||||
end
|
end
|
||||||
@@ -319,7 +321,7 @@ tasmota.add_driver(nextion)
|
|||||||
|
|
||||||
def get_current_version(cmd, idx, payload, payload_json)
|
def get_current_version(cmd, idx, payload, payload_json)
|
||||||
import string
|
import string
|
||||||
var version_of_this_script = 6
|
var version_of_this_script = 7
|
||||||
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
|
var jm = string.format("{\"nlui_driver_version\":\"%s\"}", version_of_this_script)
|
||||||
tasmota.publish_result(jm, "RESULT")
|
tasmota.publish_result(jm, "RESULT")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user