• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    Data Export

    Scheduled Pinned Locked Moved Dashboard
    6 Posts 2 Posters 3.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      esawyja
      last edited by

      Hi
      I saw an issue about exporting the data to csv format and that the feature was dropped in the 0.0.3 release
      https://github.com/mycontroller-org/mycontroller/issues/361
      But is there ANY way that I can export the data for a particular sensor, while we wait for the next release please, maybe some kind of script please or just some commands on how to view the H2 database?
      Regards

      jkandasaJ 1 Reply Last reply Reply Quote 0
      • jkandasaJ Offline
        jkandasa @esawyja
        last edited by

        @esawyja This request completed partially. To access database: http://forum.mycontroller.org/topic/18/forgotten-password

        1 Reply Last reply Reply Quote 0
        • E Offline
          esawyja
          last edited by

          aaah thank you once again @jkandasa

          1 Reply Last reply Reply Quote 0
          • E Offline
            esawyja
            last edited by jkandasa

            Hi @jkandasa
            I don't know if I'm doing something weird, but I get this below

            pi@mmm_gateway:~ $ sudo -i
            root@mmm_gateway:~# /opt/mycontroller/bin/stop.sh 
            Termination issued for Mycontroller.org server!
            root@mmm_gateway:~# ps -ef | grep myc
            root     18358 18300  0 13:14 pts/0    00:00:00 grep myc
            root@mmm_gateway:~# cd /opt/temp
            root@mmm_gateway:/opt/temp# ls -ltr
            total 30648
            -rw-r--r-- 1 root root  7791840 Apr  5  2014 h2-2014-04-05.zip
            root@mmm_gateway:/opt/temp# java -cp h2/bin/h2*.jar org.h2.tools.Shell
            
            Welcome to H2 Shell 1.3.176 (2014-04-05)
            Exit with Ctrl+C
            [Enter]   jdbc:h2:~/test
            URL       jdbc:h2:/opt/mycontroller/conf/mycontroller
            [Enter]   org.h2.Driver
            Driver    org.h2.Driver
            [Enter]   
            User      mycontroller
            [Enter]   Hide
            Password  mycontroller
            Connected
            Commands are case insensitive; SQL statements end with ';'
            help or ?      Display this help
            list           Toggle result list / stack trace mode
            maxwidth       Set maximum column width (default is 100)
            autocommit     Enable or disable autocommit
            history        Show the last 20 statements
            quit or exit   Close the connection and exit
            
            sql> select * from user;
            Error: org.h2.jdbc.JdbcSQLException: Table "USER" not found; SQL statement:
            select * from user [42102-176]
            sql> show databases;
            SCHEMA_NAME
            INFORMATION_SCHEMA
            PUBLIC
            (2 rows, 11 ms)
            sql> show tables;
            TABLE_NAME | TABLE_SCHEMA
            (0 rows, 19 ms)
            sql> quit
            Connection closed
            root@mmm_gateway:/opt/temp# /opt/mycontroller/bin/start.sh 
            /usr/bin/java
            java version: 1.8.0_65
            Start issued for Mycontroller
            root@mmm_gateway:/opt/temp# ps -ef | grep myc
            root     18403     1 99 13:16 pts/0    00:00:08 java -Xms8m -Xmx150m -Dlogback.configurationFile=../conf/logback.xml -Dmc.conf.file=../conf/mycontroller.properties -cp ../lib/* org.mycontroller.standalone.StartApp
            root     18434 18300  0 13:17 pts/0    00:00:00 grep myc
            root@mmm_gateway:/opt/temp# 
            

            Could you please point me in the right direction?

            jkandasaJ 1 Reply Last reply Reply Quote 0
            • jkandasaJ Offline
              jkandasa @esawyja
              last edited by

              @esawyja Steps you have followed are right. You have to check which version of H2 database are you using in your MyController. Status >> About

              0_1490286728698_upload-89b1b814-1421-4f92-a1cd-6e994801b3a7

              And download suitable version from here: http://www.h2database.com/html/download.html

              1 Reply Last reply Reply Quote 0
              • E Offline
                esawyja
                last edited by

                Thanks again @jkandasa , After downloading the correct version, I got it working!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                0

                Online

                587

                Users

                529

                Topics

                3.4k

                Posts
                Copyright © 2015-2025 MyController.org | Contributors | Localization