[SOLVED] Zigbee2mqtt installation

  • Platform information:
    • Hardware: rapberry pi 3b+
    • OS: openhabian
    • Java Runtime Environment: the one in the openhabian
    • openHAB version: 2.4

Hello all,
is there a guide for the installation of the zigbee2mqtt? I tried the manual instruction here: https://www.zigbee2mqtt.io/getting_started/running_zigbee2mqtt.html but when on the first step I run:

sudo curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

openhabian tell me:

## Installing the NodeSource Node.js 10.x repo...


## You appear to be running on ARMv6 hardware. Unfortunately this is not currently supported by the NodeSource Linux distributions. Please use the 'linux-armv6l' binary tarballs available directly from nodejs.org for Node.js 4 and later.

how to solve the problem?

I’m using the same platform with zigbee2mqtt and used this tutorial.

thanx! I been able to install it… know I have to add my device (Xiaomi temperature & humidity sensor) as a Generic MQTT device?

Using mqtt 2.x yes you will need to create a generic mqtt thing. Are you planning to set this up via PaperUI or files?

i will do it via paper UI… any advice?

I have everything setup via files. Do a forum search and you should find several examples using PaperUI.
Here’s a good starting point.

well… but it paper ui ->thing->Mqtt things binding there isn’t zigbee2mqtt… do I have to install something else?

For zigbee2mqtt you only need to install a broker and that’s part of the setup when installing the 2.x mqtt binding.

This is an example of a 1.x mqtt item that I have using zigbee2mqtt.

Switch MyLight "My Light"    <light> ["Lighting"] { mqtt=">[pibroker:zigbee/0xb0ce1814030ac279/set:command:*:JS(setZigbeeState.js)],<[pibroker:zigbee/0xb0ce1814030ac279:state:JSONPATH($.state)]", expire="120m,command=OFF" }
Dimmer MyLight_Level "My Light Level"    <light> ["Lighting"] { mqtt=">[pibroker:zigbee/0xb0ce1814030ac279/set:command:*:JS(setZigbeeBrightness.js)],<[pibroker:zigbee/0xb0ce1814030ac279:state:JS(getZigbeeBrightness.js)]" }

In the example, even thou its the 1.x binding, you can see the broker used is pibroker. Hope this helps to understand that after you have the broker installed you’ll then need to add that broker name to your things/items for zigbee2mqtt to work.

@vzorglub will be able to provide more help with the 2.x mqtt setup via PaperUI. I’m to hard headed to use PaperUI and have everything setup in files.:laughing:

reading on internet seems I have to install a CC2531 EMK Coordinator… but I can’t find it in the binding… where can I get it?

Have you flashed and connected the cc2531 to the RPI?

What is the output of ls -al /dev/ttyACM0 or use just ls -al /dev to get a list if your not sure about the ttyACM0 name.

hell! I did everything correctly, but didn’t thing that was so simple to add it… it has been enough to look for the topic of the Xiaomi, and add it as a Generic MQTT thing…
thanx a lot for your help H102!

That’s what I hear about PaperUI setup, easy to use.:wink: I just might have to give it a try someday.:laughing:

Glad you have it up and working.:+1:

Please click the square box on the post that provided the solution and edit the title to start with [Solved].
Example:
image

Thanks

If you haven’t already found this link you may want to book mark it as the bottom section shows how to update the zigbee2mqtt version.

While CC2531emk coordinator is different than zigbee2mqtt, which one did you get working?

I tried to flash cc2531emk, openhab found it, but it couldnt find any things…

My zigbee2mqtt setup finds my devices, but i dont know how to setup things to openhab…

Any help is welcome :slight_smile:

I guess this is what you request

Thing zigbee:coordinator_cc2531:stick1 "Zigbee USB Stick"   @ "mqtt" [zigbee_port="COM4", zigbee_baud=38400]

Bridge mqtt:broker:zigbee2mqtt [ host="localhost", port=1883, secure=false ]
{
// Temperatura_Terrassa 0x00158d0002e9370f
    Thing topic Terrassa_Ambient "Terrassa_Ambient" @ "mqtt"
    {
    Channels:
    Type number : Terrassa_Temperatura "Temperatura" [ stateTopic="zigbee2mqtt/Terrassa_Ambient/temperature"] //, transformationPattern="JSONPATH:$.temperature"] //mqtt:topic:zigbee2mqtt:temperatura_terrassa
    Type number : Terrassa_Humitat "Humitat"       [ stateTopic="zigbee2mqtt/Terrassa_Ambient/humidity"] //, transformationPattern="JSONPATH:$.humidity"]
    //Type number : pressure "Pressure"       [ stateTopic="zigbee2mqtt/Temperatura_Terrassa", transformationPattern="JSONPATH:$.pressure"]
    //Type number : voltage "Voltage"         [ stateTopic="zigbee2mqtt/temperatura_terrassa", transformationPattern="JSONPATH:$.voltage"]
    Type number : Terrassa_battery "Bateria"         [ stateTopic="zigbee2mqtt/Terrassa_Ambient/battery"] //, transformationPattern="JSONPATH:$.battery"]
    //Type number : linkquality "Linkquality" [ stateTopic="zigbee2mqtt/temperatura_terrassa", transformationPattern="JSONPATH:$.linkquality"]
    }
Thing topic Ionitzador "Ionitzador" @ "mqtt"

    {

        Channels:

            Type switch : state              [ stateTopic ="zigbee2mqtt/Ionitzador", commandTopic= "zigbee2mqtt/Ionitzador/set", on="ON", off="OFF" ]

            //Type switch : state              [ stateTopic ="zigbee2mqtt/Ionitzador/state", on="ON", off="OFF" ]

            //Type switch : state              [ stateTopic ="zigbee2mqtt/Ionitzador/state", on="true", off="false"  ]

            Type number : temperature        [ stateTopic ="zigbee2mqtt/Ionitzador/temperature" ] //",  transformationPattern="JSONPATH:$.temperature" ]

            Type number : consumption        [ stateTopic ="zigbee2mqtt/Ionitzador/consumption" ]  //",  transformationPattern="JSONPATH:$.consumption" ]

            Type number : voltage            [ stateTopic ="zigbee2mqtt/Ionitzador/voltage" ]  //",  transformationPattern="JSONPATH:$.voltage" ]

            Type number : power              [ stateTopic ="zigbee2mqtt/Ionitzador/power" ]  //",  transformationPattern="JSONPATH:$.power" ]

            Type number : linkquality        [ stateTopic ="zigbee2mqtt/Ionitzador/linkquality" ]  //",  transformationPattern="JSONPATH:$.linkquality" ]

    }