Hallo @sathya,
Okay, webSocketAuthType = session
hat das Beispiel wieder zum Laufen gebracht. Das ist mir vermutlich beim Update von der 0.6.17 zur 0.6.19 durchgerutscht.
Allerdings ist das anfängliche Problem damit immer noch da. Ich habe mal den Aufruf getAllValues() um eine Peer Id erweitert. Peer 1 ist bei mir ein Rolladenaktor und der Log sieht in Chrome dann wie folgt aus (keine nicht-ASCII-Zeichen, alles prima):
Connecting (my id: HomegearApp-8ea5f326-9861-5863-f703-dc98e97b4a2e)...
homegear-ws-0.0.1.js:169 Client authenticated.
homegear-ws-0.0.1.js:128 Server authenticated.
homegear-ws-0.0.1.js:273 Subscribing to peers (2):
homegear-ws-0.0.1.js:274 []
homegear-ws-0.0.1.js:101 Ready.
homegear-ws-0.0.1.js:308 Invoking RPC method: {"jsonrpc":"2.0","method":"getAllValues","id":1,"params":[1]}
homegear-ws-0.0.1.js:176 Response to id 1 received: {"id":1,"jsonrpc":"2.0","result":[{"ADDRESS":"LEQ0767833","CHANNELS":[{"INDEX":0,"PARAMSET":{"CENTRAL_ADDRESS_SPOOFED":{"MAX":1,"MIN":0,"READABLE":true,"TYPE":"ENUM","UNIT":"","VALUE":0,"VALUE_LIST":["UNSET","CENTRAL_ADDRESS_SPOOFED"],"WRITEABLE":true},"CONFIG_PENDING":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":false},"DEVICE_IN_BOOTLOADER":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":false},"DUTYCYCLE":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":false},"RSSI_DEVICE":{"MAX":2147483647,"MIN":-2147483648,"READABLE":true,"TYPE":"INTEGER","UNIT":"","VALUE":-36,"WRITEABLE":false},"RSSI_PEER":{"MAX":2147483647,"MIN":-2147483648,"READABLE":true,"TYPE":"INTEGER","UNIT":"","VALUE":0,"WRITEABLE":false},"STICKY_UNREACH":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":true},"UNREACH":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":false},"UPDATE_PENDING":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":false}},"TYPE":"MAINTENANCE"},{"INDEX":1,"PARAMSET":{"DIRECTION":{"MAX":3,"MIN":0,"READABLE":true,"TYPE":"ENUM","UNIT":"","VALUE":0,"VALUE_LIST":["NONE","UP","DOWN","UNDEFINED"],"WRITEABLE":false},"INHIBIT":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":true},"LEVEL":{"MAX":1,"MIN":0,"READABLE":true,"TYPE":"FLOAT","UNIT":"100%","VALUE":0,"WRITEABLE":true},"WORKING":{"READABLE":true,"TYPE":"BOOL","UNIT":"","VALUE":false,"WRITEABLE":false}},"TYPE":"BLIND"}],"FAMILY":0,"ID":1,"NAME":"ROLLO_HAR","TYPE":"HM-LC-Bl1PBU-FM","TYPE_ID":106}
Mache ich das mir Peer ID 2 (HM-TC-IT-WM-W-EU) funktioniert es jedoch nicht;
Connecting (my id: HomegearApp-7cf3fdda-3384-0177-2bb6-6318a69b50e7)...
homegear-ws-0.0.1.js:169 Client authenticated.
homegear-ws-0.0.1.js:128 Server authenticated.
homegear-ws-0.0.1.js:273 Subscribing to peers (2):
homegear-ws-0.0.1.js:274 []
homegear-ws-0.0.1.js:101 Ready.
homegear-ws-0.0.1.js:308 Invoking RPC method: {"jsonrpc":"2.0","method":"getAllValues","id":1,"params":[2]}
VM1807:37 WebSocket connection to 'ws://192.168.2.124:2001/HomegearApp-7cf3fdda-3384-0177-2bb6-6318a69b50e7' failed: Could not decode a text frame as UTF-8.
WrappedWebSocket @ VM1807:37
WrappedWebSocket @ VM1830:37
HomegearWS.connectClient @ homegear-ws-0.0.1.js:163
HomegearWS.connect @ homegear-ws-0.0.1.js:68
(anonymous) @ index.php:62
j @ jquery.2.1.4.min.js:2
fireWith @ jquery.2.1.4.min.js:2
ready @ jquery.2.1.4.min.js:2
I @ jquery.2.1.4.min.js:2
homegear-ws-0.0.1.js:90 Error: undefined
homegear-ws-0.0.1.js:90 Error: Client disconnected.
homegear-ws-0.0.1.js:112 Event:
homegear-ws-0.0.1.js:113 Object {id: 504, jsonrpc: "2.0", method: "error", params: Array(3)}
Vom Timing sollte das in etwa gleich sein, also wohl eher nicht das verkürzte Timeout.
Anbei zwei Logs mit Loglevel 5. homegear-peerid2.log.txt mit dem Fehler und die andere mit funktionierendem Peer 1.
homegear-peerid2.log.txt (70,6 KB)
homegear-peerid1.log.txt (158,4 KB)