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

    MyController 2.0 is ready for testing

    General Discussion
    2.0
    7
    22
    375
    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.
    • jkandasa
      jkandasa @j54n1n last edited by

      @j54n1n sorry for the delayed response.
      Actually you are accessing the storage data directly. Those data will be loaded at startup. and overwritten from memory on an interval mentioned on the mycontorller.yaml file.

      It is a Yaml list, you can configure any number of gateways on that file, file name should be as gateway__1.yaml

      You can omit state, modifiedon, lasttransaction fields.

      Please note: as this is storage schema (not exposed to end user directly), can be change in the future release. It may be an extra work for you, in case if there is a change in the future.

      j54n1n 1 Reply Last reply Reply Quote 0
      • j54n1n
        j54n1n @jkandasa last edited by j54n1n

        @jkandasa ok, thanks for your info on that topic.

        So maybe could there be in the future a more official way to script this? You mentioned for example in the Github issue from MyController v2 some form of scripting.

        Or maybe going back to the v1 approach of a backup file or something like that?

        Kind regards

        jkandasa 1 Reply Last reply Reply Quote 0
        • jkandasa
          jkandasa @j54n1n last edited by

          @j54n1n

          So maybe could there be in the future a more official way to script this?

          Possible options,

          • keep a backup and restore from that backup.
          • In the future I will show an example to add/modify a resource via API

          You mentioned for example in the Github issue from MyController v2 some form of scripting.

          I mentioned the script to convert the received values with specified math. script result supplied to the MyController.

          Or maybe going back to the v1 approach of a backup file or something like that?

          We have backup/restore option, in V2 it is possible to backup/restore to different databases (except metrics)

          1 Reply Last reply Reply Quote 0
          • j54n1n
            j54n1n last edited by

            Hello @jkandasa
            Today in the morning at startup of my Raspberry Pi I got a crash about concurrent map read/write in one of the goroutines. See also the file dump from my systemd service.

            Is it something serious to post it as an issue on Github?

            jkandasa 2 Replies Last reply Reply Quote 0
            • jkandasa
              jkandasa @j54n1n last edited by

              Hi @j54n1n, yes, please report in GitHub. Thanks for your time on this!

              1 Reply Last reply Reply Quote 0
              • jkandasa
                jkandasa @j54n1n last edited by

                @j54n1n Are you seeing this issue on startup of the MyController server?

                j54n1n 1 Reply Last reply Reply Quote 0
                • j54n1n
                  j54n1n @jkandasa last edited by j54n1n

                  @jkandasa yes it was at startup, but only once so far and after a restart of the service I did not see that again. Maybe some type of race condition? Could it be that it depends if either influxdb or mosquitto are ready or not at boot?

                  This is the service unit file that I am using:

                  [Unit]
                  Description=MyController.org v2 daemon
                  Requires=network.target
                  After=influxdb.service
                  
                  [Service]
                  User=mycontroller
                  Group=mycontroller
                  WorkingDirectory=/opt/apps/mycontroller
                  ExecStart=/opt/apps/mycontroller/mycontroller-server -config /opt/apps/mycontroller/mycontroller.yaml
                  
                  [Install]
                  WantedBy=multi-user.target
                  
                  jkandasa 1 Reply Last reply Reply Quote 1
                  • jkandasa
                    jkandasa @j54n1n last edited by

                    @j54n1n Yes, it should be race condition. I will look into the code carefully.

                    1 Reply Last reply Reply Quote 0
                    • JackFarrellHSul
                      JackFarrellHSul last edited by JackFarrellHSul

                      Hi, I'm interested. Can I contact you in PM?

                      1 Reply Last reply Reply Quote 0
                      • Pinned by  jkandasa jkandasa 
                      • R
                        RMF69 last edited by

                        I'm trying to install the docker image, but can't get it to start up... Dosn't seem to pick up the yaml file as using defaults... {"error": "Get \"https://ipinfo.io/json\": dial tcp 0.0.0.0:443: connect: connection refused"} ```

                        I've install everything on the quick install page... and use the following docker command

                        docker run --detach --name mycontroller2b   --publish 8081:8080   --publish 8443:8443   --publish 9443:9443   --volume /root/mycontroller/mc_home:/mc_home   --volume /root/mycontroller/mycontroller.yaml:/app/mycontroller.yaml   --env TZ="Europe/Prague"   --restart unless-stopped   docker.io/mycontroller/server:master
                        

                        is the

                        :/app/mycontroller.yaml 
                        

                        correct ?
                        Thanks

                        jkandasa 1 Reply Last reply Reply Quote 0
                        • jkandasa
                          jkandasa @RMF69 last edited by

                          @rmf69 said in MyController 2.0 is ready for testing:

                          {"error": "Get "https://ipinfo.io/json": dial tcp 0.0.0.0:443: connect: connection refused"}

                          This error may be due to you do not have internet access of your firewall blocks https://ipinfo.io/json
                          To avoid this error disable auto location detection feature and enter your location details manually.
                          169ca077-f371-43f9-9e8d-36b9f9ac47a8-image.png

                          I do not see any error in the docker run. Can you please double check the availability of the mycontroller.yaml on your host machine?

                          enter into the docker container and verify the file

                          # docker exec -it mycontroller2b /bin/sh
                          /app # cat /app/mycontroller.yaml
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          0
                          Online

                          641
                          Users

                          498
                          Topics

                          3.2k
                          Posts

                          Copyright © 2015-2022 MyController.org | Contributors | Localization