Tutorial for the installation of OR 2.5 on Raspberry Pi 3 - best Java version?

Dear all,


I am using OR on Raspberry Pi since many years now with full satisfaction.
The "Installation the Controller’ page which is part of ‘Get Started’ section of the main OR Web page still refers to an old page for Installation on a Raspberry Pi.
This
covers OR 2.0, previous version of Raspian and may therefore need some adaptation in particular since the more recent versions of Raspian already include java version 1.7 or even 1.8.
A couple if years ago, I have made a quick tutorial (in French) based on the above nice installation guides.
But
today, with the latest version of the Raspberry Pi 3 and the latest version of Raspian, I am considering to make an updated tutorial (at least in English), particularly for newbies like me.
Before starting this, I would like to know which version of Java you are using for best performance and best compatibility with OR 2.5.
I
have been working with the 1.7 or 1.8 versions that are either preinstalled on Raspian Jessie or very easily installed. I could not have the 1.6 version working.
What is important to note is that I am NOT using any rules or drools and therefore I am not able to guide towards the best java version as I understood not all java version are fully compatible with the drools.

Instead,
I am using the preinstalled version of Node-RED (see the attached example) where rules are generated and interpreted. The latter could be the occasion of another discussion…

To summarize, the installation of OR 2.5 from “out of the box” Raspian Jessie take just a few lines and a couple of minutes only… Again, not sure this is the best option for any use!

Feedback really welcome!

Kind regards,

D.-





I’ve seen that the lastest release of Raspbian Jessie comes with Java 8 pre-installed. In terms of user experience it would be best to describe the installation procedure based on OpenRemote Controller 2.6 Beta because it contains a current Drools version that requires Java 8.

I’m not sure about the Beta status of the OpenRemote Controller 2.6. I do not know if there are any serious issues - especially with the new Drools version - any ideas are welcome.

I was sketching some installation documents for Raspi3 a while back, but bumped into the same authentication errors that have popped up in a number of threads.

Having had some time to try again, looks like for me the problem is caused by permission mismatches if the service has been started as pi or root. I’ve got a modified version of the 2.0 service setup script running that seems to work now, and the installation is not giving me any errors. I have a short set of cron-based rules that I haven’t yet had the time to check if the work, but the rest of OpenRemote seemed to be running fine both on oracle-java7-jdk and oracle-java8-jdk.

My install process was based on Jessie Lite which does not contain a java installation by default. But since full Jessie comes with Java 8, I’d give a preliminary vote for that as well.

Here’s my draft for the OpenRemote vs. Pi installation doc. If anyone would be so kind to read through, comment on possible omissions or other issues, and recommend revisions, it’d be much appreciated.

How To Install OpenRemote Controller on a Raspberry Pi

hi Jani,
first i want to thank you for this tutorial because i was getting desperate trying to get it working on my recently bought PI 3, i also tryed the script i found on the forum but without succes, now i get the controller working but only manual not after a reboot .
when i do a “update-rc.d openremote defaults” i get a fault that the file isn’t a regular executble and its skipped, see screenshots , I could really use some help with this .

regards Steven

Thanks, good catch!

I seem to have left those steps out of my draft by mistake. So from the earlier instructions:

Now set the executable bit to the service script:

$ sudo chmod +x /etc/init.d/openremote

And set the service script to run at every boot:

$ sudo update-rc.d openremote defaults

Hope this helps!

Updated draft with the missing steps.

Hi Jani, those steps i did earlier didn't help the controller he won't start up after reboot.
If there is some one who would pic in and give me a direction wich i have to follow i will appreciate verry much.
I'm trying to run it on my velbus.

With regards

You don’t give much information to the nature of the problem :slight_smile:

  1. Does the file /etc/init.d/openremote exist?

  2. Is that file properly set as executable?

  3. Are there any errors when you type “sudo update-rc.d openremote defaults”?

  4. What happens if you type “sudo service openremote start” and “sudo service openremote stop” in the command line?

  5. Are there errors in your Controller boot log? (I’m typing this out of memory, but it’s probably in /home/pi/openremote/logs)

Hi Jani,
i've got it working, next step is to get the velbus server installed and running after reboot.

can you give me a headstart on how to ..?

thanks and regards steven

Good to hear things are working. Can you confirm that the installation tutorial is okay?

Sorry I’m not able to help with Velbus, you can start another thread with that topic.

