[ST EDGE] SmartThings Edge Driver for Leviton VRCS4-M0Z and VRCS4-MRZ (Beta)

Ok, probably I’m just wrong. Thanks. :sunglasses: i’ve deleted my posts above to avoid any confusion.

Do the S and the Z models have the same Behaviour? Maybe I mixed them up. :thinking:

I haven’t tried to deal with the VRCZ4 switches as they are very different. I’m only playing with the VRCS4 (M0Z and MRZ) and these seem to exhibit the same behavior.

I filed a support request and posted the question to the community as well.

Not clear if the future is better Automation or better Rules.

1 Like

Yes! That worked…given VRCS4-M0Z instructions are not easy, here’s what I did:

  • Used VRCS4 Channel Invitation and added one of my two hubs (per header instructions)
  • Added both drivers (per header instructions)
  • Did a factory reset of my VRCS4-M0Z (pressing button 1 & 3 to get solid RED LEDs)
  • In the Samsung App (iOS), did “Repair Z-Wave Network”
  • In the Samsung App (iOS), clicked “Add Device”
  • On the VRCS4-M0Z, pressed button 1 & 3 to get blinking AMBER (program mode); after 3 seconds pressed 1 & 3 (exclusion mode) and then pressed 1 & 3 again (inclusion mode). Did that about 3-4 times until it finally included the VRCS4-M04.

Note: It took me awhile to understand that SETTINGS is only for specifying the Z-Wave device id for the dimmer (button 5). I initially thought it would turn on/off the device. BTW…finding device ids are a lot harder than it should be; I recall it used to be easier. I used the Smartthings CLI and did smartthings devices - once you find the name of what you want (e.g. 21) then run smartthings devices 21 -y and then look for the zwave:networkId value (remember it’s in hex - you need to convert to decimal).

Now that I have the VRCS4-M0Z added, I’m confused to why “nothing” is happening.

  • I created a very simple ROUTINE
    IF “Leviton 4 Button Switch” Switch 1 - On
    THEN “MB Closet Light” - Turn On
  • When I physically press the VRCS4-M0Z button 1, the green LED light for button 1 comes on (and stays on). But, my MB Closet Light does not turn on.
  • I see nothing in HISTORY in the Samsung App (iOS) about a button press
  • And, if I look at the VRCS4-M0Z device history, there’s nothing about any button press.

Any suggestions?

Ok, let’s see if we can debug this.

  1. When the switch was created, did it only create a VRCS4 device or did it also create an additional Switch device?

  2. Can you select the switch using the old IDE (graphapi)? If so, then it may still have the old information associated with the switch. I am looking for the raw description field which may still be populated. If the IDE already says “published”, then this may not be available.

  3. Next, select the VRCS4 from the Samsung App. You should see Switch 1, Switch 2, etc. Press the buttons and see if the UI power changes. I’m interested to see if any of the switches are responsive.

  4. What the UI, and use the buttons on the VRCS4 and cycle through each button. View the status.

  5. Finally, review the history to see if all buttons are recorded in the history.

  6. Finally, you stated that you created a simple routine for Switch 1. Can you create a routine for Switch 2 and see if you have the same symptom. NOTE THAT YOU HAVE TO SET THE DIMMER TO 100% when you turn on the MB Closet Light (if it’s a dimming switch).

  7. It would be good to see if your problem is ONLY with Switch 1 or for all of the switches. Note that there is an earlier model of the VRCS4-M0Z which was different than the one I integrated.

  8. The next items require you to install the Smartthings CLI on a computer. You can get instructions here

  9. Issue the command: “smartthings drivers:logcat”. Finally select the VRCS4 driver.

  • Edit any of the settings values. This will give me a full log of the switch.
  • Now type a series of “*****” and press return. — this will give me a break in the log
  • Press switch 1 to turn on the LED, then press switch 1 again to turn off the LED.
  • Press switch 2 and then press switch 2 again.
  • Finally, do the same for switch 1 and switch 2 using the UI.
  1. Cut the log and include it in the return message. Please use “</>” so that the log is formatted.

Hopefully, we can isolate the problem with this.

**UPDATE: After doing everything below and getting into that weird state, I killed my Samsung App and restarted it. The device reappeared, I was able to add 4 routines, one for each button - and it works fine! I guess my only question is - was I correct in switching the DRIVER from “Z-Wave Leviton 4-Button Scene Test” to “Z-Wave Leviton 4-Button Scene Controller” ? That doesn’t seem like how I should have had to do it. Thanks! **

0 - When I included the VRCS4-M0Z, two devices showed up (same name). Clicked save and only one shows up in the Samsung App.
1 - The groovy API shows the VRCS4-M0Z, the IDE says “Published”
2 - In the Samsung App, when I click on the device, and it shows “-” next to the On/Off toggle. Same for all 4 switches. The On/Off toggle and Dimmer slider are not selectable.
3 - Can’t press On/Off, give it is not selectable.
4 - Nothing in History

