Git Product home page Git Product logo

Comments (5)

wvhn avatar wvhn commented on June 21, 2024

Yes. I have configured a Memory Log handler as described in the docu („mem_heiz“) and attached this to plugins.uzsu.
SmarthomeNG delivers the right data but then sends additional updates for env.core.log. The console error is thrown because env.core.log is not subscribed and thus not initialized in the widget.buffer.

from smarthome.

onkelandy avatar onkelandy commented on June 21, 2024

Das Problem kommt wohl von der Funktion initMemLog im log.py
Hier wird fix ein entsprechender Memory Logger erstellt, was ja prinzipiell keine schlechte Idee ist, da man dann das entsprechende memory log ohne weiteres Zutun in smartvisu einbinden kann. Wenn man es aber nicht einbindet, kommt es eben zu besagtem Fehler.

from smarthome.

Morg42 avatar Morg42 commented on June 21, 2024

Ich stecke da jetzt nicht drin - aber warum muss env.core.log pauschal als memlog bereitgestellt werden? Soweit ich den Code verstehe, werden ja auch keine anderen Logs verarbeitet, oder?

from smarthome.

msinn avatar msinn commented on June 21, 2024

Dieses Log wird standardmäßig von der smartVISU verwendet (auf der Seite Konfiguration/SmartHomeNG)

from smarthome.

wvhn avatar wvhn commented on June 21, 2024

Ich habe nochmal weiter getestet, indem ich einen weiteren memlog angelegt habe ('mem_webs'). Beim Abrufen des ursprünglichen Logs "mem_heiz" wird zunächst nur dessen Inhalt per Websocket übertragen. Soweit korrekt.

Sobald anschließend neue Einträge in "env.core.log" oder "mem_webs" erfolgen, werden diese als Updates übertragen obwohl sie nicht abonniert sind. Offenbar prüft die Update-Methode der memlogs nicht bzw. nich korrekt, welche Logs abonniert sind.

Ich habe jetzt einen workaround im smarthomeNG-Treiber von smartVISU erstellt, der die Fehlermeldung vermeidet und statt dessen eine Meldung auf der Konsole ausgibt:

console.log('[io.smarthomeng] ignoring data for not requested log "' + data.name + '"');

Die Änderung ist im smartVISU develop branch.

Dennoch sollte der bug in smarthomeNG behoben werden.

from smarthome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.