[RELEASE] Aqara and Xiaomi Smart Plug - model ZNCZ02LM (lumi.plug) - ZNCZ12LM (lumi.ctrl_86plug.aq1)

# NOTE: Although I have had great success using them, Xiaomi / Aqara ZigBee devices are NOT officially supported or guaranteed to work on the Hubitat Elevation platform.

I have ported this device driver from ST to HE a while ago, and I am using it on a daily basis since the last 6 months. Original ST code by bspranger. The main hurdle in the port process was to ensure a proper energy consumption report ( Big endian vs little endian), which is working now very reliably. Temperature reporting only works in Celsius, and for some reason does not seem to be accurate.

I have shared this driver code in Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained) but it is now lost in the that enormous thread.

Installation

  1. Make sure you have a good and stable Zigbee Mesh.
  2. Copy the code from my GitHub and paste it in a new Driver Code
  3. Pair the device with HE. After having put HE in Discovery Mode, press the button on the plug for 5 seconds. If it doesn't pair, try again.
  4. You should now have a working devices.

FAQ

  1. "Your idea is stupid and slow and I don't like it" - Don't use the code
  2. "Your app/driver is crashing my Hub. I submitted a support ticket" - Don't do that, the fine folks at Hubitat Inc. do NOT maintain this code. This software is given free of charge with no support, implied or otherwise. I may still help...
  3. "The latest update broke it, FIX IT" - I do this for fun, please don't make it un-fun.
  4. "I have a great idea for a feature" - Go ahead and post it, I might get around to it...
  5. "You ignored my great idea" - See #2
  6. "I hate you for getting my hopes up, your app/driver is awful/buggy/stupid" - Ok, please write a better one so I can use it
  7. "Please fix your code, it's broken" - I write this because I enjoy coding. I will continue to support and provide updates as long as that remains the case.
  8. "I stole your code and made it soooo much better" - Thanks. Please post it so I can start using it.
  9. "You are awfully sarcastic, I don't like you" - That's ok, I don't need you to
    (thank you @ markus for the original FAQ this one was based on)
4 Likes

Just as an FYI, the original was from @thomas.c.howard in his post announcing hubigraph:

1 Like

I do believe I mention that anywhere I use his list, if I missed that somewhere please tell me. :slight_smile:
I did modify it a bit though and the FAQ here seems to be more from my modified version.

The cluster you use (0x0002) is the Device Temperature Cluster and is the INTERNAL temperature of the device, so as the device gets warmer this would go up. It is also not always very accurate...

2 Likes

@markus - sorry, I hope my post wasn't interpreted at pointing fingers at you - I really wasn't (and not my intention either!). I just wanted to make sure that @thomas.c.howard brilliantly funny FAQ was attributed to him.

1 Like

Don't worry, I posted this FAQ in a few of my release threads and just hope I didn't miss attributing as I should somewhere, easy to miss.

Yes, it is definitely his to take credit for :slight_smile:

2 Likes

@jmarcim Xiaomi Socket driver.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.