Node Red

Topics about the Software of Revolution Pi
Kim
Posts: 6
Joined: 10 Feb 2017, 03:01

Node Red

Post by Kim »

Has anyone used Node Red running on the Pi successfully communicating with the DIO module? I'm wondering if this is possible considering Node Red has a serial connector and the DIO module communicates over RS485 to the RevPi Core.
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41

Re: Node Red

Post by volker »

Hi Kim,
this will not work the way you are thinking it could work. Yes, PiBridge uses RS485 BUT this RS485 channel is running a sophisticated protocol in combination with the other signals on the PiBridge. It would also not be a wise idea not to use the PiControl driver to collect all data and store it in the central processing image because THIS exactly is the way to excahnge data between all components in a RevPi system wehter it is sw or hw.
So for Node Red you should better use a driver (which is not yet written as far as I now) which would exchange the data with the central processing image (there are tutorials and examples explaining how this can be done in Python or C / C++). This way you would have access to ALL IO data if it is todays hw and sw or any future hw and sw. The central processing image is in our concept the main tool to have a common platform for any future developements from us or the community / third parties. Without using it you would also cut yourself off from the PiCtory configurator and would need to program your own configuration tool. E.g. the following sw components are in developement cue by us or others and will be released in the next month and which will exchange their data with the central processing imag: HMI, KNX stack, S7 protocol, Profinet Stack, cloud services, Modbus TCP/RTU, TeamViewer client and many more.
So best idea is to wait for a Node Red driver which exchanges data with the central processing image. I'm pretty sure this will be written by the community soon as there are many people out there waiting for it ;-)
Unser RevPi Motto: Don't just claim it - make it!
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Node Red

Post by dirk »

Hello Kim,
at the moment we have no experiences with Node Red. Anyway I see this for you:
Write yourself a backend!
Write a script or a C-programm according to your needs. Example code in C and in Python is available in the download section.
We recommend using the IOCTLs of the piControl driver, also known as PiBridge, in order to perform atomic operations on the process image.
For a quick test you may try to access data using the demo program

Code: Select all

piTest

Maybe if the Node Red installation is ON your RevPi you may execute scripts easily ;-)
Kim
Posts: 6
Joined: 10 Feb 2017, 03:01

Re: Node Red

Post by Kim »

Thanks for the reply guys. Looks like I can easily execute Python script from Node Red, so I'll try that and let you know if it works.
Kim
Posts: 6
Joined: 10 Feb 2017, 03:01

Re: Node Red

Post by Kim »

I've tried to install Node Red on the RevPi (using these steps https://nodered.org/docs/hardware/raspberrypi) but it says the following:

Command:
pi@RevPi ~/demo $ bash <(curl -sL https://raw.githubusercontent.com/node- ... nd-nodered)
Response:
Sorry - I'm not able to upgrade old Wheezy installations. Please think about updating.
Please see the documentation at http://nodered.org/docs/getting-started/upgrading.

It looks like I'll need a newer version of Raspbian. I have backed up my image and I can install a newer image from https://www.raspberrypi.org/downloads/ and that's ok, but once I install the newer image how do I get PiCtory and the DIO driver for C and Python installed? I can see that PiCtory - Version 1.0 is available from the downloads section, is that all I need?
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41

Re: Node Red

Post by volker »

Kim,
better not try upgrading to Jessie if you are not deep into Linux! RevPi needs a Kernel patch (RT) to run real time responsive drivers like the PiControl which is also part of the kernel extensions you would need to install. Installing these extensions is just part of the whole process. There is also an space issue: original Jessie image would fill your 4 GB eMMC up to the limit. You do need to get rid of some stuff usually not needed in an industrial controller.

1) We will publish a Jessie image soon
2) Node Red is part of that image

Thus I suggest you better wait a little bit more to get the Jessie image including all patches and extensions from our platform. We will give a full documentation of all changes we needed to implement to make it running the same time we will publish the image. Please check the news & announcements forum to get information as soon as the image is available (or just subscribe it and you will get notification emails).
Unser RevPi Motto: Don't just claim it - make it!
mario
Posts: 2
Joined: 28 Feb 2017, 12:39

Re: Node Red

Post by mario »

volker wrote:1) We will publish a Jessie image soon
2) Node Red is part of that image
If I may ask, what is the status of this?
I must admit we bought the RevPi too quickly, I thought node-red would work on it without issues. We use normal Raspberries for simple prototypes at the moment and wanted to use the RevPi instead given all the additional features. (mounting option, works with 24V, ...)

Is there a not-guaranteed-to-be-stable image available? Until node-red runs the device is useless to us :(
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41

Re: Node Red

Post by volker »

Hi Mario,
sorry for the inconvenience caused by not having communicated that point clear enough. Node Red was definitely not on our list when trying to communicate the possibilities with RevPi and even if it were I would have had not enough insight to realize that it wouldn't run on Wheezy.
I would love to give you a specific release date but I'm afraid I can't. Our Linus team is still busy finding a bug in the RT kernel patch for Jessie to make PiControl stable under this version. If we've found that bug (hopefully by the end of this week) we are going to test and verify which will take some weeks too. BUT: we are also busy preparing for embedded world fair in March so there is no chance to give you a definite date. All I can say is that this has great priority and we hope to get things published in March - but I can't promise. if we do find any further problems while testing this could cause delays.
Hope this helps for further decisions,
Volker.
Unser RevPi Motto: Don't just claim it - make it!
Kim
Posts: 6
Joined: 10 Feb 2017, 03:01

Re: Node Red

Post by Kim »

Hey guys, I'm hanging out for the Jessie image :-)

I've made a start on some custom Node Red nodes for the DIO module that will use the Python IOCTL library in the back end.
RevPiNodeRedNodes.PNG
RevPiNodeRedNodes.PNG (11.99 KiB) Viewed 13900 times
Any update on how far away the Jessie image is?
User avatar
volker
Posts: 1046
Joined: 09 Nov 2016, 15:41

Re: Node Red

Post by volker »

Hopefully we will have it online to HMI (Hannover Messe Industry) in April.
Lastest news of our R&D is that they will have finished all testing last week in April. So we hope to publish it the frist week in May.
Good news is that this image will work with CM1 as well as CM3!!!
Unser RevPi Motto: Don't just claim it - make it!
Post Reply