Announcement

Collapse
No announcement yet.

Excessive CPU and Excessive MQTT Topics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Pete View Post
    Thank you Michael.

    Just an FYI ....typically when looking at the plugins under plugin manager the name is linked to the configuration menu and I noticed that your plugin is not linked.

    [ATTACH]67881[/ATTACH]
    That link is optional and is sometimes used for a different purpose such as the zwave plugin.
    However, having it point to the config is nice when you are on a mobile phone.
    https://forums.homeseer.com/forum/de...plifier-plugin

    Comment


      4/1/18 was the last update I had from my broker and the latitude and longitude was that of my brothers house where I was for Easter dinner. So mcsmqtt was working and quit while I wasn't even home. Haven't been able to get it to work since so I did a complete UN-install and installed it completely fresh version 3.2.9.3.

      my linux install with nothing running averages around 3% CPU. With Homeseer running I average around 25%. Enabling mcsmqtt without configuring anything takes me to 65%. The plugin seems to be very busy not doing anything.

      Entered localhost, username, and password and plugin connects but CPU is stuck at 100%.
      Last edited by happnatious1; April 4, 2018, 09:16 AM.
      https://forums.homeseer.com/forum/de...plifier-plugin

      Comment


        Hi Michael,
        Was able to give 3.2.9.2 a test and unfortunately, it has the same blank settings screen. The rogue debug file has been fixed though. Attached are the latest debugs.

        I have a theory. I believe you are running a more current version of Mono on your linux box, correct? I believe you said it was 5.4.1.7 ?

        As of December the most current version HomeSeer is shipping on their SELs is 5.0.1.1. I'm sure you're aware, but just in case, A SEL is the closest thing to building your own linux box, which is what you did, I believe. I think they are using an older mono version due to incompatibilities, one of which I mentioned before, aspx pages.

        I have a feeling we could be running into a situation caused by using a much later mono version than HomeSeer supports. There are vast differences between mono versions and from what I've seen the most recent version updates are mostly for C# and they also support a few different vb.net functions. I have a feeling you are testing your PI against a much later mono version that supports different functions or behaves differently and this is causing the difference between what you and I are experiencing.

        BTW, it looks like happnatious1 is experiencing the same thing as me. His is behaving much the same as mine did. Worked then all of a sudden didn't.

        Would it be possible for you to test with a version of mono that HomeSeer is known to support? Below are the Linux commands that should help with this.

        First, shut down the HomeSeer process. You should be able to do this in Tools >System > Shutdown HomeSeer.

        Then remove your existing version of mono.

        Code:
        sudo apt remove --purge --auto-remove mono-complete
        sudo apt-get autoremove
        sudo rm -rf usr/lib/mono /usr/local/bin/mono /usr/local/etc/mono /usr/local/lib/mono
        You'll then need to edit the file etc/apt/sources.list.d/ monomono-official.list

        and change the following

        Code:
        deb http://download.mono-project.com/repo/ubuntu xenial main
        to be

        Code:
        deb http://download.mono- project.com/repo/ubuntu xenial/snapshots/5.0.1.1 main
        update the package repositories

        Code:
        sudo apt-get update
        reinstall mono

        Code:
        sudo apt-get install mono-complete
        verify 5.0.1.1 is installed.

        Code:
        mono -V
        Attached Files

        Comment


          I'll see what I can do. I will be traveling later today so if I do not before I leave then I will take things with me so I can follow your instructions tomorrow.

          Nothing unusual in you debug file. I can see where the Page was done in a little under two seconds. Are you aware that the database has 300'ish of your HS Devices?

          Comment


            Just an FYI ....typically when looking at the plugins under plugin manager the name is linked to the configuration menu and I noticed that your plugin is not linked.
            That link is optional and is sometimes used for a different purpose such as the zwave plugin.
            However, having it point to the config is nice when you are on a mobile phone.
            I was not aware of the implications of ConfigLink. I have never done it, but will look at the SDK to get is associated.

            Comment


              Originally posted by Michael McSharry View Post
              I'll see what I can do. I will be traveling later today so if I do not before I leave then I will take things with me so I can follow your instructions tomorrow.

              Nothing unusual in you debug file. I can see where the Page was done in a little under two seconds. Are you aware that the database has 300'ish of your HS Devices?
              Sounds good, let me know if you have any questions. I've done the mono uninstall and reinstall a few times

              Yes, unfortunately, I cannot remember the config setting to disable enumerate, just dealing with it for the time being.

              Comment


                I do not have the

                You'll then need to edit the file etc/apt/sources.list.d/ monomono-official.list

                What I do have in /sources.list.d is mono-xamarin.list and raspi.list. In the mono one it contains

                Code:
                deb http://download.mono-project.com/repo/debian stretch main
                What I done in the past is the following. What do I change since I am on RPi/Stretch rather than Ubuntu?

                Code:
                apt-get install dirmngr --install-recommends
                apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys
                3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
                echo "deb [url]http://download.mono-project.com/repo/debian[/url] jessie main" | sudo tee
                /etc/apt/sources.list.d/mono-xamarin.list
                apt-get update
                apt-get install mono-complete
                apt-get install mono-vbnc

                Comment


                  I changed the deb to be "deb http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 main"

                  I end up with broken packages as shown below. Looks like it is not going to be that easy to recreate an environment like yours.


                  Code:
                  root@RPi3:/usr/local# apt-get update
                  Ign:1 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 InR    elease
                  Ign:2 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 Rel    ease
                  Ign:3 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n all Packages
                  Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n armhf Packages
                  Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en
                  Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en_GB
                  Ign:3 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n all Packages
                  Get:7 https://www.mirrorservice.org/sites/archive.raspbian.org/raspbian stretch     InRelease [15.0 kB]
                  Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n armhf Packages
                  Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en
                  Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en_GB
                  Get:8 https://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]
                  Ign:3 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n all Packages
                  Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n armhf Packages
                  Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en
                  Get:9 https://www.mirrorservice.org/sites/archive.raspbian.org/raspbian stretch/    main armhf Packages [11.7 MB]
                  Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en_GB
                  Ign:3 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n all Packages
                  Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n armhf Packages
                  Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en
                  Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en_GB
                  Ign:3 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n all Packages
                  Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n armhf Packages
                  Get:10 https://archive.raspberrypi.org/debian stretch/main armhf Packages [144 k    B]
                  Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en
                  Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en_GB
                  Ign:3 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n all Packages
                  Err:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n armhf Packages
                    404  Not Found
                  Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en
                  Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/mai    n Translation-en_GB
                  Get:11 https://archive.raspberrypi.org/debian stretch/ui armhf Packages [28.2 kB    ]
                  Get:12 https://www.mirrorservice.org/sites/archive.raspbian.org/raspbian stretch    /contrib armhf Packages [56.8 kB]
                  Fetched 11.9 MB in 1min 44s (114 kB/s)
                  Reading package lists... Done
                  W: The repository 'http://download.mono-project.com/repo/debian stretch/snapshot    s/5.0.1.1 Release' does not have a Release file.
                  N: Data from such a repository can't be authenticated and is therefore potential    ly dangerous to use.
                  N: See apt-secure(8) manpage for repository creation and user configuration deta    ils.
                  E: Failed to fetch http://download.mono-project.com/repo/debian/dists/stretch/sn    apshots/5.0.1.1/main/binary-armhf/Packages  404  Not Found
                  E: Some index files failed to download. They have been ignored, or old ones used     instead.
                  root@RPi3:/usr/local# apt-get install mono-complete
                  Reading package lists... Done
                  Building dependency tree
                  Reading state information... Done
                  Some packages could not be installed. This may mean that you have
                  requested an impossible situation or if you are using the unstable
                  distribution that some required packages have not yet been created
                  or been moved out of Incoming.
                  The following information may help to resolve the situation:
                  
                  The following packages have unmet dependencies:
                   mono-complete : Depends: mono-runtime (= 4.6.2.7+dfsg-1) but 5.4.1.7-0xamarin1+    debian9b1 is to be installed
                                   Depends: mono-runtime-sgen (= 4.6.2.7+dfsg-1) but 5.4.1.7-0xama    rin1+debian9b1 is to be installed
                                   Depends: mono-utils (= 4.6.2.7+dfsg-1) but it is not going to b    e installed
                                   Depends: mono-devel (= 4.6.2.7+dfsg-1) but it is not going to b    e installed
                                   Depends: mono-mcs (= 4.6.2.7+dfsg-1) but it is not going to be     installed
                                   Depends: mono-4.0-gac (= 4.6.2.7+dfsg-1) but 5.4.1.7-0xamarin1+    debian9b1 is to be installed
                                   Depends: libmono-cil-dev (= 4.6.2.7+dfsg-1) but it is not going     to be installed
                                   Depends: ca-certificates-mono (= 4.6.2.7+dfsg-1) but 5.4.1.7-0x    amarin1+debian9b1 is to be installed
                  E: Unable to correct problems, you have held broken packages.
                  root@RPi3:/usr/local#
                  When I change mono-xamarin.list to "deb http://download.mono- project.com/repo/ubuntu xenial/snapshots/5.0.1.1 main" I also do not have success

                  Code:
                  root@RPi3:/usr/local# apt-get update
                  Err:1 http://download.mono- project.com/repo/ubuntu InRelease
                    Could not resolve 'download.mono-'
                  Hit:2 https://www.mirrorservice.org/sites/archive.raspbian.org/raspbian stretch InRelease
                  Hit:3 https://archive.raspberrypi.org/debian stretch InRelease
                  Reading package lists... Done
                  W: Failed to fetch http://download.mono-/dists/project.com/repo/ubuntu/InRelease  Could not resolve 'download.mono-'
                  W: Some index files failed to download. They have been ignored, or old ones used instead.
                  root@RPi3:/usr/local#
                  Next try was to create monomono-official list and removed my other two in sources.list.d. Similar result

                  Code:
                  root@RPi3:/usr/local# apt-get update
                  Err:1 http://download.mono- project.com/repo/ubuntu InRelease
                    Could not resolve 'download.mono-'
                  Hit:2 https://www.mirrorservice.org/sites/archive.raspbian.org/raspbian stretch InRelease
                  Reading package lists... Done
                  W: Failed to fetch http://download.mono-/dists/project.com/repo/ubuntu/InRelease  Could not resolve 'download.mono-'
                  W: Some index files failed to download. They have been ignored, or old ones used instead.
                  root@RPi3:/usr/local#
                  Last edited by Michael McSharry; April 4, 2018, 05:16 PM.

                  Comment


                    Comment


                      It is RPi 3 Model B armhfv71. DietPi Stretch. Redoing image now so next Mono install will be the first on this image.

                      Comment


                        Hi Michael,

                        I'm not really sure what happened but I've been tinkering and testing quite a bit. I decided to make sure that I can reliably connect with terminals using a user-name and password over port 1883 on localhost and send data over the Internet using lets-encrypt ssl over port 8883. I ended up changing some syntax in my mosquito broker config file. once every thing was working I fired up mcsmqtt and low and behold cpu barely changed. It's been running for about 20 minutes, granted owntracks is barely sending data because I'm not moving but better than previous experience.

                        Maybe there needs to be some try catch blocks for when things go amiss? Just guessing.

                        Anyways I'll let Homeseer putter along and update if anything happens.

                        Thanks,

                        Bill
                        https://forums.homeseer.com/forum/de...plifier-plugin

                        Comment


                          Good that things are looking better.

                          Thanks for the suggestion on error traps. There are very few places where Try/Catch is not used and in those they exist at the next level up. When I test on Windows I run with VS Debugger set to trap on first exception. While I may get some exceptions on new code, I usually don't get any. When they occur I do output to either the Debug Log or the HS Log.

                          Comment


                            I recognize that you have done some plugin work so friendly with VS. I am more than willing to share source to help zero-in on issues.

                            Comment


                              Excessive CPU and Excessive MQTT Topics

                              Originally posted by Michael McSharry View Post
                              It is RPi 3 Model B armhfv71. DietPi Stretch. Redoing image now so next Mono install will be the first on this image.

                              Comment


                                Similiar result on clean build. It looks like there is no 5.0.1.1 for Debian Stretch. Do you have image reference that I can use on a RPi3 that will allow me to recreate your setup?
                                Code:
                                root@RPi3:~# echo "deb http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
                                deb http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 main
                                root@RPi3:~# apt-get update
                                Ign:1 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 InRelease
                                Ign:2 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 Release
                                Get:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
                                Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main all Packages
                                Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main armhf Packages
                                Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en
                                Ign:7 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en_GB
                                Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main all Packages
                                Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main armhf Packages
                                Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en
                                Ign:7 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en_GB
                                Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main all Packages
                                Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main armhf Packages
                                Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en
                                Hit:8 https://archive.raspberrypi.org/debian stretch InRelease
                                Ign:7 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en_GB
                                Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main all Packages
                                Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main armhf Packages
                                Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en
                                Ign:7 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en_GB
                                Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main all Packages
                                Ign:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main armhf Packages
                                Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en
                                Ign:7 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en_GB
                                Ign:4 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main all Packages
                                Err:5 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main armhf Packages
                                  404  Not Found
                                Ign:6 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en
                                Ign:7 http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1/main Translation-en_GB
                                Fetched 15.0 kB in 3s (4,218 B/s)
                                Reading package lists... Done
                                W: The repository 'http://download.mono-project.com/repo/debian stretch/snapshots/5.0.1.1 Release' does not have a Release file.
                                N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
                                N: See apt-secure(8) manpage for repository creation and user configuration details.
                                E: Failed to fetch http://download.mono-project.com/repo/debian/dists/stretch/snapshots/5.0.1.1/main/binary-armhf/Packages  404  Not Found
                                E: Some index files failed to download. They have been ignored, or old ones used instead.
                                root@RPi3:~#

                                Comment

                                Working...
                                X