hi Jani,
the tutorial was great specially the note of not starting the controller under sudo/root/admin privileges, i think there it wend wrong the other attemps.

thanks steven.

Hello Steven,

Jani is absolutely right :slight_smile:

I'll happily help you to get your Velbus network working with OpenRemote (assuming you've got 2nd generation modules), but for the sake of all those that will follow in your footsteps, it's best to start a new thread.

I'll keep my eyes open for it.

In the mean time, this OpenRemote How-to for Velbus should be of use.

https://github.com/openremote/Documentation/wiki/Velbus

And this Velbus forum thread should answer all your questions about getting a JVelbusD server up and running.

(Although I've never used a Pi, but I'm assured it works well.)

http://forum.velleman.eu/viewtopic.php?f=81&t=6199&p=83759&hilit=JVelbusD#p83759

Good luck

Stuart

MDAR Ltd

Thanks to everyone in the thread. The draft has been updated and is now a part of the Raspberry Pi installation docs.

https://github.com/openremote/Documentation/wiki/Raspberry-Pi

Let me know of any possible omissions or inaccuracies.

Hi,

Have done all steps as in your tut, all steps without any errors,

but on my phone app i don’t see what is designed in the designer. The controller selection page just refreshes.

The synch shows OK.

And when i run open remote controller on the PC it does work.

i just don’t understand what is wrong :frowning:

Hi,

Are you running the version of Raspbian from the tutorial, or the latest one on raspi download site? The operating system has gone through a number of changes from Jessie to Stretch, and to my knowledge the new version no longer supports the init.d style startup scripts that the tutorial refers to, and instead the auto-startup needs to be implemented with systemd unit files.

The bad news is, I have zero experience with systemd, and haven’t gone through installing OpenRemote on Raspbian Stretch, so the tutorial is obsolete for Stretch. The good news is, systemd unit files are way more simple to set up than init.d startup services, according to the little documentation I’ve read about them.

If you can manually start OpenRemote on your raspi (just go through the steps of downloading, unzipping, chmod +x the .sh file, and then start), and it seems to be running but no data is synced from Designer, that by itself sounds like a problem not directly related to the tutorial. At the very least, check github releases for newer versions of OR Controller, the link in the tutorial may not point to the latest file available.

Hope this helps!

Hi

Are you trying to access your controller design from your phone's web browser or from the OpenRemote app?

The only thing that is accessible from seen browser is the sync page.

You must use the App for iOS or Android.

From a PC, you must use the OpenRemote Webconsole.

http://{yourcontrollerIP}:8688/webconsole

Hello Dominique,

I personnaly run OP Controller 2.5 on a rapsberry PI 3 with rapsbian Stretch and my advice is to use the latest release of raspbian (Stretch)
Here is the version of Java I use :

java version “1.8.0_65”
Java™ SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot™ Client VM (build 25.65-b01, mixed mode)

Concerning the way to automaticaly start openremote on raspbian stretch, the best is to use systemd and systemctl commands.

Here is the fiel I have created on the folder /etc/systemd/system
I have called this file openremote.service

The extension “.service” is mandatory. For the name, you can choose what you want.

[Unit]
Description=Service Open Remote
After=multi-user.target

[Service]
Type=forking
ExecStart=/home/pi/openremote/bin/openremote.sh start
ExecStop=/home/pi/openremote/bin/openremote.sh stop
User=pi
WorkingDirectory=/home/pi/openremote/bin

[Install]
WantedBy=multi-user.target

Change the owner of this file to “root” if it is not already the case
Then run :

chmod 644 /etc/systemd/system/openremote.service
sudo systemctl daemon-reload

sudo systemctl enable openremote.service

This service will start at startup but if you want also to manually start or stop the service, run

sudo service openremote start
or
sudo service openremote stop

There are lots of other options that can be used for the file openremote.service. This one is a basic one and the one I use.

I hope it will help, :slight_smile:
Regards,
jérôme

If you are looking to install OpenRemote’s version 3 on a RaspberryPi, check this page: Developer Guide: Installing and using Docker · openremote/openremote Wiki · GitHub

Hi @Rich @Dominique_Swinner
I want to connect my Raspberry pi device with Openremote but I don’t how to do? I have already established connection between Openremote and Mqtt client. so right now I am trying to connect with raspberry pi device. please share some link that can help to connect my device.

Thank you
Vicky Kumar