HomeGenie Forum

General Category => Troubleshooting and Support => Topic started by: emerich on November 01, 2015, 01:32:11 PM

Title: Constant Event Stream connect/disconnect
Post by: emerich on November 01, 2015, 01:32:11 PM
Hi,
I constantly get the messege Event stream connected and half a second later Event stream disconnected. I don't see any other messages beside these two.
I allready did a total uninstall and install of the software but without any change.

Anny suggestions?

Thanks Christian
Title: Re: Constant Event Stream connect/disconnect
Post by: Gene on November 01, 2015, 02:02:32 PM
Read this:

http://www.homegenie.it/forum/index.php?topic=1141.msg6914#msg6914 (http://www.homegenie.it/forum/index.php?topic=1141.msg6914#msg6914)

Title: Re: Constant Event Stream connect/disconnect
Post by: emerich on November 01, 2015, 03:01:15 PM
Hello,

I already tried to delete the homegenie directory and reinstalled on a "clean" System.
Still the same error, When ever I switch one of my modules I get the disconnect message and I think therefor the update uf the display is also missing.

br. Christian
Title: Re: Constant Event Stream connect/disconnect
Post by: Gene on November 01, 2015, 03:13:58 PM
Hi Christian,

the solution is to change your Raspberry Pi defalt locale to en_US.UTF-8.

Another solution could be upgrading mono to latest 4.x version.
http://www.mono-project.com/docs/getting-started/install/linux/ (http://www.mono-project.com/docs/getting-started/install/linux/)

g.
Title: Re: Constant Event Stream connect/disconnect
Post by: bkenobi on November 01, 2015, 06:52:12 PM
I seem to see the event stream disconnect/reconnect on my RPi from time to time and I have en_US.UTF-8 as my locale.  If the issue is constant then I don't see that.
Title: Re: Constant Event Stream connect/disconnect
Post by: Gene on November 01, 2015, 08:01:10 PM
hi bkenobi,

is there any error reported in the log?
Title: Re: Constant Event Stream connect/disconnect
Post by: Gene on November 01, 2015, 08:09:54 PM
Further info about the error "Input string was not in the correct format":

http://raspberrypi.stackexchange.com/questions/15051/parsing-double-in-mono-c-fails (http://raspberrypi.stackexchange.com/questions/15051/parsing-double-in-mono-c-fails)

g.
Title: [SOLVED] Re: Constant Event Stream connect/disconnect
Post by: Gene on November 01, 2015, 08:36:01 PM
[SOLUTION]

Change the startup.sh file like this:

Code: [Select]
sudo nano /usr/local/bin/homegenie/startup.sh

startup.sh
Code: [Select]
#!/bin/sh
#
# Usage: startup_debug.sh <homegenie_folder_path>
# Example: ./startup_debug.sh /usr/local/bin/homegenie
#
cd "`dirname \"$0\"`"
if [ -f /usr/bin/mono ]
then
    MONO="LC_ALL=en_US.UTF-8 /usr/bin/mono"
else
    MONO="LC_ALL=en_US.UTF-8 /usr/local/bin/mono"
fi

EXITCODE="1"
while [ "$EXITCODE" = "1" ]; do
    if [ -z "$1" ]
    then
        sudo $MONO HomeGenie.exe
    else
        cd $1
        sudo $MONO HomeGenie.exe >/dev/null  2>&1
    fi
    EXITCODE="$?"
    echo "Exit code: $EXITCODE"
done

Reboot your Raspberry Pi.

Notice the LC_ALL=en_US.UTF-8 in front of the mono executable path. This is the solution.
I will apply this fix to the next HG update.

Hope this will solve the issue for you all.
Cheers,
g.
Title: Re: Constant Event Stream connect/disconnect
Post by: emerich on November 02, 2015, 08:57:27 AM
 :) Thanks Gene for your investigation and the fix!!!! :)

br. Christian