hannseman / homebridge-mi-hygrothermograph

Homebridge plugin for the Xiaomi Mi Bluetooth Temperature and Humidity Sensor
MIT License
267 stars 52 forks source link

Excessive CPU usage on Raspberry Pi #36

Closed GorkaMM closed 5 years ago

GorkaMM commented 5 years ago

Homebridge increased CPU usage significantly after installing this plugin.

Expected Behavior

CPU usage should stay as it was before installing the plugin (less than 10%), or increase it only slightly.

Current Behavior

Homebridge running on Raspberry Pi Zero WH with Raspbian Stretch has a ~60% CPU consumption on average.

Steps to Reproduce (for bugs)

Run Homebridge on Raspberry Pi Zero WH with Raspbian Stretch and Node v10.6.0.

Versions

Configuration

  "accessories": [
    {
      "accessory": "Hygrotermograph",
      "name": "Hygrotermograph 1",
      "address": "4C:65:A8:DA:50:90"
    },
    {
      "accessory": "Hygrotermograph",
      "name": "Hygrotermograph 2",
      "address": "4C:65:A8:DA:57:0D"
    }
  ]

Homebridge Log / Command Output

image
hannseman commented 5 years ago

Weird, these are my load averages: load average: 0.05, 0.09, 0.08. Can you see anything in the logs that look odd? Could you be running with debug-mode enabled? That would cause a lot of output.

GorkaMM commented 5 years ago

I have done some cleaning up and it seems to be around ~11% on average. I will keep an eye on it and let you know. We can keep this issue open or close it, whatever you prefer.

Thanks a lot for the fast response.

hannseman commented 5 years ago

That's more reasonable. Please keep an eye on it. It got me a bit worried that this was something introduced by the @abandonware/noble when running Node 10. I'm running the current master but on Node 8.15 and I can see no indication of this.

Let's keep the issue open for now.

GorkaMM commented 5 years ago

After some time looking into it, It seems to be caused by another plugin. I'm closing this for now. Thank for being attentive!