Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behaviour of the ' Events: State' nodes #1705

Open
Gertjuh opened this issue Dec 6, 2024 · 1 comment
Open

Strange behaviour of the ' Events: State' nodes #1705

Gertjuh opened this issue Dec 6, 2024 · 1 comment

Comments

@Gertjuh
Copy link

Gertjuh commented Dec 6, 2024

Describe the bug

A few weeks ago I noticed strange behaviour with a few of the Events state nodes in Node-Red. I have a automation that turns on the fan when the lights go. The state nodes detect the switch state of the lights and send the on/off to the fan. But suddenly the ' off' state of the lights is send about every 4 minutes or so and then the fan goes on. when the delay is reached then it goes 'off'. And I see this behaviour on more state nodes. Did something changed recently and/or how can I fix this? I already tried to use a filter node but that does not seem to work.
B.t.w. I use NR now for a couple of years so I am not a newbie :-)

Many Thanks!

To Reproduce

I changes nothing in the automations flow.

Expected behavior

Do nothing until the payload changes.

Screenshots

Screenshot_20241206_140017
m/user-attachments/assets/6f40ee4b-f3a3-4b93-9ac2-ded9c0d75963)
Screenshot_20241206_135956

Example Flow

[
{
"id": "511250742e39805c",
"type": "server-state-changed",
"z": "848004c40e835fd0",
"name": "WC schakelaar L aan (4m)",
"server": "de75ed10910c3746",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"switch.0x00158d000432ec12_left"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "4",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 390,
"y": 1240,
"wires": [
[
"ef9a03724eef6fc9"
],
[]
]
},
{
"id": "c413c4e16c9b39ba",
"type": "api-call-service",
"z": "848004c40e835fd0",
"name": "WC schakelaar R aan",
"server": "de75ed10910c3746",
"version": 7,
"debugenabled": false,
"action": "homeassistant.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.wc_fan_switch"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "homeassistant",
"service": "turn_on",
"x": 800,
"y": 1300,
"wires": [
[]
]
},
{
"id": "5d63ee81220a9ecf",
"type": "server-state-changed",
"z": "848004c40e835fd0",
"name": "WC schakelaar R Aan",
"server": "de75ed10910c3746",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"switch.0x00158d000432ec12_right"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "on",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 360,
"y": 1360,
"wires": [
[
"07423c08ee4a6ce4"
],
[]
]
},
{
"id": "09fe8b15bc325343",
"type": "api-call-service",
"z": "848004c40e835fd0",
"name": "WC Fan Aan",
"server": "de75ed10910c3746",
"version": 7,
"debugenabled": false,
"action": "homeassistant.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.wc_fan_switch"
],
"labelId": [],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "homeassistant",
"service": "turn_on",
"x": 770,
"y": 1360,
"wires": [
[]
]
},
{
"id": "7df5400b1e60f4b2",
"type": "api-call-service",
"z": "848004c40e835fd0",
"name": "WC Fan Uit",
"server": "de75ed10910c3746",
"version": 7,
"debugenabled": false,
"action": "homeassistant.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"switch.wc_fan_switch"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "homeassistant",
"service": "turn_off",
"x": 770,
"y": 1420,
"wires": [
[]
]
},
{
"id": "83f150278eca679c",
"type": "server-state-changed",
"z": "848004c40e835fd0",
"name": "WC schakelaar R Uit",
"server": "de75ed10910c3746",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"switch.0x00158d000432ec12_right"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "off",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 370,
"y": 1420,
"wires": [
[
"bc6c0d58df439a17"
],
[]
]
},
{
"id": "a3e2014269b45790",
"type": "server-state-changed",
"z": "848004c40e835fd0",
"name": "WC schakelaar L uit",
"server": "de75ed10910c3746",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"switch.0x00158d000432ec12_left"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "str",
"ifState": "off",
"ifStateType": "str",
"ifStateOperator": "is",
"outputOnlyOnStateChange": true,
"for": "0",
"forType": "num",
"forUnits": "minutes",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": false,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 370,
"y": 1300,
"wires": [
[
"19de7e49aafb0c39"
],
[]
]
},
{
"id": "060535b90283cd13",
"type": "comment",
"z": "848004c40e835fd0",
"name": "NR012: Verlichting en Ventilator WC",
"info": "",
"x": 420,
"y": 1200,
"wires": []
},
{
"id": "ef9a03724eef6fc9",
"type": "api-call-service",
"z": "848004c40e835fd0",
"name": "Zet WC Timer Long Aan",
"server": "de75ed10910c3746",
"version": 7,
"debugenabled": false,
"action": "input_boolean.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"input_boolean.wc_switch_timer_long"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": false,
"domain": "input_boolean",
"service": "turn_on",
"x": 810,
"y": 1240,
"wires": [
[]
]
},
{
"id": "19de7e49aafb0c39",
"type": "delay",
"z": "848004c40e835fd0",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 590,
"y": 1300,
"wires": [
[
"c413c4e16c9b39ba"
]
]
},
{
"id": "07423c08ee4a6ce4",
"type": "delay",
"z": "848004c40e835fd0",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 590,
"y": 1360,
"wires": [
[
"09fe8b15bc325343"
]
]
},
{
"id": "bc6c0d58df439a17",
"type": "delay",
"z": "848004c40e835fd0",
"name": "",
"pauseType": "delay",
"timeout": "500",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 590,
"y": 1420,
"wires": [
[
"7df5400b1e60f4b2"
]
]
},
{
"id": "de75ed10910c3746",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": false,
"heartbeat": true,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": true
}
]

Environment Information

Latest version of NR and all add node versions up to date.

Additional context

No response

@Gertjuh
Copy link
Author

Gertjuh commented Dec 7, 2024

I noticed that, when ' output on connect' is active, this behaviour occurs. Looks like there is a 'connect' every once in a while (4 min.?) that triggers the on/off state. Is something changed on that level few weeks ago?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant