Aeotec Nano Switch - Control load and external switch press independently

Hello everyone,

I have a setup in which my lights are Zigbee controlled, yet behind my light switches I run Aeotec ZW132.
I’d like to have the power to my light on all the time (I think the configuration calls this the “load”), yet I want to capture the external switch signals to send to the appropriate zigbee lights.

I managed to get this setup working “reasonably” by configuring parameter 122/123 to “Control other nodes” and putting my controller in Group3/Group4 respectively. I also set up 81/82 to “Send basic set CC”.
This setup stops the nano from ever removing power on the load itself and updates the switch state on the channel when the external switch is pressed.

However, at random times my lights come on by themselves. I think I have figured it out and I’m wondering if I am right and if yes, if something can be done about it.

Observation 1: The Nano switch is sending the load on/off (not the external switch press on/off) via Hail to the channel via command class COMMAND_CLASS_SWITCH_BINARY. I assume that is the setting in/for Group 1.

Observation 2: When the external switch is operated (like physically pressed), the Nano seems to send a COMMAND_CLASS_BASIC event to the controller (That happens if the controller is in Group 3/4 respectively). This is irrespective of the load change.

The problem seems to arise if the COMMAND_CLASS_BASIC has switched the channel “off” (even though the load is still ON). In this case, my Zigbees are off because they follow that channel “Switch X”. If for some reason (e.g. polling), the Nano hails the load statuses via COMMAND_CLASS_SWITCH_BINARY, the lights go on even though the switch was not operated.

I think the problem is that there is only one channel per switch which combines the load status as well as the physical pressing of the button. And that leads to my problem. I looked at the XML for the open hab configuration and it states

<channel id="switch_binary2" typeId="switch_binary">
        <label>Switch 2</label>
        <properties>
          <property name="binding:*:OnOffType">COMMAND_CLASS_SWITCH_BINARY:2,COMMAND_CLASS_BASIC:2</property>
        </properties>
      </channel>

Would I be right in my assumption if one was to create a configuration file in which COMMAND_CLASS_SWITCH_BINARY and COMMAND_CLASS_BASIC are two different channels, I could track both things in individual items and avoid this random switching of my lights? Or am I reading this upside down and the COMMAND_CLASS_BASIC here allows the hab to send information to the switch? In my testings I thought I saw this to be SWITCH_BINARY_SET but I could be wrong?

How would I go about building something like this? I found the howto on updating the database but I haven’t really found something that tells me how I could test such a config change locally before making an edit request. Appologies if I didn’t look closely enough, maybe someone could point me in the right direction?

Cheers,
Christoph

If I understand what you’re trying to achieve, then, no, this will make no difference. The configuration in the file simply reflects what he binding receives from the device. What this is telling the binding is that if it receives a BASIC command, then it treats it the same as the BINARY_SWITCH command. It won’t change anything that the binding does when controlling the device.

This doesn’t answer your question, but here’s a possible workaround.

If your intention is to constantly supply power to the bulbs while retaining control through OH, you could wire the light fixture to bypass the switch completely and be “always on.” Add a pigtail from your line wire to power the Aeotec Nano. This way, you keep the Nano in place and use the physical switch to send commands to your bulbs, but don’t wire it to the load so it’s not physically controlling the power.

Of course, whether this is up to code will depend on where you live, but it’s an option.

Hi Chris,

thanks for your super quick reply! Really appreciate the work you are doing with all the zwave and zigbee!

Just FYI - I just changed the jsondb properties for my zwave nano “Things” and split the one channel into two. It fixes it exactly as I hoped. Now when the nano sends commands to the openhab, it sends the load signals differently to the physical switch press signals.

You are correct in that when the binding sends its values back to the nano, it makes no difference which channel sets the value, but that is not a concern for me. The whole point was to have the information feeding back into the hab differentiated and that works beautifully now. For all I care, the “External switch” could be a read-only status since I can’t control that anyway. I just need to know when a user pressed a button.

I don’t know if it is worth putting this into the device database or not, but should someone ever find themselves in the same situation as me, maybe my changes to the thing in the jsondb help :slight_smile:

{
      "acceptedItemType": "Switch",
      "kind": "STATE",
      "uid": {
        "segments": [
          "zwave",
          "device",
          "047d1abd",
          "node16",
          "switch_binary1_load"
        ]
      },
      "channelTypeUID": {
        "segments": [
          "zwave",
          "switch_binary"
        ]
      },
      "label": "Switch 1 Load",
      "description": "Switch the power on and off",
      "configuration": {
        "properties": {}
      },
      "properties": {
        "binding:*:OnOffType": "COMMAND_CLASS_SWITCH_BINARY:1"
      },
      "defaultTags": []
    }

and

{
      "acceptedItemType": "Switch",
      "kind": "STATE",
      "uid": {
        "segments": [
          "zwave",
          "device",
          "047d1abd",
          "node16",
          "switch_binary1"
        ]
      },
      "channelTypeUID": {
        "segments": [
          "zwave",
          "switch_binary"
        ]
      },
      "label": "Switch 1 External Switch",
      "description": "Switch the power on and off",
      "configuration": {
        "properties": {}
      },
      "properties": {
        "binding:*:OnOffType": "COMMAND_CLASS_BASIC:1"
      },
      "defaultTags": []
    }