Quick question about Global Cache (IP2IR, iTach)

node-red-contrib-globalcache works great when I specify the Output number in the -out node config like this:

And I use a function node to set the message:

msg.payload = '0000 006d 0025 ... '
msg.format = 'hex'

How can I also set the Output number in my function node?

An answer will end a years-long quest for my iTach!

Cheers, Richard

That node has not been updated for 6 years, so it is surprising that it still works with current node.js versions.

I have no idea what it actuall does, but the node docs say:

If one specify three parameters: unit_number, output and command, than all incoming string commands will be transformed into GlobalCache packet: [command],[unit_number]:[output],[command]

So I guess that means you have to specify msg.unit_number, msg.output and msg.command.


Thanks. That didn't work, but I can work around it. My bigger concern is your comment about how old this is. I really hope it continues to work because it's now an indispensable part of my home automation system.

What version of node.js are you using. Use
node -v
to find out.

I'm using Node Red and just upgraded to v3.0.0

I'm not aware of a command line in Node Red

The node -v command is nothing directly to do with node red. Run it in a terminal to find what version of nodejs is installed in your system.

As of node-red version 3 you can get most detail about your system by using the "system info" command in the action list.

  • Press Ctrl Shift P (or right click on white space, click top option)
  • Type the word system
  • Click the item system info
1 Like

True, I had forgotten about that, Though actually I think it is easier to type node -v

1 Like

I agree, for many folks it is, however, if that leads to "what OS are you running node-red on" or "what is the node-red servers locale & timeZone set to" or "what nodes do you have installed" etc, I think this could be a good first question to avoid all that to & fro.

Thanks for the info @Steve-Mcl

I hate to seem dense, but where would I type this?

For anyone wondering about the original question, I have found a great alternative to node-red-contrib-globalcache.

I'm currently using a tcp request node and it seems far more robust. The only catch is I need to use non-hex codes but it's no problem to get those. Let me know if anyone wants to see an example of how to do this.

It seems @Steve-Mcl is correct, assuming you are using node-red v3 then follow his advice to find the nodejs version.

If you are not using v3, and you don't know how to open a terminal on your system, you will have to tell us what OS you are using. Or perhaps google for how to open a terminal on your OS.

I can open a terminal, although I've never needed to for Node Red before. Thanks.

My node.js version is v16.16.0

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.