# Cannot get node-red-contrib-openzwave-am to run

**URL:** <https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246>\
**Category:** General\
**Created:** [21 November 2019 19:12 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246 "2019-11-21T19:12:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [21 November 2019 19:12 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/1 "2019-11-21T19:12:24Z")

</div>

Good evening folks,

When I try to install "node-red-contrib-openzwave-am" using the palette manager, I've the following issue:

```auto
21 Nov 19:45:00 - [info] Installing module: node-red-contrib-openzwave-am, version: 1.5.6
21 Nov 19:47:00 - [info] Installed module: node-red-contrib-openzwave-am
21 Nov 19:47:00 - [info] Added node types:
21 Nov 19:47:00 - [info] - node-red-contrib-openzwave-am:zwave-controller : TypeError: require(...).getMac is not a function (line:30)
21 Nov 19:47:00 - [info] - node-red-contrib-openzwave-am:zwave-in : TypeError: require(...).getMac is not a function (line:30)
21 Nov 19:47:00 - [info] - node-red-contrib-openzwave-am:zwave-out : TypeError: require(...).getMac is not a function (line:30)

```

I'm running the following:  
Node-RED version: v0.20.7 (installed with `npm install -g --unsafe-perm node-red`)  
Node.js version: v10.16.3  
Darwin 17.7.0 x64 LE

Same issue with  
Node-RED version: v1.0.3 (installed via `git clone https://github.com/node-red/node-red.git` method)  
Node.js version: v10.16.3

Thanks in advance for any idea that could help me solving this issue.  
Cheers,

---

<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 November 2019 20:45 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/2 "2019-11-21T20:45:36Z")

</div>

Did you try to install the zwave node from the cli?  
Ie.  
cd .node-red  
npm install node-red-contrib-openzwave-am

If so what was the output during install?

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [21 November 2019 21:00 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/3 "2019-11-21T21:00:13Z")

</div>

Yes I did. Same thing, in the end, when running node-red, I still have the same node-red output:

```auto
21 Nov 20:39:14 - [info] Waiting for missing types to be registered:
21 Nov 20:39:14 - [info] - zwave-controller
21 Nov 20:39:14 - [info] - zwave-in
21 Nov 20:39:14 - [info] - zwave-out

```

Node-RED is working, but zwave module is not working (nodes and connections are dotted red) and the Palette Manager gives the same getMac() error.

Here's the cli output:

```auto
npm install node-red-contrib-openzwave-am

> openzwave-shared@1.5.6 preinstall /Users/MyUser/.node-red/node_modules/openzwave-shared
> node lib/install-ozw.js

> openzwave-shared@1.5.6 install /Users/MyUser/.node-red/node_modules/openzwave-shared
> node-gyp rebuild

  CXX(target) Release/obj.target/openzwave_shared/src/callbacks.o
In file included from ../src/callbacks.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave.o
In file included from ../src/openzwave.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-config.o
In file included from ../src/openzwave-config.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-driver.o
In file included from ../src/openzwave-driver.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-groups.o
In file included from ../src/openzwave-groups.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-management.o
In file included from ../src/openzwave-management.cc:17:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-network.o
In file included from ../src/openzwave-network.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-nodes.o
In file included from ../src/openzwave-nodes.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-polling.o
In file included from ../src/openzwave-polling.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-scenes.o
In file included from ../src/openzwave-scenes.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/openzwave-values.o
In file included from ../src/openzwave-values.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  CXX(target) Release/obj.target/openzwave_shared/src/utils.o
In file included from ../src/utils.cc:18:
../src/openzwave.hpp:32:10: warning: non-portable path to file '"node.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Node.h"
         ^ ~~~~~~~
         "node.h"
1 warning generated.
  SOLINK_MODULE(target) Release/openzwave_shared.node
+ node-red-contrib-openzwave-am@1.5.6
added 2 packages from 28 contributors and audited 168 packages in 79.606s
found 0 vulnerabilities

```

---

<div class="post-metadata">

**Author:** ![Ema](https://avatars.discourse-cdn.com/v4/letter/e/858c86/32.png) [@Ema](https://discourse.nodered.org/u/Ema)\
**Post date:** [23 November 2019 13:51 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/4 "2019-11-23T13:51:00Z")

</div>

Continuing the discussion from [Cannot get node-red-contrib-openzwave-am to run](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246):

Same issue. Same output  
Node-Red v 1.0.3  
Nodejs v 13.2.0  
Raspberry buster

Thanks in advance:)

---

<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:** [23 November 2019 19:42 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/5 "2019-11-23T19:42:26Z")

</div>

I recently installed the node without any issue. Perhaps open an issue op github ?

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [25 November 2019 10:47 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/6 "2019-11-25T10:47:24Z")

</div>