At this point, I was skipped to 8 and started playing around…I did the smart things edge:drivers:logcat - and I noticed two drivers
2 … Z-Wave Leviton 4-Button Scene Controller
3 … Z-Wave Leviton 4-Button Scene Test
My device was using “Z-Wave Leviton 4-Button Scene Test” driver. For the heck of it, I changed the device driver (in the Samsung App) to “Z-Wave Leviton 4-Button Scene Controller”. It had the happy effect of my routine working when I physically pressed button 1 - AND in the Samsung App, the “-” showed ON/OFF text - with the On/Off toggle now selectable!!! However, when I went back to the Automations (in the Samsung App) to add another routine, the VRCS4-M0Z is no longer available as a device for the IF condition. And, when I try to edit the original routine, it gives an error sort of indicating it couldn’t find the device to test. I suppose it’s because I changed the driver and messed things up.

Note: I still see the device when I do a “smartthings devices” - and it does specify that updated driver I specified. Unfortunately, I don’t know how to SET/UPDATE values using the CLI. In the Samsung App, when I click on the device to try to restore the driver, the UI just hangs for 20 seconds or so and does nothing.

Snippet from lo

? Select a driver. 2
connecting... connected
2023-04-11T15:18:15.051929968+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Received event with handler unnamed
2023-04-11T15:18:15.052623163+00:00 INFO Z-Wave Leviton 4-Button Scene Controller  <ZwaveDevice: 635906a7-5022-4491-b965-528364d2ad89 [73] (Leviton 4 Button Switch)> received Z-Wave command: {args={dimming_duration=10, scene_id=5}, cmd_class="SCENE_ACTIVATION", cmd_id="SET", dst_channels={}, encap="NONE", payload="\x05\x0A", src_channel=0, version=1}
2023-04-11T15:18:15.055760885+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Found ZwaveDispatcher handler in Z-Wave Leviton 4-Button Scene Controller
2023-04-11T15:18:15.069073892+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  ------ Received Scene_Activation
2023-04-11T15:18:15.070151478+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  Number of linked devices: 	1
2023-04-11T15:18:15.070899104+00:00 INFO Z-Wave Leviton 4-Button Scene Controller  <ZwaveDevice: 635906a7-5022-4491-b965-528364d2ad89 [73] (Leviton 4 Button Switch)> emitting event: {"attribute_id":"switch","capability_id":"switch","component_id":"main","state":{"value":"off"}}
2023-04-11T15:18:15.080438665+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Z-Wave command(f4a01da7) queued for radio transmission: CC:91, CID:0x00
2023-04-11T15:18:15.081061312+00:00 INFO Z-Wave Leviton 4-Button Scene Controller  <ZwaveDevice: 635906a7-5022-4491-b965-528364d2ad89 [73] (Leviton 4 Button Switch)> sending Z-Wave command: {cmd_class="MANUFACTURER_PROPRIETARY", cmd_id=0, dst_channels={}, encap="AUTO", err="unsupported command", payload="\x1D\x0D\x01\xFF\x00", src_channel=0}
2023-04-11T15:18:15.086144686+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  Leviton 4 Button Switch device thread event handled
2023-04-11T15:18:15.247168592+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Z-Wave command(f4a01da7) transmit status: TRANSMIT_COMPLETE_OK
2023-04-11T15:18:15.323800007+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Received event with handler unnamed
2023-04-11T15:18:15.324612309+00:00 INFO Z-Wave Leviton 4-Button Scene Controller  <ZwaveDevice: 635906a7-5022-4491-b965-528364d2ad89 [73] (Leviton 4 Button Switch)> received Z-Wave command: {args={dimming_duration=10, scene_id=5}, cmd_class="SCENE_ACTIVATION", cmd_id="SET", dst_channels={}, encap="NONE", payload="\x05\x0A", src_channel=0, version=1}
2023-04-11T15:18:15.332440768+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Found ZwaveDispatcher handler in Z-Wave Leviton 4-Button Scene Controller
2023-04-11T15:18:15.333030056+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  ------ Received Scene_Activation
2023-04-11T15:18:15.333706884+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  Number of linked devices: 	1
2023-04-11T15:18:15.334521060+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  Repeated press
2023-04-11T15:18:15.335232413+00:00 DEBUG Z-Wave Leviton 4-Button Scene Controller  Leviton 4 Button Switch device thread event handled
2023-04-11T15:18:20.172552091+00:00 TRACE Z-Wave Leviton 4-Button Scene Controller  Received event with handler unnamed
2023-04-11T15:18:20.181652624+00:00 INFO Z-Wave Leviton 4-Button Scene Controller  <ZwaveDevice: 635906a7-5022-4491-b965-528364d2ad89 [73] (Leviton 4 Button Switch)> received Z-Wave command: {args={dimming_duration=10, scene_id=1}, cmd_class="SCENE_ACTIVATION", cmd_id="SET", dst_channels={}, encap="NONE", payload="\x01\x0A", src_channel=0, version=1}

