Shell Execution in MACOS 10.13.4

After long time with version 2.1 I have started migrating to Version 2.5

I have few problems but I stretch the 1st one that is in dead end state.

I have managed to migrate my MODBUS scripts from Linux down to MACOS using modbus-cli.

In a terminal it works great.

In OR Shell Execution with the same path and same parameters it runs:

{insert}
ERROR [Polling thread for sensor: Show_Kitchen_Status 534487]: Could not execute shell command: ~/OpenRemote-Controller/openremote-shell-commands/Relay_On_Off_Status.sh

``
java.io.IOException: Cannot run program “~/OpenRemote-Controller/openremote-shell-commands/Relay_On_Off_Status.sh”: error=2, No such file or directory

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)

at java.lang.Runtime.exec(Runtime.java:620)

at java.lang.Runtime.exec(Runtime.java:485)

at org.openremote.controller.protocol.shellexe.ShellExeCommand.executeCommand(Unknown Source)

at org.openremote.controller.protocol.shellexe.ShellExeCommand.run(Unknown Source)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: error=2, No such file or directory

at java.lang.UNIXProcess.forkAndExec(Native Method)

at java.lang.UNIXProcess.(UNIXProcess.java:247)

at java.lang.ProcessImpl.start(ProcessImpl.java:134)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

I have changed the path. I have set the $PATH to include the shell commands library but still no luck.

The sh files are all executables and run also from the home dir smoothly.

Need a help

I’m certainly no expert, but all I can tell you is that this path works for me on Ubuntu 14 or 16…

/opt/OpenRemote-Controller/webapps/jscanvas/csvmaker.sh

``

I’ve got other scripts working with similar paths.

There is a small detail that the change in paths when setting up don’t always get reset when syncing.

The only thing I do that makes sure everything is as per the change in the designer is to sync the controller, then reboot.

Not rebooting often means my controller (s) appear to continue to use the previous paths.

I hope this helps you.

Take a look at this post where I explain how a script based graphing solution works.

https://groups.google.com/forum/#!topic/openremotecommunity/OoHpROaS8As

All these scripts work on version 2.1 but with different location.
The issue seems to be a Ruby issue with OR. The modbus-cli is a ruby gem and. All scripts do work as a stand alone.

The modbus app is placed in a folder that appears in the $PATH so it works from any folder within MACOS.

I will try putting the scripts in this folder and see although the error seems to be the inability of OR to run the modbus app that is located in /usr/local/bin if I am not mistaken (I am not next to the MAC mini running this issue).

Thanks anyway.

בתאריך יום ראשון, 11 בפברואר 2018 בשעה 20:22:51 UTC+2, מאת Stuart Hanlon:

Update

.There is a bug in project online update. Some things are not updated so shell path remains unchanged

I need to reboot the MAC to make it change or edit controller.xml manually.

The zip backup at least under MACOS is also not created.

Now its working - Modbus under latest MACOS is working great. Even better than with Modpoll I have used in Linux.

Now I have a great use for my old 2010 MAC Mini.

End of story for now.

בתאריך יום ראשון, 11 בפברואר 2018 בשעה 19:23:44 UTC+2, מאת Nir Aviry:

Another sad update.

After cleaning all rules issues while moving to 2.6 Beta 3 it looks like rules are running but shell execution commands are not. Manually each bash file works OK in Terminal but under a OR command nothing happens.

In 2.1 it was working great.

A help will be appreciated.

בתאריך יום ראשון, 11 בפברואר 2018 בשעה 19:23:44 UTC+2, מאת Nir Aviry:

https://groups.google.com/forum/m/#!searchin/openremotecommunity/Shell$20execution/openremotecommunity/mGwnmlFeqPQ