Ankündigung

Einklappen
Keine Ankündigung bisher.

Raspberry Image Version 2.2 mit SmarthomeNG 1.5.1

Einklappen
Dieses Thema ist geschlossen.
X
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    Ich aktualisiere nur, hab leider keinnScript.
    Für Nicht-Raspi reicht wohl python pakete, via Github smarthome u -visu ziehen.

    Kommentar


      Hallo,
      jetzt hab ich alle Plugins wieder am laufen und scheitere am knxd...

      ich habe mittlerweile auf das neue Format umgestellt:
      /etc/knxd.ini:
      Code:
      #KNXD_OPTS="-e1.1.60 -E1.1.61:2 -i -u -b ipt:10.0.0.101 -c"
      #KNXD_OPTS="-e 1.1.150 -u /tmp/eib -b ipt:192.168.11.100"
      
      
      [A.tcp]
      server = knxd_tcp
      systemd-ignore = true
      [A.unix]
      path = /tmp/eib
      server = knxd_unix
      systemd-ignore = false
      [B.ipt]
      driver = ipt
      filters = C.pace
      ip-address = 192.168.11.100
      [C.pace]
      delay = 50
      filter = pace
      [main]
      addr = 1.1.150
      client-addrs=1.1.151:2
      cache = D.cache
      connections = A.tcp,A.unix,B.ipt
      systemd = systemd
      background = true
      /etc/knxd.conf:
      Code:
      KNXD_OPTS=/etc/knxd.ini
      Berechtigungen sind auf 777

      Code:
      (#)~:$ systemctl status knxd.service                  22:05:03
      ● knxd.service - KNX Daemon
         Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
         Active: activating (auto-restart) (Result: signal) since Fr 2017-06-09 22:05:                                                               19 CEST; 6s ago
        Process: 3796 ExecStart=/usr/bin/knxd $KNXD_OPTS (code=killed, signal=ABRT)
       Main PID: 3796 (code=killed, signal=ABRT)
      
      Jun 09 22:05:19 raspberrypi systemd[1]: Failed to start KNX Daemon.
      Jun 09 22:05:19 raspberrypi systemd[1]: Unit knxd.service entered failed state.
      Hint: Some lines were ellipsized, use -l to show in full.
      [Exit 3 ]
      (#)~:$                                                                  22:05:26
      Im Debug sehe ich dass er auf den local Host geht?

      2017-06-09 22:07:12 DEBUG connection Connections KNX: connected to 127.0.0.1:6720 -- connection.py:connect:393
      2017-06-09 22:07:12 DEBUG __init__ Connections KNX[default]: enable group monitor -- __init__.py:handle_connect:145

      was mache ich falsch?
      Den KNXD String habe ich von einer Laufenden alten Installation übernommen und hoffentlich richtig angepasst...

      in der Wiki habe ich das gefunden:
      Zuletzt geändert von boardman; 09.06.2017, 21:18.

      Kommentar


        Code:
        (#)~:$ sudo systemctl stop knxd.socket                                                      22:13:23
        (#)~:$ sudo systemctl stop knxd.service                                                     22:13:31
        (#)~:$ sudo systemctl enable knxd.service                                                   22:13:38
        Synchronizing state for knxd.service with sysvinit using update-rc.d...
        Executing /usr/sbin/update-rc.d knxd defaults
        Executing /usr/sbin/update-rc.d knxd enable
        (#)~:$ sudo systemctl enable knxd.socket                                                    22:13:48
        (#)~:$ sudo systemctl start knxd.socket                                                     22:14:03
        (#)~:$ sudo systemctl start knxd.service                                                    22:14:10
        Job for knxd.service failed. See 'systemctl status knxd.service' and 'journalctl -xn' for details.
        [Exit 1 ]
        (#)~:$ ^C                                                                                   22:14:16
        [Exit 130 SIGINT]
        (#)~:$ journalctl -xn                                                                       22:14:28
        -- Logs begin at Fr 2017-06-09 21:41:38 CEST, end at Fr 2017-06-09 22:14:26 CEST. --
        Jun 09 22:14:16 raspberrypi sudo[4310]: pam_unix(sudo:session): session closed for user root
        Jun 09 22:14:18 raspberrypi dhcpcd[1061]: eth0: fe80::3a10:d5ff:feab:5336 router available
        Jun 09 22:14:23 raspberrypi dhcpcd[1061]: eth0: fe80::3a10:d5ff:feab:5336 router available
        Jun 09 22:14:26 raspberrypi systemd[1]: knxd.service holdoff time over, scheduling restart.
        Jun 09 22:14:26 raspberrypi systemd[1]: Stopping KNX Daemon...
        -- Subject: Unit knxd.service has begun shutting down
        -- Defined-By: systemd
        -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
        --
        -- Unit knxd.service has begun shutting down.
        Jun 09 22:14:26 raspberrypi systemd[1]: Starting KNX Daemon...
        -- Subject: Unit knxd.service has begun with start-up
        -- Defined-By: systemd
        -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
        --
        -- Unit knxd.service has begun starting up.
        Jun 09 22:14:26 raspberrypi knxd[4357]: E00000000: [12:A.tcp] invalid transition: >up => down
        Jun 09 22:14:26 raspberrypi systemd[1]: knxd.service: main process exited, code=killed, status=6/ABR
        Jun 09 22:14:26 raspberrypi systemd[1]: Failed to start KNX Daemon.
        -- Subject: Unit knxd.service has failed
        -- Defined-By: systemd
        -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
        --
        -- Unit knxd.service has failed.
        --
        -- The result is failed.
        was bedeutet invalid transition: >up => down

        Kommentar


          Puh, Fehler gefunden..

          habe wieder auf knxd.conf umgestellt mit diesem angepassten String:
          KNXD_OPTS="-e 1.1.150 -E 1.1.151:2 -u/tmp/eib -b ipt:192.168.11.100"

          anscheinend stört das "-c" das ja in der knxd.yaml mit drin ist...

          Kommentar


            Sorry, noch ne Frage als Linux noob (-: Ich versuche ja möglichst viel über Windows zu machen...
            da ich nun ein frisches PI3 Image am laufen habe will ich mir die Sicherung gleich auf nen 2ten USB Stick packen um beim Stick crash einfach umzustecken...
            Der zweite ist natürlich nen tick kleiner, so dass ich mit dem disk Imager nicht kopieren kann... nun habe ich hier eine Anleitung gefunden:

            http://www.netzmafia.de/skripten/har...rkleinern.html

            was mich nun wundert, das SH image hat nicht Stickgröße, ggf habe ich vergessen die Initialisierung mit raspi-config zu machen... aber das kommt mir ja jetzt zugute...

            (#)~:$ lsblk 09:39:37
            NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
            sda 8:0 1 7,5G 0 disk
            ├─sda1 8:1 1 63M 0 part /boot
            └─sda2 8:2 1 2,1G 0 part /

            wenn ich nun einfach mit sudo dd if=/dev/sda2 conv=sync,noerror bs=512 count=15000000 of=/dev/sdb1 gemäß anleitung die Kopie mache, dann verliere ich doch aber Partition sda1???

            Wie macht ihr das (habe nur 2 Raspi und ein NAS unter Linux, könnte aber auch aufs NAS sichern...)

            Uwe


            Kommentar


              Hallo zusammen,
              ich habe das Image installiert und habe das Problem, dass ich sowie ich in der plugin.conf andere Services als den Backend Server aktiviere, dieser nicht mehr erreichbar ist. SmartVisu (auch mit der Version 2.8) hat einen Websocket Error. KNXD läuft aber ohne Problem, ich kann auf KNX zugreifen. Was ist in meiner plugin.conf falsch? Habt Ihr eine Idee?

              plugin.conf
              Code:
              [BackendServer]
                  class_name: BackendServer
                  class_path: plugins.backend
              #    user: admin
              #    password: very_secure_password
              [knx]
                  class_name = KNX
                  class_path = plugins.knx
                  host = 127.0.0.1
                  port = 6720
              #   send_time = 600 # update date/time every 600 seconds, default none
              #   time_ga = 1/1/1 # default none
              #   date_ga = 1/1/2 # default none
              # [ow]
              #    class_name = OneWire
              #    class_path = plugins.onewire
              [visu]
                   class_name = WebSocket
                   class_path = plugins.visu_websocket
              [smartvisu]
                   class_name = SmartVisu
                   class_path = plugins.visu_smartvisu
                   smartvisu_dir = /var/www/html/smartvisu 
              [cli]
                   class_name = CLI
                   class_path = plugins.cli
                   ip = 192.168.178.30
               #   update = True
              [sql]
                   class_name = SQL
                   class_path = plugins.sqlite
              Außerdem bekomme ich dann einen Fehler im Smarthome
              /smarthome.log
              Code:
              2017-06-10  11:06:24 INFO     Main         Number of Threads: 7
              2017-06-10  11:06:24 INFO     Main         SmartHomeNG stopped
              2017-06-10  09:06:40 INFO     Main         Loading '/usr/local/smarthome/etc/smarthome.yaml' to 'OrderedDict'
              2017-06-10  11:06:40 WARNING  Main         --------------------   Init SmartHomeNG 1.4.ae08cfc.dev   --------------------
              2017-06-10  11:06:40 INFO     Main         Init Scheduler
              2017-06-10  11:06:40 INFO     Main         Init Plugins
              2017-06-10  11:06:40 ERROR    Main         Unhandled exception: 'class_name'
              <class 'KeyError'>
                File "/usr/local/smarthome/bin/smarthome.py", line 653, in <module>
                  sh.start()
                File "/usr/local/smarthome/bin/smarthome.py", line 315, in start
                  self._plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basename)
                File "/usr/local/smarthome/lib/plugin.py", line 65, in __init__
                  classname = _conf[plugin][KEY_CLASS_NAME]

              Kommentar


                Hm. Das Image läuft auf develop? Wußte ich noch gar nicht. Hast Du SmartHomeNG mal im Debugmodus gestartet?

                Sind die Rechte auf die Plugins gegeben? Sind Deine Plugins dann auch auf develop oder noch auf Master?

                Kommentar


                  Danke für die schnelle Antwort. Ich habe noch nichts an der Konfiguration des Image verändert, davon stand auch nichts in der Anleitung. Die Plugins haben alle Rechte. Wie sehe ich ob sie auf Develop laufen? Das KNXD Plugin läuft ja auch problemlos. Wenn ich SmartHomeNG im Debugmodus start bleibt es hängen. Hier das Log:
                  Code:
                  smarthome@raspberrypi:~$ sudo service smarthome stop
                  smarthome@raspberrypi:~$ python3 /usr/local/smarthome/bin/smarthome.py -d
                  2017-06-10 10:56:18 INFO     shyaml       Main         Loading '/usr/local/smarthome/etc/smarthome.yaml' to 'OrderedDict' -- shyaml.py:yaml_load:46
                  2017-06-10 12:56:18 WARNING  smarthome    Main         --------------------   Init SmartHomeNG 1.4.ae08cfc.dev   -------------------- -- smarthome.py:__init__:229
                  2017-06-10 12:56:18 DEBUG    smarthome    Main         Python 3.5.2 -- smarthome.py:__init__:230
                  2017-06-10 12:56:18 DEBUG    smarthome    Main         DB-APIs sqlite -- smarthome.py:__init__:231
                  2017-06-10 12:56:18 INFO     scheduler    Main         Init Scheduler -- scheduler.py:__init__:89
                  2017-06-10 12:56:18 DEBUG    scheduler    Scheduler    creating 5 workers -- scheduler.py:run:96
                  2017-06-10 12:56:18 INFO     smarthome    Main         Init Plugins -- smarthome.py:start:314
                  2017-06-10 12:56:18 DEBUG    plugin       Main         Plugin: BackendServer -- plugin.py:__init__:58
                  2017-06-10 12:56:18 ERROR    smarthome    Main         Unhandled exception: 'class_name'
                  <class 'KeyError'>
                    File "/usr/local/smarthome/bin/smarthome.py", line 653, in <module>
                      sh.start()
                    File "/usr/local/smarthome/bin/smarthome.py", line 315, in start
                      self._plugins = lib.plugin.Plugins(self, configfile=self._plugin_conf_basename)
                    File "/usr/local/smarthome/lib/plugin.py", line 65, in __init__
                      classname = _conf[plugin][KEY_CLASS_NAME]
                   -- smarthome.py:_excepthook:542
                  ^C2017-06-10 12:59:08 INFO     smarthome    Main         Number of Threads: 7 -- smarthome.py:stop:379
                  2017-06-10 12:59:08 INFO     smarthome    Main         SmartHomeNG stopped -- smarthome.py:stop:403
                  Exception ignored in: <module 'threading' from '/usr/local/lib/python3.5/threading.py'>
                  Traceback (most recent call last):
                    File "/usr/local/lib/python3.5/threading.py", line 1288, in _shutdown
                      t.join()
                    File "/usr/local/lib/python3.5/threading.py", line 1054, in join
                      self._wait_for_tstate_lock()
                    File "/usr/local/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
                      elif lock.acquire(block, timeout):
                    File "/usr/local/smarthome/bin/smarthome.py", line 407, in stop
                      exit()
                    File "/usr/local/lib/python3.5/_sitebuiltins.py", line 26, in __call__
                      raise SystemExit(code)
                  SystemExit: None
                  smarthome@raspberrypi:~$

                  Kommentar


                    Interessante Kombination: Du nutzt smarthome.yaml, aber plugin.conf?

                    Hast Du mal die Plugins einzeln aktiviert und shng neu gestartet? Damit kannst Du eingrenzen bei welchem Plufin der Fehler auftritt.

                    Du läufst übrigens auf Develop, da die aktuell releaste Version von smarthomeNG erst v1.2 ist.

                    Viele Grüße
                    Martin

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

                    Kommentar


                      Onkelandy Ich finde es nicht besonders glücklich, das Anwender die auf das Image zurückgreifen (auch weil sie in der Materie nicht so tief drin stecken), in der Develop Version von SmartHomeNG landen, die qua Definition instabil sein kann.
                      Viele Grüße
                      Martin

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

                      Kommentar


                        Da die Plugin.conf noch im alten Stil ist, sollte da IMHO auch stehen
                        Code:
                        [BackendServer]
                          class_name = BackendServer
                          class_path = plugins.backend
                        also keine Doppelpunkte wie bei config.yaml

                        Du hast wohl ein wenig der beiden Konfigurationsformate gemischt ...

                        Kommentar


                          Ich sags euch, extrem mühsam die ganzen Neuerungen zu verdauen wenn man sich mit dem Thema nur 1 bis 2 mal im Jahr auseinader setzt... aber ein erster Erfolg bei mir (-: ich habe die Anbindung zum SolarEdge Wechselrichter nun langsam am laufen... dann kann ich auch mal was zur Comunity zurückgeben... erste Kommunikation ist erfolgreich... wenn auch die Installation von pymodbus total merkwürdig war - lief immer irgendwann auf fehler, aber es scheint alles notwendige installiert worden zu sein... vielleicht kann man das noch mit ins Image nehmen?

                          Kommentar


                            @bmx,
                            Du hast Recht, das war die Lösung (copy & paste Fehler...), ich kann den BackendSerrver jetzt erreichen. Es läuft jetzt merkwürdigerweise auch SmartVisu, der Websocket Fehler ist weg. Danke nochmal!

                            Kommentar


                              Mein Problem des abtürzenden smarthome.py hat sich gelöst. Im Grunde dadurch, dass ich Min/Max Werte nicht mehr aus RRD ziehe, sondern aus der Sqlite. Weiterhin habe ich auch alle smartvisu Graphen auf sqlite umgestellt.
                              Derzeit zwischen Kistenauspacken und Garten anlegen.
                              Baublog im Profil.

                              Kommentar


                                Mir sind jetzt noch ein paar Probleme mit dem Image aufgefallen. Die installierte SmartVISU Version 2.9 (default) läuft bei mir noch nicht stabil, ich habe zu Version 2.8 gewechselt. Es kommt dann aber die Fehlermeldung:
                                Code:
                                WebSocket: protocol mismatch. SmartHomeNG protocol version=3, visu protocol version=4
                                Das konnte ich durch Änderung der plugin.yaml lösen (wsproto = 4). Außerdem läuft das sqlite plugin nicht, es muß auf "class_path: plugins.sqlite_visu2_8" geändert werden.

                                Mit dieser plugin.yaml läuft jetzt alles problemlos:
                                Code:
                                BackendServer:
                                    class_name: BackendServer
                                    class_path: plugins.backend
                                    user: admin
                                    hashed_password: ...geheim....
                                knx:
                                    class_name: KNX
                                    class_path: plugins.knx
                                    host: 127.0.0.1
                                    port: 6720
                                    # send_time = 600 # update date/time every 600 seconds, default none
                                    # time_ga = 1/1/1 # default none
                                    # date_ga = 1/1/2 # default none
                                    # [ow]
                                    # class_name = OneWire
                                    # class_path = plugins.onewire
                                websocket:
                                    class_name: WebSocket
                                    class_path: plugins.visu_websocket
                                    # ip = 0.0.0.0
                                    # port = 2424
                                    # tls = no
                                    wsproto: 4
                                    acl: rw
                                smartvisu:
                                    class_name: SmartVisu
                                    class_path: plugins.visu_smartvisu
                                    smartvisu_dir: /var/www/html/smartvisu
                                cli:
                                    class_name: CLI
                                    class_path: plugins.cli
                                    ip: 192.168.178.30
                                    # update = True
                                sql:
                                    class_name: SQL
                                    # class_path: plugins.sqlite
                                    class_path: plugins.sqlite_visu2_8
                                Zuletzt geändert von bmx; 11.06.2017, 16:06.

                                Kommentar

                                Lädt...
                                X