This site uses cookies for functional purposes. To continue please read and agree to our Data Privacy.

By closing this message, you consent to our use of cookies on this device.

PLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

  1. Martin PLCnext Team
  2. PLCnext Technology & PLCnext Controls
  3. Saturday, 13 January 2018
  4.  Subscribe via email

I was speaking with a customer last week who has automated his home using a Raspberry Pi running openHAB 2 software. He asked me if the PLCnext could do the same. Not one to pass up a challenge ... here's a summary of the steps needed:

Prerequistes:
- PLCnext must be connected to the Internet - to verify: ping www.google.com

Download Zulu Embedded (OpenJDK) from https://www.azul.com/downloads/zulu-embedded/
- ARM 32bit JDK on Linux (for ARM v8/v7/v6 Hard Float ABI)
- Downladed tar file is (for example) ezdk-1.8.0_152-8.25.0.76-eval-linux_aarch32hf.tar.gz
- Extract contents of tar file: tar -xf ezdk-1.8.0_152-8.25.0.76-eval-linux_aarch32hf.tar.gz
- Copy to PLCnext: scp -r ezdk* root@192.168.1.10:/usr/lib/jvm/
- Create a symlink: ln -s /usr/lib/jvm/ezdk-1.8.0_152-8.25.0.76-eval-linux_aarch32hf/bin/java /usr/bin/java
- Verify the installed version: java -version

Download latest OpenHab distro from https://bintray.com/openhab/mvn/openhab-distro
- Downloaded file is (for example) openhab-2.2.0.tar.gz
- Extract contents of tar file: tar -xf openhab-2.2.0.tar.gz
- Copy to PLCnext: scp -r * root@192.168.1.10:/opt/openhab2/

Follow the instructions on https://docs.openhab.org/installation/linux.html#manual-installation
- sudo adduser --system --no-create-home openhab
- sudo chown -hR openhab:openhab /opt/openhab2
- sudo su -s /bin/bash -c '/opt/openhab2/start.sh' openhab

Now open a web browser and navigate to 192.168.1.10:8080

 

I got this working on the PLCnext EA hardware but it should also work on the release version.

- Martin.

 

Phoenix Contact Electronics Headquarters - Support Center

Vincent PLCnext Team Accepted Answer Pending Moderation
1
Votes
Undo

Openhab is nice, I also like Domoticz and HomeAutomation. should all fly on the AXC 2152.

 

Often used in conjunction with Node-Red :)

Phoenix Contact Netherlands - Technical Consultant

Martin PLCnext Team Accepted Answer Pending Moderation
1
Votes
Undo

Thanks Vincent.

It would be nice to have an OpenHab Binding for the PLCnext Global Data Space, like the one currently available for Modbus/TCP - then data could be exchanged directly between OpenHab and PLCnext I/O and applications.

It's on my list of things to do, for when someone invents a time machine that adds an extra 8 hours of leisure time to each day.   :-)

- Martin.

Phoenix Contact Electronics Headquarters - Support Center

dfenton@phoenixcon.com Accepted Answer Pending Moderation
0
Votes
Undo

 

It's on my list of things to do, for when someone invents a time machine that adds an extra 8 hours of leisure time to each day.   :-)

- Martin.

 

I wonder if I can get PLCnext to run a time machine... :-)

Vincent PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Martin,

A faster means of integration, could be using MQTT in openhab (already a binding present), placing mosquitto in the Linux domain of the AXC F 2152. and adding a mqtt-client in a CPP program .This way, you could get it up-and-running, without the help of H.G. Wells ;)

Phoenix Contact Netherlands - Technical Consultant

Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Right, nice one.

There's also a TCP & UDP Binding that could be used to exchange information with a C/C++ program running on the PLC.

- Martin.

Phoenix Contact Electronics Headquarters - Support Center

Jozef Accepted Answer Pending Moderation
0
Votes
Undo

How can I reach the OPC UA datapoints from PLCnext from Openhab2.

Nodered is working on PLCnext with installed package:
npm install node-red-contrib-iiot-opcua

Jozef
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hi Jozef,

I image that you may be able to install the node-red-contrib-openhab2 package and then use this, along with the node-red-contrib-iiot-opcua package, to build a flow that exchanges data between OpenHab2 and the PLCnext OPC UA Server.

- Martin.

Phoenix Contact Electronics Headquarters - Support Center

Jozef Accepted Answer Pending Moderation
0
Votes
Undo

Thanks Martin,

If openhab2 package is also installed, so too much memory is occupied.

I think openhab2 should be installed on external RPi and nodered on PLCnext.

Do you agree ?

Installed HW: 02 FW: 1.2.0.51 without SD card and nodered with opc-iiot-ua.

How is memory splitted between main and PLC runtime memory ?
If main memory is 80% used and PLC uses only 1%, is this a relationship between ?
Can be external SD card used for installation of nodered, python, openhab2 etc.?
Thanks.
Martin PLCnext Team Accepted Answer Pending Moderation
0
Votes
Undo

Hello Jozef,

The AXC F 2152 was designed with enough resources (memory etc) to run deterministic, real-time automation applications. While it's interesting to see what else we can run on this device, it's easily possible to reach the limit of what can be installed  - as you've discovered. What runs on the AXC F 2152, and what runs on other devices like an RPi, is really up to the designer of each individual solution. Some pureists may say that node-red and openhab2 should both be run on an external device. It's really up to you.

I'll try to get answers to the other questions, and post them on the other thread.

- Martin

Phoenix Contact Electronics Headquarters - Support Center

  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.