ZWN-RSM2 Create a new device type

Ive added a thread with my code as I think that is ok from what I have seen of code sharing around here. Thanks Mattjfrank for the initial work I seriously couldn’t have gotten the rest working without your code!

2 Likes

I will review and test your code with the Enerwave. If it works I’ll update mine as well. Thanks @nineismine

2 Likes

Hi Matt,

I am fairly new to z-wave but I hae managed to get a feww things connected and working. I came across your post and am trying something similar to what you were trying to do. My set up is a bit different. I have a remote control device in my light/fan canopy and now hae connected this switch as well. I was able to do that with no problem. I have followed your directions with adding the device tpype and the smartapp. However, I am having problems adding the actually devices. I initally used the on/off tile (could figure out how to connect to the device type) then used the enerwave device. That did connect to the app but I made two seperate switches but both switches still had two switches on them. So I have deleted all devices associated and need to know how to get it to actually work with smartthings.

Any help would be appreciated.

Thanks

It’s basically a few steps, here it is from memory.

First remove any device types or smart apps you’ve already created for this.

-Create a new device type and paste in my code.
-Create a new smartapp and paste in my code.
-If your device is already added to smartthings you can exclude it but you can also just go edit it and change the device type to the one you just created.
-Create two simulated switches, you can do this under my devices in the IDE
-Open SmartThings and install the app you installed from above. You will select your device that you installed above and then each of the simulated switches you installed above.

Now when you toggle either of those simulated switches they should trigger the corresponding relay in the device.

Device Type and Smart App are at

Thanks for the reply. I did wha you stated, however, my device is not being located by smartthings nor when i install the app from my apps does it give a device for the enerwave dual load. I’ve attached a screenshot of what im getting.

Have you paired the zwn-rsm2 to smartthings? Is it using the device type above?

@lrogers80, what devices do you have in your device list? is the Enerwave dual relay there? It looks like you have the virtual switches there. But unless you have all 3 you can’t run the smartapp yet. To add the dual relay to SmartThings, you’ll add it just like any z-wave device, and then you go into the SmartThings back end website (IDE) and change the device type to the dual relay device type.

Once that’s done you should have a device where you can open it and you’ll see two switches.

The smartapp then takes those two switches from within the dual relay device and separates them into 2 devices. What you can do from there is use a single switch device type on those two ‘virtual switches’ and you’ll have two devices (switches) that are linked to the dual relay.

You’ll end up with 3 devices, the dual relay (With 2 buttons inside) and 2 virtual switches (which link back to the buttons inside the dual relay device.)

At least that’s how the monoprice dual relay works.

I just did this over the weekend with 3 of my 4 new relays and it works. Install the relay, see’s it as a zwave multi switch device, install the new device type from the code above, change the device to that in the IDE, install the app, and configure. Worked very easily. My only issue is I can’t figure out how to change config parameter 3 to a value of 1, which if I understand correctly will force updates to be sent vs the slow response on the second (maybe 1st) switch toggling. Still very new to this and the code has me perplexed.

I’ve put the relay devices themselves into a separate “room” called Relays, didn’t realize how quickly things get cluttered, be nice to have the ability to hide a parent or unneeded child device in the IDE.

If anyone can help me figure out the parameter thing, or if I’m chasing ghosts, I’d appreciate it. :wink:

1 Like

@michaelahess Can you try my Philio PAN04 device type? It works well with the Monoprice Dual Relay and the Philio Dual Relay, but I don’t think anyone has tested it with the Enerwave. It will actually support “instant” status updates on both switches. At the very least, you can change parameter 3 in the preferences of the device and then change it back.

I applied the device type to one relay, remotely (not at home) it seems to be working. I’ll check the physical switch toggle response this evening. Not getting any power readings but I assume this device is not as capable as the real Philio.

I have a couple of zwn-rsm2 relays and the status update with physical switch is not working. Currently I am using pollster to update the relay refresh every 5 mins.

Here’s the log output of changing value’s. Really not sure if it’s getting set or not. I had tried Parameter 3 with value of 1 (nodeID 1) from the default of 0 (disabled) and saw no real difference, so I set it to 255 for broadcast, nothing changed, set back to 1. Verified my Hub is nodeID 01. So even though the app controls the relays fine, it seems to still not update. Polling via the refresh button in the app does show a change within a few seconds of the physical switch toggling.

