Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.3.0 build 3063 - 10 January 2020.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    Cumulus MX with Swedish locale

    Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

    Moderator: mcrossley

    Post Reply
    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Cumulus MX with Swedish locale

    Post by rogerthn » Sat 30 May 2015 8:26 pm

    Almost there :D
    I've Cumulus running on Windows 8.1 and would like to replace it with my Raspberry PI 2.
    To transfer "everything" from Windows to Raspberry I did install FileZilla Server on Windows, created a user Cumulus with C:\Cumulus as Home.
    On Raspberry I did download CumulusMXDist3025.zip to /home/pi/Download and created the folder /home/pi/Download/CumulusMX
    Installed mono according to http://sandaysoft.com/forum/viewtopic.php?f=27&t=13587
    Installed lftp (sudo apt-get install lftp) and created a script as below

    Code: Select all

    #!/bin/bash
    echo $0 started `date +%Y-%m-%d\ %H:%M:%S`
    # Fix file owner
    sudo chown -R pi:pi /home/pi/Download/CumulusMX/*
    HOST="192.168.10.211"
    USER="Cumulus"
    PASS="password"
    FTPURL="ftp://$USER:$PASS@$HOST"
    LCD="/home/pi/Download/CumulusMX"
    DELETE="--delete"
    lftp -c "set ftp:list-options -a;
    open '$FTPURL';
    lcd $LCD;
    cd $RCD;
    mirror $DELETE --use-cache --verbose --no-perms --no-umask"
    echo $0 done `date +%Y-%m-%d\ %H:%M:%S`
    
    Once Cumulus.ini on my Windows PC was saved as UTF-8 I could use Trollhättan in LocName :-)
    Cumulus stopped on Windows and USB moved to Raspberry.
    Run my script and then I did sed as below on Cumulus.ini and all ini-files in data/

    Code: Select all

    sed '/[0-9],[0-9]/s/,/./g' 

    sed as below was also used on Cumulus.ini

    Code: Select all

    sed '/C:\\Cumulus\\/s/C:\\Cumulus\\/\/home\/pi\/Download\/CumulusMX\//g'
    cd into /home/pi/Download and unzip of CumulusMXDist3025.zip
    Starting as below

    Code: Select all

    sudo su -
    export LANG=sv_SE.UTF-8
    cd /home/pi/Download/CumulusMX
    mono CumulusMX.exe -lang sv-SE
    The only? remaining issue is the name on the "month file" i.e. it used to be maj15log.txt but now it is Maj15log.txt and this makes a difference on Linux :-(

    Code: Select all

    pi@PI2 ~ $ echo $LANG
    en_GB.UTF-8
    pi@PI2 ~ $ date +%b%y
    May15
    pi@PI2 ~ $ export LANG=sv_SE.UTF-8
    pi@PI2 ~ $ date +%b%y
    maj15
    
    Is this configurable for Cumulus MX?
    Image

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by steve » Sun 31 May 2015 6:39 am

    rogerthn wrote:The only? remaining issue is the name on the "month file" i.e. it used to be maj15log.txt but now it is Maj15log.txt and this makes a difference on Linux
    Do you mean Maj15log.txt or May15log.txt as below?
    pi@PI2 ~ $ echo $LANG
    en_GB.UTF-8
    pi@PI2 ~ $ date +%b%y
    May15
    pi@PI2 ~ $ export LANG=sv_SE.UTF-8
    pi@PI2 ~ $ date +%b%y
    maj15
    If you're running it with a Swedish locale, it should get the date formatting from that. What locale do you have the Pi set to? Please attach the latest mxdiags file.
    Steve

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 31 May 2015 7:52 am

    The spelling is correct but not the "shift mode"
    maj15 != Maj15
    MXdiags.zip attached
    You do not have the required permissions to view the files attached to this post.
    Image

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by steve » Sun 31 May 2015 8:47 am

    If I run MX on my Pi running Raspbian, with "sudo mono CumulusMX.exe -lang sv-SE" it creates a log file called maj15log.txt. I don't know what it is about your system that is causing it to give 'Maj' as the short month name, unless it's something to do with the different way that you have chosen to start MX.
    Steve

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 31 May 2015 8:53 am

    OK, I'll give it a try without export LANG=sv_SE.UTF-8 later today.
    Image

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 31 May 2015 12:00 pm

    Still Maj15log.txt starting with "sudo mono CumulusMX.exe -lang sv-SE" using PuTTY
    I'm running on a PI 2 with mono according to http://sandaysoft.com/forum/viewtopic.php?f=27&t=13587.
    Maybe you are running the older mono?

    There seems to be some "issues" with datetime format with mono on Raspberry, are you able to share the
    "filename creation code"?
    Image

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by steve » Sun 31 May 2015 12:08 pm

    Yes, I'm still using Mono 3.2.8. The filename creation code just uses the "MMM" date format specifier on a DateTime value:

    Code: Select all

    return Datapath + logfiledate.ToString("MMMyy")+ "log.txt";
    Steve

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 31 May 2015 1:21 pm

    Some results when running attached HelloWorldMMMyy.exe
    Swedish W8.1
    C:\>HelloWorldMMMyy.exe
    Hello World, below is DateTime.Now.ToString("MMMyy")
    maj15

    It's the same on English W7 Pro with Swedish Region and Language Formats
    pi@PI2 ~ $ mono --version
    Mono JIT compiler version 4.0.1 (tarball Tue May 12 17:22:22 UTC 2015)
    pi@PI2 ~ $ echo $LANG
    en_GB.UTF-8
    pi@PI2 ~ $ mono HelloWorldMMMyy.exe
    Hello World, below is DateTime.Now.ToString("MMMyy")
    May15
    pi@PI2 ~ $ mono --version
    Mono JIT compiler version 4.0.1 (tarball Tue May 12 17:22:22 UTC 2015)
    pi@PI2 ~ $ echo $LANG
    sv_SE.UTF-8
    pi@PI2 ~ $ mono HelloWorldMMMyy.exe
    Hello World, below is DateTime.Now.ToString("MMMyy")
    Maj15
    Maybe it could be tested on Mono 3.2.8 before and after "export LANG=sv_SE.UTF-8"?

    File created with MonoDevelop on my PI 2, code below.

    Code: Select all

    using System;
    namespace HelloWorld
    {
            class MainClass
            {
                    public static void Main (string[] args)
                    {
                            Console.WriteLine ("Hello World, below is DateTime.Now.ToString(\"MMMyy\")");
                            Console.WriteLine (DateTime.Now.ToString("MMMyy"));
                    }
            }
    }
    
    You do not have the required permissions to view the files attached to this post.
    Image

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by steve » Sun 31 May 2015 1:33 pm

    Code: Select all

    pi@raspberrypi /mnt/samsung/steve $ mono --version
    Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4+rpi1)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    	TLS:           __thread
    	SIGSEGV:       normal
    	Notifications: epoll
    	Architecture:  armel,vfp+hard
    	Disabled:      none
    	Misc:          softdebug 
    	LLVM:          supported, not enabled.
    	GC:            sgen
    pi@raspberrypi /mnt/samsung/steve $ mono HelloWorldMMMyy.exe 
    Hello World, below is DateTime.Now.ToString("MMMyy")
    May15
    pi@raspberrypi /mnt/samsung/steve $ export LANG=sv_SE.UTF-8
    pi@raspberrypi /mnt/samsung/steve $ mono HelloWorldMMMyy.exe 
    Hello World, below is DateTime.Now.ToString("MMMyy")
    maj15
    pi@raspberrypi /mnt/samsung/steve $ 
    Looks like a bug in Mono 4.0.1
    Steve

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 31 May 2015 1:35 pm

    steve wrote: Looks like a bug in Mono 4.0.1
    Yes :cry:
    Image

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by steve » Sun 31 May 2015 1:50 pm

    At the time those instructions I posted for getting the later version were written, it appears that 3.10.0 was the latest version - http://www.hanselman.com/blog/HowToRunA ... ryPi2.aspx

    The same steps presumably now install 4.0.1? I wonder if 3.10.0 has the same bug...
    Steve

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 31 May 2015 4:06 pm

    OK, I'll do some digging.
    Image

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Mon 01 Jun 2015 4:24 pm

    Image

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Thu 04 Jun 2015 5:53 pm

    Looks like the bug has been there since version 3.4.0 :bash:

    Correct with 3.2.8

    Code: Select all

    [roger@CentOS ~]$ mono -V
    Mono JIT compiler version 3.2.8 (tarball Thu Jun  4 19:06:42 CEST 2015)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       altstack
            Notifications: epoll
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug
            LLVM:          supported, not enabled.
            GC:            sgen
    [roger@CentOS ~]$ mono HelloWorldMMM.exe
    Hello World, below is DateTime.Now.ToString MMM, MMMM, ddd and dddd
    jun
    juni
    tor
    torsdag
    Incorrect with 3.4.0 and later

    Code: Select all

    [roger@CentOS ~]$ mono -V
    Mono JIT compiler version 3.4.0 (tarball Thu Jun  4 18:43:38 CEST 2015)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       altstack
            Notifications: epoll
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug
            LLVM:          supported, not enabled 
            GC:            sgen
    [roger@CentOS ~]$ mono HelloWorldMMM.exe
    Hello World, below is DateTime.Now.ToString MMM, MMMM, ddd and dddd
    Jun
    Juni
    Tor
    torsdag
    Image

    rogerthn
    Posts: 163
    Joined: Thu 11 Apr 2013 6:31 pm
    Weather Station: Oregon Scientific WMR88
    Operating System: Raspbian GNU/Linux 8
    Location: Trollhättan Sweden
    Contact:

    Re: Cumulus MX with Swedish locale

    Post by rogerthn » Sun 20 Dec 2015 5:16 pm

    Looks like Mono 3.2.8 is OK with Swedish locale :lol:
    https://www2.rogerthn.se/weather/index.htm

    Banana PI M1 running Raspbian wheezy with Mono 3.2.8
    Locales generated: en_GB.UTF-8 and sv_SE.UTF-8 with en_GB.UTF-8 as default

    Starting with

    Code: Select all

    sudo mono CumulusMX.exe -lang sv-SE
    Next step will be to find a PI for the new weather station :P
    Image

    Post Reply