# Simple Open AND and Close Flow

**URL:** <https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062>\
**Category:** General\
**Created:** [16 October 2023 00:24 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062 "2023-10-16T00:24:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![J728man](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@J728man](https://discourse.nodered.org/u/J728man)\
**Post date:** [16 October 2023 00:24 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/1 "2023-10-16T00:24:01Z")

</div>

This is for Open and Close Gate  
I'm having an issue with a flow in which I can't solve. I have tried several configuration but unable to get it done correctly. Here is change node set as  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f83de60a14d8bad9e0be64cc9590a7cb9cc5ba7b.png)  
and here are the debug errors I'm receiving  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/85beb8929289de5d4e675277420943b0ed64f0fc.png)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 October 2023 07:33 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/2 "2023-10-16T07:33:51Z")

</div>

Your post does not say what node.  
Please post a simple flow showing issue, so we can see what is occurring.  
[How to import/export a flow](https://nodered.org/docs/user-guide/editor/workspace/import-export)

I have edited the topic category as this is not about developing a node.

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [16 October 2023 08:20 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/3 "2023-10-16T08:20:57Z")

</div>

> [@J728man](#):
>
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f83de60a14d8bad9e0be64cc9590a7cb9cc5ba7b.png)

Pure guessing: `msg.payload` isn't an `object`, but coming in e.g. as `string`.  
Insert a `debug` node before the `change` node to verify the `msg` object that is sent.

---

<div class="post-metadata">

**Author:** ![J728man](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@J728man](https://discourse.nodered.org/u/J728man)\
**Post date:** [16 October 2023 09:52 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/4 "2023-10-16T09:52:12Z")

</div>

Here is the node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/5/f56b49b9ed3d8675e085d2c4b617deb6f23c36f9.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 October 2023 10:29 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/5 "2023-10-16T10:29:46Z")

</div>

Well it certainly won't work if you inject a timestamp into the change node, as msg.payload.status will not exist.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 October 2023 10:38 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/6 "2023-10-16T10:38:54Z")

</div>

Here it is working.

 ![chrome_screenshot_1697452658174](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/6599131fbed8384bc3fa05bf9b8e63d8eabf6e6d.png)  
Can you see the issue of posting an image?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 December 2023 10:39 UTC](https://discourse.nodered.org/t/simple-open-and-and-close-flow/82062/7 "2023-12-15T10:39:09Z")

</div>

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