[OBSOLETE] ZWN-SC7 Enerwave 7 Button Scene Controller

Yep… It seems that when there is the “sleepy” issue, it actually usually shows up as two presses, hence the tinkering with the de-dupe/repeat code.

I haven’t read this entire thread so this is probably the “duplicate” issue talked about. I spent a few minutes troubleshooting the smartapp and it was quickly obvious what was going on. My scene controller registers multiple button presses, so the line of code:

if(recentEvents.size <= 1){

which I’m sure is meant to prevent duplicate actions for the multiple button presses, is actually what makes my button presses only occasionally work. With this line, the smartapp will only actually do anything if the scene controller only reports a single button press. My scene controller reports duplicate button presses around 50% of the time. Since my smartapp actions are not “toggle” actions I was able to modify the code to work 100% of the time.

Again, I’m sure this has been pointed out, but I’m just reading how people in this thread are frustrated with SmartThings and looking into other options (OpenHAB? Been there done that and good luck with that one). The problem here (in my case) is obviously the device itself. Not the device type code, not the smart app, not the SmartThings platform, but the actual device. It can probably be solved with some clever programming.

To me, SmartThings is by far the best smart home platform available. I have very, very, little issues with it and I have neraly 100 devices. I have tried InControl, OpenHAB, Wink, Razberry (Zway), and others, and they are seriously lacking compared to SmartThings.

2 Likes

I’ve spent 40 hours debugging this thing. The problem is with smartthings.

3 Likes

Well, I can’t speak for your setup, but I have several event driven smartapps working with dozens of devices that fire off nearly 100% of the time. Door/Window sensors, motion sensors, mini-motes, etc. All of them are absolutely reliable and consistent. This isn’t even counting the dozens of other light switches, water sensors, glass break sensors, etc. Seriously, they all have nearly a 100% success rate. This has been on v1 & v2 hub over almost 2 years of use.

This controller was the only device giving me problems, which were solved with a small modification to the smartapp. In case anyone is curious I changed:

def recentEvents = buttonDevice.eventsSince(new Date(now() - 1000)).findAll{it.value == evt.value && it.data == evt.data}

Since all of my duplicate events have pretty much the same time stamp.

I also changed:

if(recentEvents.size <= 3){

I usually get 2 or 3 duplicate events. I could probably remove this, but I was looking for a quick fix. The side effect of this is that it basically disables the code that is supposed to protect the app from firing off multiple times with these duplicate button presses. I don’t use the toggle function of the smartapp so it is not an issue for me. A button turns on the lights and a button turns off the lights. If the smartapp runs multiple times and sends an “on” command to the same lights multiple times, it is not a big deal.

4 Likes

I came to the same conclusion, that this is a rather cheaply put together device.

Could you elaborate as to what the ST problem is?

1 Like

Thanks so much for the modifications! It makes the device actually work to an acceptable level. Now I am not pressing a button 5 times hoping it finally works.

Granted, Enerwave devices tend to be pretty cheaply made. But that’s how they’re priced.

More significant, I think, is that the manufacturer intended them to be used as Z-wave scene controllers. That’s what they’re certified for. They require the Z wave controller replication and scene controller configuration command classes. Neither of which SmartThings supports.

So anything you do to try to make it work with Smartthings is a hack. I don’t think the manufacturer can be blamed for the device not working under those circumstances. You’re not using it as it was designed or marketed.

JMO

1 Like

There are a number of posts from me in this thread that give more in-depth tidbits as to what I learned from pressing the button nearly 2000 times and rewriting the device handler and smart app from the ground up.

I’ll probably eventually get around to putting some spit and polish on what I wrote, but other priorities in life for a few weeks.

3 Likes

Can some update the main code online so we can all get a shot at testing it… Not sure if I got all the little changes above, but if some are saying it’s much better with the minor tweaks, can someone up the code to the latest/best…

1 Like

The modification to the code makes the smartapp extremely reliable. I wen’t from a 30%-50% success rate to 100%. The only problem is that I’m not sure if the Toggle functionality will respond well to the change. I will try to test it out tonight.

Also, I’m not a “coder” so I’m not 100% sure how to change the original on github. I do Linux scripting almost all day so I know how to code in that regard (and how to troubleshoot code for that matter), but not so sure about github.

2 Likes

I’ve updated the github file. I tested these changes and they don’t appear to cause any issue with toggling. I don’t really use this device much anymore because other automations and most importantly Alexa…

4 Likes

We’ll, to all the device haters, the latest SmartApp code seems to have fixed all. I’m running 6 Devices in Toggle Mode and the big Button as an All off button with V1, clean run multiple times. Only seems to be a slight delay at times on the final 1 or 2 devices on an all off, but it does turn them off after a extra sec or two… Thanks to all that mashed the buttons countless times and worked it out. Community Rules!!! ST thanks for all the negative emails/posts that it can’t or will never work…

Lastest Code was updated (ZWN-SC7.SmartApp.groovy 10/5/2015) at: https://github.com/mattjfrank/ZWN-SC7-Enerwave-7-Button-Scene-Controller

4 Likes

I installed the older SmartApp a couple days ago and have had very erratic and unreliable behavior from the ZWN-SC7. I am very new to the Smartthings environment and not a programmer, so are there any special steps for updating my current older SmartApp to the newer one besides, copy/paste the new code over the old one in the API, save, then publish. At this point do I need to do anything special to associate this new code with my system?

Just copy and paste it, save and publish to you.

So I don’t need to go back and re-assign actions to the various buttons? So I take it by publishing the revised SmartApp, that has revised the code in my ST HUB, so that now when I push a button on the controller, the ST HUB will execute the proper command.

That is correct. Updating the SmartApp will update how it functions.

2 Likes

I’m glad the changes made have made the device more reliable. I was worried that because the SmartApp fires off multiple times on a single button press that it might cause toggle events to “flip-flop”, but that doesn’t seem to be the case. It looks like the duplicate press events have almost the exact same time stamp, so my guess is that the SmartApp fires off multiple times, but because they are so close together it does not interfere with toggle actions.

I really like this device, as I have it installed in a room with 6 philips hue bulbs and one light strip. Pressing one of the 7 buttons cause the bulbs to light up in different configurations. The big button shuts all lights off. SmartThings is one of the only platforms out there that allows me this kind of control and customization.

3 Likes

@erocm1231, thank you so much for this investigation and time spent. I’m optimistic this will help my exact same issues as you’ve also experienced. Now to pass the test of time. :slight_smile: Sincerely, thanks Eric.

1 Like

I have almost no programming skills and I was a little nervous about installing this 7 Button controller but it all came together like clockwork. It works perfectly and I wanted to say thank you for making this possible.

6 Likes