Ankündigung

Einklappen
Keine Ankündigung bisher.

Anfängerfrage SmartHomeNG in SmartVISU integrieren

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Anfängerfrage SmartHomeNG in SmartVISU integrieren

    Die Frage kling komisch, aber mir ist unklar, wie ich das ganze verbinden soll. Die ganzen Plugins sind konfiguriert, die Räume habe ich in den items von SmartHomeNG auch mit Symbolen versehen, aber wie kriege ich das ganze in die Visu? Da steht ja was von automatischer Generierung. Ich verstehe die Hilfe an der Stelle https://www.smarthomeng.de/user/visu...nerierung.html einfach nicht.

    Ich habe in der SmartVISU die Oberfläche Smarthoime ausgewählt, die ja auch erst mal leer ist. Die Frage ist aber, wie kriege ich die Sachen jetzt automatisch generiert aus SmartHomeNG?

    So sieht beispielsweise mein erstes item in SmartHomeNG aus:

    Code:
    EG:
        Buero:
            name = Buero
            sv_page = room
            sv_img = scene_office.svg
            Licht:
                Decke:
                    schalten:
                        type: bool
                        knx_dpt: 1
                        knx_send: 0/0/5
                        knx_listen: 0/2/5
                        visu_acl: rw
                        sv_widget: "{{ device.dimmer('item', 'item.name', 'item', 'item.level') }}"
                    dimmen:
                        type: num
                        knx_dpt: 5
                        knx_send: 0/4/1
                        knx_listen: 0/4/1
                        visu_acl: rw
    Achso ich Nutzte die SmartVISU 2.9

    #2
    Meine (ganz persönliche) Meinung - versuche es erstmal 'von Hand', bevor Du die Autogenerierung nutzt. Dadurch verstehst Du besser, wie die Visu eigentlich arbeitet.

    Z.B. könntest Du konkret mal einen eigenen Ordner unter pages/ anlegen (am Anfang hilft es, einfach eine bestehende Page zu kopieren) und dort Dein EG.Buero.Licht.Decke.dimmen mit einem basic.slider verbinden, und .schalten mit einem basic.flip.

    Entsprechende Beispiele findest Du auf den mitgelieferten Demoseiten, und die Doku ist ab der 2.9 auch schon enthalten (mal in der Visu über die Zahnräder oben auf die Config-Seite schalten, da findest Du alles).

    Danach dann halt Schritt für Schritt ausbauen ...

    /tom

    Kommentar


      #3
      Für die Autogenerierung musst Du das Plugin visu_smartvisu konfiguriert haben (es muss auf das richtige Verzeichnis zeigen, in dem die smartVISU installiert ist. Außerdem muss der User unter dem SmartHomeNG läuft Schreibrechte auf die Verzeichnisse der smartVISU haben. Dann sollte bei Deinem Beispiel eine Seite in smartVISU entstehen.

      Was sagt denn das Log von SmartHomeNG?
      Viele Grüße
      Martin

      There is no cloud. It's only someone else's computer.

      Kommentar


        #4
        Das Log ist noch lang, weil wenig Dinge richtig funktionieren. Licht und Rolladen geht aber schon mal, hat doch geholfen ein wenig zu üben. Einzig allein die Heizung ist echt eine Herausforderung. Die ganzen KNX-Adressen in SmartHomeNG einzustellen ..... und das am Ende auch noch alles wie gewünscht geht ....

        Kommentar


          #5
          Würde mich auch gerne an der Stelle miteinklinken.
          Versuche gerade smartvisu mit der Autogenerierung zum laufen zu bekommen. Sowie ich das verstanden habe sind dabei folgende Schritte zu beachten:

          1) In der plugin.yaml den Pfad zur Visu angeben. Schaut bei mir so aus:

          Code:
          smartvisu:
              class_name: SmartVisu
              class_path: plugins.visu_smartvisu
              # '"neue" Linux Versionen (z.B. Debian > 8.x, Ubuntu > 14.x)'
              smartvisu_dir: /var/www/html/smartVISU
          
              # nur \"alte\" Linux-Variationen
              # smartvisu_dir: /var/www/smartVISU
              # generate_pages: True
              # handle_widgets: True
              # overwrite_templates: Yes
              # visu_style: blk
          2. Eine Item Datei anlegen. Schaut bei mir so aus:
          Code:
          first:
          menu_divider:
              sv_page: seperator
              name: Private area of the house
          
          second:
          
              sleeping:
                  name: Sleeping Room
                  sv_page: room
                  sv_img: scene_sleeping.png
                  sv_nav_aside: "{{ basic.float('sleep_temp_id', 'second.sleeping.temp', '°') }}"
          
                  light:
                      name: Light
                      type: bool
                      visu_acl: rw
                      sv_widget: "&    ## 123;{ device.dimmer('second.sleeping.light', 'Light', 'second.sleeping.light', 'second.sleeping.light.level') }}"
                      knx_dpt: 1
                      knx_listen: 0/2/15
                      knx_send: 0/0/28
                      visu_acl: rw
          3. Beim Start sollte unter /var/www/html/smartVISU/pages/ ein Ordner Namens smarthome generiert werden, indem sich dann die automatisch generierten Seiten befinden.
          4. Diesen Ordner in der smartvisu Konfiguration auswählen und fertig.

          Könnt ihr mir sagen, ob ersten diese vier Schritte richtig sind, und falls ja, was die Ursache sein könnte, warum bei mir kein Ordner "smarthome" erstellt wird?

          Besten Dank voraus.

          Kommentar


            #6
            Zitat von Simml Beitrag anzeigen
            Könnt ihr mir sagen, ob ersten diese vier Schritte richtig sind, und falls ja, was die Ursache sein könnte, warum bei mir kein Ordner "smarthome" erstellt wird?
            Ehrlich gesagt, habe ich nun doch alles per Hand gemacht. Es war auch weniger aufwändig als gedacht, weil man viel mit Copy & Paste arbeiten kann. Am Ende sind ja die Räume doch alle ähnlich und es ändern sich nur die Items. Das aufwendigste ist, glaube ich, sich die richtigen Icons rauszusuchen... ;-)

            Kommentar


              #7
              JA vielleicht mache ich es auch wieder von Hand.

              Wenn ich sh.log ausführe, bekomme ich folgende Meldung:

              Code:
              2018-10-05 05:14:16 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 05:14:16 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 05:14:16 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 05:48:39 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 05:48:39 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 05:48:39 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 11:26:03 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 11:26:03 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 11:26:03 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 15:23:15 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 15:23:15 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 15:23:15 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 15:47:30 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 15:47:30 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 15:47:30 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 15:49:46 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 15:49:46 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 15:49:46 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 15:53:49 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 15:53:49 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 15:53:49 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 16:00:40 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 16:00:40 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 16:00:40 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 16:03:15 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 16:03:15 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 16:03:15 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 16:16:01 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 16:16:01 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 16:16:01 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 16:20:46 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 16:20:46 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 16:20:46 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 16:29:55 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 16:29:55 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 16:29:55 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 18:20:08 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 18:20:08 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 18:20:08 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 18:31:00 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 18:31:00 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 18:31:00 ERROR __main__ Unhandled exception: 'SmartHome' object has no attribute '_lon'
              <class 'AttributeError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1149, in <module>
              sh = SmartHome(extern_conf_dir=extern_conf_dir)
              File "/usr/local/smarthome/bin/smarthome.py", line 309, in __init__
              self.sun = lib.orb.Orb('sun', self._lon, self._lat, self._elev)
              
              2018-10-05 20:44:20 WARNING __main__ -------------------- Init Smar tHomeNG 1.5.1.master (cc1288de) --------------------
              2018-10-05 20:44:20 WARNING __main__ Running in Python interpreter 'v 3.5.3 final' on linux platform
              2018-10-05 20:44:25 ERROR __main__ Unhandled exception: invalid lit eral for int() with base 10: 'ng values are not allowed here\n in "<unicode str ing>", line 25, column 15:\n send_time: 600 # update date/time every 6 . .. \n ^ (line: 25'
              <class 'ValueError'>
              File "/usr/local/smarthome/bin/smarthome.py", line 1150, in <module>
              sh.start()
              File "/usr/local/smarthome/bin/smarthome.py", line 474, in start
              self.plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basenam e)
              File "/usr/local/smarthome/lib/plugin.py", line 104, in __init__
              _conf = lib.config.parse_basename(configfile, configtype='plugin')
              File "/usr/local/smarthome/lib/config.py", line 63, in parse_basename
              config = parse(basename+YAML_FILE)
              File "/usr/local/smarthome/lib/config.py", line 116, in parse
              return parse_yaml(filename, config, addfilenames)
              File "/usr/local/smarthome/lib/config.py", line 297, in parse_yaml
              items = shyaml.yaml_load(filename, ordered=True)
              File "/usr/local/smarthome/lib/shyaml.py", line 126, in yaml_load
              line = convert_linenumber(line, 2)
              File "/usr/local/smarthome/lib/shyaml.py", line 79, in convert_linenumber
              linenew = str(int((int(lineold)+1)/2))

              Kommentar


                #8
                Das sieht aus, als hättest Du keine gültige smarthome.yaml Datei, in der lon definiert wird.
                Viele Grüße
                Martin

                There is no cloud. It's only someone else's computer.

                Kommentar

                Lädt...
                X