Sengled Open Close Sensor needs device handler

I have a series of Sengled open/close sensors that are going offline. After a lot of reading, they do not respond to pings from Smartthings (I think it’s a battery saver feature) causing them to be listed offline. They will come back online if they are opened, but because they are offline Smartthings will not recognize the open signal. It will just come back online until the next ping a day or two later. Is there a device handler to fix this? I have searched and found nothing for it. I’m fair at learning new code so I’m willing to take a stab at creating a device handler if there is a knowledge base I can use.

Sengled considers them to be compatible with SmartThings, so this shouldn’t be happening. How many of these do you have? Are they all doing this?

In my experience, these types of sensors going offline is more of a Zigbee mesh issue. Do you have any powered Zigbee devices near the sensors? And I mean non-Sengled branded because Sengled doesn’t use a repeat function…not even in their smart plugs. It’s annoying and caused me tons of headaches until I figured that out.

2 Likes

Sorry. Busy is an understatement right now. I can try setting up a mesh, but it doesn’t appear to be a proximity issue. I have over a dozen of these throughout the house. If a device stays closed for more than a couple of days it goes offline, but once triggered it goes back online again and stays that way for a couple of days before going offline again. If the device is in regular use it will never go offline. Something I read suggested the sensors go into a “deep sleep” that won’t reply to any signals from the hub and will only signal once tripped. I don’t know if that is even an issue, but I’m open to anything. I’ll at least install some non-Senglet repeaters and see if that helps.

The issue is the sensors go to sleep when no change of state is detected - I have not determined how long before they go to sleep, but my commonly used doors show as connected the less common go offline after a while but wakes up when the door is opened.

I can see the logic to save battery, but the issue is how this is handled. Offline is treated by SmartThings are open, so if you are using them as an alarm sensor or, in my case, to turn off the AC if a slider is left open, then it is treated as a (false) open.

In my view it should maintain last state if it goes offline, until an actual state change sends an update.

My sensors are connected directly to SmartThings. Wondering if the behavior is different if they are paired with a Sengled hub which is in-turn linked to SmartThings. Is anyone connected this way?

Thanks.

To my knowledge, this isn’t possible. It will not be seen by the Smartthings hub while paired to the Sengled hub. Any cloud to cloud connection between Smartthings and Sengled is likely only for their WiFi devices. I can’t confirm that, but doubt they integrated their full line of devices.

I actually have quite a few interconnected systems - Nest, EcoBee, etc that expose many, but not all, their devices & functionality to SmartThings. For example I can use the EcoBee occupancy sensors as motion sensors to trigger lights, etc. It all depends on what is exposed by either the native ST driver or by the API connection between the two systems. In this case the Sengled hub may only pass through the state changes, so ST sees that a contact is closed until told otherwise, rather than seeing the offline state we see in native ST.

Yes, this makes sense, but I do not believe Sengled has opened their system up in this manner.
I have an ecobee system in my home and the type of exposure they use is not one that’s in place for Sengled, at least for their hub connected Zigbee devices.

This shouldn’t be a problem. Zigbee battery device should wake up periodically and ping the hub to let the hub know their alive. I have a Spengled sensor on a basement door that rarely changes position and it stays connected fine using the standard device handler. But I also have a very strong zigbee mesh.

I’d try deleting the sensor and re-adding it making sure you aren’t using a custom dth. Maybe the configuration didn’t get set right the first time.

1 Like

Hi.
A last week I removed the all the sensors and re-added them (after realizing the reset instructions on the Sengled site were wrong). Still seeing the same behavior.

I have a mix of 30-ish devices, 15 of them are zigbee - most are Sengled sensors or bulbs, but include 4 GE in-wall switches. I have been away since Tuesday p.m. and 6 of the door sensors show as offline - the most commonly used doors remain online. No correlation with distance to hub, etc.

I am curious, how are your measuring the strength of your mesh? I see Z-Wave Tools, but no Zigbee Tools. Maybe I need to test that and see if there are interference sources.

Thanks, Mark

most likely the issue is as was said above where they sleep for a long time.

Sleeping shouldn’t be a problem do to this code when it’s installed:

In my experience they can sit for days with no status change and stay online. @scanners999 if you look at the zigbee route in the IDE, is the device connecting directly to the hub or through a repeater? Also, do you have secure mode for your hub turned on or off?

1 Like

Sorry, being dense… I am adding this code as a device handler?
Below is an example of the state of one of the offline sensors. Direct connect to the hub, no mesh (it is also one of the physically closest to the hub). Shows last state as closed, but once it goes to sleep/offline, ST interprets as open.

Thanks. Appreciate your patience!

No, that code sniper is in the standard dth. What do you have this set to?

I looked at mine and secure mode was on. I just turned it off and “woke up” my sensors by opening them a couple times. They are reconnected for now. I’ll watch them over the next few days and see if they are able to stay online. I just want to make sure I understand that code thread is not a device handler, but standard to the SmartThings hub. There should be nothing else for me to do once secure mode is off?

1 Like

ah, sorry, no. Secure mode is OFF.

I tried the suggestions above with no luck. So I got to thinking how to trick the sensors into staying awake. In my head, setting up a notification every day at 8am telling me the status of the windows should be the trick.

Does this make sense? Shouldn’t it force the window sensors to report their status to the system?

It’s supposed to be at least once an hour for Zigbee 3.0 devices, but not all manufacturers adhere to the specification, and some do it in the 60th minute, which ST sometimes misses.

So I would like to recap on this since the last test:

  • Sengled open/close sensors go offline after a day or two

  • Proximity is not a factor. I have sensors that go offline 15 feet away from the hub in line of sight

  • Secure mode is off

  • They do not appear to be updating status in regular intervals, hence going offline

  • Commonly used devices stay online regardless of proximity - devices not used go offline within 48 hours

  • Some say the sensors go to sleep after inactivity causing them to go offline - I do not know if that is true or not

  • It is not a mesh issue

  • Once an offline device is activated (opened/closed) the device will signal the hub, but since the device is listed offline, the hub will not respond correctly and simply show the device online again. It will not show open.

I need to know if a custom device handler exists to eliminate checking device status, or how I can learn how to build device handlers.

That said, if someone has encountered this exact problem and has the exact fix, please let me know what that is.

Otherwise I will have to replace all 14 devices I have installed, because they are creating holes in my security system.

Okay, so I may need to eat some crow, but I have the solution. It actually IS a mesh problem which still doesn’t make sense since I have devices so close to the hub. I installed 8 Zigbee repeaters throughout the house and have gone two weeks without a device going offline. For anyone else with Sengled open/close sensors that go offline, you will need to install repeaters throughout the house, connect them to the hub, “reactivate” the offline sensors by opening and closing them a couple of times so the hub can see them as online, then do a “Zigbee Heal” by unplugging the hub for at least 30 minutes. When the hub comes back online, the Zigbee mesh will reestablish itself and all of the devices should stay online.

Thanks all!