Baldhor / Homey-ESPhome-Enhanced

This is an Homey app which adds support for ESPHome devices. ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. More information on their homepage: https://www.esphome.io/
GNU General Public License v3.0
5 stars 3 forks source link

CPU Warning Limit Reached - dsmr #47

Closed Baldhor closed 1 year ago

Baldhor commented 1 year ago

Describe the bug I received a crash report from a user (who?) This report state a CPU warning Limit Reached, meaning that the app used lot of cpu for a long time, which seems surprising ... I need more information


Note: this log has been manually submitted by a user.
    Log ID: 0fac73ee-6203-43fa-a44e-d7e7390fc89c

    User Message:
    App is crashing

    stdout:
    2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:ca864b69-bb88-467e-a016-1f40cadc7c88] stateChangedListener: 3525970621:state 0
2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:d5765127-e52a-49dc-8d74-913624abb3cf] stateChangedListener: 3525970621:state 0
2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:dfba86ae-177c-4ffc-95b2-b31fa747e92a] stateChangedListener: 3525970621:state 0
2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:e0925293-28da-4c18-ad98-c0330c71093a] stateChangedListener: 3525970621:state 0
2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:e595f371-1a8c-4cfd-a8cf-cecc0cf09943] stateChangedListener: 3525970621:state 0
2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:fa4c5c73-63a6-45b4-8aa5-e9a0bff27236] stateChangedListener: 3525970621:state 0
2023-09-30T09:33:51.237Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Received a log: {
  level: 5,
  message: "\x1B[0;36m[D][sensor:094]: 'Fouten': Sending state 12.00000  with 0 decimals of accuracy\x1B[0m",
  sendFailed: false
}
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Received state for entity 3864544342 : { key: 3864544342, state: 12, missingState: false }
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Emit event: stateChanged 3864544342 state 12
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] State received: 3864544342 state 12
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] Native capability: NativeCapability {
  entityId: '3864544342',
  entityName: 'Fouten',
  type: 'Sensor',
  attribut: 'state',
  configs: { readOnly: true, precision: 0 },
  constraints: {},
  specialCase: null,
  value: 12
}
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] Emit event stateChanged 3864544342:state 12
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:05f77df4-1b01-41fa-a4e6-1056a2bbb39b] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:1aff015d-657b-449a-bd64-ab2cb20f2aad] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.238Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:266a93a4-d3e3-4838-84a4-15152960960f] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:35780f47-f05d-40a8-90e8-8f02ef751b92] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:420f05be-9504-4a89-a361-1120d6243d4d] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:485c05cf-6f5b-45da-adef-084eb1b3748f] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:49b88c5a-bca1-44a7-8a13-1138535cbb44] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:538570e8-3498-4414-94d6-44f97b69df6b] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:54d05bd0-2375-407c-8deb-1696962994cc] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:592f58bf-bae1-4ce8-afaf-1610256002c2] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:6bd11fe7-8184-44c9-aafa-b7018d3bffba] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:80dda8a1-c8bb-41bf-8f69-ade63449b1a9] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:85c664a4-5035-4187-8278-08b80d2e75b5] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:9bdbb04c-bb73-4a84-a00c-ecbf766cd7e0] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:a550c03b-8fbb-468d-9637-80522d7aff73] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:a9c67124-9f69-40ce-99a7-a6c65ab54504] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:b3188cc5-3600-4f52-baad-9c2e62746647] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:ca864b69-bb88-467e-a016-1f40cadc7c88] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.239Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:d5765127-e52a-49dc-8d74-913624abb3cf] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.240Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:dfba86ae-177c-4ffc-95b2-b31fa747e92a] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.240Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:e0925293-28da-4c18-ad98-c0330c71093a] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.240Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:e595f371-1a8c-4cfd-a8cf-cecc0cf09943] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.240Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:fa4c5c73-63a6-45b4-8aa5-e9a0bff27236] stateChangedListener: 3864544342:state 12
2023-09-30T09:33:51.240Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Received a log: {
  level: 5,
  message: "\x1B[0;36m[D][sensor:094]: 'Langdurige Fouten': Sending state 3.00000  with 0 decimals of accuracy\x1B[0m",
  sendFailed: false
}
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Received state for entity 1744369485 : { key: 1744369485, state: 3, missingState: false }
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Emit event: stateChanged 1744369485 state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] State received: 1744369485 state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] Native capability: NativeCapability {
  entityId: '1744369485',
  entityName: 'Langdurige Fouten',
  type: 'Sensor',
  attribut: 'state',
  configs: { readOnly: true, precision: 0 },
  constraints: {},
  specialCase: null,
  value: 3
}
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] Emit event stateChanged 1744369485:state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:05f77df4-1b01-41fa-a4e6-1056a2bbb39b] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:1aff015d-657b-449a-bd64-ab2cb20f2aad] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:266a93a4-d3e3-4838-84a4-15152960960f] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:35780f47-f05d-40a8-90e8-8f02ef751b92] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:420f05be-9504-4a89-a361-1120d6243d4d] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.241Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:485c05cf-6f5b-45da-adef-084eb1b3748f] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:49b88c5a-bca1-44a7-8a13-1138535cbb44] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:538570e8-3498-4414-94d6-44f97b69df6b] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:54d05bd0-2375-407c-8deb-1696962994cc] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:592f58bf-bae1-4ce8-afaf-1610256002c2] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:6bd11fe7-8184-44c9-aafa-b7018d3bffba] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:80dda8a1-c8bb-41bf-8f69-ade63449b1a9] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:85c664a4-5035-4187-8278-08b80d2e75b5] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:9bdbb04c-bb73-4a84-a00c-ecbf766cd7e0] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:a550c03b-8fbb-468d-9637-80522d7aff73] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:a9c67124-9f69-40ce-99a7-a6c65ab54504] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:b3188cc5-3600-4f52-baad-9c2e62746647] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.242Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:ca864b69-bb88-467e-a016-1f40cadc7c88] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.243Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:d5765127-e52a-49dc-8d74-913624abb3cf] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.243Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:dfba86ae-177c-4ffc-95b2-b31fa747e92a] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.243Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:e0925293-28da-4c18-ad98-c0330c71093a] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.243Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:e595f371-1a8c-4cfd-a8cf-cecc0cf09943] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.243Z [log] [ManagerDrivers] [Driver:esphome-wizard] [Device:fa4c5c73-63a6-45b4-8aa5-e9a0bff27236] stateChangedListener: 1744369485:state 3
2023-09-30T09:33:51.243Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Received a log: {
  level: 2,
  message: '\x1B[0;33m[W][component:204]: Component dsmr took a long time for an operation (0.15 s).\x1B[0m',
  sendFailed: false
}
2023-09-30T09:33:51.244Z [log] [ManagerDrivers] [Driver:esphome-wizard] [PhysicalDevice:192.168.1.55:6053] [Client] Received a log: {
  level: 2,
  message: '\x1B[0;33m[W][component:205]: Components should block for at most 20-30ms.\x1B[0m',
  sendFailed: false
}

    stderr:
    (node:25156) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25195) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25195) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25195) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25195) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25234) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25234) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25234) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25234) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25273) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25273) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25273) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25273) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25312) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25312) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25312) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25312) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25352) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25391) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25391) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25391) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25391) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25429) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25429) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25429) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25429) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25468) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25468) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25468) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25468) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25507) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25507) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25507) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25507) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25546) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25584) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25584) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25584) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25584) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
