ZWN-RSM2 Create a new device type

You’ll see the smart app in ‘My Apps’ section - go to Marketplace, Smart Apps, then scroll down to the very bottom. Note though that this is the last step you need to perform.

I’m assuming you know this already, but the steps should be 1) pair/connect your enerwave relay to the hub 2) change the enewave relay’s device type in the IDE to the Philio 3) Create 2 new virtual devices in the IDE, device type should be simulated switch 4) install the smart app (in your smart things mobile app) as I described above. The smart app will then ask for your enerwave relay and the 2 simulated switches.

Also, don’t edit the code.

@erocm1231, here’s the log. Note that I switched these from my phone app as I’m not in the house at the moment. Thanks for the help.

154034ac-9ca0-4c5b-9331-fd02e05eb460 10:46:09 AM: debug rsmHandler called with event: name:switch2 source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.off”,“backgroundColor”:"#ffffff"}} device: Theatre In-Wall Relay Switch
062f51d6-4dd9-454b-bee8-f9753ab265f1 10:46:09 AM: debug PUBLISHED offPhysical()
733a8d98-a53c-4420-aa00-2b522c5e01d7 10:46:08 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 2) to [[‘name’:switch2, ‘value’:‘off’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Theatre In-Wall Relay Switch’, ‘descriptionText’:Theatre In-Wall Relay Switch switch2 is off]]
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:46:06 AM: debug switch 2 off
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:46:06 AM: debug switchHandler called with event: name:switch source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.off”,“backgroundColor”:"#ffffff"}} device: Theatre 2
062f51d6-4dd9-454b-bee8-f9753ab265f1 10:46:06 AM: debug PUBLISHED off()
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:45:07 AM: debug rsmHandler called with event: name:switch2 source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#79b821"}} device: Theatre In-Wall Relay Switch
062f51d6-4dd9-454b-bee8-f9753ab265f1 10:45:07 AM: debug PUBLISHED onPhysical()
733a8d98-a53c-4420-aa00-2b522c5e01d7 10:45:07 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 2) to [[‘name’:switch2, ‘value’:‘on’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Theatre In-Wall Relay Switch’, ‘descriptionText’:Theatre In-Wall Relay Switch switch2 is on]]
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:45:05 AM: debug switch 2 on
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:45:05 AM: debug switchHandler called with event: name:switch source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#79b821"}} device: Theatre 2
062f51d6-4dd9-454b-bee8-f9753ab265f1 10:45:05 AM: debug PUBLISHED on()
733a8d98-a53c-4420-aa00-2b522c5e01d7 10:44:15 AM: debug Parsed BasicReport(value: 0) to [null]
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:44:13 AM: debug rsmHandler called with event: name:switch1 source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#ffffff"}} device: Theatre In-Wall Relay Switch
52e525d3-b1da-4f71-81cf-e913cb759720 10:44:13 AM: debug PUBLISHED offPhysical()
733a8d98-a53c-4420-aa00-2b522c5e01d7 10:44:12 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [0], sourceEndPoint: 1) to [[‘name’:switch1, ‘value’:‘off’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Theatre In-Wall Relay Switch’, ‘descriptionText’:Theatre In-Wall Relay Switch switch1 is off]]
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:44:11 AM: debug switch 1 off
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:44:11 AM: debug switchHandler called with event: name:switch source:DEVICE value:off isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.off”,“backgroundColor”:"#ffffff"}} device: Theatre Main Light (SS)
52e525d3-b1da-4f71-81cf-e913cb759720 10:44:11 AM: debug PUBLISHED off()
733a8d98-a53c-4420-aa00-2b522c5e01d7 10:43:15 AM: debug Parsed BasicReport(value: 255) to [null]
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:43:10 AM: debug rsmHandler called with event: name:switch1 source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#79b821"}} device: Theatre In-Wall Relay Switch
52e525d3-b1da-4f71-81cf-e913cb759720 10:43:10 AM: debug PUBLISHED onPhysical()
733a8d98-a53c-4420-aa00-2b522c5e01d7 10:43:10 AM: debug Parsed MultiChannelCmdEncap(bitAddress: false, command: 3, commandClass: 37, destinationEndPoint: 0, parameter: [255], sourceEndPoint: 1) to [[‘name’:switch1, ‘value’:‘on’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Theatre In-Wall Relay Switch’, ‘descriptionText’:Theatre In-Wall Relay Switch switch1 is on]]
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:43:09 AM: debug switch 1 on
154034ac-9ca0-4c5b-9331-fd02e05eb460 10:43:09 AM: debug switchHandler called with event: name:switch source:DEVICE value:on isStateChange: true isPhysical: false isDigital: false data: {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#79b821"}} device: Theatre Main Light (SS)
52e525d3-b1da-4f71-81cf-e913cb759720 10:43:09 AM: debug PUBLISHED on()

I appreciate all that have responded. I have followed Ray and Jonathan’s advice here.

The relay turns on/off and reflects the proper state if the mobile app is used to turn on/off.

The virtual switches, also turn off/on and display properly with mobile app.

What is not occurring is if I switch either the AUX1 or AUX2 physical switch inputs, to on, their state is not reflected in the app, devices turns on, but no indication on mobile app.

Any help would be appreciated.

TIA

Scroll back up to about post #80. There is instruction there with a screenshot for changing the device parameters to fix your problem. You have to change the device parameter from 3 to 1.

Do the lights toggle unexpectedly when just using them physically or do they also toggle when using the app? If you space out turning the lights on or off by a decent amount of time (say 30 seconds) does it stop the lights from unexpectedly toggling?

Eric- The lights are not toggling unexpectedly. Just that the status or current state of the light is not being reflected in mobile app when I use the physical aux inputs.The virtual switches and the dual relay devices control the lights and display status correct from the app.

Ray- Going to make those changes. Will post results.

Reading back at msg #80, using v2.0.8 on my Android, All I get is an option to update the icon. Assuming this is the virtual switch device that should have the parameters changed.

I am using the Enerwave ZWN-RSM2 device.

Looked at Enerwave dual relay and the virtual switches, smartapps and see no mobile screen like the one shown…Feeling REALLY dumb ATM.

More for dummies

I just saw there was a document on Enerwave’s site for this with a pdf showing how to setup in smartthings, with a device type as well. I put that on one of my Relay’s and it seems to work fine. Can’t set parameters with it like Eric’s, but it also doesn’t have the unnecessary tiles as his modified Philio device type.

I’m going to play with it for a bit to see how it goes. Eric, have you seen this? Any downside other than parameter variables? I have no need to switch, just curiosity I guess.

http://enerwaveautomation.com/wp-content/uploads/products/zwnrsm2/ZWN-RSM2-SmartThing-Integration-Manual-1.pdf

It happens both when using the physical switch and the app. It’s happens very randomly though, I can’t recreate the issue at will.

I also have Enerwave SC7s that I use as wall switches, I’m not sure if this might be related to the issue.

I have also used this document and device driver.

My testing has shown it does work from the mobile app. Switching on/off both devices.

The use of the Aux1 or Aux2 inputs DO NOT get updated automatically on a state change. You have to do a REFRESH on the app and then the correct state is reflected.

I would prefer the status to change and be reflected in the app with both methods of activation.

In my target application of this device, I would like to interface this device to the furnace via a 115vac relay. The enerwave and external relay would perform the remote HEAT/COOL call, just like a thermostat would do. The AUX inputs could also have a 24vac relay that would apply the 115vac to the aux inputs of the enerwave device. This would be used to count the number of times the furnace is called during a given period and determine run times.Having a dual relay is a great plus as the system is dual fuel and has a mode switch that switches between gas and electric/Heat pump.

I know this is currently beyond this smartapp but trying to establish the baseline action.

This will be installed in a remote cabin location that already has a dual fuel furnace/Heat pump and zoned heating with steam humidification. I know that system very well. :slight_smile:

I have already done this on the Ardunio platform but wanted to have a more home automated approach with SmartThings.

@mmarlette You need to change parameter 3 to a value of 1. You don’t do this in the virtual switches, but rather in the physical switch in the SmartThings App on your phone. This tells the switch to notify the SmartThings hub that the physical switch has been flipped.

@michaelahess I would be very curious if their device type will report that the switch has been changed when you toggle it at the wall. From just glancing at it, it does not. Another reason that I don’t think it does is that the handler never sets parameter 3 so anyone that uses that type won’t ever have that parameter changed.

@michaelahess @mmarlette I am working on a generic “Dual Relay” device handler that will have the ability to determine whether the Monoprice, Enerwave, or Philio devices are in use and will show the appropriate tiles and set the appropriate config parameters automatically. I don’t have an estimate of when I will be done though.

That would be awesome. Really appreciate your efforts.

Not sure how comfortable you are with soldering. I removed both relays in the emerwave dual relay module and use the module to control external 12vdc relays for dry contacts. It’s much cleaner and relay clicking.
One of this module is controlling my Energy recovery ventilation (ERV) high/low.

That will be sweet! I used your code to set param 3 then switched to that code, it seems to work as yours does but I haven’t compared how quickly it updates, just that it did. I will keep using yours for sure, just wanted to see what they’d put up. I also noticed the ZWN-SC7 has code from Matt Frank. Figured maybe they took a trimmed down version of yours.

Ray- IPC J-STD-001 certified, work in a clean room, doing test development for mil spec electronic assemblies for day job.

Good to know, haven’t hacked in to it that far yet. So I am assuming you are powering it 120 VAC and then interface with a 12vdc device as that is the current coil voltage?

I did take the unit apart and look at it. Pretty simple and a nice device. I am VERY strong hardware with software background. Groovy is not one I am verse in…as you can tell… :smile:

@erocm1231- Their device type DOES NOT report the AUX1/2 switch changes. Been a travel day so I am going to try and find the parameter 3 configuration page. I swear I tried to find that setting.

The new generic dual relay device sounds GREAT! Let me know if you need testing done when the driver is ready. I bought a dozen of these devices, so have plenty to test on.

Now I am going back to getting the baseline configuration settings correct…

I give, been trying to get eric’s driver and smartapp working on my Enerwave ZWN-RSM2 device with no luck.

Again this is my only second device and the first one worked fine out of the box. So I am obviously doing something wrong on the setup and configuration. I have read and re-read this thread and taken the suggestion of others here.

Currently I can not get relays to respond at all and when I try and change the parameters like msg82/83 screenshot. I am unable to enter anything in the Which? It will not allow entry.

I apologize in advance for this long post but here is my process, I tried to document the steps.

Any advice would be much appreciated. I don’t understand all of the terminology of names, etc. To tie things all together, yet. Will be working towards a greater understanding.


How to integrate the Enerwave ZWN-RSM2 Device Dual Relay Device into SmartThings

Download from GitHub’s erocm1231 Eric Maycock’s distribution Link:

Most of this information is contained throughout the thread at:

The (MSG##) referred to below are taken from the above forum and message numbers that relate to this

(MSG71) starts the explanation of Eric’s install.

In summary per (MSG75) you need to set up the following:

Devices:

2 Virtual On/Off Button Tiles1 Relay device of type Philio PAN04 Dual Relay

Smartapp:

Dual Relay Adapter


This is the procedure to create the above devices and SmartApp.

Using windows explorer, open the directory Eric’s Github folder SmartThings-master, then Philio_pan04,
following with the web IDE smartthings web pages.

Before you can pair the Z-wave device with the hub, you need a driver.

  1. (MSG72) Adding in the new device type, Philio PAN04 Dual Relay
    a. Right click on file philio-pan04.groovy open with NotePad++
    b. In IDE select your My Device Handlers tab, click on ‘+ New Device Handlers’
    c. Select the ‘From Code’ tab
    d. Copy/Paste all the code from NotePad++ into the IDE box
    e. Then press ‘Create’

  2. Pair device to SmartThings Hub.

  3. In IDE, verify that the Enerwave ZWN-RSM2 device handler is correct.
    a. Goto the My Device Handlers and select the Enerwave ZWN-RSM2 device, Edit.
    b. verify ‘Type’ is Philio PAN04 Dual Relay, if nt select drop down combo and change it.
    c. Select ‘Update’
    d. This should change the device’s driver to Eric’s.

  4. Create 2 new virtual devices in the IDE, device type should be simulated switch.
    a. My Devices,
    Name VirtualSwitch1 VirtualSwitch2
    Label Enerwave Aux1 Input Enerwave Aux2 Input
    Type Simulated Switch
    Version Published
    Device Network Id xyz123 xyz124 (random, just make it unique)
    Status ACTIVE
    Hub Delano Hub Delano Hub
    b. Create, then repeat for VirtualSwitch2

  5. Change device parameters.
    a. My Home, Things, Select the ZWN-RSM2 Dual Relay
    b. Edit Device
    c. Which? Was unable to change to anything like in MSG82
    d. Parameter Number: 3
    e. Parameter Value : 1
    f. Press ‘Done’’

  6. Create the smart app from Eric’s code in IDE:
    a. Right click on file dual-relay-adapter.groovy open with NotePad++
    b. In IDE select your My SmartApps tab, click on ‘+ New SmartApp’
    c. Select the ‘From Code’ tab
    d. Copy/Paste all the code from NotePad++ into the IDE box
    e. Then press ‘Create’
    f. If no errors are returned, press ‘Save’, ‘Publish’ and select ‘For Me’

  7. Install the smart app to the device on MOBILE app:
    a. Set the location to installed location, if more than one location exists.
    b. Marketplace(lower right icon)
    c. You should see 2 Not Yet Configured.
    d. Select the SmartApps tab, you should see Eric’s Dual Relay Adapter SmartApp
    e. Select
    f. Which Dual Module? ZWN-RSM2 Dual Relay Module (from step 2 above)
    g. Virtual Switch to link to Switch 1? Enerwave Aux1 Input (from step 3 above)
    h. Virtual Switch to link to Switch 2? Enerwave Aux2 Input (from step 3 above)
    i. Assign a name : Enerwave SmartApp
    j. Done
    k. Should get a confirmation banner across top of the screen indicate it was successful.

At this point the device should function. My Home, Things, ZWN-RSM2 Dual Relay

Tiles are:

Outlet1 Outlet2 Refresh First Row
– – reset kWh Second Row
Configure Third Row

@mmarlette If you want to try the generic adapter, it may work better for you. I am not finished with it yet so you will still have the energy and power tiles. After changing to it in the IDE, go into the device preferences and choose “Enerwave”. This should send the proper config parameters. If it doesn’t work on the first try, hit the little configure icon in the app.

@erocm1231- I removed the smart app, installed new device_type driver from github for your generic dual relay, created, saved, published for me. Went then to my devices, edit, changed the driver from the philio to generic dual relay, update and get the following:

		Oh No! Something Went Wrong!	
		Error500: Internal Server ErrorURI/device/updateReference Id741c17eb-3012-4c25-83d2-1acf5621ee6aDateWed Feb 03 15:33:31 UTC 2016

I can change the device_type to Enerwave’s latest driver_type published on their web site with no problems and functions fine except with no status updates from the switch inputs.