node-red-contrib-schedex icon indicating copy to clipboard operation
node-red-contrib-schedex copied to clipboard

sending msg.payload.suspended: false is possible although node is configured without on or off time

Open VanillaFord opened this issue 5 years ago • 0 comments

A node configured without on or off time or "suspend scheduling" set/checked in the config reports its status as "Scheduling suspended", which is perfectly fine according to the documentation. However, sending a msg with "msg.payload.suspended: false" into such a node is possible (works) and a subsequent msg with payload "info" will report the schedule with "suspended: false". The on and off times and "state" also still report as suspended on this node (still according to documentation) and the node status also still reports "Scheduling suspended". This result is an inconsistent node state/status.

Node info as expected: {"ontime":"","ontopic":"vacation","onpayload":"ON","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"vacation","offpayload":"OFF","offoffset":0,"offrandomoffset":0,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"lon":"","lat":"","suspended":true,"on":"suspended","off":"suspended","state":"suspended"} Node info after sending "msg.payload.suspended: false" into the node: {"ontime":"","ontopic":"vacation","onpayload":"ON","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"vacation","offpayload":"OFF","offoffset":0,"offrandomoffset":0,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"lon":"","lat":"","suspended":false,"on":"suspended","off":"suspended","state":"suspended"}

expected result: the node should not accept a change from "suspended : true" into "suspended: false" state if there is (still) no on or off time declared (it also should refuse an on command/to go into on state in this case).

VanillaFord avatar Mar 31 '19 22:03 VanillaFord