SIEMENS IOT 2000 - Node - Red ("simatic_iot2000", node)

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?

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

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

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

I can only repeat my previous reply:

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. (it requires an account). Many nodes are pre-installed on the image file, included the one you are missing :slightly_smiling_face:
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
image

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

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šŸ‘‡

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

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

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

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

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

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.

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);
}

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.

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