Need help writing a Zwave+ device handler

Hello everyone. I still haven’t written a device handler, but I’m ready to get my hands dirty and try. This is my current project:

I am interested in writing a device handler (or modifying the existing one) for the GE/Jasco Zwave+ switch. The goal will be to disable the switch’s internal relay so that the switch doesn’t connect/disconnect the power to the bulb, but still reports the event to the hub. The purpose is to create a switch that can control Lifx and other smart bulbs, but keeps them powered and connected to the network.

I know there are other threads that discuss this, but I have found no solutions. The switch solution I’m looking for will:

  1. Replace the wall switch, so the user can still turn the lights on/off with a switch if they want (removing the switch, shorting the wires, and using Alexa to turn the lights on/off is not a solution)
  2. Draw power from the wall (does not use batteries)
  3. Keep the bulbs powered at all times
  4. Report button events to the hub

Here is what I’m hoping to learn from y’all ‘experts’ :wink:

  1. Where do I find the API for a device? Do all ZWave device follow a standard API, or do I have to find the API for the specific device with which I’m working?
  2. I have no experience with Groovy, but I have a lot of coding experience. What is the best ‘crash course’ specifically tailored to this type of application? Is Groovy the best (or only) coding option for device handlers?
  3. If the API doesn’t exist for the functionality I want, what is the process for trying to get it implemented?
  4. What are the questions I should be asking, that I haven’t asked yet?

Thanks for your help!!

Welcome! :sunglasses: The idea of having a mains-powered switch that does not control the load is a very good one, and gives you a nice intuitive way of handling smart bulbs. But there are easier ways to accomplish that then trying to do it with a device type handler.

Probably the simplest is to just use an auxiliary switch that is already designed to not control the load. It does exactly what you’re asking for, no special device type handler needed. And usually costs less then a master switch would.

The linear/go control WT00Z is popular for this purpose.

https://www.amazon.com/Linear-Z-Wave-3-Way-Accessory-Switch/dp/B00EAY3K5Y

In any case, you can’t do this with a device type handler, because the switches are designed to work manually even if the hub is not available. You can’t remove them from the circuit with software. Instead, you wire the switch so that it’s not connected to the load. You can do that with pretty much any switch.

have you had a chance to look at the FAQ on switches for smart bulbs? It lists a number of different alternatives and might give you some more ideas.

Also, since you have a strong technical background, I’m going to suggest two additional resources.

One) the technical welcome FAQ. This is in the community – created wiki:

http://thingsthataresmart.wiki/index.php?title=Welcome_FAQ

  1. and a thread on writing your first device type handler, which might answer some of your other questions:

JD, why does an accessory switch have three wires if it does not actually connect to a load? My expectation is that this has to wire to the master switch. Is that correct?

Different models use different wiring patterns.

The GE auxiliary switches do not have a radio inside and communicate with their master by physical traveler wire.

The gocontrol auxiliary switches do have a radio inside and communicate with their master wirelessly. They do not use a physical traveler wire. They do use the neutral wire to power the radio in the auxiliary.

So I’m not sure what you meant by “three wires” but different models are different.

^This link takes you to amazon, and the picture of the back of the switch has 3 wires. I’m assuming they must be line/load/neutral. My question is: Why do you need three wires if you are not connected to the load? You should only need line and neutral.

https://www.nortekcontrol.com/pdf/manuals/WT00Z1_manual.pdf

In the US, the green wire is the ground. I know it can be confusing, but it is not counted in the number of wires used by the switch, so a three wire switch has three wires plus a ground and a two wire switch has two wires plus a ground.

I would suggest bringing in an electrician on your project.

If you want to do more yourself, and you live near a Home Depot, many offer a free class on installing a light switch which can be very helpful. Although it will not cover network switches, you will learn a lot about basic wiring and tools. And if you happen to be using a networked switch which Home Depot does sell, then The instructor may be able to get you additional answers.