Well, this have already been done 🙂 But it's quiet there…

> <https://github.com/appmodule/node-red-contrib-openzwave-am/issues/4>
>
> Good evening folks,
> When I try to install "node-red-contrib-openzwave-am" using the palette manager, I've the following issue. (Note the same problem exit...

---

<div class="post-metadata">

**Author:** ![pvandenbulcke](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pvandenbulcke](https://discourse.nodered.org/u/pvandenbulcke)\
**Post date:** [26 November 2019 11:00 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/7 "2019-11-26T11:00:15Z")

</div>

Hello, would it be possible to explain the steps you have done to make this working?  
Including the installation of the pre-requisites.  
I am trying to install it on raspberry PI and have the same Error ....

TypeError: require(...).getMac is not a function (line:30)  
When installing the node-red-contrib-openzwave

I am stuck... heeeelp 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 November 2019 11:12 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/8 "2019-11-26T11:12:47Z")

</div>

Post the full log you get from trying to install it from the command line, including the command itself.

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [26 November 2019 11:53 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/9 "2019-11-26T11:53:57Z")

</div>

Isn't it what I've done?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 November 2019 12:01 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/10 "2019-11-26T12:01:01Z")

</div>

I meant @pvandenbulcke but if his/hers is exactly the same then no need. I notice that there is at least one issue against the node that may be relevant, have you looked through all the issues to check that? None of them seem to be getting much attention though so there may not be much help there.

---

<div class="post-metadata">

