# Get a boolean output from the Hikvision node

**URL:** <https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541>\
**Category:** General\
**Created:** [12 March 2026 13:40 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541 "2026-03-12T13:40:56Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [13 March 2026 07:59 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/21 "2026-03-13T07:59:53Z")

</div>

I think you will have to ask the author by posting an issue on the nodes GitHub page.

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [13 March 2026 08:11 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/22 "2026-03-13T08:11:08Z")

</div>

Ok, I have it already done, I let it know.  
Thanks for your help!

Gr. Johannes

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 March 2026 09:09 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/23 "2026-03-13T09:09:39Z")

</div>

apologies if I'm late to the party and missing something vital. If the key is missing entirely can you not use a switch node to check if msg.payload - has Key - isDataRetransmission ? and if not then do something ?

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [13 March 2026 09:46 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/24 "2026-03-13T09:46:14Z")

</div>

Hi,

I have put a switch in the output:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2c8b36fb68c50f08731525dbcc2533658036dc0d.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/744901d0e0dd99f7a05696b003e831663885ea02.png)

Debug 9 has no output.

The connection of the PTZ node was available.

---

<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:** [13 March 2026 09:58 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/25 "2026-03-13T09:58:39Z")

</div>

That is asking if msg.payload is equal to msg.payload.isDataRetransmission.

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [13 March 2026 10:04 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/26 "2026-03-13T10:04:03Z")

</div>

How can I know that?

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [13 March 2026 10:15 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/27 "2026-03-13T10:15:45Z")

</div>

Reaction of the Author:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/8/383ba21df9cb6292f271281020fa29278467c2b8.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:** [13 March 2026 10:21 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/28 "2026-03-13T10:21:43Z")

</div>

You need to provde hime with an example flow and point out that the node is not responding with the message that the readme says it should. It says:

**Output PIN 1**

```auto
msg = {
{
    "payload": true, // true after the camera has reached the PTZ preset position
    "_msgid": "b07e50f6.86a72"
}

```

But you are not seeing that, you are seeing something completely different. As I understand it you should just need to wait for the above message.

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [13 March 2026 10:29 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/29 "2026-03-13T10:29:47Z")

</div>

I have ask the question to him

---

<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:** [13 March 2026 11:11 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/30 "2026-03-13T11:11:02Z")

</div>

For reference, [here is the issue you have posted](https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate/issues/100).

You have not provided a sample flow, and shown the message you are sending to the node.  
You have not shown the message that you are receiving after sending the message to the node.  
You have not pointed out that this is not the message shown in the docs.

For a node author to spend time looking at your problem you must explain clearly what is happening, what should happen, and how to easily replicate the problem.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 March 2026 13:34 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/31 "2026-03-13T13:34:33Z")

</div>

I meant like this

 ![Screenshot 2026-03-13 at 13.35.15](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/5/e554bc11447854b7827f0c4fe794c91fda169b84.png)

---

<div class="post-metadata">

**Author:** ![Supergiovane](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/supergiovane/32/9716_2.png) [@Supergiovane](https://discourse.nodered.org/u/Supergiovane)\
**Post date:** [13 March 2026 16:46 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/32 "2026-03-13T16:46:38Z")

</div>

Hi guys. I'm also here in the forum.  
@Johannesje, have you solved the issue?

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [13 March 2026 20:30 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/33 "2026-03-13T20:30:45Z")

</div>

Hi, no I have it still not solved.  
I hope I can have a boolean out of the PTZ node.

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [14 March 2026 09:56 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/34 "2026-03-14T09:56:31Z")

</div>

Hello all,

I have figure out another way to get my boolean from the PTZ node:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/66dfd7f19e70a596d5c1ce5c1c31c85b96a385b9.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1de18791aaa68c53f5d8ef0ac0bbf42af76df6ad.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/0/d04736afbd6907c021b2eb4d0ef3eac197c788ed.png)

During traveling of the camera my output is true otherwise false.  
Gr. Johannes

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [14 March 2026 10:04 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/35 "2026-03-14T10:04:54Z")

</div>

Your if `Pos = false` is setting `Pos` to `false`. Equality tests in JavaScript are `==` or `===`

Why not simply use a switch node to test `msg.payload.isDataRetransmission` is false?

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [14 March 2026 10:12 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/36 "2026-03-14T10:12:18Z")

</div>

You mean the switch suggested by "dceejay" earlier in this post?  
This was not working.

---

<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:** [14 March 2026 10:13 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/37 "2026-03-14T10:13:56Z")

</div>

Does your function ever give a `false` output? As you have written it it will always set msg.payload to true. All you are doing is using any output on pin1 to indicate that movement is complete.

---

<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:** [14 March 2026 10:38 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/38 "2026-03-14T10:38:40Z")

</div>

@Supergiovane, after sending a set reset message to the PTZ node should the node send a message like

```auto
msg = {
{
    "payload": true, // true after the camera has reached the PTZ preset position
    "_msgid": "b07e50f6.86a72"
}

```

That is what the docs suggest to me. @Johannesje is seeing a completely different message, apparently.

---

<div class="post-metadata">

**Author:** ![Johannesje](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@Johannesje](https://discourse.nodered.org/u/Johannesje)\
**Post date:** [14 March 2026 10:42 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/39 "2026-03-14T10:42:40Z")

</div>

You are right, i have always a true. When there is no movement of the camera there is no output.  
Otherwise I have also a true output when the camera is starting recording

---

<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:** [14 March 2026 10:46 UTC](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541/40 "2026-03-14T10:46:20Z")

</div>

> [@Johannesje](#):
>
> You are right, i have always a true

That is because of the error in your code as pointed out by Steve.

[Previous page](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541.md?page=1)

[Next page](https://discourse.nodered.org/t/get-a-boolean-output-from-the-hikvision-node/100541.md?page=3)
