Тёмный

Open Source SCADA: Node-RED, OPC UA & MySQL on Raspberry Pi 

Kurt Braun
Подписаться 16 тыс.
Просмотров 172 тыс.
50% 1

Tutorial showing how to use Node RED OPC UA Client to collect and log data into a MySQL historian.
750-8100 PFC100 Ethernet PLC
750-461 RTD Module 2ch AI
750-600 End Module
787-1602 24VDC 1A Power Supply
2002-1401 Series 2002 Terminal Blocks
8002-025-000-007 WAGO USB Charging Station
Linux Commands:
cd .node-red
npm install node-red-node-mysql
npm install -g node-red-contrib-opcua
Raspberry Pi DIN Rail Mount:
www.dinrplate.com/

Наука

Опубликовано:

 

5 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 89   
@benjaminberger9629
@benjaminberger9629 2 года назад
Thanks! Really wish every tutorial would be like that, fast, straight to the point, easy to understand
@empty0303
@empty0303 6 лет назад
Thanks... I modified the code from yours for my Modbus TCP to MySql, it works !
@jordanbauduin7911
@jordanbauduin7911 5 лет назад
Hi Kurt , congratulations ! very nice dev. on Node Red , I was just starting with it and searched some demo , yours is just perfect ! thx for sharing
@julienr30
@julienr30 5 лет назад
Hello, If you have an EACCESS Error when setup OPCUA, try to use : sudo npm install node-red-contrib-opcua --unsafe-perm=true --allow-root It works for me ;) PS: Many thanks for the video !
@FLIPSSkateboard
@FLIPSSkateboard 4 года назад
Tks !!!
@hoangphucluu7906
@hoangphucluu7906 2 года назад
so touching for an excellent video
@maztaly3539
@maztaly3539 7 лет назад
I have a question that I can't find answer to. Can you use Node-Red to combine (custome) nodes so that its output could be generated code file(s) in python or C++ or in my case (Structured text) or whatever else? For instance, with UML tools you can create/design a visual software architechture in diagrams and arrowed connections representing dependencies. Thus you can use that UML design to convert or generate the initial architectural code, then you can start populating that architechture with needed logic. Vise versa you can write your software in code, then use eclipse for instance, to generate a UML Diagram to get a visual representation of your architechtural design of that written code.
@markcjohnsen
@markcjohnsen 7 лет назад
Great video - thanks!
@jkb561
@jkb561 7 лет назад
Thank you! This is what i've been looking for some time. I think i'll use same devices set for my newly build smart home. Looking for more node red and other open solutions.
@394ub
@394ub 3 года назад
Great video.
@TheGoodSon89
@TheGoodSon89 2 года назад
Hi Kurt, I always find your videos extremely helpful! Would you please make a video showing how to use node-red and Rpi as an OPC server and how to read the variables from a client on a desktop for example? Thanks in advance!
@dhiaaeddinanabtawi784
@dhiaaeddinanabtawi784 6 лет назад
How to get the path for the global variables stored in the OPC UA server? I am using an Omron PLC as a server and I want to make a connection with OPC UA client in Node-RED. Thanks in advance
@giovanisoriahernandez7845
@giovanisoriahernandez7845 2 года назад
Nice work! Could you tell me which devices did you use at project? Besides the Raspberry Pi
@marouanesalhaoui7144
@marouanesalhaoui7144 6 лет назад
please from where you bring the words writen in the topic of the inject Node ?
@mataxarh4018
@mataxarh4018 7 лет назад
hello! I’m a beginner in programming so please excuse me for my ignorance:i need your precious help on a project. I have a beaglobone black which is supposed to get measurments from an amplifier and then save them in a new matrix( 2 columns of frequency f and time t ).I need the measurments imported into node red and then shown on a chart of frequency and time axes.could you help me? thanx a lot!
@ykihipp
@ykihipp 6 лет назад
Thanks a lot Kurt, alltoufht it dont work exactly like you told with actuel version of node-red. But after bit adjustments like a butter! I calculate this, a first really open source opc_ua_to_mysql woking project! Heil Kurt! and again many thanks!
@gordonghaney4770
@gordonghaney4770 3 года назад
Anyone know of any tutorials where the actions the tutor is completing are explained and not zipped through at lightning fast speeds? This is incredibly difficult to follow with no background on the template, how the OPC drill works, and how to even get there properly.
@thangphamduc3325
@thangphamduc3325 7 лет назад
great ! S7-1200 can do this?
@qzorn4440
@qzorn4440 5 лет назад
Hi Kurt, How can a Koyo C-more Automation Direct Touch-screen control a Raspberry Pi3 using the Ethernet port? Thank you and Great videos!
@kosturko2
@kosturko2 6 лет назад
Hey guys, just a quick question. Is it posible to create app in node red and than somhow implement it in my own website?
@jeffreyschroeder4825
@jeffreyschroeder4825 6 лет назад
For those who are looking for the template node, you will need to have the "node-red-dashboard" palette installed.
@fuglytwatapuss
@fuglytwatapuss 5 лет назад
Thanks man, that one got me. More than one object same name, different group.
@adaptine
@adaptine 7 лет назад
I love Node RED. Haven't tried it yet but it looks quite pretty and simple to set up an interface. Is it possible to do such projects with Wago 750-881 or rather projects like your previous Node RED video?
@WagoKurt
@WagoKurt 7 лет назад
Yes, the 750 PFC & couplers are very easy to communicate with rPi & Node RED using modbusTCP if you don't want to use OPC.
@felixcamferti9601
@felixcamferti9601 4 года назад
hello Kurt has a tutorial for this? communicate with rPi & Node RED using modbusTCP
@markopopoland
@markopopoland 6 лет назад
Can i access to real time trends by red node via opc ua ?
@mohamadhasnulaiditahmadkha2345
@mohamadhasnulaiditahmadkha2345 4 года назад
for those who need code insde template, here it is: -- Objects Root -- Press to Update: Browse {{items.item.displayName.text}}: {{items.item.nodeId}}
@leonardab5042
@leonardab5042 Год назад
is OPC server available in all Wago's controller, or just a certain models? Is a license needed?
@dtec30
@dtec30 6 лет назад
how secure is the open source scada ? as i have heard that scada was hacked
@enriquealonso6316
@enriquealonso6316 3 года назад
Hello, Do u have the networking diagram fo the proyect, I would like to use as an example on a factory facilities.
@TinkatheRainbowFox
@TinkatheRainbowFox 7 лет назад
750-8100 seems to be a new model since my WAGO supplier doesn't even list it. What are the other modules on the DIN-rail?
@WagoKurt
@WagoKurt 7 лет назад
Thanks for asking, I posted the parts list in the description. The PFC100 is a new model in three configuratons; 750-8100, 750-8101 & 750-8102. Here is a brochure: www.wago.com/infomaterial/pdf/60277522.pdf
@petsatcom
@petsatcom 7 лет назад
Fantastic
@binmulyadin883
@binmulyadin883 4 года назад
awesome!
@hahaha6164
@hahaha6164 6 лет назад
awesome. May you show us the sensor list of your example? thxs
@albertocelano5402
@albertocelano5402 3 года назад
It seem very cool, could you share the flow ? I would check it with Kepware as OPC UA
@MrThilominator
@MrThilominator Год назад
Cool, it's may a cheap alternative for Peakboard :)
@chrisegge7702
@chrisegge7702 6 лет назад
Does this opc-ua configuration work with allen Bradley controllogix?
@hapticmusing
@hapticmusing 3 года назад
No
@JuanVasquez-fl3lf
@JuanVasquez-fl3lf 7 лет назад
Hello, I would like to know how to read the data which is in a mysql database, I am sending my data to a database and i set in node red mysql nodo is responding but after that how can I see the data stored? do I need any function after the node ?
@WagoKurt
@WagoKurt 7 лет назад
Hello Juan, One way, is you can add an ui template node with embedded php & js which queries the db and puts it in a table. If you want to graph this data, check out jQuery. Maybe I will do a video on this at some point, it's a common question.
@JuanVasquez-fl3lf
@JuanVasquez-fl3lf 7 лет назад
many thanks Kurt, I will try. great videos you have, I will try with OPC server too. Regards
@dhananjayjadhav7980
@dhananjayjadhav7980 7 лет назад
Hello Kurt, I have done the OPC UA communication with the help of node red. But in your video you have show how to use OPC UA browser along with template to brows items from OPC UA server.Can you provide the template code for the same?
@fredsharifi7587
@fredsharifi7587 5 лет назад
Hello Kurt, I'm also looking for the same, I like your video, I do suggest to add a link to your code that you used to setup your flow.
@steveb2465
@steveb2465 7 лет назад
What ui library are you using? node-red-contrib-ui doesn't seem to have all the options for gauges and charts that yours is showing.
@WagoKurt
@WagoKurt 7 лет назад
node-red-dashboard
@felixcamferti9601
@felixcamferti9601 7 лет назад
add "npm install node-red-dashboard " to linux command
@madhu-vo7js
@madhu-vo7js 7 лет назад
Hi, you have separate IP address for raspberry pi and OPC UA server, how is it possible? Does OPC UA server is not installed on the raspberry PI along with node red?
@WagoKurt
@WagoKurt 7 лет назад
The OPC Server is actually on the WAGO PLC. This eliminates running an IO server like in the old days.
@AnaninkiSan
@AnaninkiSan 2 года назад
Great!
@technic6455
@technic6455 6 лет назад
can you please explain me why you wrote 99 in timestamp and send it to insert statement function?
@WagoKurt
@WagoKurt 6 лет назад
Hello, Sometimes it is helpful to test the insert message with some fake data so that you can verify the statement and database is correct. Once you can insert some data, then you know your table is setup correctly to receive actual data. I hope this makes sense! I try to be methodical when working through setting up a system, so I do that out of habit.
@maztaly3539
@maztaly3539 7 лет назад
Hello Kurt Braun [0.40] At installing opcua client, you get ERROR lines. Does that mean the installation of opcua failed. Did you manage to install it at all? I am getting those ERRORs too.
@WagoKurt
@WagoKurt 7 лет назад
I did not notice those errors, but it still worked for me.
@maztaly3539
@maztaly3539 7 лет назад
1: In [1:17] how does it find the ip address. For me, the Endpoint field does not show the ip address. 2: How do you connect to raspberry from your pc? if the raspbeery ethernet connection is already connected to PLC? Is it through wireless adapter? It doesn't seem that there is any wireless adapter connected to raspberry.
@WagoKurt
@WagoKurt 7 лет назад
The rPi connection is through Ethernet. Node RED is running on the rPi's web server, and the OPC-UA is using the same ethernet connection. Sounds like you might have two different subnets.. make sure all devices are on the same subnet. For example 192.168.1.xxx
@maztaly3539
@maztaly3539 7 лет назад
Thank you for your reply. I am aware that between RPi and PLC is the ethernet connection. But how do you access RPi from your PC. How do you set up the configurations on the RPi, in terminal. From what I know, you have to be connected to your RPi either wireless or ethernet in order to access the RPi with Putty. Is it Wireless connection between PC and RPi? Have you turned RPi to wireless AccessPoint? Or the RPi is connected to network wirelessly, and that's how you connect to it from your PC?
@WagoKurt
@WagoKurt 7 лет назад
If you type raspi-config on the rPi and in the menu's enable SSH, they you can use putty to connect to it. This is the easiest way to work with the Pi over a network (headless). You can watch this video to see how this is done. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-vflPGqcXJkY.html
@DYNAMO0720
@DYNAMO0720 7 лет назад
Great Video! Could you provide the code you use on the template node.
@eliasv5519
@eliasv5519 3 года назад
-- Objects Root -- Press to update: Browse {{items.item.displayName.text}}: {{items.item.nodeId}}
@NearchosParaskeva
@NearchosParaskeva 3 года назад
Got an issue while trying your example. OPC UA Client cant connect and i got a message "invalid endpoint" anybody else got this issue
@HarhaMedia
@HarhaMedia 7 лет назад
Seems cool. But I don't understand the use of a relational database in this case. MongoDB or something similar could be a much better option performance-wise when the amount of data grows.
@WagoKurt
@WagoKurt 7 лет назад
Yes, you are right to point that out, thanks for commenting. NoSQL databases like MongoDB would be a better option for large datasets & better performance. I show SQL here because a lot of applications are already using and are familiar with them as a point of reference. I plan on doing more video's showing database integration soon.
@AkosLukacs42
@AkosLukacs42 5 лет назад
Hi, great videos, but please do not concatenate sql statements! Use parameterized statements / queries.
@redaboutaleb1252
@redaboutaleb1252 6 лет назад
Hello M.Braun, Hope you're doing well, i want to thank you for this great work :D I'm working basecally on the same project (with plcsim and matrikon OPC ) ... If it's possible can we get on contact, I want to ask you some questions :D Thank you :D
@PedroPatela
@PedroPatela 5 лет назад
Problem: No Objects in the Template Error: cannot locate certificate file C:\Users\YOUR USER\AppData\Roaming pm ode_modules ode-opcua-client\certificates\client_selfsigned_cert_1024.pem Solution: install node-opcua-client npm install -g node-opcua-client ;-)
@0lleman
@0lleman 7 лет назад
Can you please post the template code?
@WagoKurt
@WagoKurt 7 лет назад
[{"id":"a81bdd10.44b31","type":"OpcUa-Browser","z":"7b2dca67.ca8aa4","endpoint":"84ef077e.612178","item":"","datatype":"","topic":"","items":[],"x":337,"y":155,"wires":[["643cf4a5.245ddc"]]},{"id":"643cf4a5.245ddc","type":"ui_template","z":"7b2dca67.ca8aa4","tab":"f54a6156.a82de","name":"","group":"OPC","order":1,"format":" -- Objects Root -- Browse {{items.item.displayName.text}}: {{items.item.nodeId}} ","storeOutMessages":false,"fwdInMessages":false,"x":332,"y":74,"wires":[["a81bdd10.44b31"]]},{"id":"5ad77031.ac7e6","type":"OpcUa-Client","z":"7b2dca67.ca8aa4","endpoint":"84ef077e.612178","action":"read","time":10,"timeUnit":"s","name":"","x":588,"y":298,"wires":[["aabffab1.1142a8"]]},{"id":"3d62fcad.5b9ab4","type":"OpcUa-Item","z":"7b2dca67.ca8aa4","item":"ns=4;s=|var|WAGO 750-8202 PFC200 CS 2ETH RS.Application.GVL.wtest","datatype":"String","value":"","name":"","x":338,"y":300,"wires":[["5ad77031.ac7e6"]]},{"id":"4009b83f.1f4888","type":"inject","z":"7b2dca67.ca8aa4","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":120,"y":300,"wires":[["3d62fcad.5b9ab4"]]},{"id":"aabffab1.1142a8","type":"debug","z":"7b2dca67.ca8aa4","name":"","active":true,"console":"false","complete":"true","x":818,"y":297,"wires":[]},{"id":"84ef077e.612178","type":"OpcUa-Endpoint","z":"7b2dca67.ca8aa4","endpoint":"opc.tcp://192.168.4.20:4840","login":false},{"id":"f54a6156.a82de","type":"ui_tab","z":"7b2dca67.ca8aa4","name":"Home","icon":"dashboard","order":"1"}]
@0lleman
@0lleman 7 лет назад
Much obliged!
@tomgeilen225
@tomgeilen225 5 лет назад
Kurt Braun ä
@InshotsKannada
@InshotsKannada Год назад
#noderedtutorials for more videos nodered
@berth7534
@berth7534 4 года назад
hello, great vid ! Can you send me the HTML code pls ? That would be great. Thanks
@CosminRusu154
@CosminRusu154 3 года назад
Tutorial with the speed of light. :(
@jasonloopstok4549
@jasonloopstok4549 7 лет назад
pendew
@sapito169
@sapito169 6 лет назад
wtf sql injection again !!!!!!!! seriusly and the worst part is in a scada system !!!!!!!! people will follow you without thinking
@sapito169
@sapito169 6 лет назад
sql injection will never die
@WagoKurt
@WagoKurt 6 лет назад
You raise a valid concern regarding SQL injection attacks. You might be surprised to know that many commercial SCADA systems also use SQL for the historian! This is probably why it is very common that these are secured behind a firewall and/or a VPN.
@TVShirley44
@TVShirley44 6 лет назад
at least he's trying to get the concepts over ( at Mach 5 though ). Fair criticism, but it can be made without all the exclamation marks.
@maztaly3539
@maztaly3539 7 лет назад
Hi Kurt I double checked my template code with yours, and I do every step the same. But the template is not showing up in another browser-tap. node-red does load, but nothing to see of that template. Anyy idea what is going wrong? how to debug?
@WagoKurt
@WagoKurt 7 лет назад
Are you using a WAGO PFC with UPC/UA enabled?
@maztaly3539
@maztaly3539 7 лет назад
No I am using a PLC X20CP1382 from B&R Automation. And yes I have enabled the OPC UA on the PLC
@maztaly3539
@maztaly3539 7 лет назад
By the way, after inserting the code into template and by pressing deploy, a error box pops up saying that there is an error in the code. I checked every character four times, but is looks exactly the same as your code:
@maztaly3539
@maztaly3539 7 лет назад
-Objects root - Press to Update: Browse {{items.item.displayName.text}}: {{items.item.nodeId}}
@WagoKurt
@WagoKurt 7 лет назад
You misspelled align on line 12, try this: -- Objects Root -- Browse {{items.item.displayName.text}}: {{items.item.nodeId}}
Далее
🤯️ Vini Jr. ✖️ Brahim 🤯
00:13
Просмотров 1,7 млн
How to Get Started with MQTT
13:38
Просмотров 399 тыс.
Why The Windows Phone Failed
24:08
Просмотров 238 тыс.
OPC UA Lesson 1- What is OPC UA?
12:52
Просмотров 131 тыс.
Raspberry Pi Node-RED Tutorial with Modbus & MQTT
13:38
Apache vs NGINX
7:53
Просмотров 275 тыс.