# Nora google, ikea tradfri lamp

**URL:** <https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956>\
**Category:** Hardware\
**Created:** [11 March 2020 09:08 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956 "2020-03-11T09:08:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 09:08 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/1 "2020-03-11T09:08:48Z")

</div>

Hi Guys

I have a Ikea tradfri lamp that i control with Nora and google for ON and OFF  
When i want to control the brightness the problem starts

This is how the flow now looks like

```auto
[{"id":"ddfed62f.093d68","type":"nora-light","z":"1a9416eb.ba0129","devicename":"Lamp boekenkast","lightcolor":false,"brightnesscontrol":false,"turnonwhenbrightnesschanges":false,"passthru":true,"statepayload":true,"brightnessoverride":"","roomhint":"Slaapkamer","name":"","nora":"9d167d4b.443f","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":110,"y":40,"wires":[["baf3d643.307af8","1eac81c2.ab392e"]]},{"id":"1eac81c2.ab392e","type":"mqtt out","z":"1a9416eb.ba0129","name":"Boekenkast lamp","topic":"zigbee2mqtt/0xccccccfffe8ab8f4/set","qos":"0","retain":"false","broker":"c40e4a64.770398","x":450,"y":80,"wires":[]},{"id":"baf3d643.307af8","type":"debug","z":"1a9416eb.ba0129","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":430,"y":40,"wires":[]},{"id":"9d167d4b.443f","type":"nora-config","z":"","name":"nora config","group":"","notify":true},{"id":"c40e4a64.770398","type":"mqtt-broker","z":"","name":"Hassio main","broker":"192.168.2.23","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

```

And this is the payload comming out the nora google command when i changed the bridgeness

payload: object

online: true

on: true

brightness: 65

topic: ""

\_msgid: "d90c187d.2cd088"

Then only brightness work but ON and OFF from the bulb not, can someone help me out please

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 09:09 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/2 "2020-03-11T09:09:42Z")

</div>

Forgot the flow when activate the node for google light and brightness control

```auto
[{"id":"ddfed62f.093d68","type":"nora-light","z":"1a9416eb.ba0129","devicename":"Lamp boekenkast","lightcolor":false,"brightnesscontrol":true,"turnonwhenbrightnesschanges":true,"passthru":true,"statepayload":true,"brightnessoverride":"","roomhint":"Slaapkamer","name":"","nora":"9d167d4b.443f","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":110,"y":40,"wires":[["baf3d643.307af8","1eac81c2.ab392e"]]},{"id":"1eac81c2.ab392e","type":"mqtt out","z":"1a9416eb.ba0129","name":"Boekenkast lamp","topic":"zigbee2mqtt/0xccccccfffe8ab8f4/set","qos":"0","retain":"false","broker":"c40e4a64.770398","x":450,"y":80,"wires":[]},{"id":"baf3d643.307af8","type":"debug","z":"1a9416eb.ba0129","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":410,"y":40,"wires":[]},{"id":"9d167d4b.443f","type":"nora-config","z":"","name":"nora config","group":"","notify":true},{"id":"c40e4a64.770398","type":"mqtt-broker","z":"","name":"Hassio main","broker":"192.168.2.23","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 March 2020 09:10 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/3 "2020-03-11T09:10:50Z")

</div>

have you looked at the other threads about 'tradfri'?

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 09:15 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/4 "2020-03-11T09:15:08Z")

</div>

they use the ikea hub, i use zigbee

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 March 2020 09:38 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/5 "2020-03-11T09:38:30Z")

</div>

this [https://discourse.nodered.org/t/zigbee-the-best-node/3349/6or](https://discourse.nodered.org/t/zigbee-the-best-node/3349/6or) this [https://phoscon.de/en/raspbee2](https://phoscon.de/en/raspbee2) might help.

Other than that I'll have to bow out now having neither the lamp or zigbee

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 15:00 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/6 "2020-03-11T15:00:35Z")

</div>

nope nothing there, they use not google (nora) and zigbee2mqtt with ikea tradfrik bulb that have on of and brithness control

---

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [11 March 2020 15:09 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/7 "2020-03-11T15:09:09Z")

</div>

Would there be any objection to moving this thread to the "Hardware" category, since @sniperxnl seems to be looking for advice specific to his particular hardware setup?

---

<div class="post-metadata">

**Author:** ![davall](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@davall](https://discourse.nodered.org/u/davall)\
**Post date:** [11 March 2020 15:20 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/8 "2020-03-11T15:20:57Z")

</div>

Look at the attached flow. I'm using brightness control with NORA and KNX devices. Should be easily adopted to Zigbee devices. I have Zigbee devices too. I'm using a Phoscon Conbee II USB Stick with Node node-red-contrib-deconz.[flows.json](https://discourse.nodered.org/uploads/short-url/9oUsdE9MjDrpqEso0RlwNbfAH1i.json) (2.8 KB)

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 16:28 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/9 "2020-03-11T16:28:10Z")

</div>

Deconz is not working with my usb stick.

---

<div class="post-metadata">

**Author:** ![davall](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@davall](https://discourse.nodered.org/u/davall)\
**Post date:** [11 March 2020 16:31 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/10 "2020-03-11T16:31:49Z")

</div>

Do you own this one? --\> [https://www.phoscon.de/de/conbee2](https://www.phoscon.de/de/conbee2)

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 17:21 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/11 "2020-03-11T17:21:32Z")

</div>

Cc2531 stick i am using

---

<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 March 2020 17:26 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/12 "2020-03-11T17:26:21Z")

</div>

Not all zigbee controllers are compatible with Phoscon, and since Sniperxnl above mentions they're using `zigbee2mqtt`, we can just respect that choice and try to come up with a solution following that. It's a personal choice what kind of gateway setup to use. I went with Phoscon, and a Conbee II stick to match it up, others will use `zigbee2mqtt`.

You're publishing to `zigbee2mqtt/0xccccccfffe8ab8f4/set`. The zigbee2mqtt documentation describes that to publish to this topic, you always have to use an object as payload. [https://www.zigbee2mqtt.io/information/mqtt\_topics\_and\_message\_structure.html#zigbee2mqttfriendly\_nameset](https://www.zigbee2mqtt.io/information/mqtt_topics_and_message_structure.html#zigbee2mqttfriendly_nameset)  
Which you do. The formatting was lost when you pasted the object here, but (correct me if I'm wrong), it looks like this:

```auto
{
    payload: {
        online: true,
        on: true,
        brightness: 65
    },
    topic: ""
    _msgid: "d90c187d.2cd088"
}

