# SIEMENS IOT 2000 - Node - Red ("simatic\_iot2000", node)

**URL:** https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550
**Category:** Industrial
**Created:** [4 October 2022 12:57 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550 "2022-10-04T12:57:15Z")
**Posts on this page:** 10
**Page:** 3

<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: [10 October 2022 14:16 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/42 "2022-10-10T14:16:32Z")

</div>

> [@ManuGW](#):
>
> `EAI_AGAIN`

Did you google for EIA\_AGAIN to see what it means. It means you have a DNS or internet connectivity issue of some sort. Does the device have access to the internet?

---

<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: [10 October 2022 14:18 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/43 "2022-10-10T14:18:31Z")

</div>

Sorry, I should have said go into /home/root/nodos/node-red-contrib-... and run `npm install`

---

<div class="post-metadata">

### Author: ![ManuGW](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manugw/32/68640_2.png) [@ManuGW](https://discourse.nodered.org/u/ManuGW)
#### Post date: [11 October 2022 09:02 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/44 "2022-10-11T09:02:22Z")

</div>

I did it like you say but it saws me an error too:

```auto
root@iot2000:~/nodos/node-red-contrib-iot2000-gpio# npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
up to date in 25.12s
root@iot2000:~/nodos/node-red-contrib-iot2000-gpio# cd ..
root@iot2000:~/nodos# cd ..
root@iot2000:~# cd .node-red/
root@iot2000:~/.node-red# npm install /home/root/nodos/node-red-contrib-iot2000-gpio
node: WARN: Check failed in ../deps/v8/src/deoptimizer.cc:1981 - ignoringalTree
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/bindings failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/@serialport%2fbinding-abstract failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:443

npm ERR! A complete log of this run can be found in:
npm ERR! /home/root/.npm/_logs/2022-10-11T08_40_57_861Z-debug.log
root@iot2000:~/.node-red# ^C

```

---

<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: [11 October 2022 09:14 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/45 "2022-10-11T09:14:36Z")

</div>

I can only repeat my previous reply:

> [@Colin](#):
>
> Did you google for EIA\_AGAIN to see what it means? It means you have a DNS or internet connectivity issue of some sort. Does the device have access to the internet?

---

<div class="post-metadata">

### Author: ![yoba](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yoba](https://discourse.nodered.org/u/yoba)
#### Post date: [12 October 2022 09:09 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/46 "2022-10-12T09:09:48Z")

</div>

Hi ManuGW,

I'm not sure what you are trying to achieve here, but SIMATIC IOT2040 is still available on the market (at a bargain price). Basically it is an arduino shield and Siemens developped its own firmware to work on it. You can download it [here](https://support.industry.siemens.com/cs/no/en/view/109741799). (it requires an account). Many nodes are pre-installed on the image file, included the one you are missing 🙂  
But the missing nodes you are trying to install onto NodeRED running on your PC are useless, because these nodes are used to read embedded IO, so called gpio (see picture below with green screw terminals). You can find datasheet [here](https://mall.industry.siemens.com/mall/en/Catalog/Product/6ES7647-0KA01-0AA2)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/4/64e912445e3522acd8f7050f67f2ef1062409c5e.png)

So if you need to run the flow on another platform, for instance Rasperry Pi, just find the corresponding node for reading IO on your new hardware.

Regards,

Yo

---

<div class="post-metadata">

### Author: ![ManuGW](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manugw/32/68640_2.png) [@ManuGW](https://discourse.nodered.org/u/ManuGW)
#### Post date: [17 October 2022 06:38 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/47 "2022-10-17T06:38:35Z")

</div>

Hi Yoba!

Thank you for your help and advices. What i was trying it was to install and configurate the nodes in a SIMATIC IOT2000 with an image V2.6. This one right here👇

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/6/16329f5a5a5ab7bd7d4004e9532d679575d3a41a.jpeg)

The principal error, was that the node that i was trying to install, it was made for a V2.4 image and it was getting an error that it isn't deploy it, like the node appears in the manage palette but i couldn't use it.  
The node is `node-red-contrib-iot2000-gpio`.

I solve it **(partly)**, i solved it installing in the SD card of the device a V2.4 image and installing the nodes globally in this one. This is inside `/usr/lib/node_modules`. I made a `node_modules` folder inside the folder of the node `/usr/lib/node_modules/node-red-contrib-iot2000-gpio/node_modules` and copy pasting the `mraa.node` file that it's inside the folder `/usr/lib/node_modules/mraa`.

I know that the next time i need to use other hardware, i principally need to use a hardware that it's new. But this task it wasn't mine and i have to do it because an ex coworker didn't do it in time. So when i was trying to do it working against timebecause this friday it's the last day, i found the problem to learn about node-red and the outdated hardware, also the connection with a sql database and the software that i made for this task.

Best regards,

Manu

---

<div class="post-metadata">

### Author: ![ManuGW](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manugw/32/68640_2.png) [@ManuGW](https://discourse.nodered.org/u/ManuGW)
#### Post date: [17 October 2022 06:56 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/48 "2022-10-17T06:56:50Z")

</div>

Hi again Colin!

The last thing that we were talking about it was that my new IOT2000 (the one with a V2.6 image) it was without the folder npm ( i deleted it unintentionally ) and that didn't let me to use the npm command and also the IOT it was without internet.

The principal error, was that the node that i was trying to install, it was made for a V2.4 image and it was getting an error that it isn't deploy it, like the node appears in the manage palette but i couldn't use it.  
The node is `node-red-contrib-iot2000-gpio`.

I solve it **(partly)**, i solved it installing in the SD card of the device a V2.4 image and installing the nodes globally in this one. This is inside `/usr/lib/node_modules`. I made a `node_modules` folder inside the folder of the node `/usr/lib/node_modules/node-red-contrib-iot2000-gpio/node_modules` and copy pasting the `mraa.node` file that it's inside the folder `/usr/lib/node_modules/mraa`.

Now the problem that i have is it worked all the configuration and installation but the sensor doesn't read me the inputs. I don't know why. I try to use the script `read-di-test.js` but it don't read it.  
**Link of the info:** [https://support.industry.siemens.com/forum/WW/en/posts/iot2000-input-output-module-problem-with-di1-di3-di4-on-node-red/203139/?page=0&pageSize=10](https://support.industry.siemens.com/forum/WW/en/posts/iot2000-input-output-module-problem-with-di1-di3-di4-on-node-red/203139/?page=0&pageSize=10)

I can connect node-red with my database in phpymyadmin but **i don't see a "1" in the logs (here is a image)**

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/9/d94680d70b8e8aeb4f035b864f230b402a8985c1.jpeg)

**It's like the node don't read nothing. Maybe i have something wrong in the installation or configuration? I'm going to try with other motion sensor, I can send you whatever you need**

Best regards,

Manu

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [19 October 2022 10:52 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/49 "2022-10-19T10:52:19Z")

</div>

Hi,

I don't use Siemens, but I was intrigued by this case of IP censorship. I found a link that may help. It _looks_ like someone has written their own routines, but I was hampered by a quirk of the web pages that prevent vertical scrolling!

[Here](https://support.industry.siemens.com/forum/WW/en/posts/node-red-contrib-iot2000-are-no-longer-in-the-node-red-palette-why/210559) Someone asks:

> The nodes for IOT2000 - node-red-contrib-iot2000 - are no longer in the Node-Red palette. Why?  
> Do I have to use other nodes for IOT2000 IO modules?

A reply points to the sixth post [here](https://support.industry.siemens.com/forum/WW/en/posts/iot2000-input-output-module-problem-with-di1-di3-di4-on-node-red/203139/?page=0&pageSize=10)

Because I couldn't scroll, I used _inspect_ in the browser to find the actual code.

If it's any use, I append it below.

Don't ask me anything about it - it's just my potential good deed for the day!

Other people, e.g. @Steve-Mcl will probably know what to do with it!

B.

```auto
var sys = require('util')
var exec = require('child_process').exec;

module.exports = function(RED)
{
var mraa = require('mraa');
/ **************************************************** /
/* New functions */
/ **************************************************** /
function newSetInterval(func, interval)
{
newSetInterval.Ids = newSetInterval.Ids || {};
newSetInterval.IdCount = newSetInterval.IdCount || 0;
var That = this;
var Id = newSetInterval.IdCount++;
var FFBug = arguments.length - 2;//To prevent Firefox bug that adds an extra element to the arguments
(
function Fn()
{
var args = [].slice.call(arguments, 0, FFBug);//To prevent Firefox bug that adds an extra element to the arguments
func.apply(this, args);
newSetInterval.Ids[Id] = setTimeout.apply(this, [Fn, interval].concat(args));
}
).apply(That, [].slice.call(arguments, 2, arguments.length));
return Id;
}
function clearInterval(Id)
{
if(!newSetInterval.Ids || !newSetInterval.Ids[Id])
{
return false;
}
clearTimeout(newSetInterval.Ids[Id]);
return true;
}
/ **************************************************** /
exec("echo 63 > /sys/class/gpio/export");
function gpioDin(n) {
RED.nodes.createNode(this,n);
var node = this;
node.pin = n.pin;
node.updateInterval = n.updateInterval;
node.mGpio = new mraa.Gpio(parseInt(node.pin));
node.mGpio.mode(mraa.PIN_GPIO);
node.mGpio.dir(mraa.DIR_IN);
var lastPinState = 0;
var currentPinState = node.mGpio.read();
var timerId = newSetInterval(function()
{
if(node.pin != "ub")
{
currentPinState = node.mGpio.read();
}
else
{
exec("cat /sys/class/gpio/gpio63/value", function(error, stdout, stderr) {
currentPinState = parseInt(stdout)});
}
if(currentPinState === 0 || currentPinState === 1)
{
if (currentPinState != lastPinState)
{
if(currentPinState === 0)
node.status({fill:"grey",shape:"ring",text:"Low"});
else if(currentPinState === 1)
node.status({fill:"grey",shape:"dot",text:"High"});
var msg = { payload:currentPinState, topic:"D"+node.pin };
node.send(msg);
}
lastPinState = currentPinState;
}
},parseInt(node.updateInterval));
this.on('close', function() {
clearInterval(timerId);
});
}
RED.nodes.registerType("IoT2000-gpio-din", gpioDin);
}

```

---

<div class="post-metadata">

### Author: ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)
#### Post date: [19 October 2022 10:58 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/50 "2022-10-19T10:58:10Z")

</div>

Update - the website wasn't scrolling because an extension hid that blasted cookie request! I now see that the sixth post has a zip file attachment and a lot more detail.

B.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [18 December 2022 10:59 UTC](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550/51 "2022-12-18T10:59:07Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/siemens-iot-2000-node-red-simatic-iot2000-node/68550.md?page=2)
