# Control Sengled E11-G23/E11-G33 with MQTT

**URL:** <https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169>\
**Category:** Hardware\
**Created:** [15 December 2019 05:03 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169 "2019-12-15T05:03:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gehasi](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@Gehasi](https://discourse.nodered.org/u/Gehasi)\
**Post date:** [15 December 2019 05:03 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/1 "2019-12-15T05:03:59Z")

</div>

Hi, im not getting my LED Bulb running with nodered. Maybe someone can help me.....

First of all im running node-red on an raspi4 with zigbee2mqtt.

I got my bulb paired with my zigbee stick, so there is allready communication. But I dont know how i can now control it.

here is my flow I tried now 2 nights to solve the problem and searched the internet. Maybe one of you guys can help me.

[{"id":"30f418c1.dea57","type":"inject","z":"9a2d09f8.bc7f28","name":"","topic":"ON","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":200,"wires":[["15e4ab71.c7f175","760ff35b.1438b4"]]},{"id":"c790ddc7.950d3","type":"inject","z":"9a2d09f8.bc7f28","name":"","topic":"off","payload":"off","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":300,"wires":[["15e4ab71.c7f175","760ff35b.1438b4"]]},{"id":"15e4ab71.c7f175","type":"mqtt out","z":"9a2d09f8.bc7f28","name":"","topic":"zigbee2mqtt/light","qos":"2","retain":"","broker":"4deac92e.463c38","x":380,"y":260,"wires":},{"id":"760ff35b.1438b4","type":"debug","z":"9a2d09f8.bc7f28","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":350,"y":140,"wires":},{"id":"4deac92e.463c38","type":"mqtt-broker","z":"","name":"Martins MQTT Server","broker":"mqtt://localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""}]

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [15 December 2019 10:40 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/2 "2019-12-15T10:40:08Z")

</div>

I cannot import your flow as it is not formatted properly.

Export your flow again and re-post:

three backticks: `

```auto
your flow

```

three backticks: `

Looking at the code is the topic "zigbee2mqtt/light" correct? I would have expected "zigbee2mqtt/your-device-identifier"

---

<div class="post-metadata">

**Author:** ![Gehasi](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@Gehasi](https://discourse.nodered.org/u/Gehasi)\
**Post date:** [15 December 2019 12:20 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/3 "2019-12-15T12:20:12Z")

</div>

[flows.json](https://discourse.nodered.org/uploads/short-url/g0rJSzrgoSkSmIWJTZePzUejS1p.json) (1.2 KB)

Hi sorry, now you can download it hopefully.

The topic is how i receive informations from my temperature sensor (xiaomi), so i thought it is correct, I named the bulb just light.

Thx for your help...

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [15 December 2019 12:35 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/4 "2019-12-15T12:35:04Z")

</div>

I am not familiar with zigbee2mqtt, but looking at [their documentation](https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html), you need to use something like:

`topic:zigbee2mqtt/[FRIENDLY_NAME]/set`

with options like:

```auto
{
  "state": "ON", // Or "OFF", "TOGGLE"
  "brightness": 255, // Value between 0 and 255
  "color_temp": 155,
  "color": {
    // XY color
    "x": 0.123,
    "y": 0.123,

    // OR

    // RGB color
    "r": 46,
    "g": 102,
    "b": 193,

    // OR

    // HEX color
    "hex": "#547CFF",

    // OR

    // Hue and/or saturation color
    "hue": 360,
    "saturation": 100
  },

  // Blinks the bulbs, possible values:
  // - "select": single blink
  // - "lselect": blinking for a longer time
  // - "none": stop blinking
  "alert": "select",

  // Specifies the number of seconds the transition to this state takes (0 by default).
  "transition": 3,
}

```

Or if you don't want to send JSON:

```auto
topic:zigbee2mqtt/[FRIENDLY_NAME]/set/state
payload: ON/OFF

```

---

<div class="post-metadata">

**Author:** ![Gehasi](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@Gehasi](https://discourse.nodered.org/u/Gehasi)\
**Post date:** [15 December 2019 13:54 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/5 "2019-12-15T13:54:24Z")

</div>

Thx for the input, but i still do not get it to work.

Here is my newest try...

[flows-2.json](https://discourse.nodered.org/uploads/short-url/31ONGN1tUIbLTLp2FAM9SOzTTPD.json) (1.1 KB)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [15 December 2019 14:19 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/6 "2019-12-15T14:19:53Z")

</div>

Your topics are incorrect.

Remove the topic in the mqtt node

In the inject try it like this:

 ![Screenshot 2019-12-15 at 15.19.11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5af195ec958d9b2ce74a467904207fd627c578d2.jpeg)

---

<div class="post-metadata">

**Author:** ![Gehasi](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@Gehasi](https://discourse.nodered.org/u/Gehasi)\
**Post date:** [15 December 2019 14:33 UTC](https://discourse.nodered.org/t/control-sengled-e11-g23-e11-g33-with-mqtt/19169/7 "2019-12-15T14:33:11Z")

</div>

Now its working thank you so much....