(node:25622) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 available listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:25622) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unavailable listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25622) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 stateChanged listeners added to [PhysicalDevice]. Use emitter.setMaxListeners() to increase limit
(node:25622) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message.SensorStateResponse listeners added to [EsphomeNativeApiConnection]. Use emitter.setMaxListeners() to increase limit

⚠ The app has crashed.
CPU Warning Limit Reached
Baldhor commented 1 year ago

Whoever sent this report, please show up and if possible explain as much as you can :)

Happen often? What symptoms before it happens? ...?

RoadXY commented 1 year ago

My Homey Pro 2016 is struggling to keep up. Although I'm not the one who submitted the manually submitted report, I can imagine it could be something like that...

Baldhor commented 1 year ago

My Homey Pro 2016 is struggling to keep up. Although I'm not the one who submitted the manually submitted report, I can imagine it could be something like that...

@RoadXY Can you check in homey developpers: https://tools.developer.homey.app/tools/app-profiling

For me, the cpu is near zero, but I notice after a long time that the memory keep increease (however, I'm mostly on the new wizard version, not the one you use)

image

Baldhor commented 1 year ago

I think the problem come when reconnecting, in a previous fix, I modified how reconnection is handled. Now I rebuild a new low level client everytime.

The problem is that the listeners on the old low level client are not removed before destroying it ... so actually it is not destroyed!

RoadXY commented 1 year ago

My Homey Pro 2016 is struggling to keep up. Although I'm not the one who submitted the manually submitted report, I can imagine it could be something like that...

@RoadXY Can you check in homey developpers: https://tools.developer.homey.app/tools/app-profiling

For me, the cpu is near zero, but I notice after a long time that the memory keep increease (however, I'm mostly on the new wizard version, not the one you use)

image

I checked and you are right: ESPhome app never uses more then 1%.

RoadXY commented 1 year ago

I think the problem come when reconnecting, in a previous fix, I modified how reconnection is handled. Now I rebuild a new low level client everytime.

The problem is that the listeners on the old low level client are not removed before destroying it ... so actually it is not destroyed!

I think you're right! The point where the graph is going down was a reboot of Homey. image

Baldhor commented 1 year ago

@RoadXY Yes, the app crasahed at 60Mo, it's the max allowed! Obviously one (or more) memory leak, and as we already know your DSMR disconnect often :)

For info, the new wizard is live! :)

Baldhor commented 1 year ago

And I just published live a fix for this memory leak (hopefully)

RoadXY commented 1 year ago

Updating 😎

Baldhor commented 1 year ago

@RoadXY Please check the insigth graph again a few hours after updating, so we know if there are more leak. Seems your configuration make the leak "very high" :)

