# Node-red and z-wave for dummies

**URL:** <https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418>\
**Category:** General\
**Created:** [21 March 2020 15:26 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418 "2020-03-21T15:26:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 15:26 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/1 "2020-03-21T15:26:18Z")

</div>

Hi,

thanks to Covid-19 (I'm a positive guy ;)), I have time to create my home assistant from scratch.

Therefor, I baught some Rapsberrys PI4 4GO.

1. For MQTT  
**node-red**  
Rfxcom  
z-wave Aeotec Gen5
2. For Home Assistant  
older z-wave controller
3. For Jeedom
4. for testing purposes

All are using latest Raspbian OS.

I want to configure my node-red to control Fibaro devices (FGMS-001 and wall plugins)

I installed the node-red version 1.4, using the documentation of node-red.  
(thus, not by using apt-get install nodered)

Node-red is working.

Now I try to add the palette _ **node-red-contrib-openzwave** _ and the nightmare starts.

I have the famous error : `require(...).getMac is not a function (line:30)`

I applied the correction :

`var gm = require('getMac');  
UUIDPREFIX = gm.default().replace(/:/gi, '');

/\*  
require('getmac').getMac(function(err, macAddress) {  
if (err) throw err;  
UUIDPREFIX = macAddress.replace(/:/gi, '');  
});  
\*/  
`

restarted node-red

Now I have this error :

> * * *
> 
> 21 Mar 15:23:47 - [info] Waiting for missing types to be registered:  
> 21 Mar 15:23:47 - [info] - zwave-controller  
> 21 Mar 15:23:47 - [info] - zwave-in  
> 21 Mar 15:23:47 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)

I already re-install everything from scratch 3 times.

Can you help me with an **easy undestandable cookbook** to get it working ?

With an example of z-wave-in node definition, ...

Thanks in advance.

Kind regards,  
Dom

---

<div class="post-metadata">

**Author:** ![rgerrans](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@rgerrans](https://discourse.nodered.org/u/rgerrans)\
**Post date:** [21 March 2020 16:00 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/2 "2020-03-21T16:00:49Z")

</div>

I know this may be stating the obvious but did you install open--zwave (the standalone libraries, not the Node-Red plugin)

On a side note, I never had good luck with Open-zwave and went with OpenHab using MQTT. If you already have HA working with your Zwave devices, I'd suggest that route.

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 16:17 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/3 "2020-03-21T16:17:39Z")

</div>

Hi,  
thanks for your reply.

Do i have therefor to run

```auto
sudo apt-get instal open--zwave 

```

With 2 dashes ?

I didn't ☹

Btw, I'm looking for the most reliable solution as frontend.  
Some are saying HA is better, more easy, ... (I'm not convinced but want to try).  
Jeedom is nice, but I hate to buy plugins before having test them.

I can have a look to OpenHab also 🙂

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 16:34 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/4 "2020-03-21T16:34:29Z")

</div>

follow these steps:  
`node-red stop`  
`node-red --safe`

remove the zwave nodes from your flow, deploy

Install:

in node-red editor: hamburger menu \> manage palette \> install tab \> search:  
`node-red-contrib-openzwave-am`

Install  
Once installed, restart node-red, it will be working.

@rgerrans the openzwave node does not work, op should use the -am version instead.

---

<div class="post-metadata">

**Author:** ![rgerrans](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@rgerrans](https://discourse.nodered.org/u/rgerrans)\
**Post date:** [21 March 2020 16:37 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/5 "2020-03-21T16:37:30Z")

</div>

> [@Dom](#):
>
> Do i have therefor to run
> 
> ```auto
> sudo apt-get instal open--zwave 
> 
> ```
> 
> With 2 dashes ?

That doesn't look right. It's openzwave as far as I remember. It's been a couple of years since I played with it and I may have just installed the tar files. Here's one set of instructions - [node-openzwave-shared/README-raspbian.md at master · OpenZWave/node-openzwave-shared · GitHub](https://github.com/OpenZWave/node-openzwave-shared/blob/master/README-raspbian.md)

> [@Dom](#):
>
> Btw, I'm looking for the most reliable solution as frontend.  
> Some are saying HA is better, more easy, ...

I've never played with HA. If I remember right I think it uses the OpenZwave libraries and they didn't support my dimmers very well. I've actually been jumping back and forth between OpenHab (which has pretty robust device support except for a scene controller I use) and HomeSeer (on a pi) from a commercial point of view (though I have some issues with commands not going through but I suspect it's the old MQTT plugin and I haven't had time to finish configuring the newer plugin. Plus they are about to release a new version so may wait to test it).

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 16:52 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/6 "2020-03-21T16:52:55Z")

</div>

Thanks.

I deleted the nodes, ...  
but the palette is still "in use", which means, I can not install the the other palette ☹

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 16:55 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/7 "2020-03-21T16:55:10Z")

</div>

You also have to delete the config node.

right top: configuration nodes, there you will find it.

![Screenshot 2020-03-21 at 17.54.27](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/06ff0ca4a7e6b477a67efa721d765d4365cb5737.jpeg)

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 16:55 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/8 "2020-03-21T16:55:22Z")

</div>

🙂  
I never heard about HomeSeer.

I think node-red is perfect for all the automation, just need a "sexy" interface or front-end.

At least, if I can make this zwave controller working.

After that, I'll have to control AWOX lighting, Heatzy thermostat controllers, ... 🙂

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 16:56 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/9 "2020-03-21T16:56:33Z")

</div>

I already did it.

Maybe a ... reboot ?

I start it right now 🙂

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 16:58 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/10 "2020-03-21T16:58:40Z")

