Z-Wave – A system architects view

I’ve been looking into smart home systems lately. Z-Wave seemed like a popular choice and I liked the possible scenarios you could achieve with it. So I have played around with it for a few days now, and my final verdict on it, looking through my system architect eyes is that the entire thing must been developed by hackers, at least the software stack. Let me tell you why…

To communicate between devices the protocol has something called association groups, basically a collection of commands to send. As an example a Fibaro Switch can send group 3 (dimmer commands to channel S1) to the same group on a Fibaro Dimmer and you can control the Dimmer remotely from a switch elsewhere. Because of the poor abstraction you need to use Fibaro switches and Fibaro Dimmers if you want to be sure that at the end of the day your devices can talk to each other.

Talking about abstraction, there is NONE! As a seasoned architect this comes as a chock. I mean this is a school example of how not to solve it. Why should the Switch have knowledge about how a dimmer works? A switch is just a binary state producer. Nothing more, nothing less. But here the Fibaro Switch has implemented all of the logic of a dimmer and sends dimmer commands to the dimmer instead of sending binary commands to the dimmer and let the dimmer decide what todo with the data. Anyone that have read any basic architect books knows this is bad design. What they should have done instead is to have some basic command types, like BinaryCommand, NormalizedCommand (value going from 0-1), etc. And let the dimmer decide on how to act on these.

I would have designed it like this instead, each device give the controller a settings collection telling what it can handle during the setup phase. Example for a switch with only outputs and no inputs.

{
   out: [
      {
         channel: 0,
         commands: [BinaryCommand]
      },
      {
         channel: 1,
         commands: [BinaryCommand]
      }
   ],
   in: []
}

So basically we tell the controller we can produce Binary commands on two channels. The controller can then let you connect the binary command on one channel to another devices in channels, like a dimmer.

Another funny thing is, there is no Switch without relays. So if I just want a switch that send commands to other devices that is not possible, I need to buy the bulkier and more expensive version with relays. Again, someone did not think this through enough.

Update: So I just associated a Fibaro Double Switch 2 with another Double Switch 2. Both configured for momentary switches (Param 20 = 0), I thought it would be obvious that it should  toggle its state on receiving the command. So if the receiving was turned on it would turn off or vice versa, not matter the state on the sending side. But no, the two switches need to sync. If they do not sync nothing will happen when you press the button. Crazy.

 

Advertisements

