Using variables to program Eztimer error: Invalid object (msg.payload) input

Trying to program Eztimer on and off time without success, I assume the problem is with the input to Eztimer not being the right type, I have tried converting object to JSON string with JSON node and also using mustache template but no success?

[{"id":"f17c9f78.e95ae","type":"change","z":"8c83fae7.330248","name":"","rules":[{"t":"set","p":"arm_start","pt":"global","to":"21:00:00","tot":"str"},{"t":"set","p":"arm_stop","pt":"global","to":"06:00:00","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":80,"wires":[["8b9193ab.d533f"]]},{"id":"32273994.938ff6","type":"inject","z":"8c83fae7.330248","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":80,"wires":[["f17c9f78.e95ae"]]},{"id":"4b03fa7.0c7eb04","type":"eztimer","z":"8c83fae7.330248","name":"","debug":false,"autoname":"","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"","lon":"","timerType":"1","startupMessage":true,"ontype":"9","ontimesun":"dawn","ontimetod":"17:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"str","onvalue":"on","onoffset":0,"onrandomoffset":0,"onsuppressrepeats":true,"offtype":"9","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"str","offvalue":"off","offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":780,"y":100,"wires":[["7d383b03.d39b54"]]},{"id":"7d383b03.d39b54","type":"debug","z":"8c83fae7.330248","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":950,"y":100,"wires":[]},{"id":"4171f412.05b42c","type":"debug","z":"8c83fae7.330248","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":770,"y":160,"wires":[]},{"id":"8b9193ab.d533f","type":"change","z":"8c83fae7.330248","name":"","rules":[{"t":"set","p":"ontime","pt":"msg","to":"arm_start","tot":"global"},{"t":"set","p":"offtime","pt":"msg","to":"arm_stop","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":160,"wires":[["4171f412.05b42c","4b03fa7.0c7eb04"]]}]

error

According to the read me at node-red-contrib-eztimer (node) - Node-RED , the ontime and offtime should be object properties of msg.payload.
e.g msg.payload.offtime.

Hi E1cid thanks for the reply, I tried that first same error.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.