Z-wave question

Node Red is the brains of my Home Automation and I have dozens of devices connected by MQTT all over the property, with more to come. Some of those devices are Sonoff Switches that have been modified for in-wall use. I am looking at replacing my Sonoff in-wall kludges with Inovelli Z-Wave switches. Two reasons are moving me in this direction. First, forcing a Sonoff switch module into an outlet box just breaks so many rules that I am uncomfortable with, and second, the Inovelli will work in 3-way lighting configurations. Most of the lights in my home are on 3-way circuits, and while I have figured out a way to make one Sonoff switch function in a 3-way circuit, it would be just so contrary to my knowledge of the NEC (National Electrical Code).

I want to be able to sell the house in a few years and advertise it as a Smart home, but I can’t do it with DIY kludges.

Problem is, I’ve never worked with Z-Wave devices. So, my question is- do I need a Z-wave hub? I have read the documentation for the openzwave node, but I don’t know if NR is talking directly to the device(s) or to a hub. And if I need a hub, which one?

Of course if someone else is already controlling the Inovelli Z-Wave switch through Node Red, I would like to learn the details.

Thanks,
Steve- Still a newbie

I'm not qualified enough to talk about Z-Wave devices but I can't understand where you draw the line between what can be accepted as DIY and what can not.

So you build the brains of your automations by yourself, using opensource project based software solution to drive commercially available devices. I see this home as the Smart Home with no doubts but is the DIY part eliminated then?

Endel[hotNipi] - newbie as well

What you call a “hub” is in fact called a “controller” in the Zwave world …

You could pair some zwaves devices independantly but they won’t be able to respond to any outside-commands (like NR) … so, yes, you need a Zwave controller if you want your zwave devices to communicate with you (and other stuff)…

There are many controllers available … See Fibaro’s Home Center Lite (and Home Center 2) for example … they’re rather complete and allow you to do a lot of stuff using http requests API to control your devices …

You can also go for cheaper USB sticks but in that case, you have to provide the controller unit yourself (a RPI should suffice) and build all the API yourself (although once again, Node JS and NPM are your friends as there are some modules available to do just that).

Hope this helps…

Yes, you need a hub or a controller. Like Aeon Z-Wave Stick that will work as your hub. For Z-Wave, I would recommend to use Home Assistent (HA) for all devices and let HA act as a “device service” to Node-RED (NR), connection between both via MQTT

Reason for my statement is simply that HA’s support for z-wave is great, including support for secure z-wave devices. I know that there are nodes for NR supporting z-wave but my experience was that to make it work is too complicated and the support for secure devices felt unreliable. Switching to HA, suddenly everything was functioning as expected.

So, I’m still using NR for my automation & business rules and others, HA just provides connectivity to devices, thats all it does. Works fine, both running in the same Pi3.

I’m not qualified enough to talk about Z-Wave devices but I can’t understand where you draw the line between what can be accepted as DIY and what can not.

If it wouldn't pass the NEC codes, and likely not a pre-purchase inspection, then I can't leave it in the house.
The National Electric Code has specific limits on what you can put into an outlet box. Right off the bat, adding something the size of the Sonoff Basic to a standard duplex box would most certainly exceed the box capacity.

The NEC, by the way, goes back to the 1940's and the capacity of the box isn't just the number of wires in the box — it's the total volume of the conductors, devices, and fittings in a box. Every 14 guage wire coming into the box is counted as 2 cubic inches. The mounting ears on a switch is counted as 2CuIn. If you subtract the Sonoff size from the box specification (the math won't add up, find the capacity printed on the box), and you will most certainly be over capacity.

krambriw "I would recommend to use Home Assistent (HA) for all devices and let HA act as a “device service” to Node-RED (NR), connection between both via MQTT"

I tried HA a few months ago and found it too complex to use. I write the code running in all of my devices and felt that HA was too complex and too restrictive.