```

Keep in mind that each device uses a specific payload format. An example is given on the MQTT FAQ for IKEA Trådfri bulbs (E27 fitting), but that might not be the one you've connected. Still, I'm expecting Ikea devices to be mostly compatible in how they're talking, so try to edit that example.

```auto
{
  "state": "ON",
  "brightness": 215,
  "color_temp": 325
}

```

Put a function node (or change node depending on which you're most comfortable with) between the Nora output, and the mqtt-out node. Your goal is to transform the payload object to that kind of format, so a key `state` with a value `"ON"`/`"OFF"`, and a key `brightness` with the value.  
I hope that helps.

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 17:34 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/13 "2020-03-11T17:34:18Z")

</div>

Thanks for the good information @afelix, if i understand it correctly then it is possible to chnage the dimmer function with google assist and on or off?

Zigbee2mqtt works btw great with there motion sensors and e27 tradfri warm white bulb

---

<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 March 2020 17:46 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/14 "2020-03-11T17:46:58Z")

</div>

I don't use Nora myself, and as I'm mid-moving I don't have a proper connection to my Node-RED install(s) at the moment, so I can't test any flows really. When you say "dimmer function", do you mean something in Nora, or the functionality of dimming lights in general.

Rather than look at the exact situation you see here, look at it more generic: Zigbee2mqtt allows you to query the state of devices, and to subscribe to state changes, as well as publish those changes yourself for the device to act on. Nora outputs information coming from google assist. You posted an output of that in your first post. Your goal now is to transform that information from google assistant, to a format that your device on zigbee2mqtt can read.

As you're already publishing to `zigbee2mqtt/[friendly_name]/set`, you don't have to add much. If you had been publishing to the specific topic for each aspect (`zigbee2mqtt/[friendly_name]/set/state` or `zigbee2mqtt[friendly_name]/set/brightness`), you would have just published a single item in a payload, for example `msg.payload = "ON"` for the state. With using `zigbee2mqtt/[friendly_name]/set`, you have to create a payload object that matches what your IKEA bulb on zigbee is expecting.

Take a look at this note from the Zigbee2mqtt FAQ:

> [@](#):
>
> Remove attributes which are not supported for your device. E.G. in case of a Xiaomi Mi power plug ZigBee (ZNCZ02LM) only send the `"state"` attribute.

Nora might add additional properties/attributes that your lamp does not support. Make sure they're no longer on the object that you send to the mqtt-out node.  
An option for that is to use a change node, where you set the `msg.payload` with JSONata. Here's an example: [https://try.jsonata.org/cmULsyI0](https://try.jsonata.org/cmULsyI0)

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 19:37 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/15 "2020-03-11T19:37:36Z")

</div>

> [@afelix](#):
>
> { "state": "ON", "brightness": 215, "color\_temp": 325 }

![Knipsel](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/e/fe7fd3ab0ecc50a3a122530c17c054780e8b9fb3.jpeg)

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [11 March 2020 19:38 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/16 "2020-03-11T19:38:04Z")

</div>

This Works, no control, but a set brightness

---

<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 March 2020 19:51 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/17 "2020-03-11T19:51:05Z")

</div>

Make sure you change your off payload to an object syntax too.

---

<div class="post-metadata">

**Author:** ![realjax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/realjax/32/895_2.png) [@realjax](https://discourse.nodered.org/u/realjax)\
**Post date:** [12 March 2020 07:43 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/18 "2020-03-12T07:43:22Z")

</div>

Try setting the 'dimmer' value instead of the 'brightness'. I've seen some tradfri libs that use this.

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [12 March 2020 08:53 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/19 "2020-03-12T08:53:34Z")

</div>

done, thanks

---

<div class="post-metadata">

**Author:** ![sniperxnl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sniperxnl/32/18250_2.png) [@sniperxnl](https://discourse.nodered.org/u/sniperxnl)\
**Post date:** [12 March 2020 08:55 UTC](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956/20 "2020-03-12T08:55:37Z")

</div>

Nora, node don't have dimmer function only brightness, it works but only for brightness not on or off and only between 0-99, not 0-255 what ikea bulb needed

[Next page](https://discourse.nodered.org/t/nora-google-ikea-tradfri-lamp/22956.md?page=2)