12 comments

  1. Lot of false assumptions and information here and it is plain obvious that you just scratched the surface of the topic, going into premature conclusion based on the implementation from one manufacturer only.

    First: it is common knowledge that Fibaro uses their own variation of Z-wave protocol, which work for their devices, but not necessarily is compatible with others. Using Fibaro as a sample is not very wise idea. Probably this is why you get to the other false opinion, wchich is:
    Second: no, it is not true that you have to use the same manufacturer of the devices to make them work together, regardless if through direct associations or via central controller In the second case you may look through the list of supported devices for any controller on the market to see that such assumption is false. For the first case I don’t think that it is true even for Fibaro. As I have couple of dimmers direct associated with Z-wave switches. Which guides us to the…
    Third, it is not true, that you don’t have switches without relays. You have variety of products, from Keyfobs (Fibaro, Aeon, NodOn, NeoCoolcam, POPP, etc.) through 2-4 button wall switches (Aeon, POPP, NodOn, etc.) to custom designed solutions where you may define virtually any device which has defined states as a switch – Door/Window sensors, Fibaro Universal Binary Sensor (probably one of the the smallest options), you name it.
    Fourth, it is not true that you can’t send commands to specific channels. If your device is so called multiple endpoints device, you can define which endpoint or endpoints will be controlled via specific association.

    1. Well, subpar workaround for shortcomings in the protocol/contracts doesn’t change my facts in the article. Plus any senior developer or system architect would agree with me on the abstraction part.

      This article is mainly written around the architect view on the protocol.

      Edit: I mean a switch that you can hide behind your actual switch like a Fibaro Double Switch 2, a binary sensor needs 9 to 30 volts and is not ideal.

      1. Sorry, but argumentation “through authority” (“any senior developer would agree…”) doesn’t work in my case. Any senior developer would see that Fibaro is not a good benchmark for analyzing Z-wave protocol. And any developer (even not senior one) would know, that judging based only on one sample from one manufacturer is not the best idea at the first place.

        What you are saying are not facts, but assumptions based on your experience with two devices coming from the same manufacturer.
        I have over 80 devices in total (2 installations) from 13 different suppliers: Aeotec, POPP, D-Link, Devolo, Fibaro, Qubino, NodOn, TKB, Everspring, Eurotronic, Heiman, Philio, Zipato and they work together, both via controller and direct associations (including Fibaro ones). So the conclusion that “you need to use Fibaro switches and Fibaro Dimmers f you want to be sure that at the end of the day your devices can talk to each other” is not a fact, but just your (false)assumption.

        As for the switches, I don’t see the point of installing a switch without relays behind a physical switch. As the physical switch closes the circuit, replacing it with Z-wave controlled one is a logical solution. Attaching “virtual” (without relays) switch instead of a physical one would need major changes in the current installation, like separating the circuit going to the switched device and the switch + “virtual” relay (as they need to be powered somehow). It is possible in some installations, but for many of them it would need putting additional cables in the wall. Remember that Z-wave is mainly designed for adopting already existing installations not for the building up new ones from scratch (in that case wired system is better in terms of reliability).
        But as I wrote above, if you need a switch without relays, you have variety of products available. Depending on the manufacturer, they can be adopted to match commonly used covering (for example POPP allows you to use some covers/frames from Breker or Legrand, and probably another producers. Nice thing is that you can attached these switches at any place, using just double-sided bonding tape: walls, furniture, virtually anywhere. Even at the place of your former physical switch (in such case you close the circuit behind the switch and put the relay switch at other place of the installation).
        Therefore what you are saying is partially not true (there are switches without relays, although they are designed different way than you would like) and partially doesn’t make much sense from the implementation point of view (who design a device which need major adaptation of the power installation, if a device which doesn’t need such modifications will be just couple of mm bigger and probably cost the same price? (you don’t think that the cost of relay would be higher than 1-2 bucks, do you?)

        The comment about sending commands to specific channel is also not referring to facts. As I wrote, you can define to which channel the command is send (in Vera you do it by adding the number ot the channel in the field on the right after the name of the device which you chosen to be associated. These data are then transferred tot the device, end of story.

        Maybe some of your comments are valid, but it is hard to believe in your opinion seeing that you’re not familiar with the basics.

  2. EDIT: One more thing about “a switch without relays behind physical switch”. Such solution would be in fact more expensive, as you need two separate devices (one without and one with relays) to do the job. Which would create costs of buying switch with relays AND the one without.
    So if you have room behind the switch, putting a device with relays would be more effective even if it is a bit bulkier.
    If you doesn’t, then you use a switch which you can put virtally on any (more or less) flat surface, additionally or as a replacement of your current switch, up to you.

    1. Funny thing is no one understands the reason for having switches without relays 😀 But its pretty simple. Controlling a device that you do not have a physical wiring to. And sometimes its out of just lazynezz I dont want to wire throgh 3 junction boxes to go from the switch to the light.

      Going over the controller is what I call one of those subpar solutions. For a basic thing like this. I use scenes and controller interaction for much more advanced scenarios. For example when my projector goes on the projector screen goes down, all lights that are on are saved in an array and are turned off. When the projector is turned off the the projector screen goes up again and the lights that was on are turned on again.

      But for simple stuff direct communication between two devices is much better, plus having scenes for every little thing is not practical.

      A Fibaro switch needs to implement the dimmer commands to be able to control a dimmer. There is nothing you can say that will change my view on that being a terrible design.

  3. Funny thing is that you (again) are going to false conclusions.
    It is not that no one “understand the need for having switch without relays” (I have couple of such switches), but no one understand why such switch would have to be a device which is put in the box behind existing physical switch, if you can just replace such switch with a z-wave one. Which is more versatile as it can be also attached almost anywhere.

    As for “subpar”, again, you don’t understand how it works. You set an association on the controller, it transfers such settings to the device and then devices communicate with each other directly.
    Another topic is that direct associations have very limited use, as they are merely transferring the state of the main device to another one, forcing it to respond to such state. If you want to have more complex logic (as you usually do), like different states of the controlled device depending on another conditions (i.e. turn light on set to 100% between 17:00 and 20:00 50% between 20:00 and 23:00 and 15% if after 23:00, but before 5:00) then you need a controller to evaluate these conditions and set a device properly.
    If you have only 2 devices which go in pair, then you may not need a controller at all. I know a seller who was offering a duo of door/window switch and a siren associated with each other *By the way, they weren’t coming from the same brand). The only purpose of such combo was to act as an alert system, and they worked without a controller. But if you want to have a bit more intelligent system (i.e. trigger the siren only when nobody is home), then you won’t manage that via associations.

    You may be right about a terrible design of a Fibaro switch, but I’m not really sure if it relates to any other brand using Z-wave protocol, or Z-wave alliance itself.
    As I said couple of times, Fibaro uses Z-wave protocol in a very “elastic” way, which means that they have some modifications to the general standard. This is why their devices are not necessarily compatible with other brands, and they have some issues i.e. with Vera.
    Again, using only one brand as a benchmark (especially the one which is known about not fully following the standard) is not a very good idea.

  4. I think part of your misunderstanding is that you don’t consider z-wave system as an “inteligent home system”, but merely as a wireless remote for various switches. This way sticking to associations may be a good idea, but this is not what Z-wave was designed for.

    1. The same goes for you need of a very specific switch. If you consider your home as “inteligent one” you want to have possibility of steering every device you have. In this case virtual switch (without relays) connected to a wired one doesn’t make much sense, as you want to turn the device attached to that switch ON and OFF also remotely.
      I can imagine an installation where wired switch controls one (wired) device AND is sending commands to another (wireless). But in such case you loose ability to control first one remotely, which is the opposite of the whole idea of intelligent home. Another issue is that you need more wiring behind the wired switch (installation to it AND to power the z-wave device, connection between the two of them to make the wired switch be able to steer z-wave one), which – taking into consideration additional cables and joints, makes the whole installation bulkier and more difficult to fit in the wall box. It would make sense if the switch without relays would be significantly cheaper, but if you look at the market prices, that is not the case.
      I have installation which is similar to the one you propose, but in this case part of the need was to change single switch to the double one. One is steering the original wired installation and the other one is steering remote dimmer. I used the switch from Nodon, which replaced the original one and I don’t see the point why I would insist to use the one hidden behind original switch instead.

  5. I’m from Scandinavia, we take our homes very serious. Which means I do not want to mix cheap looking Z-wave switches with my designer switches. Why not at least supply us with parameters so we could disable the relays so we dont need to hear that click when they engage.
    Yes, I know they have limited use because they are designed wrong. Read my article is my tip.

  6. Uhmm… “believe me, I’m an expert because I have two devices which I’ve bought couple of days ago and didn’t even carefully look at them (I explain this later on). Doesn’t matter that I don’t even know anything about what kind of devices are available on the market, not mentioning knowledge about how the whole system is designed and intended to work” 🙂

    I would go deeper with irony, telling that if you really take your home very serious, then you should insulate it better, then you wouldn’t hear any “click”. Which is in fact more quiet than a click of a regular switch (For touch panels you have couple of z-wave replacements to which you can attach your designer face plate without problem)

    But here also comes your lack of research and knowledge. First, popular z-wave switches and dimmers (including Fibaro ones which you have) have at least one additional input for a physical switch. Fibaro single switch and dimmer has additional one, but for example Qubino deliver additional two. If you would read the manual of the devices you have, you would know that you can program these inputs to act in a various ways – as switches, sensors, etc.
    Then won’t hear any click, as they are not switching any relay in the module.
    In fact in case of dimmer you wouldn’t hear any “click” as it doesn’t have any relay (if you did, then I would recommend control visit to a specialist). If you read the manual of your dimmer (which I doubt) then you should know that you can program it to act and behave the same way as a regular switch.
    And if you would go to Qubino webpage, then you would see, that dimmer is these couple of mm thinner than a relay switch, (not much, but you have your so desired additional 5mm space)
    And this doesn’t exploit all possibilities, as you may use some PWM devices (they also not using relays, or make some custom solution based on some sensor.

    So you ask me to listen to your “tips” and take you seriously, when the facts are that you didn’t even read manuals for devices which you have, not mentioning going to couple of manufacturers and looking at technical data for devices they offer? You really are an optimist.

    1. Its fine if you want to be happy with Z-Wave, its normal to protect beyond reason the things we have invested in. You can protect your sub-par solutions, I’m fine with that too. But what I’m not fine with is your tone, behave or be banned.

      The relay thing was also just a side note. The article is about the out right poor design decisions involving associations.

      edit: You are even pointing out the problems with the protocol yourself over at vera forum, “The problem is that TommyE has Aeotec, not Fibaro as the second device.”. 😀 haha. Talking about protcol, vera has problems adding Fibaro switches because of encrypted inclusion. In a solid protocol and standard that wouldnt happen, ever…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s