I want to determine why my system memory usage is growing and after a maximum available size is reached the whole system is hang up. This happens in aprox. 10-14 days of continous running of pimatic. I’m looking in raspbian task manager, and true, the node task used memory is slowly growing. My CPU usage is a little bit high, i guess because of the to many contact sensors. Maybe this is the reason for the memory too. Anyone have a point of view, how can be done more simple way the contact sensors section in my script?
Here is my config:
By the way, how can i introduce commented text in config? I have several lines hat is not yet physically implemented. I try with simple #, but no success. If i use this, the pimatic service cannot be started.
{
"settings": {
"httpServer": {
"enabled": true,
"port": 80
},
"database": {
"deviceAttributeLogging": [
{
"deviceId": "*",
"attributeName": "*",
"type": "*",
"interval": "0",
"expire": "7d"
},
{
"deviceId": "*",
"attributeName": "*",
"type": "continuous",
"interval": "5min",
"expire": "7d"
},
{
"deviceId": "*",
"attributeName": "temperature",
"type": "number",
"expire": "1y"
},
{
"deviceId": "*",
"attributeName": "humidity",
"type": "number",
"expire": "1y"
}
],
"messageLogging": [
{
"level": "*",
"tags": [],
"expire": "7d"
},
{
"level": "debug",
"tags": [],
"expire": "0"
}
]
},
"authentication": {
"secret": "xxxxxxxxxx"
},
"httpsServer": {},
"gui": {}
},
"plugins": [
{
"plugin": "cron"
},
{
"plugin": "mobile-frontend"
},
{
"plugin": "gpio"
},
{
"plugin": "homeduino",
"driver": "serialport",
"driverOptions": {
"serialDevice": "/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0",
"baudrate": 115200
},
"receiverPin": 0,
"transmitterPin": 4
},
{
"plugin": "sysinfo"
},
{
"plugin": "watchdog-unix"
}
],
"rules": [
{
"id": "k001-on",
"name": "k001-on",
"rule": "if trigger: k001 is closed and l001 is off then turn l001 on",
"active": true,
"logging": true
},
{
"id": "k001-off",
"name": "k001-on",
"rule": "if trigger: k001 is closed and l001 is on then turn l001 off",
"active": true,
"logging": true
},
{
"id": "k002-on",
"name": "k002-on",
"rule": "if trigger: k002 is closed and l002 is off then turn l002 on",
"active": true,
"logging": true
},
{
"id": "k002-off",
"name": "k002-off",
"rule": "if trigger: k002 is closed and l002 is on then turn l002 off",
"active": true,
"logging": true
},
{
"id": "k003-on",
"name": "k003-on",
"rule": "if trigger: k003 is closed and l003 is off then turn l003 on",
"active": true,
"logging": true
},
{
"id": "k003-off",
"name": "k003-off",
"rule": "if trigger: k003 is closed and l003 is on then turn l003 off",
"active": true,
"logging": true
},
{
"id": "k004-on",
"name": "k004-on",
"rule": "if trigger: k004 is closed and l004 is off then turn l004 on",
"active": true,
"logging": true
},
{
"id": "k004-off",
"name": "k004-off",
"rule": "if trigger: k004 is closed and l004 is on then turn l004 off",
"active": true,
"logging": true
},
{
"id": "k005-on",
"name": "k005-on",
"rule": "if trigger: k005 is closed and l005 is off then turn l005 on",
"active": true,
"logging": true
},
{
"id": "k005-off",
"name": "k005-off",
"rule": "if trigger: k005 is closed and l005 is on then turn l005 off",
"active": true,
"logging": true
},
{
"id": "k007-on",
"name": "k007-on",
"rule": "if trigger: k007 is closed and l010 is off then turn l010 on",
"active": true,
"logging": true
},
{
"id": "k007-off",
"name": "k007-off",
"rule": "if trigger: k007 is closed and l010 is on then turn l010 off",
"active": true,
"logging": true
},
{
"id": "k008-on",
"name": "k008-on",
"rule": "if trigger: k008 is closed and l011 is off then turn l011 on",
"active": true,
"logging": true
},
{
"id": "k008-off",
"name": "k008-off",
"rule": "if trigger: k008 is closed and l011 is on then turn l011 off",
"active": true,
"logging": true
},
{
"id": "k101-on",
"name": "k101-on",
"rule": "if trigger: k101 is closed and l103 is off then turn l103 on",
"active": true,
"logging": true
},
{
"id": "k101-off",
"name": "k101-off",
"rule": "if trigger: k101 is closed and l103 is on then turn l103 off",
"active": true,
"logging": true
},
{
"id": "k102-on",
"name": "k102-on",
"rule": "if trigger: k102 is closed and l103 is off then turn l103 on",
"active": true,
"logging": true
},
{
"id": "k102-off",
"name": "k102-off",
"rule": "if trigger: k102 is closed and l103 is on then turn l103 off",
"active": true,
"logging": true
},
{
"id": "k103-on",
"name": "k103-on",
"rule": "if trigger: k103 is closed and l103 is off then turn l103 on",
"active": true,
"logging": true
},
{
"id": "k103-off",
"name": "k103-off",
"rule": "if trigger: k103 is closed and l103 is on then turn l103 off",
"active": true,
"logging": true
},
{
"id": "k104-on",
"name": "k104-on",
"rule": "if trigger: k104 is closed and l104 is off then turn l104 on",
"active": true,
"logging": true
},
{
"id": "k104-off",
"name": "k104-off",
"rule": "if trigger: k104 is closed and l104 is on then turn l104 off",
"active": true,
"logging": true
},
{
"id": "k105-on",
"name": "k105-on",
"rule": "if trigger: k105 is closed and l105 is off then turn l105 on",
"active": true,
"logging": true
},
{
"id": "k105-off",
"name": "k105-off",
"rule": "if trigger: k105 is closed and l105 is on then turn l105 off",
"active": true,
"logging": true
},
{
"id": "k106-on",
"name": "k106-on",
"rule": "if trigger: k106 is closed and l106 is off then turn l106 on",
"active": true,
"logging": true
},
{
"id": "k106-off",
"name": "k106-off",
"rule": "if trigger: k106 is closed and l106 is on then turn l106 off",
"active": true,
"logging": true
},
{
"id": "k201-on",
"name": "k201-on",
"rule": "if trigger: k201 is closed and l201 is off then turn l201 on",
"active": true,
"logging": true
},
{
"id": "k201-off",
"name": "k201-off",
"rule": "if trigger: k201 is closed and l201 is on then turn l201 off",
"active": true,
"logging": true
},
{
"id": "k203-on",
"name": "k203-on",
"rule": "if trigger: k203 is closed and l203 is off then turn l203 on",
"active": true,
"logging": true
},
{
"id": "k203-off",
"name": "k203-off",
"rule": "if trigger: k203 is closed and l203 is on then turn l203 off",
"active": true,
"logging": true
},
{
"id": "s-lights-off",
"name": "s-lights-off",
"rule": "if s-lights-off is pressed then switch l201 off and switch l203 off and switch l205 off",
"active": true,
"logging": true
},
{
"id": "s-lights-on",
"name": "s-lights-on",
"rule": "if s-lights-on is pressed then switch l201 on and switch l203 on and switch l205 on",
"active": true,
"logging": true
},
{
"id": "p-lights-off",
"name": "p-lights-off",
"rule": "if p-lights-off is pressed then switch l001 off and switch l002 off and switch l003 off and switch l004 off and switch l005 off and switch l006 off and switch l007 off and switch l008 off and switch l009 off and switch l010 off and switch l010* off and switch l011 off",
"active": true,
"logging": true
},
{
"id": "p-lights-on",
"name": "p-lights-on",
"rule": "if p-lights-on is pressed then switch l001 on and switch l002 on and switch l003 on and switch l004 on and switch l005 on and switch l006 on and switch l007 on and switch l008 on and switch l009 on and switch l010 on and switch l010* on and switch l011 on",
"active": true,
"logging": true
},
{
"id": "e-lights-off",
"name": "e-lights-off",
"rule": "if e-lights-off is pressed then switch l100 off and switch l101 off and switch l102 off and switch l103 off and switch l104 off and switch l105 off and switch l106 off and switch l107 off and switch l108 off and switch l109 off and switch l111 off and switch l112 off and switch l113 off",
"active": true,
"logging": true
},
{
"id": "e-lights-on",
"name": "e-lights-on",
"rule": "if e-lights-on is pressed then switch l100 on and switch l101 on and switch l102 on and switch l103 on and switch l104 on and switch l105 on and switch l106 on and switch l107 on and switch l108 on and switch l109 on and switch l111 on and switch l112 on and switch l113 on",
"active": true,
"logging": true
},
{
"id": "all-lights-off",
"name": "all-lights-off",
"rule": "if all-lights-off is pressed then press s-lights-off and press p-lights-off and press e-lights-off",
"active": true,
"logging": true
},
{
"id": "all-lights-on",
"name": "all-lights-on",
"rule": "if all-lights-on is pressed then press s-lights-on and press p-lights-on and press e-lights-on",
"active": true,
"logging": true
}
],
"devices": [
{
"id": "k001",
"name": "K001",
"class": "HomeduinoContactSensor",
"pin": 36,
"inverted": false,
"interval": 125
},
{
"id": "k002",
"name": "K002",
"class": "HomeduinoContactSensor",
"pin": 37,
"inverted": false,
"interval": 125
},
{
"id": "k003",
"name": "K003",
"class": "HomeduinoContactSensor",
"pin": 38,
"inverted": false,
"interval": 125
},
{
"id": "k004",
"name": "K004",
"class": "HomeduinoContactSensor",
"pin": 39,
"inverted": false,
"interval": 125
},
{
"id": "k005",
"name": "K005",
"class": "HomeduinoContactSensor",
"pin": 40,
"inverted": false,
"interval": 125
},
{
"id": "k006",
"name": "K006",
"class": "HomeduinoContactSensor",
"pin": 41,
"inverted": false,
"interval": 125
},
{
"id": "k007",
"name": "K007",
"class": "HomeduinoContactSensor",
"pin": 42,
"inverted": false,
"interval": 125
},
{
"id": "k008",
"name": "K008",
"class": "HomeduinoContactSensor",
"pin": 43,
"inverted": false,
"interval": 125
},
{
"id": "k009",
"name": "K009",
"class": "HomeduinoContactSensor",
"pin": 44,
"inverted": false,
"interval": 125
},
{
"id": "k010",
"name": "K010",
"class": "HomeduinoContactSensor",
"pin": 45,
"inverted": false,
"interval": 125
},
{
"id": "k011",
"name": "K011",
"class": "HomeduinoContactSensor",
"pin": 46,
"inverted": false,
"interval": 125
},
{
"id": "k101",
"name": "K101",
"class": "HomeduinoContactSensor",
"pin": 49,
"inverted": false,
"interval": 125
},
{
"id": "k102",
"name": "K102",
"class": "HomeduinoContactSensor",
"pin": 50,
"inverted": false,
"interval": 125
},
{
"id": "k103",
"name": "K103",
"class": "HomeduinoContactSensor",
"pin": 51,
"inverted": false,
"interval": 125
},
{
"id": "k104",
"name": "K104",
"class": "HomeduinoContactSensor",
"pin": 52,
"inverted": false,
"interval": 125
},
{
"id": "k105",
"name": "K105",
"class": "HomeduinoContactSensor",
"pin": 53,
"inverted": false,
"interval": 125
},
{
"id": "k106",
"name": "K106",
"class": "HomeduinoContactSensor",
"pin": 54,
"inverted": false,
"interval": 125
},
{
"id": "k201",
"name": "K201",
"class": "HomeduinoContactSensor",
"pin": 61,
"inverted": false,
"interval": 125
},
{
"id": "k203",
"name": "K203",
"class": "HomeduinoContactSensor",
"pin": 62,
"inverted": false,
"interval": 125
},
{
"id": "l001",
"class": "HomeduinoSwitch",
"name": "Eloszoba",
"pin": 2,
"inverted": true
},
{
"id": "l002",
"class": "HomeduinoSwitch",
"name": "Nappali",
"pin": 3,
"inverted": true
},
{
"id": "l003",
"class": "HomeduinoSwitch",
"name": "Konyha",
"pin": 4,
"inverted": true
},
{
"id": "l004",
"class": "HomeduinoSwitch",
"name": "Konyha blatt",
"pin": 5,
"inverted": true
},
{
"id": "l005",
"class": "HomeduinoSwitch",
"name": "Kicsi furdo",
"pin": 6,
"inverted": true
},
{
"id": "l006",
"class": "HomeduinoSwitch",
"name": "Kicsi furdo tukor",
"pin": 7,
"inverted": true
},
{
"id": "l007",
"class": "HomeduinoSwitch",
"name": "Bejarat kint",
"pin": 8,
"inverted": true
},
{
"id": "l008",
"class": "HomeduinoSwitch",
"name": "Konzol alatt kint",
"pin": 9,
"inverted": true
},
{
"id": "l009",
"class": "HomeduinoSwitch",
"name": "Hatso udvar kint",
"pin": 10,
"inverted": true
},
{
"id": "l010",
"class": "HomeduinoSwitch",
"name": "Kamra",
"pin": 11,
"inverted": true
},
{
"id": "l010*",
"class": "HomeduinoSwitch",
"name": "Eloszoba tukor",
"pin": 12,
"inverted": true
},
{
"id": "l011",
"class": "HomeduinoSwitch",
"name": "Eloszoba lepcso",
"pin": 13,
"inverted": true
},
{
"id": "l100",
"class": "HomeduinoSwitch",
"name": "Lepcso fent",
"pin": 14,
"inverted": true
},
{
"id": "l101",
"class": "HomeduinoSwitch",
"name": "Furdoszoba eloter",
"pin": 15,
"inverted": true
},
{
"id": "l102",
"class": "HomeduinoSwitch",
"name": "Furdoszoba",
"pin": 16,
"inverted": true
},
{
"id": "l103",
"class": "HomeduinoSwitch",
"name": "Furdoszoba tukor",
"pin": 17,
"inverted": true
},
{
"id": "l104",
"class": "HomeduinoSwitch",
"name": "Gyermekszoba",
"pin": 18,
"inverted": true
},
{
"id": "l105",
"class": "HomeduinoSwitch",
"name": "Gyermekszoba asztal",
"pin": 19,
"inverted": true
},
{
"id": "l106",
"class": "HomeduinoSwitch",
"name": "Haloszoba bejarat",
"pin": 20,
"inverted": true
},
{
"id": "l107",
"class": "HomeduinoSwitch",
"name": "Haloszoba allmennyezet",
"pin": 21,
"inverted": true
},
{
"id": "l108",
"class": "HomeduinoSwitch",
"name": "Haloszoba K",
"pin": 22,
"inverted": true
},
{
"id": "l109",
"class": "HomeduinoSwitch",
"name": "Haloszoba Z",
"pin": 23,
"inverted": true
},
{
"id": "l111",
"class": "HomeduinoSwitch",
"name": "Kicsiterasz",
"pin": 24,
"inverted": true
},
{
"id": "l112",
"class": "HomeduinoSwitch",
"name": "Nagyterasz 1",
"pin": 25,
"inverted": true
},
{
"id": "l113",
"class": "HomeduinoSwitch",
"name": "Nagyterasz 2",
"pin": 26,
"inverted": true
},
{
"id": "l201",
"class": "HomeduinoSwitch",
"name": "Iroda",
"pin": 27,
"inverted": true
},
{
"id": "l203",
"class": "HomeduinoSwitch",
"name": "Muhely",
"pin": 28,
"inverted": true
},
{
"id": "l205",
"class": "HomeduinoSwitch",
"name": "Iroda bejarat",
"pin": 29,
"inverted": true
},
{
"id": "e300",
"class": "HomeduinoSwitch",
"name": "Kicsikapu",
"pin": 30,
"inverted": true
},
{
"id": "e301",
"class": "HomeduinoSwitch",
"name": "Nagykapu",
"pin": 31,
"inverted": true
},
{
"id": "e302",
"class": "HomeduinoSwitch",
"name": "Ontozes",
"pin": 32,
"inverted": true
},
{
"id": "e303",
"class": "HomeduinoSwitch",
"name": "Filegoria",
"pin": 33,
"inverted": true
},
{
"id": "e304",
"class": "HomeduinoSwitch",
"name": "Udvar vilagitas",
"pin": 34,
"inverted": true
},
{
"id": "e305",
"class": "HomeduinoSwitch",
"name": "Kapucsengo",
"pin": 35,
"inverted": true
},
{
"id": "all-lights",
"name": "Minden lampa",
"class": "ButtonsDevice",
"buttons": [
{
"id": "all-lights-off",
"text": "Off"
},
{
"id": "all-lights-on",
"text": "On"
}
]
},
{
"id": "s-lights",
"name": "Alagsor lampak",
"class": "ButtonsDevice",
"buttons": [
{
"id": "s-lights-off",
"text": "Off"
},
{
"id": "s-lights-on",
"text": "On"
}
]
},
{
"id": "p-lights",
"name": "Foldszint lampak",
"class": "ButtonsDevice",
"buttons": [
{
"id": "p-lights-off",
"text": "Off"
},
{
"id": "p-lights-on",
"text": "On"
}
]
},
{
"id": "e-lights",
"name": "Emelet lampak",
"class": "ButtonsDevice",
"buttons": [
{
"id": "e-lights-off",
"text": "Off"
},
{
"id": "e-lights-on",
"text": "On"
}
]
},
{
"id": "alarm-zone1",
"name": "Iroda riaszto",
"class": "ButtonsDevice",
"buttons": [
{
"id": "disarm-zone1",
"text": "Disarm"
},
{
"id": "arm-zone1",
"text": "Arm"
}
]
},
{
"id": "alarm-zone2",
"name": "Lakas riaszto",
"class": "ButtonsDevice",
"buttons": [
{
"id": "disarm-zone2",
"text": "Disarm"
},
{
"id": "arm-zone2",
"text": "Arm"
}
]
},
{
"class": "SystemSensor",
"id": "syssensor",
"name": "System",
"attributes": [
{
"name": "cpu"
},
{
"name": "memory"
}
]
}
],
"pages": [
{
"id": "lights_1",
"name": "FOLDSZINT",
"devices": [
{
"deviceId": "l001"
},
{
"deviceId": "l002"
},
{
"deviceId": "l003"
},
{
"deviceId": "l004"
},
{
"deviceId": "l005"
},
{
"deviceId": "l006"
},
{
"deviceId": "l007"
},
{
"deviceId": "l008"
},
{
"deviceId": "l009"
},
{
"deviceId": "l010"
},
{
"deviceId": "l010*"
},
{
"deviceId": "l011"
},
{
"deviceId": "p-lights"
}
]
},
{
"id": "lights_2",
"name": "EMELET",
"devices": [
{
"deviceId": "l100"
},
{
"deviceId": "l101"
},
{
"deviceId": "l102"
},
{
"deviceId": "l103"
},
{
"deviceId": "l104"
},
{
"deviceId": "l105"
},
{
"deviceId": "l106"
},
{
"deviceId": "l107"
},
{
"deviceId": "l108"
},
{
"deviceId": "l109"
},
{
"deviceId": "l110"
},
{
"deviceId": "l111"
},
{
"deviceId": "l112"
},
{
"deviceId": "l113"
},
{
"deviceId": "e-lights"
}
]
},
{
"id": "lights_3",
"name": "ALAGSOR",
"devices": [
{
"deviceId": "l201"
},
{
"deviceId": "l203"
},
{
"deviceId": "l205"
},
{
"deviceId": "s-lights"
}
]
},
{
"id": "security",
"name": "BIZTONSAG",
"devices": [
{
"deviceId": "alarm-zone1"
},
{
"deviceId": "alarm-zone2"
},
{
"deviceId": "uelck1"
},
{
"deviceId": "all-lights"
},
{
"deviceId": "p-lights"
},
{
"deviceId": "e-lights"
},
{
"deviceId": "s-lights"
},
{
"deviceId": "syssensor"
}
]
}
],
"groups": [],
"users": [
{
"username": "admin",
"password": "xxxxxxxxxx",
"role": "admin"
}
],
"roles": [
{
"name": "admin",
"permissions": {
"pages": "write",
"rules": "write",
"variables": "write",
"messages": "write",
"events": "write",
"devices": "write",
"groups": "write",
"plugins": "write",
"updates": "write",
"database": "write",
"config": "write",
"controlDevices": true,
"restart": true
}
}
],
"variables": []
}