OH3 zigbee2mqtt Livarno Lux work in progress

Material :

  • Raspberry Pi 3 Model B Rev 1.2, boot ext HDD w/o sd
  • Conbee 2, fw version 0x26680700.bin.GCF
  • Lidl HG06106C Livarno Lux E27 bulb RGB (in progress)
  • Lidl HG06106B Livarno Lux E14 candle RGB (in progress)
  • Lidl FB20-002 Livarno Lux remote control (next job)
  • Lidl HG06337 Silvercrest smart plug (next job)
  • Lidl Bridge (unused, maybe useful for helping debugging original binding)

OS :

  • OpenHabian 3.0.1
  • Java : Zulu11, oJDK 11.0.10
  • Zigbee2mqtt 1.18.1, node v 14.16.0, npm 6.14.11
  • MQTT 3.0.1

Hi everybody,

First, thanks a lot to all developers, members, in fact all the community who gave me the ability to control my first RGB color LEDs without original commercial bridge. I’m a newcomer (about 1 month), and I’m really impressed and excited by your OpenHab Project!!!

Because i had some problems to render “true” colors with “hue bridge” or “deconz bridge”, and thinking mqtt is more “brut” and will let me have more integration possibilities for futures devices, I choosed this way, and i am thinking today it was not wrong… for RGB only :wink: :

nobody knows what future will bring

So after burning my head reading forum topics, documentations and what else?, I decided to subscribe your community, to continue to progress and understand, maybe help someone :rofl:, hoping some help or even just little directions during i digest all, and savor some won battles, before coming back to war! :crazy_face:

Config files :

/opt/zigbee2mqtt/date/configuration.yalm

homeassistant: false
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://localhost:1883'
  user: XxXx
  password: xXxX
serial:
  port: /dev/ttyACM0
  adapter: deconz
advanced:
  log_level: error
  baudrate: 38400
  availability_timeout: 60
experimental:
  output: json
devices:
  '0xbc33acfffea9c60e':
    friendly_name: E27
  '0xbc33acfffe863c13':
    friendly_name: Remote
  '0x588e81fffed98822':
    friendly_name: E14
  '0x842e14fffe2008e7':
    friendly_name: E141

Thing file :

