SmartThings Community

Connecting VRCZ4-MRZ - not to be confused with VRCS (DTH in post 20)

Okay, pulled latest version, deleted app from device, checked controller settings and still no love :frowning: Here is what I see in the logs:

c5eaeea6-f521-44bb-a5f4-3da91a3a3b28 6:59:14 PM: debug Falling through to default case for buttonEvent() on event physicalgraph.app.EventWrapper@1dade7fe with evt.data {“microDeviceTile”:{“type”:“standard”,“icon”:“http://schemalive.com/vrcz4-m0z.png”,“backgroundColor”:"#ffffff"}} parsed to [microDeviceTile:[icon:http://schemalive.com/vrcz4-m0z.png, backgroundColor:#ffffff, type:standard]] with status null for button null

c5eaeea6-f521-44bb-a5f4-3da91a3a3b28 6:59:14 PM: debug buttonEvent data: [microDeviceTile:[icon:http://schemalive.com/vrcz4-m0z.png, backgroundColor:#ffffff, type:standard]]

c5eaeea6-f521-44bb-a5f4-3da91a3a3b28 6:59:14 PM: debug buttonEvent evt: physicalgraph.app.EventWrapper@1dade7fe

c5eaeea6-f521-44bb-a5f4-3da91a3a3b28 6:59:00 PM: debug 1B

c5eaeea6-f521-44bb-a5f4-3da91a3a3b28 6:59:00 PM: debug Devices for Button 1: Kitchen Fan

It’s worth noting that using the same configuration I’ve got 2 other leviton switches of the same make working in my house (WOW!) – It’s a real pain, but should pull the device and rejoin it? Is there any better reset button here?

Hm…first, just to clarify: You’re saying (at the end) that two other VRCZ4s are working properly with the same DH/smartApp, but a third VRCZ4 is not?

I’m not sure I have all the context I’ll need to fully make sense of those debug statements…but the first debug is certainly odd/curious. It’s happening when you turn one of the buttons on/off?

I wonder: Since deleting/restoring the smartApp, have you also updated/reassigned the Device Handler to the latest version? And after updating both, have you then gone into the DH screen on your phone and pressed both “Configure” and “Get My State”?

I have this working with my fabrio controllers to change my LED lights.

Thanks a million! it’s only taken 3 years for me to have that controller sitting in the wall to work.

1 Like

So glad to hear that, James – thanks for the update!

Hey Michael, I’m fairly new to ST (converting from Vera) so I may be asking a dumb Q. Thanks for posting your code. I was able to get my VRCZ4 working using a combination of the DH and SmartApp. I’m wondering if there’s any way to have one or more of the switches to control scenes instead of lights directly. Is that possible?

Well…that’s a good question.

I’ve not yet worked with scenes myself, and so I haven’t looked at this directly – but I imagine it should certainly be possible (if likely requiring some modifications to the code).

Of course, VRCS4 is the “scene” version of the VRCZ4 (and has its own smartApp/DTH support – start here). Although I’ve never touched a VRCS4, one major difference is that the “scene controller” is effectively a 4-throw (mutually exclusive) switch – that is, only one of the buttons (scenes) is meant to be “on” at any given time, and turning “on” any one scene essentially turns “off” (or, really, overrides) the other three. The “zone controller”, on the other hand, is really four separate on/off buttons for separate (groups, or “zones” of) devices (although it should be possible to have the same device in more than one group or zone).

That said, it’d be straightforward enough to alter the VRCZ4 code to make each button turn off the other ones.

The other missing bit would be to set not only the on/off status, but also the level (dimming) for each device in the group/scene. This could all be built into the smartApp itself (including using the config to explicitly define the dimming levels for each device in each scene), but it might be better (and easier) to use something else to create the scenes (or even record/snapshot them, which is something I’ve been considering) and then just use the controller to activate/deactivate them.

Probably best to start by soliciting input from the folks who’ve already dealt with and/or written about the VRCS4 (and some of whose code served as the starting point for my own), including @bdahlem, @ygelfand, @JDRoberts, and @aniceberg. I’m happy to assist with any modifications to my smartApp/DTH if/as needed, but would like to hear more from the “scene veterans” about how best to approach (including whether other smartApps/DTHs might already have this covered)?

@mpk Just wanted to say thanks – got this up and running today on three zone controllers with no snags at all. Still amazes me that the manufacturer and ST don’t support these devices as well as the community does…

2 Likes

Great to hear – thanks so much for the update!

And yes, it amazes me too (about Leviton). But it seems pretty clear now that they’prefer to promote lock-in to their own proprietary smart-home ecosystem.

1 Like

mkp, It looks like you’ve done a lot of good work in making the Leviton VCRZ4 controller usable with SmartThings. I’m just jumping in from another discussion where I mentioned that I have 6 VCRZ4s already installed in my house that are not being used because they aren’t compatible with SmartThings. In my case, I don’t need to have them work as scene controllers - having each button control a different set of devices would be fine for me. Could this be accomplished with the code you have developed to date. If so, how would I go about doing what is required? I cannot write or understand code, so it would have to be some straight forward, easy to follow, step by step instructions. Could you point me to anything like that?

Your thoughts/comments/suggestions would be greatly appreciated. Tx

2 Likes

Yep – I just responded on the other thread: Wall-Mounted 120V Button Controller for Smartthings?

You just need to install the DTH and smartApp referenced from that other thread, and you should be good to go. I think generic instructions for installing DTHs and smartApps must be available somewhere on the site (maybe @JDRoberts would know?)

1 Like

As long as you are using the classic app, the community FAQ covers the steps for installing both custom smartapps and custom DTHs. But it won’t work with the new “SmartThings (Samsung connect)” app. ( The topic title is a clickable link)

1 Like

Hello everyone. I’ve been away for 6 weeks and haven’t had a chance to follow up on mpk’s solution for connecting VRCZ$-MRZ to SmartThings. I’m back and would like to implement the solution. However, I am 71 years old and cannot write or understand code - so I would need some straight forward, easy to follow, step by step instructions for this.

Are such instructions available anywhere?

To recap, I have 6 VCRZ4s already installed and powered in my house. They are not being used because they aren’t compatible with SmartThings.

Would appreciate any help with this…

Thank you

Hi again, @rbcap – did you not find @JDRoberts FAQ link (above) helpful?

You don’t have to write code, but you do have to use the SmartThings IDE (website) to copy/paste my code into your own SmartThings hub. Perhaps that sounds intimidating, but I’m confident we can talk you through it.

Have you looked at the FAQ? You want to focus on (and can probably just jump right to) SECTION II: HOW TO PUBLISH CUSTOM SMARTAPPS AND DEVICE HANDLERS TO YOURSELF SO YOU CAN USE THEM. As explained, this is a one-time setup process, so I’d encourage you to wade in and come back to us (here) with any questions as you go…

1 Like

Could you expand upon your tinkering? I have downloaded the vera firmware and extracted its contents but am having a bit of trouble finding where the LED z-wave commands are actually created. I see them referenced in D_SceneControllerLED1.json/xml but if you could point me in the right direction that’d be great.

I have a VRCS4-M0Z I’m trying to use as a scene controller by writing my own device handler but I can’t get any LED response with the Hub actions you created so wanted to follow your path of reverse engineering Vera implementation to see if it sheds any light on proprietary commands I can use to control them.

Cheers,

-Q

I got it to work with Brians device handler (no dimming with his though) and also partly working with yours MPK, these switches are basically VRCS4-M0Z but monster branded. They work with your dimming function, I did have to reverse the button “up” with"down" to make it go the right direction for some reason.

Now the only thing I cant get to work is the buttons will turn the lights on, but when you press a button the second time nothing happens. How can I get an off command after it has been pressed a second time?? Any help would be greatly appreciated! Thanks in advance!!

Hi MPK,

It’s been quite a while and unfortunately I still haven’t implemented your solution to allow my VRCZ4s to work with Smartthings. I would like to give it a try now. Before starting, I would like to clarify a few things and would appreciate your comments.

  1. I assume that these are the DTH & SmartApp that I need:
  1. Do I copy and paste everything that’s in the links or just part of it? If so what part?

Thank you for your help with this.

Robert

Hi @Malekfahl – sorry I didn’t see your post sooner. (I guess I wasn’t notified via email because it wasn’t a reply to me directly, and it didn’t mention @mpk explicitly.)

Seems I’ve missed that eBay auction now, but it looks like those Monster units are scene controllers (or VRCS4-compatibles) rather than zone controllers (or VRCZ4-compatibles). As such, my understanding is that they don’t have an “off” function by design – instead, they function like “radio buttons” (on a computer display, or an actual car radio) as a mutually-exclusive set. Turning on any one of them turns off all the others. The idea is for each button to readjust all of the same devices (which are also controlled by the other buttons) to the respective levels that define that particular button’s “scene.”

As for the up/down buttons, I think I simply programmed them backwards. It seemed intuitive to me at the time that the side of buttons 1-4 that turns the switches “on” (on the zone controllers, anyway) – namely, the left side – would also be the side of the dimming rocker that dims the lights up, while the right side would be for both “off” (on the switches) and “down” (for the dimming rocker). It wasn’t until much later that I noticed there’s a “down arrow” (I guess?) embossed on the left side of the dimming rocker, and an “up arrow” on the right side. I’ve since debated whether to swap the directions in my code, but it still feels right to me this way, and nobody (around here, at least) ever looks at the embossed legends anyway. (If I ever get around to it, I might try actually flipping the rockers within their housings instead.)

Yes, that’s right – paste the entire contents of each one into a corresponding editor session within your IDE (and don’t forget to “publish” them to your hub when you’re done!)

Let us know if you run into any trouble…

Thanks for the reply! So how is it that Brians device handler makes each button work like a zone controller , with his device handler and smart app I can press a button once and it will turn on a set of zigbee lights, and if I press the same button again it will turn them off!?

He’s using a toggle function somehow? Only thing I don’t like about his dth and app is I cant dim. with yours I can dim them but cant toggle them. Is there an easy way to do this? Or would someone have to write a whole different dth and app? It must be able to be done somehow, if its working with toggle in Brians, and it’s working with dimming in yours. Perhaps I’m the only one wanting to control sylvania lightify bulbs with these and other zigbee lights instead of going the easy way and just using zwave all around.

I doubt it’s the bulbs. I’ve never owned a scene controller, nor targeted that functionality (yet, anyway), but Brian’s DTH – and also, @ygelfand’s (whose code I adapted) – should be useful guides, and since you can code (you reversed my dimmer buttons, no?), I’d think you should be able to composite features from all three (or even just two) of our modules to get the sum-total behavior you’re after.

I’m happy to help, if you need a hand looking through the code bases and deciding what to grab from each version…


P.S.: Without having looked at Brian's code, I'd presume that each button puts out the same code every time you press it, and it's on your code to track device state and toggle the target (controlled) devices on/off alternately with each successive press. Shouldn't be too hard to do -- certainly, simpler than (and likely similar to) my dimming code (which, after all, has to track/control the dim level of the target based on simple "up" or "down" messages from the controller)?