I have been testing Aqara sensors all day but results are so … unsatisfying.
The illumination sensor seems to be working but it shows to be on mains power power (it cannot be, it’s always battery powered).
The door sensor thing keeps dropping offline quickly (gets back online when I use the contact).
I’ve increased the maximum reporting period from 15mins to 4h and the poll period to 12h, need to wait to see if that helps.
The weather sensor works (but I had a lot of trouble with that on previous pairing attempts).
And just took on the last one, a brand new Aqara motion sensor.
That now I keep failing completely to pair :(.
I’ve been pressing the button all process long, some attempts more often others less but none worked.
I see packets arrive so it’s probably no RF issue.
Most of the attempts the thing does even not appear in UI as a box so I cannot promote it to thing status. Sometimes it does but it’s stuck in Unknown, no matter if I scan once or multiple times.
Then again after OH restart it’s always there in inbox, including its full name, but it does not work (thing stays in ‘unknown’ state). I understand this is related to the interrogation stage needed after promotion to thing. But I pushed the button a lot and for a long time before I’ve restarted OH (the effect being the name to appear).
Here’s one logged attempt, taken after a fresh OH restart to ensure there’s no leftovers: aqara_motion_pair_log.txt (1003.5 KB)
Please have a look.
Another attempt I made was to use Karaf openhab:zigbee ncpscan
rather than GUI.
That reproduceably results in the following error the moment I reset the sensor:
2021-04-28 14:52:49.716 [DEBUG] [e.ember.internal.ash.AshFrameHandler] - --> TX ASH frame: AshFrameAck [ackNum=1, notRdy=false]
2021-04-28 14:52:49.889 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'Energiemanagement-7' failed: Could not cast NULL to org.openhab.core.library.types.QuantityType; line 1082, column 58, length 52 in Energiemanagement
2021-04-28 14:52:49.997 [DEBUG] [e.ember.internal.ash.AshFrameHandler] - Sending EZSP transaction timed out after 10 seconds
2021-04-28 14:52:50.001 [ERROR] [b.core.io.console.ConsoleInterpreter] - An error occurred while executing the console command.
java.lang.ClassCastException: class com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspNetworkFoundHandler cannot be cast to class com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspScanCompleteHandler (com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspNetworkFoundHandler and com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspScanCompleteHandler are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @102372b)
at com.zsmartsystems.zigbee.dongle.ember.EmberNcp.doActiveScan(EmberNcp.java:939) ~[?:?]
at com.zsmartsystems.zigbee.console.ember.EmberConsoleNcpScanCommand.process(EmberConsoleNcpScanCommand.java:53) ~[?:?]
at org.openhab.binding.zigbee.console.internal.ZigBeeConsoleCommandExtension.handleZigbeeCommand(ZigBeeConsoleCommandExtension.java:149) ~[?:?]
at org.openhab.binding.zigbee.console.internal.ZigBeeConsoleCommandExtension.handleCommand(ZigBeeConsoleCommandExtension.java:117) ~[?:?]
at org.openhab.binding.zigbee.console.internal.ZigBeeConsoleCommandExtension.execute(ZigBeeConsoleCommandExtension.java:89) ~[?:?]
at org.openhab.core.io.console.ConsoleInterpreter.execute(ConsoleInterpreter.java:55) [bundleFile:?]
at org.openhab.core.io.console.karaf.internal.CommandWrapper.execute(CommandWrapper.java:78) [bundleFile:?]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) [bundleFile:4.3.1]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) [bundleFile:4.3.1]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) [bundleFile:4.3.1]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) [bundleFile:4.3.1]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) [bundleFile:4.3.1]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) [bundleFile:4.3.1]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [bundleFile:4.3.1]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [bundleFile:4.3.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2021-04-28 14:52:50.013 [DEBUG] [e.osgi.LoggingCommandSessionListener] - Command: 'openhab:zigbee ncpscan' returned 'null'
2021-04-28 14:52:50.711 [DEBUG] [e.ember.internal.ash.AshFrameHandler] - ASH: TX EZSP queue size: 1
2021-04-28 14:52:50.713 [DEBUG] [e.ember.internal.ash.AshFrameHandler] - --> TX ASH frame: AshFrameData [frmNum=6, ackNum=1, reTx=false, data=2E 00 01 18 00]
2021-04-28 14:52:50.719 [DEBUG] [e.ember.internal.ash.AshFrameHandler] - <-- RX ASH frame: AshFrameData [frmNum=1, ackNum=7, reTx=false, data=2E 80 01 18 00 02]
2021-04-28 14:52:50.720 [DEBUG] [e.ember.internal.ash.AshFrameHandler] - ASH: Frame acked and removed AshFrameData [frmNum=6, ackNum=1, reTx=false, data=2E 00 01 18 00]
Finally and FWIW, when I click to remove the thing, OH keeps telling me in orange it is “removing”, waiting for the binding to confirm, but it never finishes doing so until I click to delete it a 2nd time.