//Bridge definition an parameters :
    Bridge mqtt:broker:mosquitto [
        host="192.168.1.24",
        port="1883",
        secure="false",
        qos="0",
        reconnectTime="60000",
        keepAlive="60",
        lwtQos="0",
        lwtRetain="true",
        username="XxXx",
        password="xXxX",
        certificatepin="true",
        publickeypin="true"
    ]
{
        //"Bridge Thing" for permiting join and logs : (txh @Seaside)
	Thing topic zigbeeBridge "Zigbee2mqtt Bridge" @ "Salon" {
            Channels:
                Type switch : permitJoin [
                    commandTopic="zigbee2mqtt/bridge/config/permit_join",
                    on="true",
                    off="false"
                ]
                Type string : state [
                    stateTopic="zigbee2mqtt/bridge/state"
                ]
                Type string : logType [
                    stateTopic="zigbee2mqtt/bridge/log",
                    tranformationPattern="JSONPATH:$.type"
                ]
                Type string : logMessage [
                    stateTopic="zigbee2mqtt/bridge/log",
                    transformationPattern="JSONPATH:$.message"
                ]
        }
        //"Light Thing" Lidl Livarno Lux E27 bulb RGB (model HG06106C) :
        Thing topic jsonE27 "JSON E27" @ "Salon" {
            Channels:
                Type switch : jsonSwitchE27 "JSON Switch E27" [
                    stateTopic="zigbee2mqtt/E27/state",
                    commandTopic="zigbee2mqtt/E27/set",
                    on="ON",
                    off="OFF"
                ]
                Type dimmer : jsonDimmerE27 "JSON Dimmer E27" [
                    stateTopic="zigbee2mqtt/E27",
                    commandTopic="zigbee2mqtt/E27/set/brightness",
                    min=0,
                    max=254,
                    transformationPattern="JSONPATH:$.brightness"               //seems useless or bad, return percent value
                ]
                Type number : jsonLqiE27 "JSON LQI E27" [
                    stateTopic="zigbee2mqtt/E27",
                    transformationPattern="JSONPATH:$.linkquality"
                ]
                Type color : jsonColorE27 "JSON Color E27" [                    //may need 'send JSONE27_JSONColorE27 "100,50,100"' in karaf to enable colorpicker
                    stateTopic="zigbee2mqtt/E27",
                    commandTopic="zigbee2mqtt/E27/set",
                    colorMode="RGB",
                    formatBeforePublish="{\"color\":{\"rgb\":\"%s,%s,%s\"}}",   //should try {\"rgb\":\"%d,%d,%d\"}}", cf mqtt doc; sends max 250 instead of 255
                    transformationPattern="JSONPATH:$.color"                    //seems useless or bad
                ]
        }
        //"Light Thing" Lidl Livarno Lux E14 candle RGB (model HG06106B) :
        Thing topic jsonE141 "JSON E141" @ "Salon" {
            Channels:
                Type switch : jsonSwitchE141 "JSON Switch E141" [
                    stateTopic="zigbee2mqtt/E141/state",
                    commandTopic="zigbee2mqtt/E141/set",
                    on="ON",
                    off="OFF"
                ]
                Type dimmer : jsonDimmerE141 "JSON Dimmer E141" [
                    stateTopic="zigbee2mqtt/E141",
                    commandTopic="zigbee2mqtt/E141/set/brightness",
                    min=0,
                    max=254,
                    transformationPattern="JSONPATH:$.brightness"
                ]
                Type number : jsonLqiE141 "JSON LQI E141" [
                    stateTopic="zigbee2mqtt/E141",
                    transformationPattern="JSONPATH:$.linkquality"
                ]
                Type color : jsonColorE141 "JSON Color E141" [
                    stateTopic="zigbee2mqtt/E141",
                    commandTopic="zigbee2mqtt/E141/set",
                    colorMode="RGB",
                    formatBeforePublish="{\"color\":{\"rgb\":\"%s,%s,%s\"}}",
                    transformationPattern="JSONPATH:$.color"
                ]
        }
        //"Light Thing" Lidl Livarno Lux E14 candle RGB (model HG06106B) :
        Thing topic jsonE14 "JSON E14" @ "Salon" {
            Channels:
                Type switch : jsonSwitchE14 "JSON Switch E14" [
                    stateTopic="zigbee2mqtt/E14/state",
                    commandTopic="zigbee2mqtt/E14/set",
                    on="ON",
                    off="OFF"
                ]
                Type dimmer : jsonDimmerE14 "JSON Dimmer E14" [
                    stateTopic="zigbee2mqtt/E14",
                    commandTopic="zigbee2mqtt/E14/set/brightness",
                    min=0,
                    max=254,
                    transformationPattern="JSONPATH:$.brightness"
                ]
                Type number : jsonLqiE14 "JSON LQI E14" [
                    stateTopic="zigbee2mqtt/E14",
                    transformationPattern="JSONPATH:$.linkquality"
                ]
                Type color : jsonColorE14 "JSON Color E14" [
                    stateTopic="zigbee2mqtt/E14",
                    commandTopic="zigbee2mqtt/E14/set",
                    colorMode="RGB",
                    formatBeforePublish="{\"color\":{\"rgb\":\"%s,%s,%s\"}}",
                    transformationPattern="JSONPATH:$.color"
                ]
        }
}

Sniffing mqtt traffic :

$ mosquitto_sub -h '192.168.1.24' -p 1883 -u openhabian -P 'Rpi01OHMqtt!44?' -v -t 'zigbee2mqtt/#'
zigbee2mqtt/E27/set {"color":{"rgb":"250,250,250"}}
zigbee2mqtt/E27 {"brightness":96.52,"color":{"x":0.3227,"y":0.329},"color_temp":165,"linkquality":208,"state":"ON"}

Note :

I choose “JSON output” (i think the default in fact), because I’m not able to set “color-x”/“color-y”, the separated “attribute output”. Maybe using both should solved some problems.

What is WORKING !

  1. Bridge and binding
  2. Switchs ON/OFF
  3. Brightness control
  4. Color control, through RGB mode
  5. Reading linkquality value

What I’m looking for ?

  1. Where an how writing “availability topic” in the thing file ? (i got it when i create thing through GUI)
  2. Why brightness output value is percent value ? Is “JSONPATH:$.brightness” wrong ? Or is it just the item configuration ?
    And color output is wrong too! (of course if reading X,Y value)
  3. I defined i my model a scale 0-100 to brightness control, that’s running, but in the “auto-generated” card , it still appears as 0-255. Where am i wrong ?
  4. Why “sended” max color control value (“r”, “g” or “b”) is 250 ? (maybe have to try “%d,%d,%d”) (cf “sniffing traffic”)
  5. Can’t switch in “white color temperature” mode. (maybe have to set “colorMode”=“CT” if possible)

Hoping I respected Guidelines,
Thanks for reading, and future help,
And good continuation!

Hello,
I bought the Lidl HG06106C Livarno Lux E27 bulb RGB…and I think I found an easier way to control it with the Zigbee2MQTT.
In MQTT Command Topic, we have to indicate the path zigbee2mqtt/FRIENDLY_NAME/set/color. Then if we choose CIE mode xyY (x, y, Brightness), in the Outgoing Value Format we have to put {“x”:%s, “y”:%s}. If we choose RGB mode (Red, Green, Blue) we have to put {“rgb”:“%s,%s,%s”} or {“r”:%s,“g”:%s,"b ":%s}.