49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:39 PM: debug Parsed ConfigurationReport(configurationValue: [1], parameterNumber: 3, reserved11: 0, size: 1) to [[‘descriptionText’:Bathroom Relay: ConfigurationReport(configurationValue: [1], parameterNumber: 3, reserved11: 0, size: 1), ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘Bathroom Relay’]]
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:39 PM: debug Parsed ConfigurationReport(configurationValue: [1], parameterNumber: 3, reserved11: 0, size: 1) to [[‘descriptionText’:Bathroom Relay: ConfigurationReport(configurationValue: [1], parameterNumber: 3, reserved11: 0, size: 1), ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘Bathroom Relay’]]
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:35 PM: debug Parsed ConfigurationReport(configurationValue: [255], parameterNumber: 3, reserved11: 0, size: 1) to [[‘descriptionText’:Bathroom Relay: ConfigurationReport(configurationValue: [255], parameterNumber: 3, reserved11: 0, size: 1), ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘Bathroom Relay’]]
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:35 PM: debug Parsed ConfigurationReport(configurationValue: [255], parameterNumber: 3, reserved11: 0, size: 1) to [[‘descriptionText’:Bathroom Relay: ConfigurationReport(configurationValue: [255], parameterNumber: 3, reserved11: 0, size: 1), ‘isStateChange’:false, ‘displayed’:false, ‘linkText’:‘Bathroom Relay’]]
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:35 PM: debug configure() called
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:35 PM: debug Preferences have been changed. Attempting configure()
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:35 PM: debug configure() called
49fde29a-b7f9-4942-9edd-0af1af258f64 7:36:35 PM: debug Preferences have been changed. Attempting configure()

From the logs, it does appear that the configuration parameter is getting changed. Can you post some logs when you flip the switch?

Switching the physical switch for relay 1 on/off then 2 on/off. Seems to see each event, nearly instantly.

025d88fd-e5fb-461b-b6cc-7538c154cc07 11:59:36 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 2) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 11:59:33 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 2) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 11:59:31 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 1) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 11:59:28 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 1) to [null]

@michaelahess Ok, that information is great. I updated my Philio Device type. Can you try it for me and let me know if it is working now?

https://github.com/erocm123/SmartThings/blob/master/Philio_pan04/philio-pan04.groovy

I think it works! I called my wife and had her switch the first relay on then off, then the second, within seconds it updated on the app! I’ll test more when I get home with my other two relay’s.

025d88fd-e5fb-461b-b6cc-7538c154cc07 1:44:02 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 2) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:44:01 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 1) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:44:00 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 2) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:58 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 2) to [[‘name’:switch2, ‘value’:‘off’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Living Room Fan & Light Relay’, ‘descriptionText’:Living Room Fan & Light Relay switch2 is off]]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:55 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 2) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:53 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 2) to [[‘name’:switch2, ‘value’:‘on’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Living Room Fan & Light Relay’, ‘descriptionText’:Living Room Fan & Light Relay switch2 is on]]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:47 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 1) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:46 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 1) to [[‘name’:switch1, ‘value’:‘off’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Living Room Fan & Light Relay’, ‘descriptionText’:Living Room Fan & Light Relay switch1 is off]]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:39 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 1) to [null]
025d88fd-e5fb-461b-b6cc-7538c154cc07 1:43:37 PM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 32, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 1) to [[‘name’:switch1, ‘value’:‘on’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Living Room Fan & Light Relay’, ‘descriptionText’:Living Room Fan & Light Relay switch1 is on]]

Using the adapter for these relay’s, seems they aren’t updating status, but I need to verify when I get home.

Enerwave RSM2 Adapter App

Since it’s just creating virtual switches, I’d assume it reads the status from the actual device, which now thanks to you seems to be updating. But I am having a heck of a time following the code on these.

Yep, looks to be working from the logs.

The SmartApp syncs the state of the virtual switches and the physical switches. This is only necessary because SmartThings does not let you use the second switch in routines and automations. Hopefully this will change someday soon.

The SmartApp that is in this thread does a type of “poll” on the switches because I don’t think the device type here supports “instant” status updates. Since the Philio device type does support it, I recommend using the SmartApp that I modified.

Eric, is there anyway to change “poll” to “refresh” in the code? Poll doesn’t work with the zwn-rsm2 relay but refresh does work. I am not a coder and have no idea what to change. It’s the reason why I am using pollster for this. Thanks.

Which device type are you using? If you use the Philio device type you shouldn’t ever have to do a “poll”.