Ankündigung

Einklappen
Keine Ankündigung bisher.

- √ - KNX.update_item list Index out of Range

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

    - √ - KNX.update_item list Index out of Range

    Hallo,

    nach dem gestrigen update des Images funktioniert meine KNX Kommunikation nun auch über die Visu. Im Log tauchen aber immer noch Fehler auf wenn ich auf ein Objekt in der Visu klicke. Habe ich noch etwas übersehen?

    Danke
    Stefan

    smartvisu.conf
    ========
    [first]
    [[hallway]]
    name = Hallway
    sv_page = room
    sv_img = scene_stairs.png
    [[[light]]]
    knx_dpt = 1
    knx_send = 5/5/10
    knx_status = 5/5/11
    knx_listen = 5/5/12
    knx_reply = 5/5/13
    name = Light
    type = bool
    visu_acl = rw
    sv_widget = {{ basic.switch('item', 'item') }}
    [[[door]]]
    name = Door
    type = bool
    ...


    Debug:
    ======
    admin@smarthome:/usr/smarthome$ smarthome.py -s
    admin@smarthome:/usr/smarthome$ smarthome.py -d
    2013-11-17 21:12:13,137 INFO Main Start SmartHome.py 0.9-504-gf86fb04 -- smarthome.py:__init__:231
    2013-11-17 21:12:13,142 DEBUG Main Python 3.2.3 -- smarthome.py:__init__:232
    2013-11-17 21:12:13,148 INFO Main Init Scheduler -- scheduler.py:__init__:86
    2013-11-17 21:12:13,155 INFO Main Init Plugins -- smarthome.py:start:274
    2013-11-17 21:12:13,170 DEBUG Scheduler creating 5 workers -- scheduler.py:run:93
    2013-11-17 21:12:13,177 DEBUG Main Plugin: knx -- plugin.py:__init__:43
    2013-11-17 21:12:13,199 DEBUG Main Plugin: visu -- plugin.py:__init__:43
    2013-11-17 21:12:13,295 DEBUG Main Plugin: cli -- plugin.py:__init__:43
    2013-11-17 21:12:13,307 DEBUG Main Plugin: sql -- plugin.py:__init__:43
    2013-11-17 21:12:13,339 DEBUG Main SQLite 3.7.13 -- __init__.py:__init__:62
    2013-11-17 21:12:13,395 DEBUG Main SQLite: database integrity ok -- __init__.py:__init__:78
    2013-11-17 21:12:13,421 DEBUG Main SQLite pack next time: 2013-11-18 03:02:00+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:12:13,428 INFO Main Init Items -- smarthome.py:start:280
    2013-11-17 21:12:13,556 DEBUG Main KNX: second.sleeping.light.level listen on 3/2/14 -- __init__.pyarse_item:235
    2013-11-17 21:12:13,562 DEBUG Main KNX: Light listen on 3/2/12 -- __init__.pyarse_item:235
    2013-11-17 21:12:13,623 DEBUG Main Item second.sleeping.blind: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,632 DEBUG Main Item second.sleeping: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,699 DEBUG Main Item second.bath.blind: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,704 DEBUG Main Item second.bath: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,708 DEBUG Main Item second: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,742 DEBUG Main Item env.core.memory = 12602837.454400992 via SQLite None None -- item.py:set:457
    2013-11-17 21:12:13,763 DEBUG Main Item env.core.threads = 7.0 via SQLite None None -- item.py:set:457
    2013-11-17 21:12:13,784 DEBUG Main Item env.core.garbage = 0.0 via SQLite None None -- item.py:set:457
    2013-11-17 21:12:13,791 DEBUG Main Item env.core: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,831 DEBUG Main Item env.location: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,857 DEBUG Main Item env.system.load = 0.20590207845336977 via SQLite None None -- item.py:set:457
    2013-11-17 21:12:13,870 DEBUG Main Item env.system: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,875 DEBUG Main Item env: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,891 DEBUG Main KNX: Light listen on 5/5/12 -- __init__.pyarse_item:235
    2013-11-17 21:12:13,896 DEBUG Main KNX: Light reply to 5/5/13 -- __init__.pyarse_item:267
    2013-11-17 21:12:13,905 DEBUG Main Item first.hallway: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:13,923 DEBUG Main Item first.living.light: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:14,007 DEBUG Main Item first.living.blind: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:14,020 DEBUG Main Item first.living: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:14,024 DEBUG Main Item first: no type specified. -- item.py:__init__:242
    2013-11-17 21:12:14,034 INFO Main Start Plugins -- plugin.py:start:65
    2013-11-17 21:12:14,082 INFO Main Start Logics -- logic.py:__init__:33
    2013-11-17 21:12:14,086 DEBUG Main Reading Logics from /usr/smarthome/lib/env/logic_conf -- logic.py:_read_logics:64
    2013-11-17 21:12:14,112 DEBUG Main Reading Logics from /usr/smarthome/etc/logic.conf -- logic.py:_read_logics:64
    2013-11-17 21:12:14,137 DEBUG Main Logic: dummy -- logic.py:__init__:44
    2013-11-17 21:12:14,199 DEBUG Main dummy next time: 2013-11-17 21:12:26+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:12:14,208 DEBUG Main Logic: hello -- logic.py:__init__:44
    2013-11-17 21:12:14,223 DEBUG Main Logic: env_init -- logic.py:__init__:44
    2013-11-17 21:12:14,258 DEBUG Main Logic: env_stat -- logic.py:__init__:44
    2013-11-17 21:12:14,296 DEBUG Main env_stat next time: 2013-11-17 21:12:26+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:12:14,317 DEBUG Main Logic: env_loc -- logic.py:__init__:44
    2013-11-17 21:12:14,447 DEBUG Connections KNX: connected to 127.0.0.1:6720 -- connection.py:connect:384
    2013-11-17 21:12:14,458 DEBUG Connections KNX: enable group monitor -- __init__.py:handle_connect:117
    2013-11-17 21:12:14,472 DEBUG Connections WebSocket: binding to 0.0.0.0:2424 (TCP) -- connection.py:connect:160
    2013-11-17 21:12:14,485 DEBUG Connections CLI: binding to 0.0.0.0:2323 (TCP) -- connection.py:connect:160
    2013-11-17 21:12:19,300 INFO hello Hello World! -- hello.py:<module>:3
    2013-11-17 21:12:19,305 DEBUG env_init Item env.core.version = 0.9-504-gf86fb04 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:19,325 DEBUG env_init Item env.core.start = 2013-11-17 21:12:19.321808+01:00 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:19,334 DEBUG env_init Item env.system.name = smarthome.local via Logic None None -- item.py:__update:363
    2013-11-17 21:12:19,344 DEBUG env_init Item env.system.start = 2013-11-17 19:59:07.341313+01:00 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:19,890 DEBUG env_loc Item env.location.sunrise = 2013-11-18 07:39:42.423873+01:00 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:19,892 DEBUG sh.gc Garbage collector: collected 0 objects. -- smarthome.py:_garbage_collection:498
    2013-11-17 21:12:19,946 DEBUG env_loc Item env.location.sunset = 2013-11-18 16:26:34.599076+01:00 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:20,029 DEBUG env_loc Item env.location.moonrise = 2013-11-18 17:13:19.898147+01:00 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:20,109 DEBUG env_loc Item env.location.moonset = 2013-11-18 08:15:16.025921+01:00 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:20,151 DEBUG env_loc Item env.location.moonphase = 4 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:20,219 DEBUG env_loc Item env.location.night = True via Logic None None -- item.py:__update:363
    2013-11-17 21:12:20,224 DEBUG sh.gc Object references: 9136 -- smarthome.py:_maintenance:490
    2013-11-17 21:12:20,434 DEBUG Scheduler env_loc next time: 2013-11-17 21:42:20+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:12:20,476 DEBUG Scheduler sh.gc next time: 2013-11-18 02:04:00+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:12:26,023 DEBUG dummy Item first.living.temperature = 20 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,089 DEBUG dummy Item first.living.humidity = 48 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,105 DEBUG dummy Item second.sleeping.temperature = 20 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,098 DEBUG env_stat Item env.core.memory = 13443072 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,124 DEBUG env_stat Item env.system.load = 0.16 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,126 DEBUG dummy Item second.bath.temperature = 22 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,142 DEBUG env_stat Item env.location.moonlight = 100 via Logic None None -- item.py:__update:363
    2013-11-17 21:12:26,540 DEBUG Scheduler dummy next time: 2013-11-17 21:17:26+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:12:26,547 DEBUG Scheduler env_stat next time: 2013-11-17 21:17:26+01:00 -- scheduler.py:_next_time:289
    2013-11-17 21:13:03,353 DEBUG Main knx: 5.1.250 set 1/0/5 to f50d02 -- __init__.pyarse_telegram:181
    2013-11-17 21:13:03,504 DEBUG Main knx: 5.1.250 set 1/0/6 to 110b0d -- __init__.pyarse_telegram:181
    2013-11-17 21:13:18,481 DEBUG Main WebSocket: incoming connection from 192.168.188.38:64102 to 0.0.0.0:2424 -- connection.py:accept:187
    2013-11-17 21:13:18,719 DEBUG Main 192.168.188.38:64102 sent '{"cmd":"proto","ver":3}' -- __init__.py:json_parse:269
    2013-11-17 21:13:18,731 DEBUG Main 192.168.188.38:64102 sent '{"cmd":"monitor","items":["second.sleeping.light","second.sleeping.light.lev el","second.sleeping.scence","second.sleeping.temp erature","second.sleeping.temperature.set","second .sleeping.temperature.mode","second.sleeping.tempe rature.night","second.sleeping.temperature.frost", "second.sleeping.temperature.state","second.sleepi ng.blind.move","second.sleeping.blind.pos","second .sleeping.blind.tilt","second.sleeping.blind.stop"]}' -- __init__.py:json_parse:269
    2013-11-17 21:13:18,746 DEBUG Main 192.168.188.38:64102 sent '{"cmd":"series","item":"second.sleeping.temperatu re","series":"avg","start":"1h"}' -- __init__.py:json_parse:269
    2013-11-17 21:13:22,421 DEBUG Main 192.168.188.38:64102 sent '{"cmd":"monitor","items":["first.hallway.light"]}' -- __init__.py:json_parse:269
    2013-11-17 21:13:23,681 DEBUG Main 192.168.188.38:64102 sent '{"cmd":"item","id":"first.hallway.light","val":"1 "}' -- __init__.py:json_parse:269
    2013-11-17 21:13:23,695 DEBUG Main Item first.hallway.light = True via Visu 192.168.188.38:64102 None -- item.py:__update:363
    2013-11-17 21:13:23,702 ERROR Main Item first.hallway.light: problem running <bound method KNX.update_item of <plugins.knx.KNX object at 0x97dcb0>>: list index out of range -- item.py:__update:371
    Traceback (most recent call last):
    File "/usr/smarthome/lib/item.py", line 369, in __update
    method(self, caller, source, dest)
    File "/usr/smarthome/plugins/knx/__init__.py", line 327, in update_item
    self.groupwrite(ga, item(), item.conf['knx_dpt'])
    File "/usr/smarthome/plugins/knx/__init__.py", line 67, in groupwrite
    pkt.extend(self.encode(ga, 'ga'))
    File "/usr/smarthome/plugins/knx/__init__.py", line 143, in encode
    return dpts.encode[str(dpt)](data)
    File "/usr/smarthome/plugins/knx/dpts.py", line 308, in enga
    return [int(ga[0]) << 3 | int(ga[1]), int(ga[2])]
    IndexError: list index out of range
    2013-11-17 21:13:23,738 DEBUG Main knx: 0.0.0 set 5/5/10 to 01 -- __init__.pyarse_telegram:181
    2013-11-17 21:13:26,411 DEBUG Main 192.168.188.38:64102 sent '{"cmd":"item","id":"first.hallway.light","val":"0 "}' -- __init__.py:json_parse:269
    2013-11-17 21:13:26,417 DEBUG Main Item first.hallway.light = False via Visu 192.168.188.38:64102 None -- item.py:__update:363
    2013-11-17 21:13:26,424 ERROR Main Item first.hallway.light: problem running <bound method KNX.update_item of <plugins.knx.KNX object at 0x97dcb0>>: list index out of range -- item.py:__update:371
    Traceback (most recent call last):
    File "/usr/smarthome/lib/item.py", line 369, in __update
    method(self, caller, source, dest)
    File "/usr/smarthome/plugins/knx/__init__.py", line 327, in update_item
    self.groupwrite(ga, item(), item.conf['knx_dpt'])
    File "/usr/smarthome/plugins/knx/__init__.py", line 67, in groupwrite
    pkt.extend(self.encode(ga, 'ga'))
    File "/usr/smarthome/plugins/knx/__init__.py", line 143, in encode
    return dpts.encode[str(dpt)](data)
    File "/usr/smarthome/plugins/knx/dpts.py", line 308, in enga
    return [int(ga[0]) << 3 | int(ga[1]), int(ga[2])]
    IndexError: list index out of range
    2013-11-17 21:13:26,445 DEBUG Main knx: 0.0.0 set 5/5/10 to 00 -- __init__.pyarse_telegram:181

    #2
    Hi Stefan,

    der Fehler ist das Du sowohl status als auch send setzt. Das sind aus meiner Sicht zwei sich ausschließende Attribute. Du musst Dich entscheiden.

    Im Code hatte ich das aber nicht sauber abgefangen. Das werde ich ändern.

    Bis bald

    Marcus

    Kommentar


      #3
      Hallo Marcus,

      alles klar, das hatte ich nur zum Testen mal eingebaut um zu sehen wie sich die Funktionen so verhalten.

      Danke
      Stefan

      Kommentar


        #4
        Raspberry Image GIT branch develop als default?

        Hi Marcus,

        mir ist gerade noch etwas aufgefallen. Wie im log vorhin zu sehen bin ich wieder auf der 0.9er Version gewesen!? (Mit einem Image vom 16.) Im update log über die Website steht bei mir der Branch auf develop. Ein wechsel zum master und anschließendem merge brachte mich nun wieder zur 1.0-8. Kann es sein das die RP Images als default den dev Branch eingestellt haben? Das habe ich bis eben immer übersehen. Ist das so gewollt?

        Gruß
        Stefan

        Kommentar


          #5
          Hi Stefan,

          siehe https://knx-user-forum.de/353875-post19.html

          Bis bald

          Marcus

          Kommentar


            #6
            Hi Marcus, super danke!

            Kommentar

            Lädt...
            X