Announcement

Collapse
No announcement yet.

[Feature req] Release a kodi addon to reduce cpu utilization on hs3

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

  • [Feature req] Release a kodi addon to reduce cpu utilization on hs3

    Hi, This plugin works great on HS3 and recognizes all of the kodi boxes.

    However, I noticed that it results in really high cpu utilization, which I'm assuming is due to the continuous polling of the kodi boxes.

    On a raspberry pi 3, this plug-in results in a constant 200% cpu utilization (quad core, so out of a total 400%) whereas the zwave plugin has about 5-10% and other plugins even lower than that.

    I would like to see a kodi addon, that pushes status info during changes to HS3, rather than the HS3 plugin constantly pulling/querying.

    It is really not that difficult and I put together the attached addon as a proof of concept. It is based on other home automation addons that were available on kodi.

    Basically, whenever the kodi status changes and it is either playing a video, paused a video, resumed or stopped a video, the addon sends json post requests to HS3.

    Currently, as a proof of concept, the attached addon can be coupled with a virtual device on HS3 (screenshot attached), with the following statuses:
    0 = Playing
    1 = Paused
    2 = Resumed
    3 = Stopped

    In the kodi addon settings, enter the HS3 ip address and the ref id of the virtual device, and the device status will be updated with the video play status.

    There is a lot more that can be done with the kodi addon, and this can replace certain parts of the HS3 plugin and reduce cpu utilization.
    Attached Files

  • #2
    Thank you for your work, but the Kodi plugin does not do any constant polling/querying, it already use a push mechanism using a TCP connection to the json server.

    I just tested it on Windows and did not see any high CPU utilization. I will test on a RaspberryPi later today.
    Is that possible you have some event or script that cause a high CPU utilization in the plugin?

    Comment


    • #3
      Originally posted by spud View Post
      Thank you for your work, but the Kodi plugin does not do any constant polling/querying, it already use a push mechanism using a TCP connection to the json server.

      I just tested it on Windows and did not see any high CPU utilization. I will test on a RaspberryPi later today.
      Is that possible you have some event or script that cause a high CPU utilization in the plugin?
      Oops, I guess I shouldn't have assumed [emoji4]

      I'm currently out of town for the holiday but will do some troubleshooting when I get back.

      By the way, I'm running Debian Jessie lite and mono 4 on the rpi 3

      Comment


      • #4
        I just tested it on my RPi 2 and did not see any high CPU utilization

        Comment


        • #5
          Originally posted by spud View Post
          I just tested it on my RPi 2 and did not see any high CPU utilization
          That is strange. I certainly disabled/enabled the plugin, and did an uninstall and reinstall just to test and always had the high cpu utilization.

          I just realized that my trial has expired for the plugin so unfortunately I can't do any more troubleshooting but if it helps, I had documented my install steps of hs3 on my pi3 here: https://forums.homeseer.com/showthread.php?p=1280307

          Thanks

          Comment


          • #6
            I also experienced the same high cpu usage on windows, was about 85%, i disabled the plugin and then re-enabled and it went back to normal

            Comment

            Working...
            X