Here is a screenshot with the Philio. It supports energy usage information.
@erocm1231 I’m going to try this setup out with the Monoprice dual relay module. Quick question, with your smartapp, do I need to create some virtual switches in the IDE to associate with the “First Switch” and “Second Switch”?
Yep, if you want to use both switches in other SmartApps, Routines, etc. you have to create the two virtual devices and associate them to the physical switches in the SmartApp. Maybe someday SmartThings will support multi-switch switches, but until then we have to use this workaround.
I used the “On/Off Button Tile” device type for the virtual switches.
Cool. I used “Simulated Switch” for mine, and it’s working perfectly.
What are your thoughts on a Monoprice 11990 specific device type? The Philio PAN04 has a lot of features that the Monoprice doesn’t. I’d love to clean up the UI and get rid of everything except for the Switch 1, Switch 2, and Refresh tiles.
I’ve been itching to start writing some code for ST, so I’d be more than happy to maintain that if that’s okay with you. You’ve put in the bulk of the work, I’d be sure to accredit you.
I was going to try and make a generic dual relay device type that has different tiles based on the device that is detected but it might be a week or so before I can get to it. You are more than welcome to create a separate device type if you would like though. Cleaning up the interface for the Monoprice would be simple change to one line of code. If you want to get your feet wet in SmartThings device type code, take a shot at it.
Let me know if you have any questions!
I’ve got it published, just need to do some testing to make sure I didn’t break anything in the process. If you’re curious, here’s where it’s at: https://github.com/justintime/SmartThings-Monoprice-11990/blob/master/monoprice-11990.groovy
Quick question about the dual-relay-adapter smartapp: I think the ST-supported “Multi-Channel Control” SmartApp (under “More”) will do just what your code does, but it won’t allow me to select the Monoprice. I can’t seem to find the source code to this smartapp to find out what capabilities it’s looking for. Do you happen to know where the source is? Does the Philio show up as a choosable option?
Thanks again!
I can’t find the source for it either. It seems the app is looking for capability “Zw Multichannel”. I added that to my device type and it lets me choose my switch. I don’t see what it does beyond letting me choose my multi-channel switch though. Perhaps it got published before it should of, because the “Zw Multichannel” capability really isn’t documented anywhere (that I could find).
Your device type looks good. I would have just changed the “details” line and left it at that, but you did a good job cleaning things up.
Oh, one thing that you will probably want to update with your device handler is the fingerprint. This will make it so that if you add another Monoprice Relay onto your network it will automatically assign the correct device type. Here are some instructions for that:
Nice catch, I’ve updated the code. Thanks!
I created my own version of the same that seems to work completely for me. It also has the added benefit of only requiring one virtual switch. I have the dual relay setup to switch the first output and you only have to add the binder and 2nd virtual switch for the secondary function.
DeviceType:
Smart App Binder:
I assume if I want to buy one of these to put in an existing array of 4-way switches (long hallway) which sometimes will be toggled off and on manually at the wall, this is a waste of time?
This type of device would only work for single-pole/location wall switches, correct?
Someone can correct me if I am wrong, but the switch inputs on the Monoprice switches are load bearing right? So in theory, you could stick one of these in the box that goes up to the light. So you would take the load wire that goes to the light and connect it into the monoprice where indicated. Then you would take the line wire at the end of the N-Way switch circuit and connect it to the switch wire on the Monoprice. You shouldn’t even need the Dual Relay unless you want to add another light into the mix (but the other light’s final switch in the circuit needs to be in that same box. So imagine this diagram with an N-Way switch configuration in place of the 3-Way they have shown:
Anyway, I’m no expert though so I encourage you to verify this information. Seems like it would work to me though.
Just a heads up for any Rule machine users here, Bruce released a version update today incorporating my custom command code. This would allow control of both switches in this device without the need for the intermediate smartapp and the virtual devices.
Ok, I’m no programmer, but I did stay at a Holiday Inn Express once…
Just guessing, I tried to set up the MonoPrice DR 11990 using Parameter > number = 1 for On, 0 for Off, but no dice.
So, any help with which Parameter and Value to use would be greatly appreciated!
I don’t think the monoprice requires any parameter changes. What exactly isn’t working?
I’m trying to set up my 11990 in Rule Machine using the new Expert feature. I am no expert but am trying to learn how it works.
Don’t I need one command for On and one for Off in order to be able to control the 11990 in RM directly instead of through the custom app?
I don’t have one of these, but if you send a screen shot of the available commands I might be able to help.
on() and off() probably control switch one, these are standard commands and would work with a normal switch type in ST, so you don’t need custom commands for these.
But to answer your question, yes, you would need separate commands for on and off for the second relay output.
If the monoprice device type you’re using is derived from the philio one, then you would use
"on2" and “off2” for the second output.
@dtterastar, I wanted to say thanks for your code, took me a couple of minutes to figure out what I was doing since this is the first piece of custom code I have added to my hub but it seems to work great.
I am using one of these relays to control a ceiling fan with a light so that they can both be controlled separately, I have the fan hooked up to switch2 and have it assigned to a virtual switch I created, both the light and fan can now be turned on/off using voice with my Amazon Echo.
Great I’m glad it worked for you.
Device price just went up to $34.99 =(