Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - smarthome.py keine Reaktion

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

    - √ - smarthome.py keine Reaktion

    Hallo,

    ich habe folgendes Problem:

    smarthome.py läuft:

    tcp 0 0 0.0.0.0:6720 0.0.0.0:* LISTEN 16878/eibd
    tcp 0 0 0.0.0.0:2727 0.0.0.0:* LISTEN 21310/python3
    tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2098/smbd

    Hier die Debug Ausgabe beim Start:
    2014-02-20 16:09:50,644 INFO Main Start SmartHome.py 1.0 -- smarthome.py:__init__:231
    2014-02-20 16:09:50,649 DEBUG Main Python 3.2.3 -- smarthome.py:__init__:232
    2014-02-20 16:09:50,653 WARNING Main No latitude/longitude specified => you could not use the sun and moon object. -- smarthome.py:__init__:248
    2014-02-20 16:09:50,660 INFO Main Init Scheduler -- scheduler.py:__init__:86
    2014-02-20 16:09:50,665 INFO Main Init Plugins -- smarthome.py:start:274
    2014-02-20 16:09:50,673 DEBUG Main Plugin: nw -- plugin.py:__init__:43
    2014-02-20 16:09:50,676 DEBUG Scheduler creating 5 workers -- scheduler.py:run:93
    2014-02-20 16:09:50,780 DEBUG Main Adding listener on: tcp:0.0.0.0:2727 -- __init__.py:add_listener:154
    2014-02-20 16:09:50,866 DEBUG Main TCPDispatcher: binding to 0.0.0.0:2727 (TCP) -- connection.py:connect:160
    2014-02-20 16:09:50,870 INFO Main Init Items -- smarthome.py:start:280
    2014-02-20 16:09:50,918 DEBUG Main Item EG.Kueche: no type specified. -- item.py:__init__:242
    2014-02-20 16:09:50,922 DEBUG Main Item EG: no type specified. -- item.py:__init__:242
    2014-02-20 16:09:50,954 DEBUG Main Item env.core: no type specified. -- item.py:__init__:242
    2014-02-20 16:09:50,991 DEBUG Main Item env.location: no type specified. -- item.py:__init__:242
    2014-02-20 16:09:51,009 DEBUG Main Item env.system: no type specified. -- item.py:__init__:242
    2014-02-20 16:09:51,013 DEBUG Main Item env: no type specified. -- item.py:__init__:242
    2014-02-20 16:09:51,018 INFO Main Start Plugins -- plugin.py:start:65
    2014-02-20 16:09:51,023 INFO Main Start Logics -- logic.py:__init__:33
    2014-02-20 16:09:51,026 DEBUG Main Reading Logics from /opt/smarthome/smarthome-1.0/lib/env/logic_conf -- logic.py:_read_logics:64
    2014-02-20 16:09:51,039 DEBUG Main Reading Logics from /opt/smarthome/smarthome-1.0/etc/logic.conf -- logic.py:_read_logics:64
    2014-02-20 16:09:51,045 DEBUG Main Logic: env_init -- logic.py:__init__:44
    2014-02-20 16:09:51,085 DEBUG Main Logic: env_stat -- logic.py:__init__:44
    2014-02-20 16:09:51,098 DEBUG Main env_stat next time: 2014-02-20 16:10:03+01:00 -- scheduler.py:_next_time:289
    2014-02-20 16:09:51,102 DEBUG Main Logic: env_loc -- logic.py:__init__:44
    2014-02-20 16:09:56,311 DEBUG env_init Item env.core.version = 1.0 via Logic None None -- item.py:__update:363
    2014-02-20 16:09:56,369 DEBUG env_init Item env.core.start = 2014-02-20 16:09:56.365963+01:00 via Logic None None -- item.py:__update:363
    2014-02-20 16:09:56,372 DEBUG sh.gc Garbage collector: collected 0 objects. -- smarthome.py:_garbage_collection:498
    2014-02-20 16:09:56,397 DEBUG env_init Item env.system.name = fileserver via Logic None None -- item.py:__update:363
    2014-02-20 16:09:56,423 DEBUG env_init Item env.system.start = 2014-02-17 15:13:02.420170+01:00 via Logic None None -- item.py:__update:363
    2014-02-20 16:09:56,543 DEBUG sh.gc Object references: 7766 -- smarthome.py:_maintenance:490
    2014-02-20 16:09:56,883 DEBUG Scheduler sh.gc next time: 2014-02-21 02:04:00+01:00 -- scheduler.py:_next_time:289
    2014-02-20 16:09:56,889 WARNING Scheduler No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:403
    2014-02-20 16:09:56,896 WARNING Scheduler No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:403
    2014-02-20 16:09:56,902 WARNING Scheduler No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:403
    2014-02-20 16:09:56,909 WARNING Scheduler No latitude/longitude specified. You could not use sunrise/sunset as crontab entry. -- scheduler.py:_sun:403
    2014-02-20 16:09:56,916 DEBUG Scheduler env_loc next time: 2014-02-20 16:39:56+01:00 -- scheduler.py:_next_time:289
    2014-02-20 16:10:03,495 DEBUG env_stat Item env.core.threads = 7 via Logic None None -- item.py:__update:363
    2014-02-20 16:10:03,505 DEBUG env_stat Item env.core.memory = 11165696 via Logic None None -- item.py:__update:363
    2014-02-20 16:10:03,513 DEBUG env_stat Item env.system.load = 0.13 via Logic None None -- item.py:__update:363
    2014-02-20 16:10:03,962 DEBUG Scheduler env_stat next time: 2014-02-20 16:15:03+01:00 -- scheduler.py:_next_time:289
    ^C2014-02-20 16:10:15,812 INFO Main Number of Threads: 7 -- smarthome.py:stop:348

    Folgendes Item habe ich in items/smartvisu.conf definiert:
    [EG]
    [[Kueche]]
    [[[Deckenspots]]]
    type = bool
    visu_acl = rw
    knx_listen = 10/0/1
    knx_send = 4/0/1

    In meiner smartVISU page habe ich genau einen einzigen Button defniert der auch angezeigt wird:
    {{ basic.button('Deckenspots','EG.Raum00.Deckenspots' ,' Deckenspots','delete','0','mini') }}

    Der Knopf ist sichtbar aber beim klicken tut sich im smarthome.log gar nichts.

    Ausserdem sagt mir die Oberfläche:
    Could not connect to smarthome.py server!
    Websocket error undefined.

    Allerdings scheint der Request in smarthome.py anzukommen, da beim Browser-Zugriff folgende Fehler im Log erscheinen:
    2014-02-20 16:16:38,760 DEBUG Main TCPDispatcher: incoming connection from 192.168.0.111:55994 to 0.0.0.0:2727 -- connection.py:accept:187
    2014-02-20 16:16:39,146 INFO Main Ignoring input GET / HTTP/1.1. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,151 DEBUG Main TCPHandler: closing socket 192.168.0.111:55994 -- connection.py:close:302
    2014-02-20 16:16:39,155 INFO Main Ignoring input Upgrade: websocket. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,159 INFO Main Ignoring input Connection: Upgrade. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,163 INFO Main Ignoring input Host: 192.168.0.87:2727. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,167 INFO Main Ignoring input Origin: http://fileserver.huckmuc.lan. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,172 INFO Main Ignoring input Pragma: no-cache. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,176 INFO Main Ignoring input Cache-Control: no-cache. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,180 INFO Main Ignoring input Sec-WebSocket-Key: y06Hh5RSmiHoVw7Zm7KDdg==. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,184 INFO Main Ignoring input Sec-WebSocket-Version: 13. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,188 INFO Main Ignoring input Sec-WebSocket-Extensions: x-webkit-deflate-frame. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,193 INFO Main Ignoring input User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36. Format not recognized. -- __init__.pyarse_input:183
    2014-02-20 16:16:39,197 INFO Main Ignoring input . Format not recognized. -- __init__.pyarse_input:183

    Kann mir jemand einen Tip geben ?

    Danke vorab.
    sigpic
    Christian Huck
    Tel.: 089 / 122 80 995
    Email: mail@homeintelligence.de
    Web: www.homeintelligence.de

    #2
    Hi,

    die Visu kommuniziert nicht mit dem Netzwerkplugin, sondern mit dem Visu-Plugin.
    Das muss eingerichtet und verwendet werden. In der Regel läuft es auf Port 2424.

    Bis bald

    Marcus

    Kommentar


      #3
      ahh ok.

      Vom VISU-Plugin ist allerdings nirgendwo die Rede.

      Da existiert lediglich die Beschreibung zur PHP-Webapp die in einen Apache/Ngnix mit PHP unterstützung gelegt wird und fertig.

      Wo soll denn dieses Plugin sein ?

      Danke vorab.
      sigpic
      Christian Huck
      Tel.: 089 / 122 80 995
      Email: mail@homeintelligence.de
      Web: www.homeintelligence.de

      Kommentar


        #4
        Doku ist immer ein guter Startpunkt...

        Plugins ? SmartHome.py 1.0 documentation

        Kommentar


          #5
          Also das hat schon Mal geholfen. Sorry war mir nicht klar.

          VIELEN DANK:

          Ich sehe jetzt die Schaltvorgänge beim Klick auf den Button:

          2014-02-20 16:41:47,853 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"proto","ver":3}' -- __init__.py:json_parse:273
          2014-02-20 16:41:47,863 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"monitor","items":["EG.Kueche.Deckenspots"]}' -- __init__.py:json_parse:273
          2014-02-20 16:41:48,289 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"item","id":"EG.Kueche.Deckenspots","val": "0"}' -- __init__.py:json_parse:273
          2014-02-20 16:42:14,097 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"item","id":"EG.Kueche.Deckenspots","val": "0"}' -- __init__.py:json_parse:273
          2014-02-20 16:42:14,991 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"item","id":"EG.Kueche.Deckenspots","val": "0"}' -- __init__.py:json_parse:273

          Leider tritt noch ein anderer Fehler mit Serverity ERROR auf den ich nicht deuten kann:

          2014-02-20 16:41:47,406 ERROR Main Connection polling failed: release unlocked lock -- smarthome.py:start:344
          Traceback (most recent call last):
          File "./smarthome.py", line 342, in start
          self.connections.poll()
          File "/opt/smarthome/smarthome-1.0/lib/connection.py", line 103, in poll
          server.handle_connection()
          File "/opt/smarthome/smarthome-1.0/plugins/visu/__init__.py", line 126, in handle_connection
          self._lock.release()
          _thread.error: release unlocked lock
          2014-02-20 16:41:47,853 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"proto","ver":3}' -- __init__.py:json_parse:273
          2014-02-20 16:41:47,863 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"monitor","items":["EG.Kueche.Deckenspots"]}' -- __init__.py:json_parse:273
          2014-02-20 16:41:48,289 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"item","id":"EG.Kueche.Deckenspots","val": "0"}' -- __init__.py:json_parse:273
          2014-02-20 16:42:14,097 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"item","id":"EG.Kueche.Deckenspots","val": "0"}' -- __init__.py:json_parse:273
          2014-02-20 16:42:14,991 DEBUG Main 192.168.0.111:51483 sent '{"cmd":"item","id":"EG.Kueche.Deckenspots","val": "0"}' -- __init__.py:json_parse:273


          Kann mir da jemand was zu sagen ?
          sigpic
          Christian Huck
          Tel.: 089 / 122 80 995
          Email: mail@homeintelligence.de
          Web: www.homeintelligence.de

          Kommentar


            #6
            Da gab es einen Bug. Update die Installation via git mit 'git pull' oder lade die aktuelle stabile Version runter: https://github.com/mknx/smarthome/archive/master.zip

            Bis bald

            Marcus

            Kommentar


              #7
              gelöst

              Merci. Danke für die schnelle und kompetente Rückmeldung !
              sigpic
              Christian Huck
              Tel.: 089 / 122 80 995
              Email: mail@homeintelligence.de
              Web: www.homeintelligence.de

              Kommentar


                #8
                Selbes Problem - Websocket Error

                Lieber hoggle :-),

                ich habe das selbe Problem wie du! Welche *.conf hast du verändert um den Websocket Error zu beheben?
                Hast du dafür die IP Adresse im Plugin.conf geändert?
                Wenn ja, könntest du mir bitte dein Plugin.conf posten...Wäre echt super!

                Vielen Dank!

                BG Martin

                Kommentar


                  #9
                  Hi Martin,

                  das war ein Verständnisfehler von mir.
                  Smartvisu muss über das Visu-Plugin mit smarthome.py kommunizieren.
                  Dazu musst Du vorher in der plugin.conf einen zusätzlichen Eintrag setzen.

                  So sieht meine aktuell aus:

                  Code:
                  [nw]
                  class_name = Network
                  class_path = plugins.network
                  ip = 0.0.0.0
                  port = 2727
                  tcp = yes
                  #tcp_acl= 127.0.0.1 | 192.168.0.34
                  # udp = no
                  # udp_acl= *
                  
                  [visu]
                  class_name = WebSocket
                  class_path = plugins.visu
                  ip='0.0.0.0'
                  port=2424
                  acl = ro
                  #   smartvisu_dir = False
                  
                  [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
                  #   busmonitor = False
                  Hoffe das hilft Dir weiter.

                  Gruß

                  Christian
                  sigpic
                  Christian Huck
                  Tel.: 089 / 122 80 995
                  Email: mail@homeintelligence.de
                  Web: www.homeintelligence.de

                  Kommentar


                    #10
                    PS: Diesen Prozess solltest Du dann nach einem Neustart finden:

                    root@fileserver:/opt/smarthome/etc# netstat -tulpn | grep 2424
                    tcp 0 0 0.0.0.0:2424 0.0.0.0:* LISTEN 7202/python3
                    sigpic
                    Christian Huck
                    Tel.: 089 / 122 80 995
                    Email: mail@homeintelligence.de
                    Web: www.homeintelligence.de

                    Kommentar

                    Lädt...
                    X