Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. English
  3. Visualization
  4. getting started with visualisations

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.7k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.1k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.0k

getting started with visualisations

Geplant Angeheftet Gesperrt Verschoben Visualization
vis
43 Beiträge 4 Kommentatoren 6.1k Aufrufe 4 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • T Offline
    T Offline
    Taragorm
    schrieb am zuletzt editiert von
    #24

    fyi, in enableDebug I think:

    var stats = fs.lstatSync(adapterDir2Try);

    maybe should be
    var stats = fs.statSync(adapterDir2Try);

    As diagnostics suggest we're finding the link, and lstatSync() returns the link itself, rather than the target of the link.

    Changing it, lets things go a bit further, but it still fails somewhat messily:

    Trying:/opt/iobroker/iobroker.vis-taragorm
    Got stats:{"dev":2049,"mode":16895,"nlink":8,"uid":1001,"gid":1001,"rdev":0,"blksize":4096,"ino":791105,"size":4096,"blocks":8,"atimeMs":1552471286715.824,"mtimeMs":1552471172270.63,"ctimeMs":1552471172270.63,"birthtimeMs":1552471172270.63,"atime":"2019-03-13T10:01:26.716Z","mtime":"2019-03-13T09:59:32.271Z","ctime":"2019-03-13T09:59:32.271Z","birthtime":"2019-03-13T09:59:32.271Z"}  isDir=true isLink=false
    Upload "/opt/iobroker/node_modules/iobroker.vis/www/index.html.original"
    fs.js:119
        throw err;
        ^
    
    Error: ENOENT: no such file or directory, open '/opt/iobroker/node_modules/iobroker.js-controller/lib/setup/../../../iobroker.vis/www/index.html.original'
        at Object.openSync (fs.js:448:3)
        at Object.readFileSync (fs.js:348:35)
        at VisDebug.enableDebug (/opt/iobroker/node_modules/iobroker.js-controller/lib/setup/setupVisDebug.js:91:23)
        at _objects (/opt/iobroker/node_modules/iobroker.js-controller/lib/setup.js:2460:30)
        at Object.connected (/opt/iobroker/node_modules/iobroker.js-controller/lib/setup.js:3133:17)
        at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:87:68)
        at Socket.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
        at Socket.emit (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:136:10)
        at Socket.onconnect (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:328:8)
        at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:224:12)
    
    

    For now, I'm going to switch my development environment to Windows, as that seems to be working for you.

    BluefoxB 1 Antwort Letzte Antwort
    0
    • T Taragorm

      fyi, in enableDebug I think:

      var stats = fs.lstatSync(adapterDir2Try);

      maybe should be
      var stats = fs.statSync(adapterDir2Try);

      As diagnostics suggest we're finding the link, and lstatSync() returns the link itself, rather than the target of the link.

      Changing it, lets things go a bit further, but it still fails somewhat messily:

      Trying:/opt/iobroker/iobroker.vis-taragorm
      Got stats:{"dev":2049,"mode":16895,"nlink":8,"uid":1001,"gid":1001,"rdev":0,"blksize":4096,"ino":791105,"size":4096,"blocks":8,"atimeMs":1552471286715.824,"mtimeMs":1552471172270.63,"ctimeMs":1552471172270.63,"birthtimeMs":1552471172270.63,"atime":"2019-03-13T10:01:26.716Z","mtime":"2019-03-13T09:59:32.271Z","ctime":"2019-03-13T09:59:32.271Z","birthtime":"2019-03-13T09:59:32.271Z"}  isDir=true isLink=false
      Upload "/opt/iobroker/node_modules/iobroker.vis/www/index.html.original"
      fs.js:119
          throw err;
          ^
      
      Error: ENOENT: no such file or directory, open '/opt/iobroker/node_modules/iobroker.js-controller/lib/setup/../../../iobroker.vis/www/index.html.original'
          at Object.openSync (fs.js:448:3)
          at Object.readFileSync (fs.js:348:35)
          at VisDebug.enableDebug (/opt/iobroker/node_modules/iobroker.js-controller/lib/setup/setupVisDebug.js:91:23)
          at _objects (/opt/iobroker/node_modules/iobroker.js-controller/lib/setup.js:2460:30)
          at Object.connected (/opt/iobroker/node_modules/iobroker.js-controller/lib/setup.js:3133:17)
          at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.js-controller/lib/states/statesInMemClient.js:87:68)
          at Socket.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
          at Socket.emit (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:136:10)
          at Socket.onconnect (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:328:8)
          at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:224:12)
      
      

      For now, I'm going to switch my development environment to Windows, as that seems to be working for you.

      BluefoxB Offline
      BluefoxB Offline
      Bluefox
      schrieb am zuletzt editiert von Bluefox
      #25

      @Taragorm It is very well, that you want to get the visbebug runnnig, but
      I don't understand, why you ignore my other suggestions:

      • https://forum.iobroker.net/topic/19929/getting-started-with-visualisations/15
      • https://forum.iobroker.net/topic/19929/getting-started-with-visualisations/8

      The problem with non existing index.html.original is fixed only on github.

      1 Antwort Letzte Antwort
      0
      • BluefoxB Bluefox

        @Taragorm No matter. With iobroker r vis && iobroker u vis it should work.
        Not Fast, but work.

        Just tried to execute (windows):
        2797695c-1307-4c36-a736-32d4f35862c9-image.png
        and cannot see any errors

        T Offline
        T Offline
        Taragorm
        schrieb am zuletzt editiert von
        #26

        @Bluefox I

        @Bluefox said in getting started with visualisations:

        @Taragorm No matter. With iobroker r vis && iobroker u vis it should work.
        Not Fast, but work.

        Just tried to execute (windows):
        2797695c-1307-4c36-a736-32d4f35862c9-image.png
        and cannot see any errors

        I tried this; I don't get any errors, but I don't get a visualisation in the toolbox either.

        That's why I trying to enable debug.

        1 Antwort Letzte Antwort
        0
        • BluefoxB Bluefox

          @Taragorm I do it like this.

          My folder structure is like this one:

          /opt/iobroker
                  iobroker.my-new-adapter
                  node_modules
                         ...
                         iobroker.js-controle
                         iobroker.xxxx
                         ...
          

          Then I install my new adapter by writing npm i iobroker.my-new-adapter in /opt/iobroker.
          As result the npm creates a sym-link to my developer folder:

          /opt/iobroker
                  iobroker.my-new-adapter
                  node_modules
                         ...
                         iobroker.js-controle
                         iobroker.my-new-adapter (symlink)
                         iobroker.xxxx
                         ...
          

          after that I develop my adapter as usual in /opt/iobroker/iobroker.my-new-adapter even as a git repo.

          after every change I write iobroker r vis && iobroker u vis This should work 100%.

          Additionally I can write iobroker visdebug my-new-adapter and if I see the output
          Disable cache I restart the iobroker (only for the first time).

          After that I can directly modify the file /opt/iobroker/iobroker-data/files/vis/widgets/my-new-adapter.html and after every browser refresh it will be loaded anew from disk. So you can fast see your changes.

          But, the changes in /opt/iobroker/iobroker-data/files/vis/widgets/my-new-adapter.html must be copied to /opt/iobroker/iobroker.my-new-adapter/widgets/ manually and you may not call iobroker u vis till you do that, else they will be overwritten

          T Offline
          T Offline
          Taragorm
          schrieb am zuletzt editiert von
          #27

          @Bluefox said in getting started with visualisations:

          @Taragorm I do it like this.

          My folder structure is like this one:

          /opt/iobroker
                  iobroker.my-new-adapter
                  node_modules
                         ...
                         iobroker.js-controle
                         iobroker.xxxx
                         ...
          

          Then I install my new adapter by writing npm i iobroker.my-new-adapter in /opt/iobroker.
          As result the npm creates a sym-link to my developer folder:

          /opt/iobroker
                  iobroker.my-new-adapter
                  node_modules
                         ...
                         iobroker.js-controle
                         iobroker.my-new-adapter (symlink)
                         iobroker.xxxx
                         ...
          

          after that I develop my adapter as usual in /opt/iobroker/iobroker.my-new-adapter even as a git repo.

          after every change I write iobroker r vis && iobroker u vis This should work 100%.

          Additionally I can write iobroker visdebug my-new-adapter and if I see the output
          Disable cache I restart the iobroker (only for the first time).

          After that I can directly modify the file /opt/iobroker/iobroker-data/files/vis/widgets/my-new-adapter.html and after every browser refresh it will be loaded anew from disk. So you can fast see your changes.

          But, the changes in /opt/iobroker/iobroker-data/files/vis/widgets/my-new-adapter.html must be copied to /opt/iobroker/iobroker.my-new-adapter/widgets/ manually and you may not call iobroker u vis till you do that, else they will be overwritten

          ...and I have also set my environment up like this.

          1 Antwort Letzte Antwort
          0
          • BluefoxB Offline
            BluefoxB Offline
            Bluefox
            schrieb am zuletzt editiert von
            #28

            Please set here the names without vis-
            1946c1e7-29c2-4a4a-b13d-2f7d13e26c22-image.png

            1 Antwort Letzte Antwort
            0
            • BluefoxB Offline
              BluefoxB Offline
              Bluefox
              schrieb am zuletzt editiert von
              #29

              And you may not change class.
              a29115fc-9bf9-47e9-b033-cba03ec1fd78-image.png

              1 Antwort Letzte Antwort
              0
              • T Offline
                T Offline
                Taragorm
                schrieb am zuletzt editiert von
                #30

                thanks, will do

                1 Antwort Letzte Antwort
                0
                • T Offline
                  T Offline
                  Taragorm
                  schrieb am zuletzt editiert von
                  #31

                  It's showing in the toolbox now - many thanks!

                  1 Antwort Letzte Antwort
                  0
                  • T Offline
                    T Offline
                    Taragorm
                    schrieb am zuletzt editiert von
                    #32

                    Much progress, but another small issue.

                    My visualisation shows values ok in the edit dialog.

                    In the normal view, it shows the "undefined" value... unless the value is used by a different widget.

                    This suggests I've done something wrong in binding, but as far as I can see, I've done pretty much what the template does.

                    Have I missed something out? It feels like whatever code that populates vis.states[] hasn't been invoked correctly. (i.e. the view seems to be unaware of the points I'm asking for).

                    1 Antwort Letzte Antwort
                    0
                    • T Offline
                      T Offline
                      Taragorm
                      schrieb am zuletzt editiert von
                      #33

                      ps: Changed the repo to: https://github.com/Taragorm/ioBroker.vistaragorm

                      BluefoxB 1 Antwort Letzte Antwort
                      0
                      • T Taragorm

                        ps: Changed the repo to: https://github.com/Taragorm/ioBroker.vistaragorm

                        BluefoxB Offline
                        BluefoxB Offline
                        Bluefox
                        schrieb am zuletzt editiert von Bluefox
                        #34

                        @Taragorm It can be, that I forgot to describe, that all ObjectID Variables Names must start with "oid..." or end with "...oid" or "...oidN" (N is any number from 0 to 99)

                        Please use following files, that work:
                        vistaragorm.js
                        vistaragorm.html

                        1 Antwort Letzte Antwort
                        0
                        • T Offline
                          T Offline
                          Taragorm
                          schrieb am zuletzt editiert von
                          #35

                          Ah, that would be it then - I may have missed it.

                          I assumed that the /id type in the attr declaration was what did it.

                          1 Antwort Letzte Antwort
                          0
                          • T Offline
                            T Offline
                            Taragorm
                            schrieb am zuletzt editiert von
                            #36

                            That works nicely, thanks.

                            Out of curiosity, is there any way to force subscription?

                            I have a case where I have mutiple values on a sensor, and I'd like to be able to just specify the sensor oid for the widget, and have the implementation figure out the values.

                            e.g. I have
                            foo.bah.x
                            foo.bah.y
                            foo.bah.z

                            .. I'd like to only have to supply an oid of foo.bah - the widget can add .x, .y etc as those are fixed.

                            or does supplying an oid = "foo.bah" create a subscription for changes of all children too?

                            BluefoxB 1 Antwort Letzte Antwort
                            0
                            • T Offline
                              T Offline
                              Taragorm
                              schrieb am zuletzt editiert von
                              #37

                              In case it's not obvious, I'd like a widget to be able to generate oids based on, or relative to, an oid in an attribute, and have the object correctly added to the widget/view so I can get data from it.

                              Surely there must be a way to do this?

                              BluefoxB 1 Antwort Letzte Antwort
                              0
                              • T Taragorm

                                In case it's not obvious, I'd like a widget to be able to generate oids based on, or relative to, an oid in an attribute, and have the object correctly added to the widget/view so I can get data from it.

                                Surely there must be a way to do this?

                                BluefoxB Offline
                                BluefoxB Offline
                                Bluefox
                                schrieb am zuletzt editiert von
                                #38

                                @Taragorm I must check it

                                1 Antwort Letzte Antwort
                                0
                                • T Offline
                                  T Offline
                                  Taragorm
                                  schrieb am zuletzt editiert von
                                  #39

                                  Appreciated

                                  1 Antwort Letzte Antwort
                                  0
                                  • T Taragorm

                                    That works nicely, thanks.

                                    Out of curiosity, is there any way to force subscription?

                                    I have a case where I have mutiple values on a sensor, and I'd like to be able to just specify the sensor oid for the widget, and have the implementation figure out the values.

                                    e.g. I have
                                    foo.bah.x
                                    foo.bah.y
                                    foo.bah.z

                                    .. I'd like to only have to supply an oid of foo.bah - the widget can add .x, .y etc as those are fixed.

                                    or does supplying an oid = "foo.bah" create a subscription for changes of all children too?

                                    BluefoxB Offline
                                    BluefoxB Offline
                                    Bluefox
                                    schrieb am zuletzt editiert von
                                    #40

                                    @Taragorm Now I understand, what you want.
                                    The solution is to provide all OIDs during configuration. You can see the example:

                                    • https://github.com/ioBroker/ioBroker.vis-hqwidgets/blob/master/widgets/hqwidgets.html#L61
                                    • https://github.com/ioBroker/ioBroker.vis-hqwidgets/blob/master/widgets/hqwidgets/js/hqwidgets.js#L3069

                                    If your first OID is changed, the defined function (in example vis.binds.hqwidgets.changedButtonId) will be called and you can define other fields there with desired OIDs.

                                    1 Antwort Letzte Antwort
                                    0
                                    • T Offline
                                      T Offline
                                      Taragorm
                                      schrieb am zuletzt editiert von
                                      #41

                                      Thanks- that solves the problem!

                                      1 Antwort Letzte Antwort
                                      1
                                      • G Offline
                                        G Offline
                                        goodDay14
                                        schrieb am zuletzt editiert von goodDay14
                                        #42

                                        That works nicely, thanks.
                                        Out of curiosity, is there any way to force subscription?
                                        I have a case where I have mutiple values on a sensor, and I'd like to be able to just specify auto clicker wordunscrambler jumblesolver

                                        the sensor oid for the widget, and have the implementation figure out the values.

                                        1 Antwort Letzte Antwort
                                        0
                                        • BluefoxB Bluefox

                                          @Taragorm Have you seen that? https://github.com/ioBroker/ioBroker/wiki/How-to-debug-vis-and-to-write-own-widget-set

                                          S Offline
                                          S Offline
                                          sonusfaber
                                          schrieb am zuletzt editiert von
                                          #43

                                          @Bluefox I do struggle with the following instruction:
                                          "replace index.html and edit.html replace files in /opt/iobroker/iobroker-data/files/vis/index.html and edit.html with files from /opt/iobroker/node_modules/iobroker.vis/www/index.html.original and edit.html.original. Change the file /opt/iobroker/iobroker-data/files/vis/cache.manifest. No matter what, just one symbol to trigger the browser to load files anew. The files must be smaller than 200k. If you have got wrong files, so they are definitly largen than 400k."

                                          I understood ..
                                          Replace the following two files /opt/iobroker/iobroker-data/files/vis/index.html & /opt/iobroker/iobroker-data/files/vis/edit.html with
                                          /opt/iobroker/node_modules/iobroker.vis/www/index.html.original and /opt/iobroker/node_modules/iobroker.vis/www/edit.html.original.

                                          in other words..
                                          cp /opt/iobroker/node_modules/iobroker.vis/www/index.html.original /opt/iobroker/iobroker-data/files/vis/index.html
                                          cp /opt/iobroker/node_modules/iobroker.vis/www/edit.html.original /opt/iobroker/iobroker-data/files/vis/edit.html

                                          Is this correct ?

                                          If yes, in my installation
                                          /opt/iobroker/node_modules/iobroker.vis/www/index.html.original and /opt/iobroker/node_modules/iobroker.vis/www/edit.html.original do not exist!

                                          1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          334

                                          Online

                                          32.4k

                                          Benutzer

                                          81.5k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe