Im looking to move my raspberry openhabian 3.4 setup over to OSX … I had openhab running on the Mac and could open an http session, but then I brought it down (with shutdown) to restore the openhabian backup … the restore worked, but now I cant open an http session…
The instructions in the docs for OSX seem very bare. Is there somewhere to read about starting / stopping openhab for OSX? and other basic commands?
Ok … well I see in the openhab log the first issue …
2022-08-25 10:43:39.112 [WARN ] [org.apache.felix.fileinstall ] - /usr/share/openhab/addons does not exist, please create it.
2022-08-25 10:43:39.194 [ERROR] [org.apache.felix.fileinstall ] - Cannot create folder /var/lib/openhab/tmp/bundles. Is the folder write-protected?
2022-08-25 10:43:39.196 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedServiceFactory, id=44, bundle=17/mvn:org.apache.felix/org.apache.felix.fileinstall/3.7.4]: Unexpected pr
After playing around a bit (and getting denied to mkdir for various reasons) it seems that “MacOS Catalina” has a lot of additional restrictions about accessing and writing to root directories. Has anyone attempted to run openhab on MacOS Catalina? Would be interested in any feedback before I dive into it.
I’ve run OH on my mac (mostly for development purposes). If you download the zip/tar.gz version of openhab you can install it wherever you’d like and it won’t try to write to any outside directories.
One little tip: for whatever reason, the archive you download doesn’t include the openhab root directory, so by default, it’ll unzip a bunch of stuff into whatever directory the zip file is in. So, create a directory called “openhab” or whatever and then move the archive into there and unzip.
Once that’s done, you can just run the start script from a command line. To get it to start up automatically, you’ll probably need to write a launchd configuration file, which shouldn’t be too difficult; we can probably help with that as well if a little googling doesn’t give you an obvious solution.
Let me know if I can answer any other questions!
Thanks! What version of OSX are you running?
My issues are with Catalina which has a lot more security protections. I created an openhab directory in my User home and then unzipped the file inside that directory … it created a “runtime” directory among others. I was able to ./start.sh to get it running and then could launch an http://xxxx:8080 session … the problem arose when I restored my openhabian backup … the files moved over but then when I tried running it, it wanted to create an “/usr/share/openhab/addons” directory which it couldn’t … I couldn’t create it either due to having to turn off protections and then it being in a readonly filesystem.
It works exactly as described above on my Development machine, MacBook Air M1 with MacOS Catalina.
Thanks Jan - Let me do the install over … sounds like I messed something up.
Ok … well everything worked fine this time … no idea what I did wrong … now going to try to get a Z-Wave USB stick working
It sounds like you had some references to those other directories in the backup you restored. Usually, it’s only the userdata directory that’s needed… I’ve not looked at all of the files that end up there to know for sure if anything gets stuck there or not. But glad you were able to get it sorted out!