# Correct json notation?

**URL:** <https://discourse.nodered.org/t/correct-json-notation/26466>\
**Category:** General\
**Created:** [11 May 2020 08:04 UTC](https://discourse.nodered.org/t/correct-json-notation/26466 "2020-05-11T08:04:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![haskle](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@haskle](https://discourse.nodered.org/u/haskle)\
**Post date:** [11 May 2020 08:04 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/1 "2020-05-11T08:04:59Z")

</div>

Hello - very much a NR newbie.

I want to make a HomeBridge compatable light come on when the drive gate opens, but I can't work out what the correct notation is within a `change` node.

To test things I have created this flow:

 ![Screenshot 2020-05-11 08.58.16](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/728aa0cb02544caf2b7454431d54487ba6084ec5.png)

I have downloaded and installed the **homebridge-magichome-platform** plugin for HomeBridge, and have included the following in my config file. What should I put in the `change` node to trigger the lights? I have tried loads of combinations such as {"On":"false"} etc etc, but none work.

When I have got this test to work, I can bring in a feed from the gate.

TIA

[https://github.com/sahilchaddha/homebridge-magichome-platform#readme](https://github.com/sahilchaddha/homebridge-magichome-platform#readme)

```
    {
        "platform": "MagicHome-Platform",
        "debug": true,
        "lights": [
            {
                "name": "Office LEDs",
                "ip": "192.168.2.89",
                "setup": "RGBW",
                "purewhite": false,
                "timeout": 10000
            }
        ],
        "presetSwitches": [
            {
                "name": "Gate Open Strobe Flash",
                "ips": {
                    "192.168.2.89": "255,255,255"
                },
                "preset": "seven_color_strobe_flash",
                "speed": 60
            }
        ]
    }
```

---

<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:** [11 May 2020 08:12 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/2 "2020-05-11T08:12:44Z")

</div>

Hi .

What node is that orange office LED node? Have you read it's readme in the flow library? When that orange node is selected/highlighted, look in the sidebar info panel to see if it has some built-in help information?

Also, show us the debug output.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 May 2020 08:32 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/3 "2020-05-11T08:32:58Z")

</div>

> [@haskle](#):
>
> "192.168.2.89": "255,255,255"

Is that meant to be an IP and network mask? If so, the mask should probably be "255.255.255.0"

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [11 May 2020 08:41 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/4 "2020-05-11T08:41:11Z")

</div>

> [@TotallyInformation](#):
>
> IP and network mask

With it being office lights, it could also be IP address of the device, followed by RGB brightness levels from 0 to FF in hexadecimal. Which in this context makes more sense to me 🙂 But obviously I could be wrong too

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 May 2020 08:46 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/5 "2020-05-11T08:46:29Z")

</div>

haha, you can tell that my IT background is coming through as I immediately assumed infrastructure. 😁

---

<div class="post-metadata">

**Author:** ![haskle](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@haskle](https://discourse.nodered.org/u/haskle)\
**Post date:** [11 May 2020 13:49 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/6 "2020-05-11T13:49:15Z")

</div>

Thanks all - your replies made me look deeper and I now realise that just selecting the "to" dropdown of JSON isn't enough - you also have to type the { & } in the box. Very embarrassing, but at least I now know 😜

---

<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:** [10 July 2020 13:49 UTC](https://discourse.nodered.org/t/correct-json-notation/26466/7 "2020-07-10T13:49:18Z")

</div>

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