# Receiving MQTT response from a Philips bulb

**URL:** <https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291>\
**Category:** General\
**Created:** [8 January 2022 11:09 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291 "2022-01-08T11:09:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![B3n84](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/b3n84/32/53781_2.png) [@B3n84](https://discourse.nodered.org/u/B3n84)\
**Post date:** [8 January 2022 11:09 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/1 "2022-01-08T11:09:59Z")

</div>

I have an RPi running Node-Red, Mosquitto and Zigbee2MQTT in Docker (latest). Currently only one Philps Hue lamp (9290022169) is connected which I can control. Unfortunately I have a problem querying the status and use it (show in debug) in Node-Red.

This is my FLow:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1e28aa80cf6505524a1000d2e1095a48320fed0d.png)

I cann see the respone in the Z2M Log:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/a/2ac3a162ca29c83849e756d3507b7853ca93b5b4.png)

How can i read the respone in Node-Red?

Thanks and have a nice day,  
Ben

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [8 January 2022 20:02 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/2 "2022-01-08T20:02:23Z")

</div>

Hi Ben,

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/0/a0f4517eabcd603cbd657d255c7575c1ee9219e8.png)

This should be enough to get the status out of your lamp after pressing the **statusabfrage** , don't forget to set the output of the mqtt node to "a parsed json object" for easy handling of the data.

---

<div class="post-metadata">

**Author:** ![B3n84](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/b3n84/32/53781_2.png) [@B3n84](https://discourse.nodered.org/u/B3n84)\
**Post date:** [9 January 2022 10:05 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/3 "2022-01-09T10:05:40Z")

</div>

Hi edje,

Thanks for your reply.

Unfortunately I don’t get a response in Node-red.

Here are the settings of the mqtt-in Node.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9dc57bdff8ec0ca5f07649ec1239ff3228a5359d.jpeg)

Do you think these settings should work?

---

<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:** [9 January 2022 11:13 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/4 "2022-01-09T11:13:21Z")

</div>

If you install MQTT explorer you can watch and examine all the MQTT topics flying around & determine what topics you need to subscribe to

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [9 January 2022 12:52 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/5 "2022-01-09T12:52:04Z")

</div>

The mqtt **in** node must be without the **/get** in the topic.  
So the topic needs to be **zigbee2mqtt/Lampe\_Buero**

---

<div class="post-metadata">

**Author:** ![B3n84](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/b3n84/32/53781_2.png) [@B3n84](https://discourse.nodered.org/u/B3n84)\
**Post date:** [10 January 2022 18:56 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/6 "2022-01-10T18:56:58Z")

</div>

I tried this before. But with no succes.

If I got that right, it should actually work with this flow?! But I did not receive the response of the bulb in Node Red (but in the MQTT-Broker Logs).

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/443a09723b7f5ee42a497a2688f1646191500752.png)

Do you have any ideas how I can catch the respone in NodeRed?

This is my Flow:

```auto
[
    {
        "id": "3523f9f6631a492f",
        "type": "tab",
        "label": "Bulb repsonse",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "3fd60f1c8f78b190",
        "type": "debug",
        "z": "3523f9f6631a492f",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 550,
        "y": 300,
        "wires": []
    },
    {
        "id": "785215765a426f6f",
        "type": "inject",
        "z": "3523f9f6631a492f",
        "name": "Statusabfrage ",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"brightness\": \"\"}",
        "payloadType": "str",
        "x": 350,
        "y": 220,
        "wires": [
            [
                "d9259d47693d1f8b",
                "abe33dd859ac5def"
            ]
        ]
    },
    {
        "id": "f2e34ef30cecf719",
        "type": "mqtt in",
        "z": "3523f9f6631a492f",
        "name": "",
        "topic": "zigbee2mqtt/Lampe_Buero",
        "qos": "0",
        "datatype": "json",
        "broker": "5f7aaa48051ef5f8",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 270,
        "y": 280,
        "wires": [
            [
                "3fd60f1c8f78b190"
            ]
        ]
    },
    {
        "id": "d9259d47693d1f8b",
        "type": "mqtt out",
        "z": "3523f9f6631a492f",
        "name": "",
        "topic": "zigbee2mqtt/Lampe_Buero/get",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "5f7aaa48051ef5f8",
        "x": 610,
        "y": 220,
        "wires": []
    },
    {
        "id": "abe33dd859ac5def",
        "type": "debug",
        "z": "3523f9f6631a492f",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 570,
        "y": 160,
        "wires": []
    },
    {
        "id": "5f7aaa48051ef5f8",
        "type": "mqtt-broker",
        "name": "mosquitto mit PW",
        "broker": "mosquitto",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    }
]

```

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [12 January 2022 20:53 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/7 "2022-01-12T20:53:02Z")

</div>

It looks good, now set the output of the mqtt node to **a parsed json object** and look again in the debug window.  
To be sure you don't miss anything set the output of the debug node to **complete msg object**.

---

<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:** [13 March 2022 20:53 UTC](https://discourse.nodered.org/t/receiving-mqtt-response-from-a-philips-bulb/56291/8 "2022-03-13T20:53:19Z")

</div>

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