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

    MyController 2.0 is ready for testing

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

      @jkandasa I'm in for a new version!!!

      1 Reply Last reply Reply Quote 1
      • P
        pillarama @jkandasa last edited by

        @jkandasa Yes,I would be keen to give it a try! Thanks again for the time and effort you have invested in both legacy and new controllers!

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

          @jkandasa Hello, I would also like to try out your new version. At our school we have been using your old v1 Java implementation for our weather station build by our students. It is running on a Raspberry Pi connected to the serial pins via radio receiving data from a custom made MySensors node.

          You can find our old setup code here: https://gitlab.com/rrbz/meteo/metteo/-/blob/0241002c06f0258949590810258b72c2a95ff543/metteo-config.lib.sh#L380-492

          Basically we setup everything by overwriting the initial configuration by a preconfigured MyController settings backup and do a little housekeeping with systemd unit files.

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

            @pillarama @j54n1n Thanks for your interest in v2. Currently, I am working on the installation documentation. I will keep informed you

            @j54n1n your setup looks interesting! Thanks for sharing the setup code!

            1 Reply Last reply Reply Quote 0
            • H
              HJ_SK last edited by

              I'm using mysensors with domoticz and would like to assist you with good testing. Let me know how to start with it!

              jkandasa 2 Replies Last reply Reply Quote 1
              • jkandasa
                jkandasa @HJ_SK last edited by

                @hj_sk Welcome to MyController community 🙂
                Thanks for your interest
                I am working/reworking on documentation.
                I will keep informed you.

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

                  Hi @hj_sk I have updated the V2 doc to install MyController server v2. But still lot things to be updated.
                  Kindly follow the document and let me know if you see an issue.
                  Thanks!

                  Documentation: https://v2.mycontroller.org

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

                    Hello @jkandasa,

                    In the meantime I did some test runs with the weather station and I did notice some things.

                    1. The forecast field is missing its text value and it is showing always 0 instead, like so:
                      Screenshot 2021-07-31 at 11-44-42 MyController org - The Open Source Controller.png
                      I think it is related to how you map the MySensors field data types. Here at plugin/gateway/provider/mysensors_v2/constant.go you map it as a float type, but according to the MySensors Protocol 2.x documentation it should be a string of either "stable", "sunny", "cloudy", "unstable", "thunderstorm" or "unknown". Your old v1 controller seems to intercept that correctly and shows for example the sun or the cloud symbol. Do you intent that to do the same also in your new v2?

                    2. Regarding the data types it seems when the type none is mapped a string can be displayed for a field. For example this is the case for your old v1 style RSSI indicator message:
                      Screenshot 2021-07-31 at 12-00-53 MyController org - The Open Source Controller.png
                      So maybe the first point can be partly resolved by changing the type. Furthermore do you intent also reuse your old style RSSI message to let it show at the node status page? Or do you want to support either the MySensors I_SIGNAL_REPORT_REQUEST feature or the NodeManagers signal sensor to show its value at the node status page? In my case the later solution would fit the best because our node is sleeping most of the time without smart sleep to conserve power.

                    3. Currently the internal message for the battery percentage is not showing up anywhere. Also there your old v1 controller would show the percentage on the node status page. The MySensors implementation is similar as the NodeManagers SensorSignal solution but it is using an internal message type.

                    So I think that was everything for now. I am curious what you are thinking about it.
                    Thanks in advance and kind regards.

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

                      @j54n1n Thanks for the detailed report. I have added a GH issue to track this
                      https://github.com/mycontroller-org/server/issues/2

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

                        Hello @jkandasa,
                        Now I am trying to automatize the installation of MyController v2 from within a Bash script, where I want to preset the MySensors gateway.

                        I found your documentation at https://v2.mycontroller.org/docs/user-interface/resources/gateway-mysensors/ where you show also as an example a yaml file. Furthermore I found within the directory mc_home/data/storage/memory_db/yaml/ a file called gateway__1.yaml with the settings of the gateway that I inserted via the web UI.

                        The content of the file is like the following:

                        - id: MySensors
                          description: MySensors Serial 2MQTT Bridge
                          enabled: true
                          reconnectdelay: 30s
                          queuefailedmessage: false
                          provider:
                            enableInternalMessageAck: true
                            protocol:
                              broker: tcp://127.0.0.1:1883
                              publish: mysensors-in
                              qos: 0
                              subscribe: mysensors-out/#
                              transmitPreDelay: 10ms
                              type: mqtt
                            retryCount: 3
                            timeout: 500ms
                            type: mysensors_v2
                          messagelogger:
                            type: none
                          labels:
                            location: server
                          others: {}
                          state:
                            status: up
                            message: Started successfully
                            since: 2021-08-06T17:40:06.560894835+02:00
                          modifiedon: 0001-01-01T00:00:00Z
                          lasttransaction: 0001-01-01T00:00:00Z
                        

                        Can I simply assume that if I drop such a yaml file in that folder that a new installation of MyController v2 will simply pick it up or do I need to setup also something else?

                        Also most likely in the preconfigured yaml file I can simply drop the part of state:, modifiedon: and lasttransaction:, right?

                        Also can be the name of the file anything or do I need to follow some convention?

                        Thanks

                        jkandasa 1 Reply Last reply Reply Quote 0
                        • 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
                                            • First post
                                              Last post

                                            0
                                            Online

                                            647
                                            Users

                                            506
                                            Topics

                                            3.3k
                                            Posts

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