[RELEASE] NYCE Ceiling Motion Sensor DTH


(Bobby) #1

Anyone looking for a small form, very responsive and relatively reasonable priced motion sensor that can be mounted on the ceiling, I have been testing the NYCE Ceiling Motion. At first it didn’t work with ST, but after some trial and error and with the help of @NYCE_Support I was able to get the sensor to report motion, temperature and relative humidity. There is a DTH in the public GitHub templates but that doesn’t report the temperature or the humidity.

This is how it looks:

This is where you can get the handler from:

And this is where you can buy it from:


NYCE sensors
FAQ: Where to locate motion sensor for fastest response?
(Brad Langhorst) #2

How do you find the detection range on this guy? I have a 3 car garage and was contemplating mounting these on the bottom of the garage door openers (or perhaps on the ceiling above and behind them, but that would possibly block some of the field of view). Wondering if 1 device could detect motion in the entire garage if mounted in the middle or if I’d need 2 devices (garage is around 35 ft wide if I recall correctly).


(Bobby) #3

I have mine in small rooms, but the range seems good. I would start with one, it might be sufficient.


(Derek) #4

Any idea how often the humidity sensor will refresh? I’ve got one mounted above my shower with the idea that I could have it turn on the bathroom fan switch if there was both motion and high humidity, but the humidity (and temperature for that matter) only updated once over the course of two showers. Motion was consistently being triggered during that time. And the refresh button doesn’t update the humidity either.


(Bobby) #5

Mine updates every 2 hours if there was a change. I am not good at reading zigbee fingerprints, maybe someone else can chime in to help fine tune your sensor to update more often. I will look at the refresh problem and why is not updating, that at least I can do…


(Derek) #6

Not that the refresh functionally is that important, was just trying to use it for troubleshooting purposes. At least I know it’s working as intended, just wasn’t how I hoped it would.

In any case, thanks for the work on the DTH!


(Bobby) #7

The refresh is only set to update the battery. I am testing now a refresh on all sensors and will update if it works. I looked at fingerprint and makes no sense to me, so I cannot help with that. Maybe @Mike_Maxwell can take a look if he has any spare time…


(Derek) #8

If that does work for refreshing all the sensors, I wonder if I could use CoRE to do something along the lines of: if motion; force refresh

Not sure of CoRE has that ability. I imagine there’d need to be a limit of how many times to force a refresh in x amount of minutes so it doesn’t blow through the sensors batteries.


(Bobby) #9

CoRE can certainly do that…And that actually may be a better solution for you. Instead of constantly refreshing to drain your batteries, CoRE can only do it when you actually need it and save your battery when you don’t…


(Derek) #10

Any luck with getting refresh to work on all of the sensors?


(FailedInsider) #11

Did anyone manage to get it to update humidity more often? I see there is an ‘official’ groovy device type on their website


#12

The official DTH does not include temperature or humidity.

I don’t have this device and the code above is no longer available, so I can’t see the specific lines to edit, but I can give you something that may work for you.

This is not the best way to code this but it should work.

At the end of the refresh method there should be a return line. Add this to the end of that line:

+ humidityConfigCmds(X, Y)

Where X is the minimum amount of seconds to report and Y is the maximum. If you leave off the (X, Y), the default is 30, 300 (30 seconds minimum, 5 minutes maximum).

You should also add that line above to the return line in the configure method. Again this is not the best way to do this as some lines should be edited instead and refresh should not be modified but this should be a quick fix.

Once changed you will need to click refresh once to enable.


#13

I asked NYCE Support about the temperature and humidity refresh rate. This is the response that I received:

“To be more precise, the 2 hours auto report is the longest interval that you will get a report IF no temperature or humidity changes is detected.
The sensor is preset in such a way that, if there is a temperature change of 1 degree C or a humidity change of 5%from last report, the next reporting interval will be 5 mins.
What that means is, the sensor is scanning the temperature and humidity every 5 mins, if the value is not greater than the threshold mentioned above, it will not send out a report.
For 2 hours it hasn’t been reporting, it will be forced to send one out to keep the sensor “alive” to the network.”

After an understanding of how this device works, it satisfies my needs.

