[Request] More information on errors

This is a collection of wishes and needs for the next versions of Z-Way/Z-Cloud/Z-Box
Post Reply
User avatar
aLiEnHeAd
Posts: 136
Joined: 02 Feb 2017 15:09

[Request] More information on errors

Post by aLiEnHeAd »

It would be handy, if you could see, which device or rule caused a specific error.
For example, I have the following error:
Screenshot_20210130-114229~2.png
Screenshot_20210130-114229~2.png (24.73 KiB) Viewed 15704 times
I cannot find out which logical rule is affected, other than checking each rule for possible issues.
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: [Request] More information on errors

Post by PoltoS »

Such an error should never happen - is it our code bug? Or wrong settings?
User avatar
aLiEnHeAd
Posts: 136
Joined: 02 Feb 2017 15:09

Re: [Request] More information on errors

Post by aLiEnHeAd »

It seems the eror origins from this:

Code: Select all

[2021-02-04 22:29:04.826] [I] [core] Instantiating module 104 from class LogicalRules
[2021-02-04 22:29:04.826] [I] [core] --- Starting module Logical Rule
[2021-02-04 22:29:04.853] [I] [core] (node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit. 11
[2021-02-04 22:29:04.854] [I] [core] Notification: error (core): Cannot instantiate module: LogicalRules: TypeError: undefined is not a function
[2021-02-04 22:29:04.860] [I] [core] TypeError: undefined is not a function
    at EventEmitter.on [as addListener] (automation/lib/eventemitter2.js:392:29)
    at _.extend.on (automation/classes/DevicesCollection.js:200:37)
    at LogicalRules.attachDetach (automation/userModules/LogicalRules/index.js:132:28)
    at automation/userModules/LogicalRules/index.js:44:9
    at Array.forEach (native)
    at LogicalRules.init (automation/userModules/LogicalRules/index.js:42:20)
    at AutomationController.instantiateModule (automation/classes/AutomationController.js:483:13)
    at AutomationController.<anonymous> (automation/classes/AutomationController.js:590:12)
    at Array.forEach (native)
    at AutomationController.loadModule (automation/classes/AutomationController.js:589:5)
It seems to be a problem in logical rule ID 104, but I have no idea what the problem is :?

the logical rule ID 104 looks like this:

Code: Select all

{
	"moduleId": "LogicalRules",
	"active": true,
	"title": "Eingangstüre auf -> Alarm",
	"params": {
		"triggerOnDevicesChange": true,
		"eventSource": [],
		"logicalOperator": "and",
		"tests": [
			{
				"testType": "binary",
				"testBinary": {
					"device": "DummyDevice_66",
					"testValue": "on"
				}
			},
			{
				"testType": "binary",
				"testBinary": {
					"device": "ZWayVDev_zway_37-0-48-10",
					"testValue": "on"
				}
			}
		],
		"action": {
			"switches": [],
			"dimmers": [
				{
					"device": "TimerSwitch_18",
					"status": 30,
					"sendAction": false
				}
			],
			"thermostats": [],
			"locks": [],
			"scenes": [],
			"notification": []
		},
		"mail_helper": "Aktuell ist keine Benachrichtigung über Email möglich, da die EMailMe-App nicht installiert/aktiviert ist.",
		"mail_button": "Aktiviere EMailMe",
		"mail_confirm": "ACHTUNG!<br />Beim Verlassen des Konfigurationsfensters gehen alle bisherigen Einstellungen verloren.<br /><br />HINWEIS:<br />Sie können mit 'Abbrechen' ohne die Konfiguration der EMailMe-App fortfahren, diese im Nachgang anlegen und anschließend in der Logische Regel Konfiguration hinzufügen.",
		"expertSettings": false,
		"moduleAPITransformed": true
	},
	"id": 104,
	"creationTime": 1540849357,
	"category": "automation_basic"
}
User avatar
PoltoS
Posts: 7562
Joined: 26 Jan 2011 19:36

Re: [Request] More information on errors

Post by PoltoS »

The problem looks to be in the line above:
[2021-02-04 22:29:04.853] [core] (node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit. 11

You have subscribed too many times on the same event. It complains on this. You can rise the limit in libs/EventEmitter.js
Post Reply