NEWS
SONOFF NSPanel mit Lovelace UI
-
@tt-tom Danke, und sorry dass ich da gerade am Schlauch stehe, aber wo finde ich einen Bereich "Tester"? Hier? Im github zum Javascript? Github zum NSpanel?
EDIT: Gefunden, hier im Tester zu 9.0.1 -
Hallo zusammen,
bei mir läuft plötzlich das Script nicht mehr. Ich habe nichts geändert am System nicht mal ein Update gemacht das habe ich erst danach gemacht weil ich gedacht habe vielleicht löst das das Problem.
Das TypeScript gibt folgende Fehler aus. Jemand eine Idee wie ich das behebe? Bin ich der einzige damit aktuell?
19.6.2025, 20:36:16.913 [info ]: javascript.0 (26568) script.js.common.nspanel.panel3: Stopping script 19.6.2025, 20:36:17.214 [info ]: javascript.0 (26568) script.js.common.nspanel.panel3: Compiling TypeScript source 19.6.2025, 20:36:18.136 [error]: javascript.0 (26568) script.js.common.nspanel.panel3: TypeScript compilation failed: await setStateAsync(NSPanel_Path + 'PageNavi', <iobJS.State>{ val: "{ pagetype: 'page', pageId: 0 }", ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_Dimmode_brightnessDay', <iobJS.State>{ val: 8, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_Dimmode_hourDay', <iobJS.State>{ val: 7, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_Dimmode_brightnessNight', <iobJS.State>{ val: 1, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_Dimmode_hourNight', <iobJS.State>{ val: 22, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(meanPower, <iobJS.State>{ val: meanConsumption, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(screensaverNotifyHeading, <iobJS.State>{ val: '', ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(screensaverNotifyText, <iobJS.State>{ val: '', ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(obj.id, <iobJS.State>{ val: obj.state.val, ack: true }); // ack new value ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_locales_json', <iobJS.State>{ val: JSON.stringify(response.data), ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_locales_service_json', <iobJS.State>{ val: JSON.stringify(response.data), ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota_Firmware.currentVersion', <iobJS.State>{ val: getState(NSPanel_Path + 'Tasmota_Firmware.onlineVersion').val, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Berry_Driver.currentVersion', <iobJS.State>{ val: getState(NSPanel_Path + 'Berry_Driver.onlineVersion').val, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Display_Firmware.currentVersion', <iobJS.State>{ val: getState(NSPanel_Path + 'Display_Firmware.onlineVersion').val, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyHeading, <iobJS.State>{ val: Headline, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyHeadingColor, <iobJS.State>{ val: HeadlineColor, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyButton1Text, <iobJS.State>{ val: Button1, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyButton1TextColor, <iobJS.State>{ val: Button1Color, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyButton2Text, <iobJS.State>{ val: Button2, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyButton2TextColor, <iobJS.State>{ val: Button2Color, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifySleepTimeout, <iobJS.State>{ val: Timeout, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyInternalName, <iobJS.State>{ val: InternalName, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyLayout, <iobJS.State>{ val: Layout, ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(popupNotifyText, <iobJS.State>{ val: [formatDate(getDateObject(new Date().getTime()), 'TT.MM.JJJJ SS:mm:ss'), '\r\n', '\r\n', Text].join(''), ack: false }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_ipAddress', <iobJS.State>{ val: get_current_tasmota_ip_address(), ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota_Firmware.onlineVersion', <iobJS.State>{ val: TasmotaVersionOnline, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Berry_Driver.currentVersion', <iobJS.State>{ val: JSON.parse(JSON.stringify(response.data)).nlui_driver_version, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota_Firmware.currentVersion', <iobJS.State>{ val: tasmoVersion, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Uptime', <iobJS.State>{ val: Tasmota_JSON.StatusPRM.Uptime, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Version', <iobJS.State>{ val: Tasmota_JSON.StatusFWR.Version, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Hardware', <iobJS.State>{ val: TasmotaHardware[0] + '\r\n' + TasmotaHardware[1], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.AP', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.AP, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.SSId', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.SSId, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.BSSId', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.BSSId, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.Channel', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.Channel, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.Mode', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.Mode, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.RSSI', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.RSSI, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Wifi.Signal', <iobJS.State>{ val: Tasmota_JSON.StatusSTS.Wifi.Signal, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Tasmota.Product', <iobJS.State>{ val: 'SONOFF NSPanel', ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Berry_Driver.onlineVersion', <iobJS.State>{ val: BerryDriverVersionOnline, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'TFT_Firmware.onlineVersion', <iobJS.State>{ val: NSPanelVersion, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Display_Firmware.onlineVersion', <iobJS.State>{ val: desired_display_firmware_version, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Display_Firmware.currentVersion', <iobJS.State>{ val: split[2], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Display_Firmware.currentRelease', <iobJS.State>{ val: split[4], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'NSPanel_Version', <iobJS.State>{ val: split[3], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'TFT_Firmware.onlineVersion', <iobJS.State>{ val: tft_version, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.HUE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.HUE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.RED').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.RED').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.CIE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.CIE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.RGB').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(pageItem.id + '.TEMPERATURE').ts < getState(pageItem.id + '.RGB').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. setState(popupNotifyInternalName, <iobJS.State>{ val: words[2], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. setState(popupNotifyAction, <iobJS.State>{ val: true, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. setState(popupNotifyInternalName, <iobJS.State>{ val: words[2], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. setState(popupNotifyAction, <iobJS.State>{ val: false, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.HUE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.HUE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.RED').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.RED').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.RGB').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.RGB').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.CIE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. if (getState(id + '.TEMPERATURE').ts < getState(id + '.CIE').ts) { ^ ERROR: Property 'ts' does not exist on type 'AbsentState | TypedState<any>'. Property 'ts' does not exist on type 'TypedState<any>'. unsubscribe(value); ^ ERROR: Argument of type 'unknown' is not assignable to parameter of type 'string | RegExp | string[]'. await setStateAsync(NSPanel_Path + 'Sensor.Time', <iobJS.State>{ val: dateTime[0] + '\r\n' + dateTime[1], ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Sensor.TempUnit', <iobJS.State>{ val: '°' + Tasmota_Sensor.TempUnit, ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Sensor.ANALOG.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ANALOG.Temperature1), ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. await setStateAsync(NSPanel_Path + 'Sensor.ESP32.Temperature', <iobJS.State>{ val: parseFloat(Tasmota_Sensor.ESP32.Temperature), ack: true }); ^ ERROR: Namespace 'global.iobJS' has no exported member 'State'. val: iobJS.StateValue; ^ ERROR: 'global.iobJS' has no exported member named 'StateValue'. Did you mean 'StateACL'? val: iobJS.StateValue; ^ ERROR: 'global.iobJS' has no exported member named 'StateValue'. Did you mean 'StateACL'?
-
Sieh mal kurz nach, ob da ein JS-Adapter 9.X.X (beta/latest) läuft... Da gibts noch irgendwie broken Types...
Falls ja, dann Downgrade auf die 8.9.2 (stable)
P.S.: Der hat sich übrigens heute bei mir auch selbstständig installiert, obwohl "Automatisches Upgrade" unter Repo's nicht angehakt ist...
-
@armilar ja hatte 9.x.x drauf durch das update natürlich jetzt den latest was vorher war weiß ich nicht. danke. nach downgrade funktioniert es wieder. komisch ist das es erst mit der 9er Java ohne probleme lief.
-
Beim JS-Adapter 9.X warten wir schon seit der 9.0.0 auf ein Bugfix der Types... Solange keiner sagt, dass es jetzt anders beabsichtigt ist, gehe ich nach wie vor von einem Bug aus...
-
Re: SONOFF NSPanel mit Lovelace UI
Hallo liebe community,
ich bin kurz vorm Verzweifeln mit meinem NSPanel und hoffe irgendjemand kann mir hier weiterhelfen.
Ich habe das NSPanel schon ca 2-3 Jahre und damals nach der Anleitung von haus:automation eingestellt; es hatte damals einwandfrei funktioniert bis mich das display irgendwann aufgefordert hat ein update zu machen, das hatte ich am display bestätigt und danach ging gar nichts mehr außer "waiting for content".Ich hab das display jetzt nach Ewigkeiten wieder mal in die Hand genommen, tasmota_nspanel neu geflasht, das panel entsprechend vorbereitet. Beim Flashen der nextion firmware zeigt das display auch mal ausnahmsweise den Ladebalken beim Flash-Vorgang statt "waiting for content / This is taking longer..".
In iobroker scheint die MQTT Anbindung des Display zu funktionieren. Ich habe die "CustomSend" und "Result" angelegt und in die skripte eingetragen, gespeichert und gestartet .. das Display zeigt aber immer nur "waiting for content" .. hat irgendjemand eine Idee wie ich weiter kommen kann?Danke und VG
-
RESULT muss nicht angelegt werden und wird, sofern der MQTT-Austausch erfolgt, unter /tele/ angelegt.
Bitte zeige kurz deine beiden Kommunikationsparameter im Script und die beiden in den mqtt.X. Objekten...
-
@hansi44 Einmal vom Strom nehmen, (nur Neustart reicht nicht) nachdem das Stromlos war ging es bei mir auch wieder
-
Im Übrigen bist du bei der Dokumentation (bei dir im Post unter "entsprechend vorbereitet") des Panels bei Home Assistant gelandet... Die Vorbereitung ist zwar gleich, jedoch ist die TFT-Firmware nicht mehr gleich...
Unsere (ioBroker) Dokumentation findest du in der Wiki:
-
Ich hätte da mal eine Frage, Auf dem Display werden mir ja symbole für die Leuchten angezeigt wenn die Lampe an ist wird das symbol gelb und wenn sie aus ist wird oder ist es Orange.
Würde das irgendwie funktionieren das das Symbol die Farbe bekommt in der sie leuchtet.?
Wenn zb. Blau beleuchtet wird das mi´r das symbol der Lampe ebenfalls blau wird.
GrußHat sich erledigt habs gefunden Zauberwort heißt (interpolateColor: true)
-
hallo @Armilar , hallo @teletapi , vielen Dank für eure schnelle Antwort, hier im Forum ist wirklich Verlass auf Unterstützung wenn man Probleme hat! Ich hab heute morgen das NSPanel mit wenig Hoffnung nochmal angeschlossen und es kommt tatsächlich ein Bild!
(Obwohl ich nicht wirklich etwas anders gemacht hab)
Im javascript unten im iobroker kommen zwar noch etliche Fehlermeldungen, aber ich denke das ist normal und ich habe jetzt wieder Mut weiter an dem Thema zu arbeiten! Danke euch! -
das schaut bei mir im script so aus
ich habe die id's direkt aus den objekten kopiert, passt das?
Ich hab in letzter Zeit wenig mit iobroker gemacht, aber was mich auch gewundert hat, wenn ich in den Objekten in iobroker rechts neben dem ID namen "kopieren" geklickt habe, bilde ich mir ein wurde früher immer der komplette Pfad des Objekts übernommen
also hier zB "mqtt.0.cmnd.tasmota_85D34C.CustomSend" .. er hat aber jetzt immer nur den Objektnamen kopiert, also nur "CustomSend" .. ging das nicht irgendwie mal anders? VG
-
danke auch nochmal für den richtigen link für die step-by-step anleitung
Ich bin nochmal alles Punkte bis 10) durchgegangen und tatsächlich war der hier
komplett neu für mich, kann mich zumindest nicht erinnern, dass der im Youtoube Tutorial von haus:automation gezeigt wurde, vermutlich eine neue Einstellung(?)Kurze Frage hier noch: besteht die Möglichkeit, Update-Anfragen auf dem NSPanel zu deaktivieren?
-
@hansi44 sagte in SONOFF NSPanel mit Lovelace UI:
ging das nicht irgendwie mal anders? VG
wenn du auf das richtige Icon klickst dann kopiert der auch das richtige..
und kleiner exkurs zu
vermutlich eine neue Einstellung(?)
dies
sind zusatzpakete die benötigt werden in scripten.. denke ich mir was neues aus und es wird ein paket xyz benötigt dann muss es auch eingetragen werden.. was vor 2 monaten noch nicht da war.. zu alter script Verion , muss jetzt rein..