Hallo,
Vorweg, ich bin mir nicht sicher, ob smarthome.py oder smartvisu subforum das Richtige ist.
Ich versuche mal mein Problem zu erklären.
RaspberryPi mit dem Combo-Image smarthome.py + smartVisu.
KNX Teststellung
1 Raum "Kinderzimmer Nicolas" fertig konfiguriert
In der Navigation befinden sich Übersichtsicons (Licht, Heizung, Temperatur)
Mache ich nun das Hauptbild sehe ich die Werte meist bei der Übersicht des Raumes (Bild1), machmal aber auch erst nach "F5" im Browser.
Klicke ich nun auf "Kinderzimmer Nicolas" werden einige Symbole nicht dargestellt und die Temperatur fehlt auch (Bild2). Ändert sich nun ein Wert (zB Heizung schaltet sich ein), wird dieser dann plötzlich angezeigt. Drücke ich F5 wird alles richtig angezeigt (Bild3).
Mir ist folgendes aufgefallen
Bei F5 wird eine neue Verbindung aufgebaut:
und ich bekomme für meine noch nicht existierenden Items in smarthome.py einen Fehler (ist auch aktuell OK, muss ich erst machen):
Die gelieferten Daten in der Javascriptconsole sind:
Beim Seitenwechsel wird keine neue Verbindung aufgebaut, nur ein Monitor-Aufruf:
Die Fehlermeldung wegen den nicht existierenden Items kommen nicht.
Hier noch das komplette Log des Tests:
Habe ich etwas falsch gemacht?
lg,
Andreas
Vorweg, ich bin mir nicht sicher, ob smarthome.py oder smartvisu subforum das Richtige ist.
Ich versuche mal mein Problem zu erklären.
RaspberryPi mit dem Combo-Image smarthome.py + smartVisu.
KNX Teststellung
1 Raum "Kinderzimmer Nicolas" fertig konfiguriert
In der Navigation befinden sich Übersichtsicons (Licht, Heizung, Temperatur)
Mache ich nun das Hauptbild sehe ich die Werte meist bei der Übersicht des Raumes (Bild1), machmal aber auch erst nach "F5" im Browser.
Klicke ich nun auf "Kinderzimmer Nicolas" werden einige Symbole nicht dargestellt und die Temperatur fehlt auch (Bild2). Ändert sich nun ein Wert (zB Heizung schaltet sich ein), wird dieser dann plötzlich angezeigt. Drücke ich F5 wird alles richtig angezeigt (Bild3).
Mir ist folgendes aufgefallen
Bei F5 wird eine neue Verbindung aufgebaut:
Code:
2013-03-29 11:10:19,268 SmartHome.py DEBUG Websocket: incoming connection from 192.168.33.253:37932 -- __init__.py:handle_accept:107 2013-03-29 11:10:19,390 SmartHome.py DEBUG 192.168.33.253:37932 sent '{"cmd":"proto","ver":2}' -- __init__.py:json_parse:206 2013-03-29 11:10:19,409 SmartHome.py DEBUG 192.168.33.253:37932 sent '{"cmd":"monitor","items":["og.kz_nicolas.temperatur.ist","og.kz_nicolas.li_sued.setrm","og.kz_nicolas.li_nord.setrm","og.kz_nicolas.temperatur.stellwert","og.kz_eric.temperatur.ist","og.kz_eric.li_sued.setrm","og.kz_eric.li_nord.setrm"]}' -- __init__.py:json_parse:206
Code:
2013-03-29 11:10:19,417 SmartHome.py INFO Client 192.168.33.253:37932 requested invalid item: og.kz_eric.li_nord.setrm -- __init__.py:json_parse:230 2013-03-29 11:10:19,425 SmartHome.py INFO Client 192.168.33.253:37932 requested invalid item: og.kz_eric.temperatur.ist -- __init__.py:json_parse:230 2013-03-29 11:10:19,429 SmartHome.py INFO Client 192.168.33.253:37932 requested invalid item: og.kz_eric.li_sued.setrm -- __init__.py:json_parse:230
Code:
[io.smarthome.py] receiving data: {"cmd":"proto","ver":2} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.li_sued.setrm",0]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.temperatur.stellwert",0]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.li_nord.setrm",0]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.temperatur.ist",22.14]],"cmd":"item"} io_smarthome.py.js:98
Code:
2013-03-29 11:11:47,792 SmartHome.py DEBUG 192.168.33.253:37932 sent '{"cmd":"monitor","items":["og.kz_nicolas.temperatur.ist","og.kz_nicolas.li_sued.setrm","og.kz_nicolas.li_nord.setrm","og.kz_nicolas.temperatur.stellwert","og.kz_eric.temperatur.ist","og.kz_eric.li_sued.setrm","og.kz_eric.li_nord.setrm","og.kz_nicolas.temperatur.soll","og.kz_nicolas.temperatur.betriebsart","og.kz_nicolas.rollo.move","og.kz_nicolas.rollo.pos","og.kz_nicolas.rollo.stop"]}' -- __init__.py:json_parse:206
Code:
[io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.temperatur.ist",22.12]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.rollo.pos",0]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.rollo.move",0]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.temperatur.betriebsart",40]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.rollo.stop",0]],"cmd":"item"} io_smarthome.py.js:98 [io.smarthome.py] receiving data: {"items":[["og.kz_nicolas.temperatur.soll",7.0]],"cmd":"item"} io_smarthome.py.js:98
Code:
root@smarthome:/smartvisu# /usr/local/smarthome/bin/smarthome.py --start --debug -n 2013-03-29 11:10:05,320 SmartHome.py INFO Init SmartHome.py v0.8-83-g0990026 -- smarthome.py:__init__:192 2013-03-29 11:10:05,327 SmartHome.py INFO Init Scheduler -- scheduler.py:__init__:53 2013-03-29 11:10:05,332 SmartHome.py INFO Init Plugins -- smarthome.py:__init__:207 2013-03-29 11:10:05,346 Scheduler DEBUG creating 5 workers -- scheduler.py:run:59 2013-03-29 11:10:05,353 SmartHome.py DEBUG Plugin: knx -- plugin.py:__init__:42 2013-03-29 11:10:05,390 SmartHome.py DEBUG Plugin: ow -- plugin.py:__init__:42 2013-03-29 11:10:05,408 SmartHome.py ERROR Onewire: could not connect to 127.0.0.1:4304: [Errno 111] Connection refused -- __init__.py:connect:62 2013-03-29 11:10:05,414 SmartHome.py DEBUG Plugin: cli -- plugin.py:__init__:42 2013-03-29 11:10:05,426 SmartHome.py DEBUG Plugin: visu -- plugin.py:__init__:42 2013-03-29 11:10:05,510 SmartHome.py DEBUG Plugin: rrd -- plugin.py:__init__:42 2013-03-29 11:10:05,608 SmartHome.py INFO Init Items -- smarthome.py:__init__:209 2013-03-29 11:10:05,737 SmartHome.py DEBUG knx: og.kz_nicolas.li_sued.setrm listen on 1/0/8 -- __init__.py:parse_item:210 2013-03-29 11:10:05,804 SmartHome.py DEBUG knx: og.kz_nicolas.li_sued.setrm listen on and init with 1/0/8 -- __init__.py:parse_item:219 2013-03-29 11:10:05,820 SmartHome.py DEBUG knx: og.kz_nicolas.li_nord.setrm listen on 1/0/9 -- __init__.py:parse_item:210 2013-03-29 11:10:05,824 SmartHome.py DEBUG knx: og.kz_nicolas.li_nord.setrm listen on and init with 1/0/9 -- __init__.py:parse_item:219 2013-03-29 11:10:05,833 SmartHome.py DEBUG knx: og.kz_nicolas.rollo.move listen on 1/0/1 -- __init__.py:parse_item:210 2013-03-29 11:10:05,841 SmartHome.py DEBUG knx: og.kz_nicolas.rollo.stop listen on 1/0/0 -- __init__.py:parse_item:210 2013-03-29 11:10:05,854 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.ist listen on 1/0/5 -- __init__.py:parse_item:210 2013-03-29 11:10:05,863 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.soll listen on 1/0/7 -- __init__.py:parse_item:210 2013-03-29 11:10:05,867 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.soll listen on and init with 1/0/7 -- __init__.py:parse_item:219 2013-03-29 11:10:05,876 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.betriebsart listen on 1/0/10 -- __init__.py:parse_item:210 2013-03-29 11:10:05,881 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.betriebsart listen on and init with 1/0/10 -- __init__.py:parse_item:219 2013-03-29 11:10:05,891 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.stellwert listen on 1/0/12 -- __init__.py:parse_item:210 2013-03-29 11:10:05,896 SmartHome.py DEBUG knx: og.kz_nicolas.temperatur.stellwert listen on and init with 1/0/12 -- __init__.py:parse_item:219 2013-03-29 11:10:05,913 SmartHome.py DEBUG knx: second.sleeping.light.level listen on 3/2/14 -- __init__.py:parse_item:210 2013-03-29 11:10:05,918 SmartHome.py DEBUG knx: Light listen on 3/2/12 -- __init__.py:parse_item:210 2013-03-29 11:10:06,160 SmartHome.py INFO Start Plugins -- plugin.py:start:63 2013-03-29 11:10:06,169 ow DEBUG 1w-disc next time: 2013-03-29 11:10:06+01:00 -- scheduler.py:_next_time:224 2013-03-29 11:10:06,188 SmartHome.py INFO Start Logics -- logic.py:__init__:32 2013-03-29 11:10:06,192 SmartHome.py DEBUG reading logics from /usr/local/smarthome/etc/logic.conf -- logic.py:__init__:38 2013-03-29 11:10:06,187 rrd DEBUG rrd next time: 2013-03-29 11:11:46+01:00 -- scheduler.py:_next_time:224 2013-03-29 11:10:06,225 SmartHome.py DEBUG Logic: hello -- logic.py:__init__:45 2013-03-29 11:10:06,231 SmartHome.py WARNING hello: Could not access logic file (hello_world.py) => ignoring. -- logic.py:generate_bytecode:106 2013-03-29 11:10:06,256 sh.con DEBUG knx: read init/cache ga -- __init__.py:handle_connect:100 2013-03-29 11:10:06,278 SmartHome.py DEBUG 0.0.0 read 1/0/12 -- __init__.py:parse_telegram:178 2013-03-29 11:10:06,283 sh.con INFO KNX: connected to 127.0.0.1:6720 -- my_asynchat.py:connect:69 2013-03-29 11:10:06,311 SmartHome.py DEBUG 0.0.0 read 1/0/7 -- __init__.py:parse_telegram:178 2013-03-29 11:10:06,319 SmartHome.py DEBUG 0.0.0 read 1/0/8 -- __init__.py:parse_telegram:178 2013-03-29 11:10:06,326 SmartHome.py DEBUG 0.0.0 read 1/0/9 -- __init__.py:parse_telegram:178 2013-03-29 11:10:06,341 SmartHome.py DEBUG 0.0.0 read 1/0/10 -- __init__.py:parse_telegram:178 2013-03-29 11:10:06,357 SmartHome.py DEBUG 1.1.15 set 1/0/12 to 0 -- __init__.py:parse_telegram:165 2013-03-29 11:10:06,396 SmartHome.py DEBUG 1.1.15 set 1/0/7 to 7.0 -- __init__.py:parse_telegram:165 2013-03-29 11:10:06,404 SmartHome.py INFO og.kz_nicolas.temperatur.soll = 7.0 via KNX 1.1.15 -- item.py:_update:210 2013-03-29 11:10:06,489 Scheduler DEBUG 1w-disc next time: 2013-03-29 11:20:06+01:00 -- scheduler.py:_next_time:224 2013-03-29 11:10:06,491 SmartHome.py DEBUG 1.1.2 set 1/0/8 to False -- __init__.py:parse_telegram:165 2013-03-29 11:10:06,499 SmartHome.py DEBUG 1.1.2 set 1/0/9 to False -- __init__.py:parse_telegram:165 2013-03-29 11:10:06,501 sh.gc DEBUG Garbage collector: collected 1009 objects. -- smarthome.py:_garbage_collection:343 2013-03-29 11:10:06,510 SmartHome.py DEBUG 1.1.15 set 1/0/10 to 40 -- __init__.py:parse_telegram:165 2013-03-29 11:10:06,514 SmartHome.py INFO og.kz_nicolas.temperatur.betriebsart = 40 via KNX 1.1.15 -- item.py:_update:210 2013-03-29 11:10:06,711 Scheduler DEBUG sh.gc next time: 2013-03-30 02:04:00+01:00 -- scheduler.py:_next_time:224 2013-03-29 11:10:19,268 SmartHome.py DEBUG Websocket: incoming connection from 192.168.33.253:37932 -- __init__.py:handle_accept:107 2013-03-29 11:10:19,390 SmartHome.py DEBUG 192.168.33.253:37932 sent '{"cmd":"proto","ver":2}' -- __init__.py:json_parse:206 2013-03-29 11:10:19,409 SmartHome.py DEBUG 192.168.33.253:37932 sent '{"cmd":"monitor","items":["og.kz_nicolas.temperatur.ist","og.kz_nicolas.li_sued.setrm","og.kz_nicolas.li_nord.setrm","og.kz_nicolas.temperatur.stellwert","og.kz_eric.temperatur.ist","og.kz_eric.li_sued.setrm","og.kz_eric.li_nord.setrm"]}' -- __init__.py:json_parse:206 2013-03-29 11:10:19,417 SmartHome.py INFO Client 192.168.33.253:37932 requested invalid item: og.kz_eric.li_nord.setrm -- __init__.py:json_parse:230 2013-03-29 11:10:19,425 SmartHome.py INFO Client 192.168.33.253:37932 requested invalid item: og.kz_eric.temperatur.ist -- __init__.py:json_parse:230 2013-03-29 11:10:19,429 SmartHome.py INFO Client 192.168.33.253:37932 requested invalid item: og.kz_eric.li_sued.setrm -- __init__.py:json_parse:230 2013-03-29 11:10:50,085 SmartHome.py DEBUG 1.1.50 set 1/0/5 to 22.06 -- __init__.py:parse_telegram:165 2013-03-29 11:10:50,089 SmartHome.py INFO og.kz_nicolas.temperatur.ist = 22.06 via KNX 1.1.50 -- item.py:_update:210 2013-03-29 11:11:46,364 Scheduler DEBUG rrd next time: 2013-03-29 11:16:46+01:00 -- scheduler.py:_next_time:224 2013-03-29 11:11:47,792 SmartHome.py DEBUG 192.168.33.253:37932 sent '{"cmd":"monitor","items":["og.kz_nicolas.temperatur.ist","og.kz_nicolas.li_sued.setrm","og.kz_nicolas.li_nord.setrm","og.kz_nicolas.temperatur.stellwert","og.kz_eric.temperatur.ist","og.kz_eric.li_sued.setrm","og.kz_eric.li_nord.setrm","og.kz_nicolas.temperatur.soll","og.kz_nicolas.temperatur.betriebsart","og.kz_nicolas.rollo.move","og.kz_nicolas.rollo.pos","og.kz_nicolas.rollo.stop"]}' -- __init__.py:json_parse:206 2013-03-29 11:11:50,079 SmartHome.py DEBUG 1.1.50 set 1/0/5 to 22.06 -- __init__.py:parse_telegram:165 ^C2013-03-29 11:11:57,607 SmartHome.py INFO Stop Plugins -- plugin.py:stop:68 2013-03-29 11:11:57,611 SmartHome.py INFO KNX: connection to 127.0.0.1:6720 closed -- my_asynchat.py:handle_close:103 2013-03-29 11:11:57,615 SmartHome.py DEBUG Closing listen -- __init__.py:stop:125 2013-03-29 11:11:58,121 SmartHome.py INFO SmartHome.py stopped -- smarthome.py:stop:337
lg,
Andreas
Kommentar