Aqara in 2024 - Zigbee 3.0

So I ran into the issue of a switch having to be a No Neutral type.
Picked up an Aqara hub E1 and a Switch (WS-USC01) installed in minutes and the app was a breeze. Now for the hard part.

How do I add this thing to Openhabian? I installed the Zigbee binding since its zigbee certified, but when I click SCAN nothing shows up, and there are just the 4 default co-ordinators in OH.

Any tips appreciated

You can’t use the Aqara hub with the Zigbee binding. It requires a USB Zigbee controller to be plugged into your OH server.

I don’t know anything about the Aqara hub E1. You can search the community to see if anyone else has implemented it, but I’d personally recommend that you get a USB controller (I use a Sonoff ZBDongle-E).

If your Aqara switch follows the Zigbee standards, the Zigbee Binding will automatically identify it for direct control in OH. Unfortunately, Aqara has a history of not following the Zigbee standards, in which case you’ll need to use Zigbee2mqtt.

If you haven’t used MQTT before, you’ll have to set up an MQTT broker to pass messages between Zigbee2mqtt and OH. If you’re using openHABian, you can install the Mosquitto broker from openhabian-config.

MQTT can be very daunting at first, but once you figure it out it makes a lot of sense. Plus, there’s a lot of help available in the community.

Aquara hub is, as far as I understand, not a standard/supported Zigbee coordinator. The Zigbee binding requires a supported USB Zigbee coordinator in order to access the Zigbee network. Nothing shows up when you hit “scan” because there is no coordinator. The coordinator has the actual antenna that talks Zigbee. Without the coordinator it’s like asking your bluetooth speaker to send a file over WiFi.

There is an API for the Aquara Hub: API Introduction · Aqara Developer Platform Documentation. You might be able to make something work using the HTTP binding, but it’s going to be a lot of work.

Here is the list of supported coordinators.

Thanks for your replies. Took a look at the api and bailed because I don’t have time for a pet project.

I ordered a
EFR32MG21 Sonoff Dongle and will try it tomorrow.

Ok - dongle installed, and recognized in openhab -meaning I installed mosquito broker and zibgee2mqtt from the >

sudo openhab-config

menu. (This is RPi 4 with OH 4.0.4)

Visited the URL http:\myopenhabip:8081 and zigbee2mqtt’s UI was there, Allowed Join (Which actually says "Disable join’ in the dropdown, with a count down, since joining will automatically close in 255secs)

So switch is added.

But now I have no clue what THING to add

  • Tried adding a zigbee thing, scan did nothing. So I added an already listed one - EMBER, it was initializing and says Error Com, the port is /dev/ttyACM0

(investigating how to determine what dev mount point a USB device has)

Also added an MQTT broker - there was nothing much to configure, Broker Hostname is localhost, security disabled.

Adding an item just adds stub, the channel can neither be set to ember or mqtt …
Other threads indicate a lot of textfile based config - is this still the case?

Any pointers appreciated. (I can use text files but would rather hit this via the UI as much as possible)

None of this. You are using zigbee2mqtt. zigbee2mqtt owns the Zigbee network. OH can access it through zigbee2mqtt using MQTT.

You have two choices:

  • zigbee2mqtt to interface with Zigbee and MQTT in OH
  • OH Zigbee add-on to interface with the Zigbee network directly.

You can’t use both zigbee2mqtt and the Zigbee add-on at the same time with the same controller.

MQTT is going to be more work. There are several tutorials on the forum with how to integrate with zigbee2mqtt.

For a simple switch, it’s probably going to be sufficient to:

  1. Remove the Zigbee add-on from OH. At this point OH is completely separated from Zigbee.

  2. Install the MQTT add-on.

  3. Create an MQTT Broker Thing and configure it to connect to your MQTT broker (presumably zigbee2mqtt has also been configured to connect to this same broker).

  4. On the MQTT Broker Thing click “show advanced” and scroll to the bottom and make sure “Enable Discovery” is checked.

  5. Return to Settings → Things and click +, choose MQTT and then run a scan. If zigbee2mqtt is connected to the MQTT broker and configured to use the HomeAssistant MQTT standard, it should automatically discover the switch and let you add it’s Thing.

Thanks Rich - it got me pretty much in the right direction, I did have to enable legacy options as in screen shot, then the SCAN worked and found the switch.

From that I chose the option to create a thing, and it did.
From the thing I chose to create an Item which it did.
But its making fun of me and not working.

Getting close - but I’ll play with it more tonight.

Thanks for your help!

I don’t use the HA auto-discovery, which I seem to recall being problematic for at least one of my devices. I prefer to create things manually and only define the channels I need. If I need a duplicate thing, I just add a new one and then copy/edit the code from an existing one.

Here’s what the thing code looks like for one of my outlets, which is the closest I’ll have to your Aqara light switch. As you can see, you need a stateTopic to receive data from Z2M, and a commandTopic to send commands to Z2M.

UID: mqtt:topic:mosquitto:ThirdReality_Outlet
label: "MQTT: Third Reality Outlet"
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: offline
  availabilityTopic: zigbee2mqtt/ThirdReality_Outlet/availability
  payloadAvailable: online
bridgeUID: mqtt:broker:mosquitto
channels:
  - id: state
    channelTypeUID: mqtt:switch
    label: Outlet
    description: ""
    configuration:
      commandTopic: zigbee2mqtt/ThirdReality_Outlet/set
      stateTopic: zigbee2mqtt/ThirdReality_Outlet/state
  - id: current
    channelTypeUID: mqtt:number
    label: Current
    description: ""
    configuration:
      stateTopic: zigbee2mqtt/ThirdReality_Outlet/current