Some progress

I am really surprised that Z-Wave Leviton 4-Button Scene Test is available to you as this is my debugging version and I didn’t think that I pushed it to the the channel. If you can, can you select that driver and give me the Driver version (from the UI select driver, and record the version information). If you are willing, we can use that version to debug exactly what is going on.

  1. Select Z-Wave Leviton 4-Button Scene Controller as your driver.
  2. Start Logcat and select the “Z-Wave Leviton 4-Button Scene Test” driver.
  3. Change the driver (in the UI) to Z-Wave Leviton 4-Button Scene Test
  4. Please send me the log.

Hopefully this will tell me something.

Here’s what I am suspecting but just wild ass guesses. When you paired the device, it created two devices and somehow it has associated the Leviton 4-button to the switch device. But I may be wrong. Let’s see if we can isolate the problem.

I am very surprised that the original driver works but the new test driver exhibits these behaviors. Let’s get the logs and see if we can see what is happening.

Note, I just updated the Z-Wave Leviton 4-Button Scene Test to the current working version. The one you were using was an early version.

The driver version should be: 2023-04-11T17:20:39.143881546.

This SHOULD work much better.

Henry

Z-Wave Leviton 4-Button Scene Controller - Version 2023-03-27T20:06:56.080614011
Z-Wave Leviton 4-Button Scene Test - Version 2023-04-11T17:20:39.143881546

Good. The Scene Test version is my most up to date and almost ready to release.

Note that the Edit Panel no longer has Switch devices to enter. This, which handled dimming, is handled through Smartthings integration.

This SHOULD work for you.

Just updated the driver on Z-Wave Leviton 4-Button Scene Controller. Will be retired the test version in a few days.

Hopefully, this solves everything.

1 Like

Here’s the template for your solution.

  1. Using the SmartThings CLI (use “smartthings devices”) to get the Device ID for the Leviton switch and replace the text with the Device Id.

  2. Change the component field, <main, switch2, switch3, or switch4>, with the switch that you want to query (first case), and then change as a result of this action.

  3. Using the SmartThings CLI (use “smartthings scenes”) to find the scene id that you wish to effect.

  4. Save the file as a json file.

  5. Install the rule by "smartthings rules:create -j -I

Alternatively, you can use the API Browser+ (https://api-browser-plus.pinsky.us to perform these actions. This is a friendlier interface and includes a method to enable/disable a rule while you are debugging.

Good luck.

{
  "name": "test",
  "actions": [
    {
      "if": {
        "changes": {
          "operand": {
            "device": {
              "devices": [
                "<VCRS4 Device ID>"
              ],
              "component": "<main, switch2, switch3, or switch4>",
              "capability": "switch",
              "attribute": "switch"
            }
          }
        },
        "then": [
          {
            "scene": {
              "scenes": [
                "<scene id>"
              ]
            }
          },
          {
            "command": {
              "devices": [
                "<VCRS4 Device ID>"
              ],
              "commands": [
                {
                  "component": "<main, switch2, switch3, or switch4>",
                  "capability": "switch",
                  "command": "on"
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

When I try to upload the rule, I get an error.
HTTP error 422
The request is malformed.
image

Hmm …

  1. Can you give me the full rule that you submitted.
  2. And then the details (in API+, select the device, get details, and copy the detail information in the message. Do so for each device that is in your rule.

The error message seems to indicate that the target device doesn’t have an “on” command.

Thanks

Henry

1 Like

Great news for you. It looks like the latest IOS client allows you to create automations with all four switches. Looks like it works for Automations and Scenes.

Version is 1.7.01 updated yesterday.

Cheers

Henry

1 Like

Henry,

Thanks for letting me know, that fixed my problem!

Peter

1 Like

I haven’t studied this thread yet, but hope to have time next month. Is the technique used in this driver only useful for Z-wave devices?

I have a Leviton D2SCS Second Generation Scene Controller Switch. The Leviton App allows me to set it up to control other Leviton Devices (not what I want to do) or use IFTTT. I hope to figure out how to get it to control a Tuya Wi-Fi plug and a Shelly 1 Relay implemented as a momentary switch without going through IFTTT.

I very much think so (that the VRCS4 driver only is useful for Wave devices). From my reading, the Leviton D2SCS switch uses WIFI (or LAN communication) for control and thus would need a totally different driver.

1 Like