more G-Labs products

Author Topic: Constant Event Stream connect/disconnect  (Read 1765 times)

November 01, 2015, 01:32:11 PM
Read 1765 times

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
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

November 01, 2015, 02:02:32 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer

November 01, 2015, 03:01:15 PM
Reply #2

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
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

November 01, 2015, 03:13:58 PM
Reply #3

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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/

g.

November 01, 2015, 06:52:12 PM
Reply #4

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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.
« Last Edit: November 01, 2015, 06:57:13 PM by bkenobi »

November 01, 2015, 08:01:10 PM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
hi bkenobi,

is there any error reported in the log?

November 01, 2015, 08:09:54 PM
Reply #6

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer

November 01, 2015, 08:36:01 PM
Reply #7

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
[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.
« Last Edit: November 01, 2015, 08:44:09 PM by Gene »

November 02, 2015, 08:57:27 AM
Reply #8

emerich

  • ***
  • Information
  • Full Member
  • Posts: 73
 :) Thanks Gene for your investigation and the fix!!!! :)

br. Christian