Nevermind. That won’t work. It won’t set the minBattery properly the first time, giving a wrong calculation (max will be set, but min will be 0, and the average will not be correct).
I think it will have to be changed to an array and average the rolling values to smooth the value fluctuations. Either that, or just ignore the fluctuations by removing the averaging. Or prevent out-of-range values from being set to min and max.
I was a little scared when I read this conversation, because I have a Smartthings Link too! Today arrived my two Aqara motion sensors and one Temp Sensor. Just following your pairing steps and surprisingly all the devices are working! They didn’t report the battery status just yet (about 1 hr of pairing). Well… just have to wait I guess Thanks for all your great support guys!
i think i found how to get the battery to report. I have around 14 aquara contacts and 1 aquara humidty sensor. i went into IDE for each device and clicked on firmware/ check now. let it go for a few minutes or more…then the battery report shows.
Well… After testing the temp and motion sensors with my Smartthings Link I’m really dissapointed. The pairing process it’s working good, using the “Add thing” method. But after 1 - 1.5 hours all the devices just disconnect. Like @veeceeoh said, the Link it’s the problem. I hope they fix this problems with a firmware upgrade. I’ll buy the original hub
I’m using the aqara temp sensor, and when I tap the refresh button on the app, my IDE log show this error: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘zcl global write 0x500 0x10 0xf0 {null}’ with class ‘java.lang.String’ to class ‘int’. I’m paired it with the “Add a Thing” method, the device shows a Zigbee ID on IDE. I have to use the “Original” or the “Aqara” DH on the repository?
I realized today that the original sensors do not report their catchall the same as the Aqara. I have updated the DH to fix this issue.
I have also tried to update the refresh and configure functions so they do not generate errors. I am not very aware of the correct way to configure these zigbee devices but we will learn…
My Aqar Temperature sensor is finally working since this update!
Now if only my door sensor would (for the record it worked for weeks on this other profile that I did not backup, nor can I find the repo that had it …)
As far as I can tell the sensor is linked up to the network (light blinks 3x when i attempted to link it. Now each press it blinks twice)
Make sure your using the latest DH. I just tested mine and the open/close is working and the battery checked in only moments ago. It appears to be fine.
The DH ensures the device is found right?
Because I do see it in the HUB’s events log.
But the mobile app shows nothing new after I’v done “add a thing”
Like I mentioned my devices worked for many weeks without issue.
Just wondering if it’s the DH making it so that I can’t see it or something else is. Like i’v also said the lights seem to indicate all is well, atop of that I’v tried pairing it dozens of time already with no change.
UPDATE: Temp sensor stopped working after 2 hours.