</div>

You should not need to reboot.

You can do a ctrl+f/cmd+f to find it, search for `open`

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 17:01 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/11 "2020-03-21T17:01:44Z")

</div>

As my node-red environment is empty, I can delete everything, but ... how to do that ?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 17:03 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/12 "2020-03-21T17:03:23Z")

</div>

What do you mean exactly ? You can double click on a tab and click delete, deploy.

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 17:07 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/13 "2020-03-21T17:07:28Z")

</div>

Sorry.

After the reboot, I have the possibility to remove the palette 🙂

Now, I just install the _ **node-red-contrib-openzwave-am** _

It worked.  
I get the new nodes : **zwave-in** and **zwave-out**

The magic question : how to configure my first device ?

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 17:10 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/14 "2020-03-21T17:10:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/f/7f580cfb3ea4a49d792a2fafb42dcc4132540a82.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 17:17 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/15 "2020-03-21T17:17:02Z")

</div>

As the "Node Help" text describes: the zwave-in node fires events when zwave values are changed.

To change the values, you need to use the zwave-out node and you need some information for them.  
In your `.node-red` directory, a file was created called something like `ozwcache_xxx.xml`

First check if you see your devices in that file.  
eg:

```auto
cd ~/.node-red
more ozwcache_xxx.xml

```

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 17:19 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/16 "2020-03-21T17:19:09Z")

</div>

The file does not exist.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9b58ff347f2a860ca247bc0d6b9a74f9f17dcbf8.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 17:19 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/17 "2020-03-21T17:19:32Z")

</div>

You need to deploy first with your controller configured and maybe even restart node-red, i dont exactly remember.

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 17:21 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/18 "2020-03-21T17:21:32Z")

</div>

You are a master of Zwave 🙂

I'm at a point never reached before.

I just still need to understand how to add a device

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/c/dce629497f15af4562170d76d3e824a3a59ccd88.png)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [21 March 2020 17:23 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/19 "2020-03-21T17:23:13Z")

</div>

that is not the .xml file but the logfile.

and i am def not a master of zwave i had the same issues as you, but have been using this node for over a year and it has worked flawlessly for me

---

<div class="post-metadata">

**Author:** ![Dom](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Dom](https://discourse.nodered.org/u/Dom)\
**Post date:** [21 March 2020 17:24 UTC](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418/20 "2020-03-21T17:24:44Z")

</div>

There is no xml file generated 😢

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14956a4ec28f100a2faf3cc766a3c0dccfb4acb4.png)

I have reached my limit of 22 posts 😢  
This is the device for my RFXCOM

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bbbf73c8d3ea3b363d1a320bcac4f702403d9e3a.png)

Thanks, but I have to wait until tomorrow, to be sure I'm not a spammer (I can understand)

Replacing ttyUSB0 by **ttyAMA0** created the XML file.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c8d6e61ec358ae32da32ed1579aff231bb91db7b.png)

Now I have this kind of error.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/1/1179fede00170e82d6b8e49409b5955311254d1e.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74cfe708044375b9006a26dd4da80c74f5a6dc49.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/34dbc094aab38cff29a5effc6fe08dab1ede1e69.png)

the logfile :

```auto
> pi@raspberrypi:~/.node-red $ cat OZW_Log.txt
> 2020-03-21 17:19:57.896 Always, OpenZwave Version 1.5.0 Starting Up
> 2020-03-21 17:19:57.896 Warning, Failed - Network Key Not Set
> 2020-03-21 17:19:58.903 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
> 2020-03-21 17:19:59.904 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
> 2020-03-21 17:20:00.904 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
> 2020-03-21 17:20:01.905 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
> 2020-03-21 17:20:02.906 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
> 2020-03-21 17:50:58.198 Error, mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown
> 2020-03-21 17:50:58.199 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
> 2020-03-21 17:53:42.846 Error, mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown
> 2020-03-21 17:53:42.846 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
> 2020-03-21 18:03:29.451 Error, mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown
> 2020-03-21 18:03:29.452 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
> 2020-03-21 18:04:15.865 Error, mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown
> 2020-03-21 18:04:15.867 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
> 2020-03-21 18:09:44.572 Error, mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown
> 2020-03-21 18:09:44.572 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver

```

@backman2 (thanks for helpinng me so far 🙂 )  
I have 2 USB devices :

- RFXcom connected directly

```auto
pi@raspberrypi:/dev/serial/by-id $ ls -l
total 0
lrwxrwxrwx 1 root root 13 Mar 22 08:17 usb-RFXCOM_RFXtrx433XL_DO3M76A6-if00-port0 -> ../../ttyUSB0
pi@raspberrypi:/dev/serial/by-id $

```

- the AEOTEC Z-Wave plus GEN 5, connected via USB 2.0 hub  
It seems USB standard of Raspberry 4 is not compatible with that stick, and we need to use a HUB 2.0

```auto
pi@raspberrypi:/dev/serial/by-id $ dmesg | grep tty
[0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M smsc95xx.macaddr=DC:A6:32:53:E9:EB vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=97709164-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[0.000263] console [tty1] enabled
[0.423907] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 34, base_baud = 0) is a PL011 rev2
[4.028888] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
pi@raspberrypi:/dev/serial/by-id $

```

_ **I have to wait about 6 loooong hours before being able to add a post** _

[Next page](https://discourse.nodered.org/t/node-red-and-z-wave-for-dummies/23418.md?page=2)