Maybe I would reconsider HA if you could give me some tips. (I haven't received the Z-wave switch yet).

Thanks, Steve

I agree with about the complexity, it is a nightmare (or for some, maybe an engineers best dream). As I wrote, just using it as a gateway for your devices, then it is rather simple to get up and running. But as soon as you start to create the normal necessities, it is getting very demanding. I have been programming Python since…well back in 2007 at least, and never got very happy using the script language used in HA (Jinja2). Just to mention one thing.

But for z-wave, since you are waiting for the device, you also need to order a controller, I guess you got that? I am using the Aeon Labs Z-Stick Gen 5 and an RPi3.

I’m using z-wave devices + node-red for months now. It’s not trivial to set up!

  1. you need a controller (I’m using ZME-UZB1)
  2. you should learn the z-wave protocol (at least the basic)
  3. install https://github.com/OpenZWave/node-red-contrib-openzwave
  4. you need to follow the contrib-openzwave doc and install the dependencies (open-zwave, node-openzwave-shared) first.
  5. I also installed the open-zwave-control-panel
    https://github.com/OpenZWave/open-zwave-control-panel
  6. you need some build in nodes to handle the z-wave in and out data.
  7. good luck

In other words if you only need one device, I would not use z-wave.

2 Likes

What you say worked fine for me as well using NR + supporting nodes for z-wave for non-secure devices. Problems came when adding a lock (secure device). If we are discussing just standard non-secure z-wave devices, fine. But one day, maybe not too far away, you might consider adding z-wave locks to your doors…

I’ve been using zwave with pi/node red for a year or more now. It’s great, but not without occasional issues, which are becoming less and less frequent. I have mainly lighting, but also a thermostat.

I’ve written about it here, under the node red menu at the top, it may be a little out of date now, but I’m trying to keep it current… https://thefrinkiac7.wordpress.com/node-red/

That was pretty much where I gave up on HA. (What? Yet another programming skill to learn???)
To get where my IOT is now, I've had to learn Python, sharpen my C skills. attempt to understand Java and JSON, and HA wanted to introduce yet another script language!

I am multilingual, from Assembly to Basic to Fortran to C, and EVERY language or scripting skill was said to be "the last you'll ever need to master".

Anyway, my Aeotec stick and first switch are on the way.

I am planning to replace all of my Sonoff Basic modules that are stuffed into duplex outlet boxes behind the physical switch. This would never pass a home inspection and does not work in 3-way circuits. The Zwave switches I am planning on are UL approved and will work in 3-way lighting configurations.

Ok, whatever this is similar to the discussion about the best programming language.
There are tons of pro and contra arguments. Probably the new home owner will not like Z-wave.

I use what I think is the best for me and my successor will be free to replace all devices by whatever he likes :slight_smile:

I have all the parts, a Z-Wave switch wired into a lamp for testing, the Z-Stick and I am installing HA on a Pi 3.
What’s my next step.

Thanks, Steve

Just a question Steve, what you mean by “does not work on 3-way configurations” ?

Regards

Where would you put the Sonoff Basic switch in this circuit?

Update, Home Assistant (yuck) is installed on a RPi3, Z-Stick is working and I can control the Inovelli switch from the HA console.

Now, how do I use Node Red to control the switch?

Understood, I guess you are having sonoff flashed with tasmota or ESPeasy because this is the starting point....., for this purpose is just required that one unit control the light and the other is a dummy device just to use the switch and publish the action, the message can be handled via node red or even directly from one unit to the other without the need of anything else as intermediate.

Take a look on the corresponding wiki, is very easy


https://www.letscontrolit.com/wiki/index.php/ESPEasy_Command_Reference
https://www.letscontrolit.com/wiki/index.php/Tutorial_Rules

One of the advantages is the fact that you can make 3/4/5 or whatever ways you wanted with no wires compared to an standard electrical wiring as the info is passing through MQTT/WIFI from one unit directly to the other, a big advantage if you need to add extra features but don't wanted to re-wire your home again adding new cables.

Regards

I’m not using home assistant, if you have node red which has more capabilities & features I’m not sure why u wanted home assistant for exactly…

Install mosquitto as MQTT server and start playing with node red, a wide and amazing way will appears to you :wink:

Here is 3-way switching with only one sonoff basic (with tasmota or similar) in use. https://www.youtube.com/watch?v=l-CM8JQmges