Ankündigung

Einklappen

Serverwartung 21.2.



Am 21.2. im Laufe des späten Abends wird eine Serverwartung durchgeführt. Das Forum ist dadurch für gut zwei Stunden nicht erreichbar.
Es wird eine Wartungsseite geschaltet.

Mehr anzeigen
Weniger anzeigen

- √ - smartvisu: want to update invalid item

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

    - √ - smartvisu: want to update invalid item

    hallo,
    ich probiere mich gerade daran smartvisu mit smarthome.py (v. 0.8) zu verbinden und scheitere leider schon am ersten schalter :-(

    der schalter ist in smartvisu (version 2.3) mit folgendem definiert
    Code:
    {{ basic.switch('vorraum', 'vorraum.licht', icon1~'light_light.png', icon0~'light_light.png') }}
    /usr/local/smarthome/items/item.conf
    Code:
    [vorraum]
        [[licht]]
            type = bool
            knx_dpt = 1
            knx_send = 2/1/9
            knx_listen = 2/1/9
            knx_init = 2/1/9
    debug log output:
    Code:
    root@host:/usr/local/smarthome/bin# ./smarthome.py -n
    2013-04-13 19:39:18,444 SmartHome.py INFO     Init SmartHome.py v0.8 -- smarthome.py:__init__:189
    2013-04-13 19:39:18,444 SmartHome.py INFO     Init Scheduler -- scheduler.py:__init__:51
    2013-04-13 19:39:18,444 SmartHome.py INFO     Init plugins -- smarthome.py:__init__:204
    2013-04-13 19:39:18,445 SmartHome.py DEBUG    Plugin: knx -- plugin.py:__init__:42
    2013-04-13 19:39:18,447 SmartHome.py DEBUG    Plugin: visu -- plugin.py:__init__:42
    2013-04-13 19:39:18,449 Scheduler    DEBUG    creating 5 workers -- scheduler.py:run:57
    2013-04-13 19:39:18,456 SmartHome.py DEBUG    Plugin: cli -- plugin.py:__init__:42
    2013-04-13 19:39:18,456 SmartHome.py INFO     Init items -- smarthome.py:__init__:206
    
    2013-04-13 19:39:18,458 SmartHome.py DEBUG    knx: vorraum.licht listen on 2/1/9 -- __init__.py:parse_item:212
    2013-04-13 19:39:18,458 SmartHome.py DEBUG    knx: vorraum.licht listen on and init with 2/1/9 -- __init__.py:parse_item:221
    2013-04-13 19:39:18,458 SmartHome.py DEBUG    Item 'vorraum': No type specified. -- item.py:__init__:100
    2013-04-13 19:39:18,465 SmartHome.py DEBUG    Item 'example': No type specified. -- item.py:__init__:100
    2013-04-13 19:39:18,465 SmartHome.py INFO     Start Plugins -- plugin.py:start:63
    2013-04-13 19:39:18,466 sh.con       INFO     KNX: connected to 127.0.0.1:3671 -- my_asynchat.py:connect:62
    2013-04-13 19:39:18,466 sh.con       DEBUG    knx: read init/cache ga -- __init__.py:handle_connect:102
    2013-04-13 19:39:18,468 SmartHome.py INFO     Starting logics -- logic.py:__init__:33
    2013-04-13 19:39:18,468 SmartHome.py DEBUG    reading logics from /usr/local/smarthome/etc/logic.conf -- logic.py:__init__:40
    2013-04-13 19:39:18,468 SmartHome.py DEBUG    0.0.0 read 2/1/9 -- __init__.py:parse_telegram:180
    2013-04-13 19:39:18,545 SmartHome.py DEBUG    1.1.1 set 2/1/9 to False -- __init__.py:parse_telegram:167
    2013-04-13 19:39:18,677 sh.gc        DEBUG    Garbage collector: collected 57 objects. -- smarthome.py:_garbage_collection:312
    2013-04-13 19:39:18,867 Scheduler    DEBUG    sh.gc next time: 2013-04-14 02:04:00+02:00 -- scheduler.py:_next_time:193
    2013-04-13 19:39:18,946 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.1:47351 -- __init__.py:handle_accept:108
    2013-04-13 19:39:19,947 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.1:47352 -- __init__.py:handle_accept:108
    2013-04-13 19:39:20,948 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.1:47353 -- __init__.py:handle_accept:108
    2013-04-13 19:39:21,949 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.1:47354 -- __init__.py:handle_accept:108
    2013-04-13 19:39:22,950 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.1:47355 -- __init__.py:handle_accept:108
    2013-04-13 19:39:23,952 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.1:47356 -- __init__.py:handle_accept:108
    2013-04-13 19:39:41,929 SmartHome.py DEBUG    Websocket: incoming connection from 192.168.0.2:52179 -- __init__.py:handle_accept:108
    2013-04-13 19:39:42,311 SmartHome.py DEBUG    192.168.0.2:52179 sent '{"cmd":"proto","ver":1}' -- __init__.py:json_parse:205
    2013-04-13 19:39:42,314 SmartHome.py INFO     Client 192.168.0.2:52179 requested invalid item: vorraum.licht -- __init__.py:json_parse:229
    2013-04-13 19:39:42,887 SmartHome.py DEBUG    192.168.0.2:52179 sent '{"cmd":"item","id":"vorraum.licht","val":"1"}' -- __init__.py:json_parse:205
    2013-04-13 19:39:42,887 SmartHome.py INFO     Client 192.168.0.2:52179 want to update invalid item: vorraum.licht -- __init__.py:json_parse:218
    er behauptet, dass vorraum.licht ein invalid item sei. das kann aber meiner meinung nach nicht sein, da es von der CLI aus problemlos geht

    Code:
    root@host:/usr/local/smarthome/items# telnet localhost 2323
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    SmartHome.py v0.8
    > update vorraum.licht = 1
    > update vorraum.licht = 0
    /usr/local/smarthome/etc/plugin.conf

    Code:
    [knx]
    
    class_name = KNX
    class_path = plugins.knx
    host = 127.0.0.1
    port = 3671
    # 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
    
    [visu]
        class_name = WebSocket
        class_path = plugins.visu
    #   ip='0.0.0.0'
        port=2424
    #   visu_dir = False
    #   smartvisu_dir =  /var/www/smartvisu
    
    [cli]
       class_name = CLI
       class_path = plugins.cli
       update = true

    hat jemand eine idee, wo das problem liegen könnte?

    danke
    werner

    #2
    Hallo Werner,

    vielen Dank für die gute Config-Arbeit. Das macht es mir einfach den Fehler zu lokalisieren.

    Du musst in /usr/local/smarthome/items/item.conf bei den Items ein
    Code:
    visu = yes
    einfügen um Änderungen über die Visu zu erlauben.

    Bitte Haken setzen wenn es funktioniert.

    Bis bald

    Marcus

    Kommentar


      #3
      Hallo Markus,
      funktioniert :-)

      Vielen Dank für deine schnelle Hilfe!

      Beste Grüße
      Werner

      Kommentar


        #4
        Hallo Werner1,

        vielen Dank für Dein Beispiel. Ich bin jetzt genau da, wo Du im April warst.
        Ich habe mich an Deinem Beispiel orientiert, mit folgendem Setup:

        1) Der Schalter ist definiert als:

        Code:
        {{ basic.switch('vorraum', 'vorraum.licht', icon1~'light_mirror.png', icon0~'light_mirror.png') }}
        2) in /usr/smarthome/items/item.conf

        Code:
        [vorraum]
            [[licht]]
                type = bool
                knx_dpt = 1
                knx_send = 0/0/2
                knx_listen = 0/0/2
                knx_init = 0/0/2
                visu = yes
        3) wenn ich die update befehle ausführe, geht das licht aus und an (initial an)

        Code:
        telnet localhost 2323
        Trying ::1...
        Trying 127.0.0.1...
        Connected to localhost.
        Escape character is '^]'.
        SmartHome.py v0.9-3-g3d90e39
        > update vorraum.licht=0
        > update vorraum.licht=1
        4) Die Plugin.conf sieht folgendermaßen aus:

        Code:
        admin@smarthome:/usr/smarthome/etc$ more plugin.conf
        # plugin.conf
        [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
        #    host = 127.0.0.1
        #    port = 4304
        [cli]
            class_name = CLI
            class_path = plugins.cli
        #   ip = 0.0.0.0
            update = True
        [visu]
            class_name = WebSocket
            class_path = plugins.visu
        #   ip='0.0.0.0'
            port=2424
        #    smartvisu_dir = /var/www/smartvisu
        [sql]
            class_name = SQL
            class_path = plugins.sqlite
        [rrd]
            class_name = RRD
            class_path = plugins.rrd
            step = 300
        Wenn ich nun im Browser auf den Schalter (siehe 1)) oben drücke, dann passiert leider nichts, d.h. das Licht geht nicht an und nicht aus.

        Mit

        Code:
        groupswrite ip:localhost 0/0/2 1
        bzw.

        Code:
        groupswrite ip:localhost 0/0/2 0
        geht das Licht auch an und aus.

        Was mache ich falsch?

        Vielen Dank für Deine Hilfe,

        Foobar

        Kommentar


          #5
          Hallo foobar

          - starte mal smarthome im Debug Mode (/usr/smarthome/bin/smarthome.py -d

          - mach mal bitte ein reload (F5) im Browser

          - hänge mal dasl smarthome logfile an.

          Grüße Stromie

          Kommentar


            #6
            Wie sieht Deine Config-Seite aus (oben im Menu die 3 Zahnräder)?
            Versuch mal folgendes in der plugin.conf

            Code:
            # plugin.conf
            
            [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
            #    host = 127.0.0.1
            #    port = 4304
            
            [cli]
                class_name = CLI
                class_path = plugins.cli
                ip = 0.0.0.0
                update = True
            
            [visu]
                class_name = WebSocket
                class_path = plugins.visu
            #   ip='0.0.0.0'
            #   port=2424
                smartvisu_dir = /var/www/smartvisu
            
            [sql]
                class_name = SQL
                class_path = plugins.sqlite
            
            [rrd]
                class_name = RRD
                class_path = plugins.rrd
                step = 300

            Kommentar


              #7
              Hi Macflei,

              Wie sieht Deine Config-Seite aus (oben im Menu die 3 Zahnräder)?
              das war der entscheidende Tip. Es funktioniert. In der Config Seite war keine Verbindung zum smarthome.py referenziert.

              Vielen Dank für die Hilfe, auch an stromie.

              Beste Grüße,

              foobar

              Kommentar

              Lädt...
              X