Ole8700 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
1 stars 0 forks source link

gTalk XMPP messages are bounced back as error and cause infinite loop #255

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use google talk as XMPP configuration
2. send items message
3. this will cause an infinite number of answers

What is the expected output? What do you see instead?

21:17:39.018 INFO  o.o.u.w.i.s.WebAppServlet[:99]- Started Classic UI at 
/openhab.app
21:18:25.630 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
null
21:18:28.505 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
help
21:18:32.534 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
null
21:18:33.844 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
items
21:18:34.305 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
FF_Office (Type=GroupItem, Members=3, State=Uninitialized)
21:18:34.332 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
FF_Child (Type=GroupItem, Members=1, State=Uninitialized)
21:18:34.352 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
FF_Bed (Type=GroupItem, Members=1, State=Uninitialized)
21:18:34.372 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
FF_Gallery (Type=GroupItem, Members=1, State=Uninitialized)
21:18:34.394 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Lights (Type=GroupItem, BaseType=SwitchItem, Members=7, State=Uninitialized)
21:18:34.415 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_GF_TV_Wall (Type=DimmerItem, State=Uninitialized)
21:18:34.435 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_FF_Office_Ceiling (Type=SwitchItem, State=Uninitialized)
21:18:34.456 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_FF_Gallery_Ceiling (Type=DimmerItem, State=Uninitialized)
21:18:34.488 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_FF_Child_Ceiling (Type=SwitchItem, State=Uninitialized)
21:18:34.518 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_FF_Bed_Ceiling (Type=DimmerItem, State=Uninitialized)
21:18:34.543 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_FF_Bath_Ceiling (Type=SwitchItem, State=Uninitialized)
21:18:34.564 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Light_FF_Bath_Mirror (Type=SwitchItem, State=Uninitialized)
21:18:34.582 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_all (Type=SwitchItem, State=Uninitialized)
21:18:34.612 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Living_1 (Type=RollershutterItem, State=Uninitialized)
21:18:34.636 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Living_2 (Type=RollershutterItem, State=Uninitialized)
21:18:34.662 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Living_3 (Type=RollershutterItem, State=Uninitialized)
21:18:34.674 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Living_4 (Type=RollershutterItem, State=Uninitialized)
21:18:34.700 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Living_TV1 (Type=RollershutterItem, State=Uninitialized)
21:18:34.716 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Living_TV2 (Type=RollershutterItem, State=Uninitialized)
21:18:34.728 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Kitchen_1 (Type=RollershutterItem, State=Uninitialized)
21:18:34.759 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Kitchen_2 (Type=RollershutterItem, State=Uninitialized)
21:18:34.773 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Kitchen_3 (Type=RollershutterItem, State=Uninitialized)
21:18:34.794 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_GF_Kitchen_4 (Type=RollershutterItem, State=Uninitialized)
21:18:34.815 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_FF_Office_Window (Type=RollershutterItem, State=Uninitialized)
21:18:34.828 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Shutter_FF_Office_Door (Type=RollershutterItem, State=Uninitialized)
21:18:34.840 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Weather_Chart (Type=GroupItem, Members=3, State=Undefined)
21:18:34.852 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Weather_Temperature (Type=NumberItem, State=13)
21:18:34.864 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Weather_Temp_Max (Type=NumberItem, State=Uninitialized)
21:18:34.876 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Weather_Temp_Min (Type=NumberItem, State=Uninitialized)
21:18:34.893 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Date (Type=DateTimeItem, State=Uninitialized)
21:18:34.905 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
update_greent (Type=SwitchItem, State=Uninitialized)
21:18:34.917 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Usage: 
update <item> <state> - sends a status update for an item
send <item> <command> - sends a command for an item
status <item> - shows the current status of an item
items [<pattern>] - lists names and types of all items matching the pattern
say <sentence to say> - Says a message through TTS on the host machine
> <script to execute> - Executes a script

21:18:34.935 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Usage: 
update <item> <state> - sends a status update for an item
send <item> <command> - sends a command for an item
status <item> - shows the current status of an item
items [<pattern>] - lists names and types of all items matching the pattern
say <sentence to say> - Says a message through TTS on the host machine
> <script to execute> - Executes a script

21:18:34.953 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Usage: 
update <item> <state> - sends a status update for an item
send <item> <command> - sends a command for an item
status <item> - shows the current status of an item
items [<pattern>] - lists names and types of all items matching the pattern
say <sentence to say> - Says a message through TTS on the host machine
> <script to execute> - Executes a script

This Block is repeated over and over every couple of milli seconds (until i 
kill the process):

21:18:34.953 DEBUG o.o.i.n.i.jabber.XMPPConsole[:80]- Received XMPP message: 
Usage: 
update <item> <state> - sends a status update for an item
send <item> <command> - sends a command for an item
status <item> - shows the current status of an item
items [<pattern>] - lists names and types of all items matching the pattern
say <sentence to say> - Says a message through TTS on the host machine
> <script to execute> - Executes a script

What version of the product are you using? On what operating system?
Version 1.2.0

Please provide any additional information below.

openhab should not answer to error messages. Therefore these messages have to 
be ignored:

org.openhab.io.net.internal.jabber.XMPPConsole

public void processMessage(Chat chat, Message msg) {
    logger.debug("Received XMPP message: {} of type {}", msg.getBody(),
        msg.getType());
if (msg.getType() != Message.Type.error) {
    String cmd = msg.getBody();
    String[] args = cmd.split(" ");
        ConsoleInterpreter.handleRequest(args, new ChatConsole(chat));
    }
}

Original issue reported on code.google.com by cpt.kump...@gmail.com on 24 Apr 2013 at 6:55

GoogleCodeExporter commented 9 years ago

Original comment by kai.openhab on 24 Apr 2013 at 7:09

GoogleCodeExporter commented 9 years ago
Fixed with changeset 
https://code.google.com/p/openhab/source/detail?r=808568355a5ee373dfe7f03c10e119
b8aea3f171

Original comment by kai.openhab on 26 Apr 2013 at 9:25