Startup both OH and OH2 on Startup?

I currently have a startup script I found somewhere in the past that runs OH1 on startup (using Ubuntu Server as VM).

Is it possible to start both OH1 and OH2 on startup? I like to start testing OH2 while still continuing with OH1.

Same applies to me. I’m running openhab on Raspberry Pi2 Raspbian installed with apt-get

Assuming that they are using different ports and not trying to share any other resources (e.g. /dev/tty* where your zwave stick may reside) it should work without issue. However, I personally would recommend playing around with OH2 in a VM rather than trying to experiment on your production system by running them both at the same time.

Thanks Rick

I think that is semi what i"m trying to do though. The ability to use/share the zwave stick on both OH1 and OH2.

OH1 and OH2 are on different ports and I can start OH2 manually and it works. And was able to add my philips Hue to OH2 and now control those lights with both OH1 and OH2.

So yeah, now I’m both trying to get OH2 to start automatically on boot along side OH1 (on a different port of course) and to share the Zwave stick.

Both on running/installed on the same VM that is running Ubuntu Sever as well.

I don’t think you can share the stick but @chris can confirm. If I’m correct in what I’ve seen, whoever gets access to the device first puts a lock on it that prevents other devices from reading/writing it. From what I know of these things (i.e. how serial devices work but not specifically zwave) letting two processes write to the same device at the same time would be a disaster.

Yep - 100% correct…

You can’t share resources (like a serial port) across multiple applications - there would be a conflict. For starters you wouldn’t be able to open the port twice, but if you could overcome that with a port multiplexor (which is possible) there would be a major mess having two copies of OH trying to access the stick at the same time…

You can use the same stick, with no changes to the network etc, on both OH1 and OH2, but not at the same time…

ok, thanks for the help and tips…

But in still working to start testing and learning OH2, is there a start up script that works to stop and start? Currently, I can log into Ubuntu Server via SSH and manually start it, but haven’t figure how to auto run OH2 on a reboot.

I did come across this post here, but couldn’t get the script to work.

Yes, oh2 has the the same batch/script files included for starting the system as oh1.

Only until next Monday - then it will change as we move to Apache Karaf. More news will follow!

1 Like