And, if I understand correctly, and with previous discussions with them, other than pressing the button on the back of the sensor, the device may not respond to a refresh command for temperature or humidity.


#14

I’m not sure that is completely correct but may be their default. In ZigBee HA you configure the device to send reports on different attributes (bind to an attribute). Humidity is an attribute you can configure. The command above sends that configure bind to the device with a minimum and maximum reporting time.

NYCE responded that those times are 5 minutes (min) and 2 hours (max). Unless they’ve not followed the ZigBee standard, those values can be changed with the configure command. It is possible hardware wise the values will not update more often than 5 minutes but that would not keep the device from reporting more often if that is how you configured it. Unfortunately, the existing SmartThings DTH does not report temperature or humidity as those attributes are not configured in the DTH.

Also many DTHs are designed to not report unchanged values. So even though the device will at least send a report every 2 hours, if it does not change, you may not see that message except through device live logs.

I will look at their NYCE’s official DTH.


#15

Here is the configure command for humidity. They are using the old syntax SmartThings wants to replace.

If you are interested in changing those values you can remove the line:

"zdo bind 0x${device.deviceNetworkId} 1 1 0x0405 {${device.zigbeeId}} {}"

And edit this line:

return configCmds + refresh()

With

return configCmds + humidityConfigCmds(X, Y) + refresh()

The default values are 30 seconds, 5 minutes based on SmartThings settings without the (X, Y). If you want to match the old settings they would be humidityConfigCmds(300, 7200)

Obviously if you are fine with the default settings you don’t need to change anything. I’m interested in getting one of these and may create an updated DTH when I get a chance with the new SmartThings syntax.


(Derek) #16

I tried updating the DTH with your modifications along with (300, 900), but it doesn’t seem to have made a difference. Also tried hitting refresh to see if that’d get it going.


#17

So with that setting the sensor will not report unless the humidity has changed by ±5% and 5 minutes has passed. If 15 minutes passes, it will report the current value no matter what. Remember even though the device sends a message every 15 minutes, the DTH may not report it if the value has not changed. You would only see that reporting in the logs.

Now there could be an issue with the configure command not being executed. That normally only happens when the device is joined to SmartThings, though I think switching DTHs may execute it as well.

To get around this you can use CoRE to execute the configure command. That would only need to be done once after you change it. No parameters are needed. Another choice would be to change the following:

valueTile("humidity", "device.humidity") {
            state("humidity", label:'${currentValue}${unit}', unit:'%', icon:"st.Weather.weather12", backgroundColor:"#00adc6")
        }

        main (["motion"])
        details(["motion","battery","refresh","temperature","humidity"])

To:

valueTile("humidity", "device.humidity") {
            state("humidity", label:'${currentValue}${unit}', unit:'%', icon:"st.Weather.weather12", backgroundColor:"#00adc6")
        }
standardTile("reconfigure", "device.reconfigure", inactiveLabel:false, label:"Reconfigure", decoration: "flat") {
            state "default", action:"configure", icon:"st.secondary.tools"
        }
        main (["motion"])
        details(["motion","battery","refresh","temperature","humidity","reconfigure"])

By adding those lines you will have a new tile called Reconfigure you can press to rerun the configure command.


(Derek) #18

So after adding that those new lines and hitting reconfigure, I see the following in the logging.

error groovy.lang.MissingMethodException: No signature of method: script1485838585741449249326.humidityConfigCmds() is applicable for argument types: (java.lang.Integer, java.lang.Integer) values: [300, 900] @ line 377

debug configure: Write IAS CIE

debug Attr Init


#19

Sorry my mistake. They apparently have not added a humidity class. I misread SmartThings’ DTH. You will need to replace the entry I told you to add with:

Replace:

return configCmds + humidityConfigCmds(X, Y) + refresh()

With:

return configCmds + zigbee.configureReporting(0x0405, 0x0000, 0x21, 300, 900, null) + refresh()

The 300 and 900 are the min/max times.

The above command means report on cluster 0x0405 (which is the humidity measurement cluster), report on attribute 0x0000 (which is the current humidity value), return an unsigned 16 bit integer (0x21), with min time 5 minutes, max time 15 minutes.


(Christopher Filip) #20

@SBDOBRESCU What happenedto your dth code? I clicked on the link and got a 404 error.