Fork me on GitHub

pimatic-aqara by Wiebe Nieuwenhuis (sweebee) | github | npm

pimatic-aqara

For controlling and receiving events from the Aqara (Xiaomi) Gateway.

Supported devices

  • Aqara Human Motion Sensor
  • Aqara Wireless Single Switch (On / Off)
  • Aqara Window Door Sensor
  • Aqara Smart Wireless Switch (click / longpress / doublepress)
  • Aqara Water/Leak Sensor (dry / wet)
  • Aqara Temperature/Humidity/Pressure sensor
  • Aqara magic cube
Not (yet) supported
  • Aqara Smart Lock
  • Aqara Curtain motor

( Feel free to donate one ;) )

Setup

The Gateway must be in developer mode, when setting to developer mode you will also receive a password, save it because you need it to add the plugin.

Just install the plugin from the plugin page within pimatic, enable it and enter the password you received from the gateway by setting it in developer mode.

To add devices, just go to the devices page in pimatic and press "discover devices", the devices connected to the gateway should popup.

Enabling developer mode

  • Select your Gateway in the MiHome app
  • Go to the “…” menu on the top right corner and click “About”
  • Tap the version number “Version : 2.XX” at the bottom of the screen repeatedly until you enable developer mode
  • You should now have 2 extra options listed: local area network communication protocol and gateway information
  • Choose local area network communication protocol
  • Tap the toggle switch to enable LAN functions. Note down the developer key (something like: 91bg8zfkf9vd6uw7)
  • Make sure you hit the OK button (to the right of the cancel button) to save your changes

Original documention from: https://docs.openhab.org/addons/bindings/mihome/readme.html#setup

Plugin Config Options

pimatic aqara config options
OptionDescriptionDefault
password
string
Password for the gateway
pairing
boolean
Enable pairing when discovering devices
true
debug
boolean
Log information for debugging, including received messages
false
batteryMin
number
The low voltage when the battery is empty
2800
batteryMax
number
The high voltage when the battery is full
3200

Device Config Options

pimatic-aqara device config options

AqaraMotionSensor

AqaraMotionSensor config options
OptionDescriptionDefault
SID
string
The unique SID for this device
autoReset
boolean
By default the sensor resets after 120s, if this takes to long for you, enable autoreset
true
resetTime
integer
60000
showLux
boolean
If you're using V1 of this sensor, disable lux
true
displaySparkline
boolean
Show the sparkline for the lux value
false

AqaraDoorSensor

AqaraDoorSensor config options
OptionDescriptionDefault
SID
string
The unique SID for this device

AqaraLeakSensor

AqaraLeakSensor config options
OptionDescriptionDefault
SID
string
The unique SID for this device
wet
string
Label when the sensor is wet
"wet"
dry
string
Label when the sensor is dry
"dry"

AqaraWirelessSwitch

AqaraWirelessSwitch config options
OptionDescriptionDefault
SID
string
The unique SID for this device

AqaraWirelessButton

AqaraWirelessButton config options
OptionDescriptionDefault
SID
string
The unique SID for this device
resetTime
integer
The time the device resets to waiting state
100
waitingState
string
"Waiting..."

AqaraTemperatureSensor

AqaraTemperatureSensor config options
OptionDescriptionDefault
SID
string
The unique SID for this device
showHumidity
boolean
If you don't need the humidity, hide it
true
showPressure
boolean
If you're using V1 of this sensor, disable pressure
true

AqaraMagicCube

AqaraMagicCube config options
OptionDescriptionDefault
SID
string
The unique SID for this device
pimatic-aqara is written by Wiebe Nieuwenhuis (sweebee)