Control Sengled E11-G23/E11-G33 with MQTT

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":""}]

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

Export your flow again and re-post:

three backticks: `

your flow

three backticks: `

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

flows.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...

I am not familiar with zigbee2mqtt, but looking at their documentation, you need to use something like:

topic:zigbee2mqtt/[FRIENDLY_NAME]/set

with options like:

{
  "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:

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

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

Here is my newest try...

flows-2.json (1.1 KB)

Your topics are incorrect.

Remove the topic in the mqtt node

In the inject try it like this:

1 Like

Now its working thank you so much....

1 Like