**Author:** ![pvandenbulcke](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pvandenbulcke](https://discourse.nodered.org/u/pvandenbulcke)\
**Post date:** [26 November 2019 12:54 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/11 "2019-11-26T12:54:22Z")

</div>

@Colin

Hello, here is the installation output.  
No errors but in when I go to the node-red pallete manager i see error \* TypeError: require(...).getMac is not a function (line:30)

I also see 2 installed nodes in the pallete manager=:  
1.2.4 node-red-contrib-openzwave

- TypeError: require(...).getMac is not a function (line:30)

node-red-contrib-openzwave-am  
1.5.6

- Type already registered  
then I see an error and the nodes are not visible in the designer

Before the installation neither node-red-contrib-openzwave-am nor node-red-contrib-openzwave were installed.

This is the command I issued:

npm install node-red-contrib-openzwave-am

> openzwave-shared@1.5.6 preinstall /home/pi/.node-red/node\_modules/node-red-contrib-openzwave/node\_modules/node-red-contrib-openzwave-am/node\_modules/openzwave-shared  
> node lib/install-ozw.js

> openzwave-shared@1.5.6 install /home/pi/.node-red/node\_modules/node-red-contrib-openzwave/node\_modules/node-red-contrib-openzwave-am/node\_modules/openzwave-shared  
> node-gyp rebuild

make: Entering directory '/home/pi/.node-red/node\_modules/node-red-contrib-openzwave/node\_modules/node-red-contrib-openzwave-am/node\_modules/openzwave-shared/build'  
CXX(target) Release/obj.target/openzwave\_shared/src/callbacks.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-config.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-driver.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-groups.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-management.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-network.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-nodes.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-polling.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-scenes.o  
CXX(target) Release/obj.target/openzwave\_shared/src/openzwave-values.o  
CXX(target) Release/obj.target/openzwave\_shared/src/utils.o  
SOLINK\_MODULE(target) Release/obj.target/openzwave\_shared.node  
COPY Release/openzwave\_shared.node  
make: Leaving directory '/home/pi/.node-red/node\_modules/node-red-contrib-openzwave/node\_modules/node-red-contrib-openzwave-am/node\_modules/openzwave-shared/build'

- node-red-contrib-openzwave-am@1.5.6  
added 5 packages from 85 contributors and audited 7 packages in 184.061s  
found 0 vulnerabilities

---

<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:** [26 November 2019 13:57 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/12 "2019-11-26T13:57:00Z")

</div>

I have installed it using:  
`apt-get update && apt-get install -y libopenzwave1.5 libopenzwave1.5-dev`

followed by node-red editor \> manage palette \> install: node-red-contrib-openzwave-am  
Restarted node-red.

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [26 November 2019 14:13 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/13 "2019-11-26T14:13:12Z")

</div>

This is the second time libopenzwave1.5 is mentioned (other mention on my GitHub post linked above)  
Here was my answer there:

> I didn't found this anywhere on the documentation.  
> BTW, on the linked thread, you're saying " **Or** install it using the Node-Red Editor Palette" and this is exactly what I've done first.  
> Before, it was working. The only thing I remember having done in between, is uninstalling open-zwave from homebrew and installing it manually with git.  
> Also, libopenzwave-1.6.dylib (in /usr/local/lib/) is installed when `make install` open-zwave Git

So could it be a simple link to liboppenzwave which is missing somewhere?

---

<div class="post-metadata">

**Author:** ![pvandenbulcke](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@pvandenbulcke](https://discourse.nodered.org/u/pvandenbulcke)\
**Post date:** [26 November 2019 20:49 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/14 "2019-11-26T20:49:08Z")

</div>

I am not getting it (sorry not a unix pro)  
I messed around to much and decided to do a complete reinstall of my raspberry pi and thus upgrading completly to latest version of raspbian

i installed node, node-red and then executed  
apt-get update && apt-get install -y libopenzwave1.5 libopenzwave1.5-dev  
as mentioned above and added the node-red-contrib-openzwave-am in the palette manager.  
The difference now is in the palette manager I don't see any error (I said..Yes! problem fixed)  
but no, when I start node-red I get the following in the console  
26 Nov 21:41:01 - [info] Node-RED version: v1.0.3  
26 Nov 21:41:01 - [info] Node.js version: v12.13.1  
26 Nov 21:41:01 - [info] Linux 4.19.75-v7+ arm LE  
26 Nov 21:41:03 - [info] Loading palette nodes  
26 Nov 21:41:08 - [info] Dashboard version 2.18.0 started at /ui  
26 Nov 21:41:10 - [warn] ------------------------------------------------------  
26 Nov 21:41:1 - [warn] [node-red-contrib-openzwave-am/zwave] TypeError: require(...).getMac is not a function (line:30)  
26 Nov 21:41:10 - [warn] ------------------------------------------------------  
26 Nov 21:41:10 - [info] Settings file : /home/pi/.node-red/settings.js  
26 Nov 21:41:10 - [info] Context store : 'default' [module=memory]  
26 Nov 21:41:10 - [info] User directory : /home/pi/.node-red  
26 Nov 21:41:10 - [warn] Projects disabled : editorTheme.projects.enabled=false  
26 Nov 21:41:10 - [info] Flows file : /home/pi/.node-red/flows\_domotica.json  
26 Nov 21:41:10 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
26 Nov 21:41:10 - [warn]

back to square one

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 November 2019 21:12 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/15 "2019-11-26T21:12:23Z")

</div>

Well th epackage.json is here - [https://github.com/appmodule/node-red-contrib-openzwave-am/blob/master/package.json](https://github.com/appmodule/node-red-contrib-openzwave-am/blob/master/package.json)  
and does seem to include a package called getmac - but it's asking for version \>1 and the latest is 4. which may well have changed a lot and broken things. You may try contacting the author to see if he want to fix. Or you could try downgrading getmac to version 3 or 2 or 1 (which may be quite tricky).

Then again looking at the openzwave code it's asking for .getMac whereas the v4 code seems to expose .getMAC instead - so maybe try editing the 10-zwave.js code to that first.

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [26 November 2019 21:23 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/16 "2019-11-26T21:23:15Z")

</div>

Check out my issue on GitHub (linked above).  
The problem will be soon take car off apparently!

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 November 2019 21:27 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/17 "2019-11-26T21:27:55Z")

</div>

meanwhile you can replace line 30 -34 with

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

```

---

<div class="post-metadata">

**Author:** ![Tazintosh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tazintosh/32/11911_2.png) [@Tazintosh](https://discourse.nodered.org/u/Tazintosh)\
**Post date:** [27 November 2019 18:36 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/18 "2019-11-27T18:36:42Z")

</div>

> [@dceejay](#):
>
> var gm = require('getMac') UUIDPREFIX = gm.default().replace(/:/gi, '')

Did worked, thank you!

---

<div class="post-metadata">

**Author:** ![PaulM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paulm/32/14213_2.png) [@PaulM](https://discourse.nodered.org/u/PaulM)\
**Post date:** [10 January 2020 13:00 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/19 "2020-01-10T13:00:20Z")

</div>

> [@Tazintosh](#):
>
> var gm = require('getMac') UUIDPREFIX = gm.default().replace(/:/gi, '')

It should be this instead ('getmac' all in lower case):  
var gm = require('getmac') UUIDPREFIX = gm.default().replace(/:/gi, '')

---

<div class="post-metadata">

**Author:** ![PaulM](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paulm/32/14213_2.png) [@PaulM](https://discourse.nodered.org/u/PaulM)\
**Post date:** [10 January 2020 13:22 UTC](https://discourse.nodered.org/t/cannot-get-node-red-contrib-openzwave-am-to-run/18246/20 "2020-01-10T13:22:14Z")

</div>

> [@PaulM](#):
>
> var gm = require('getmac') UUIDPREFIX = gm.default().replace(/:/gi, '')

Sorry, it should be (add comma's):  
var gm = require('getmac'); UUIDPREFIX = gm.default().replace(/:/gi, '');
