Node-red and z-wave for dummies

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/

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

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.

Hi,
thanks for your reply.

Do i have therefor to run

sudo apt-get instal open--zwave 

With 2 dashes ?

I didn't :frowning:

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 :slight_smile:

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.

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

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).

Thanks.

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

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

:slight_smile:
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, ... :slight_smile:

I already did it.

Maybe a ... reboot ?

I start it right now :slight_smile:

You should not need to reboot.

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

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

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

Sorry.

After the reboot, I have the possibility to remove the palette :slight_smile:

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 ?

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:

cd ~/.node-red
more ozwcache_xxx.xml

The file does not exist.

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

You are a master of Zwave :slight_smile:

I'm at a point never reached before.

I just still need to understand how to add a device

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

There is no xml file generated :cry:

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

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.

Now I have this kind of error.

image

the logfile :

> 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 :slight_smile: )
I have 2 USB devices :

  • RFXcom connected directly
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
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