RoadXY commented 1 year ago

Yes, I will

Baldhor commented 1 year ago

Yes, I will

But you need to upgrade to 1.0.3 (1.0.2 doesn't have the memory leak fix) image

RoadXY commented 1 year ago

Yes, I saw that 😉 image

RoadXY commented 1 year ago

Most of my device were offline and then I saw this:

image

Baldhor commented 1 year ago

@RoadXY How is that possible!? lol

Can you use console.re and try to understand what could be the root cause? like you restart the app, and then you wait 5 minutes, then check without touching anything what is going on? I suppose your DSMR send the same message again and again, so fast that the application doesn't have time to clean up memory (that's the main issue with modern garbage collector based programming).

To be honest, I don't see what change I made in the backend that could lead to this issue. I almost didn't change anything there.

RoadXY commented 1 year ago

It really is going like crazy 😧

https://console.re/roadxy

RoadXY commented 1 year ago

To be honest, I don't see what change I made in the backend that could lead to this issue. I almost didn't change anything there.

It could be there the whole time, as far as we know?

Baldhor commented 1 year ago

It really is going like crazy 😧

https://console.re/roadxy

@RoadXY I cannot see anything wrong there, the sate are sent every 30 seonds or so Ok it's many states, but not so many either. => The problem doesn't come from the physical device

I need to simulate it, then I can find where the problem come from

Baldhor commented 1 year ago

So I did this to try reproduce: image

20 random sensor which update every 30 seconds!

RoadXY commented 1 year ago

Looks way more promising! At 22:55 I updated to version 1.04. At 6:00 today I rebooted Homey image

Baldhor commented 1 year ago

@RoadXY I now have 20 temperature native capabilities updating every 10 seconds. 10 of them are linked to a virtual device: image

image image

restart the app at 12:26 ... no obvious leak at all!

When I added the 10 capabilties to the virtual device, the memory gone up a lot: image

So maybe there are a leak there, but then it's related to the "add new capability" process, not 'runtime'.

Conclusion: the fix on reconnection was actually the good solution => problem solved! Agree?

RoadXY commented 1 year ago

Dang it! image

I disabled console.re, could it have something to do with that? Which was working but 8 hours later it didn't so I disabled it.

Baldhor commented 1 year ago

@RoadXY I don't have this kind of issue, if I enable/disable console.re. And for me console.re is stable, however sometimes their server stop working for whatever reason.

Baldhor commented 1 year ago

@RoadXY Let's say that's a good joke ... I just checked the code of the ConsoleReService, I have a nice consolereEnabled property, which is correctly initiated and so on! I use it to check if I should connect or not to the console.re server!

But never to judge if I should add the log in the queue to send ...

Baldhor commented 1 year ago

https://homey.app/fr-fr/app/nl.inversion.esphome/ESPhome/test/ certification will be for tomorrow

Baldhor commented 1 year ago

image

Memory usage has never been so low lol I feel shame to be honest lol

RoadXY commented 1 year ago

Don't look back! It's a feature, not a bug

Baldhor commented 1 year ago

I'm closing this issue: image

I think it's obvious enough, since 9pm yesterday, the memory is just much more stable than ever.