openHab and CC2531 for ZigBee

Hello All,

first of all let me apologies for the question, because I have already found many other user asking something similar (but I cannot find an easy start2finish guide)

I am pretty new to openHab and I got excited on how I can “dump” all sort of “proprietary hubs”…

The first I want to dump if IKEA :slight_smile:

I have some IKEA lights (ZigBee) and I was trying to setup a USB dongle CC2531… (I have the debugger and I can easily flash the firmware…)

I have the following problems:

  • which firmware should I l flash the CC2531 with?
  • once flash the USB, how to I see connect it to the openHab? (Raspberry Pi3)
  • when and how I will change the settings?

is there any “step by step guide” for this?

thank you all and sorry if the question is silly

I would recommend having a read of the binding docs which I think from your question you may not have found?

You can change any settings through PaperUI. Just select the coordinator thing that you added above and change any configuration that you need to set. In general, other than the serial port you shouldn’t need to change much I hope.

1 Like

You can also take a look at this for zigbee2mqtt and it work well with OH. The link has all the instructions you will need just start with “Getting Started”.

Thank you for this…

I actually followed the guide up to https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html (managed to succesfully flash the CC2531)

then I got stacked to "running ZigBee in openHab…

So i came here and look for alternatives :slight_smile:

I will try with the openHab bindings method :slight_smile:

thank you all for now

Cheers

Thank you for this… I managed to download CC2531ZNP-Pro-Secure_Standard.hex and all the Texas instruments sw for flashing the USB dongle…

I am not too sure when and how to use then sha256 3cc5dc571ef0f49e3f42c6c2ca076d6f8fef33a945c71e6f951b839ba0599d3c (whatever it is)

sorry, but this is way over my skills :wink: but happy to learn :slight_smile:

I flashed the USB, but I did not use anywhere the sha 256…

Plugged in the USB in Raspberry Pi and tried to set it us in paper ui…

it seems that the coordinator is online… now:

  • how can I make sure it is really online?

  • how do I discover IKEA ligth bulbs?

Thank you all

Hello,

please be aware that the zigbee binding could have problemens with some ikea dimmers and motion sensors. These devices act not like expected from the zigbee standard. They open own groups and don´t communicate (directly) with the coordinater (your usb stick). As far as I know also some xiamio devices have the same problems.
This could have chanced recently. Maybe @chris knows the actual state of these strange acting devices. For me this was a reason to change to zigbe2mqtt. But the integration is a bit more complex as you need:

  • proper firmware
  • zigbee2mqtt as another software beside openhab
  • a mqtt service beside openhab (maybe you use one allready)
  • manage the mqtt commands and messages yourself (could get tricky, i.e. for color lights)
  • you need to manage your devices within zigbee2mqtt and openhab in parallel

Greetings
Chris

thank you for this… I am actually interested on learning :slight_smile: would you kindly suggest me how to start?

I managed to follow the ZigBee2mqtt gude up to her https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html then I got stacked because the instruction are mainly for HASS.IO

any suggestion?

This is to verify the file you downloaded has not been modified. Has nothing to do with set up it’s just for secure download verification.

This link shows your stuck with flashing the firmware?

This is the link for setting up and running zigbee2mqtt | Zigbee2MQTT

After setup go to your ymal file and setup like instructions mentioned, ignore the Hass.io stuff.

Here is an example of a dimmable light I think it’s a Sengled bulb.

Things file:

Thing topic zigbee2mqtt "Bedroom Light" @ "Bedroom" {
    Channels:
        Type switch : power  "Power"               [ stateTopic="zigbee/0xb0ce1814030ac279", transformationPattern="JSONPATH:$.state",
                                                    commandTopic="zigbee/0xb0ce1814030ac279/set", on="ON", off="OFF" ]//, formatBeforePublish="{\"state\":\"%s\"}" ]
        Type dimmer : dimmer "Dimmer"              [ stateTopic="zigbee/0xb0ce1814030ac279",
                                                    commandTopic="zigbee/0xb0ce1814030ac279/set", transformationPattern="JSONPATH:$.brightness", formatBeforePublish="{\"brightness\":%s}" ]
    }

Items file:

Switch BedroomLight "Bedroom Light"    <light> ["Lighting"]  { channel="mqtt:topic:pibroker:zigbee2mqtt:power", expire="120m,command=OFF" }
Dimmer BedroomLight_Level "Bedroom Light Level [%.0f %%]"    <light> ["Lighting"]  { channel="mqtt:topic:pibroker:zigbee2mqtt:dimmer" }

JS transformation for geting bulb brightness:

(function(x){

    var result;
 
    var json = JSON.parse(x);  
    result = json.brightness * 100 / 255;

    return result;
    
})(input)

JS transformation for setting bulb brightness:

(function(x){

    var brightness = x * 255/100;

    var result = new Object();
    result.brightness = brightness;
 
    return JSON.stringify(result);
    
})(input)

JS transformation for setting zigebee state:

```csv
(function(x){

    var result = new Object();
    result.state = x;
 
    return JSON.stringify(result);
    
})(input)