# HA-mqtt beginner help needed - I'm so close!

**URL:** <https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [1 June 2023 18:26 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878 "2023-06-01T18:26:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tul](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@Tul](https://discourse.nodered.org/u/Tul)\
**Post date:** [1 June 2023 18:26 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878/1 "2023-06-01T18:26:47Z")

</div>

Hi all,  
Trying to light a Ledvance bulb with HA/mqtt in Node-RED.  
I'm up and running with a fresh install on HA-os. My Sonoff button works in Node-RED so the broker is working.  
I can toggle the bulb in Zigbee2mqtt control panel... But I cannot inject anything to get it to respond in Node-RED.

The images below show a diagram that should toggle the bulb, but doesn't.  
Any help is appreciated!

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b9e532e1c5995ea67d6df74a8dae48cc175e4789.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1c9467607c11f723c9a642cb0007022725f286b8.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:** [1 June 2023 19:00 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878/2 "2023-06-01T19:00:47Z")

</div>

If you set the topic in the inject then you do not need to set it in the out node.

Is the payload and topic correct, is there a link to the topics and payloads for your device?

---

<div class="post-metadata">

**Author:** ![jw\_te\_r](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jw_te_r/32/69700_2.png) [@jw\_te\_r](https://discourse.nodered.org/u/jw_te_r)\
**Post date:** [1 June 2023 19:06 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878/3 "2023-06-01T19:06:03Z")

</div>

My first guess would be a spelling error in your MQTT topic.  
Keep in mind that MQTT topics are case sensitive. I think that's what is causing your problems. You could try listening to topic '#' on an MQTT in node to find out what topics the lamp uses when sending.  
On the [Zigbee2MQTT supported devices](https://www.zigbee2mqtt.io/supported-devices/#s=ledvance) site you can find lots of information about your specific device (if supported of course)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [1 June 2023 19:09 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878/4 "2023-06-01T19:09:03Z")

</div>

![mqtt](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/658cf7d2f1ad8869f6ab4abe1ba54048c52c3b60.jpeg)

You don't appear to adding the qos & retain as msg properties, and you've also left the fields blank in the MQTT node.

Also, although spaces in the MQTT topic are permitted, it's generally discouraged.

---

<div class="post-metadata">

**Author:** ![Tul](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@Tul](https://discourse.nodered.org/u/Tul)\
**Post date:** [1 June 2023 19:20 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878/5 "2023-06-01T19:20:10Z")

</div>

Amazing - I changed the Friendly name to a shorter without spaces and wrote out the 'zigbee2mqtt...' in lowercase letters and now it works!

Thanks a lot for the quick responses, I'd been pulling my hair out for days over this!

---

<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 June 2023 19:21 UTC](https://discourse.nodered.org/t/ha-mqtt-beginner-help-needed-im-so-close/78878/6 "2023-06-15T19:21:04Z")

</div>

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