Zigbee binding

This should not be the case. If I remember correctly, when the OnOff command is sent to a level_control channel, it should send the same command as when it’s sent to the switch channel.

I have defined the 2 items as shown below, both linked to the Levelcontrol channel:
The switch sends ON/OFF, the dimmer 0-100.
The ON command from the switch sets the lightbulb to 100% level. However, this is not represented by the dimmer item.

Switch Werkkamer_Lamp      "Werkkamer Lamp [%s]" [ "Lighting" ]    
Dimmer Werkkamer_Lamp_dim    "Werkkamer Dim [%d %%]" [ "Lighting" ]

image

I checked, and you are right that different commands are used. Please raise an issue for this and I’ll have a look at it when I get a chance.

ok no problem… where do I do this? Still very new to this, but eager to learn :slight_smile:

Here.

Great - thanks.

Thanks for your quick reponses, I will look into creating a ticket tonight. May I also ask you took look into another topic I have started a while ago: Zigbee binding shows wrong status

Hi, @Hamboo.

While waiting for a fix, you can achieve more or less what you are after by:

  1. Unlinking your item Werkkamer_Lamp so it becomes a proxy item of type switch
  2. … and creating two rules, one to link the commands issued to the switch proxy Werkkamer_Lamp with the dimmer item Werkkamer_Lamp_dim and a second rule to link updates to Werkkamer_Lamp_dim back to the proxy switch, Werkkamer_Lamp.
rule "Turn On/Off Werkkamer Lamp Via Proxy Switch"
when
    Item Werkkamer_Lamp received command
then
    val logID = "ProxySwitchReceivedCommand"
    logDebug(logID, "Werkkamer Lamp received command {}", receivedCommand)

    try {
        Werkkamer_Lamp_dim.sendCommand(receivedCommand)
    } catch (Throwable t) {
        logError(logID, "Exception in 'Turn On Werkkamer Lamp Via Proxy Switch' rule: {}", t.toString())
    }
end

rule "Werkkamer Dim Updated"
when
    Item Werkkamer_Lamp_dim received update
then
    val logID = "WerkkamerDimUpdated"
    logDebug(logID, "Werkkamer_Lamp_dim received update {}", triggeringItem.state)

    try {
        Werkkamer_Lamp.postUpdate(triggeringItem.getStateAs(OnOffType))
    } catch (Throwable t) {
        logError(logID, "Exception in 'Werkkamer Dim Updated' rule: {}", t.toString())
    }
end

Disclaimer: I haven’t tested the rules I entered here, but I have implemented similar rules that are working here.

Hi @chris,

I just opened an issue (and sent the corresponding PR) in github to add the static thing definition xml and update discovery.txt file for the “Xiaomi Aqara Sensor HT” devices. These are the round devices with only temperature and humidity sensors (not the square ones, which correctly report their clusters and also have a barometric sensor)

Of course, this is tied to your commit for static thing definitions.

BTW, I closed the issue accidentally and reopened it again, so it looks as “closed” in the link, but it is not :slight_smile:

Best Regards,
Pedro

@chris, I don’t see an option for it yet… where does Ember coordinator insecure rejoin fall in your backlog? And if you have a stop over in CLE, let me know so I can buy you beer!

I think this is added to the library (I’ll double check though), and I need to flow this through into the binding (which I’ll look at this weekend hopefully). Once that’s in, then I can add this option to the binding.

I’ve got a direct flight (delayed!) from Austin to London, otherwise that beer would have been good.

1 Like

Hi Chris,
did you make any changes with the things linked to items?
Since tonight I see all things as before as well as the items, but if I use PaperUI and click on the things, the linked items are not shown any more. I also do not have any objects in the control area of PaperUI.
The same happens in HABmin.
I can’t control the (ubisys) switches and dimmers any more through openhab (zigbee).
Rebooting doesn’t help. All things are reconnected without problems afterwards.
Has anyone else the same problem?

When you say the items are not showing - how bout the channels? Are the channels showing, and the problem is just with the lined items? If so, this is probably not a binding issue as the binding knows nothing of the items and the links.

Thanks Scott for the example. The behaviour is not exactly how I would like it to be. When the switch is set to ON it should set the level to the last level before it was switched off. Now the switch is setting the level to 100%. Although the level_control channel is not stricktly needed it was kind of handy to prevent a lot of additional coding…

How are others using the dimmer control using the zigbee binding?

I’ve created a PR for this -:

sorry, I forgot that. The channels are NOT showing.
After clicking on the thing I only see the following:

I’ve raised an issue on this -:

Same problem here. Just installed new OpenHAB on a Pi 3B+, Elelabs USB Zigbee adapter. Things can be created, but show no channels…

I’ve raised an issue on this already -:

https://github.com/openhab/org.openhab.binding.zigbee/issues/320

Hi @chris,

I have had a quick look, and provided a PR that fixes the issue (comments in Issue #320)

If the fix implementation approach in the PR is not the right one, at least will point in the right direction.

BTW, this fix seems to be working for me, and channel consolidation is also happening correctly with it.

Pedro

Thanks - I saw. I’ll take a look when I get a chance - maybe tomorrow, or maybe Tuesday. Or Thomas might otherwise take a look when he gets into the office tomorrow.