openhab / openhab-qnap-qpkg

openHAB Packages for QNAP NAS systems
Eclipse Public License 2.0
77 stars 21 forks source link

openhabian-conf #57

Open howroyd opened 4 years ago

howroyd commented 4 years ago

How do I run openhabian-conf when running OH on QNAP? I can get a shell to Karaf, a shell into the QNAP, and see the usual http on 8090, but can't seem to figure out how to run that command. Thanks Simon

ptrooms commented 4 years ago

openhabian-config is meant to configure the Raspberry Pi (openHABian) platform which in turn will basically setup the rPI environment. See. https://www.openhab.org/docs/installation/openhabian.html

I presume, as you can run Karaf and have port 8090 etc, you already run openHAB@qnap. AFAIK, there's no equivalent for the Qnap.

Grtz. Peter

howroyd commented 4 years ago

Ahhhh ok. I am trying to migrate from running openhab on a pi to my qnap. Just trying to wrap my head around how to get an mqtt broker installed and configured. Apologies for opening an issue for this, I guess I was after more of a "how to"

ptrooms commented 4 years ago

No problem, we all been there.

Regarding a mqqt@qnap broker, if not available somewhere in a QNAP (i/pkg) repository, (virtual) APP etcetera ; as one (like me once did & still use) you have compile a version natively for QNAP itself.

This is what I once followed, did FWIW and still use, while following link http://westerg.tumblr.com/post/49205566744/how-to-compile-mosquitto-mqtt-brokerclient-on-a Which I converted to the following actions/notes: 1   downloaded http://mosquitto.org/files/source/mosquitto-1.5.tar.gz 2   created a directory: $ cd /share/....../mosquitto/ (for doing the operation) 3   untar download: $ tar xvfz mosquitto-1.5.tar.gz 4   set gcc compiler: $ export CC=gcc 5   edit settingt $ vi /share/.../mosquitto/mosquitto-1.5/config/mk (set WITH_TLS:=no ) 6   make: $ make WITHTLS=no (No security !!!) 7   if OK , install it: (into /opt by modifying $ vi config.mk (change from /usr/local)) 8   install: $ make WITH_TLS=no install 9   create directories $ mkdir /opt/mosquitto ; 10  move to opt for persistence: $ mv /etc/mosquitto/* /opt/mosquitto/ ; rmdir /etc/mosquitto 11  move config: $ cp /share/.../mosquitto/mosquitto-1.5/mosquitto.conf /opt/mosquitto/ 12  fix userid : $ vi /opt/mosquitto/mosquitto.conf (user mosquitto change to user admin) 13  fix user libraries commands: $ ln -s /opt/lib/libmosquitto.so.1 /usr/local/lib/libmosquitto.so.1 14  fix user libraries commands: $ ln -s /opt/lib/libmosquittopp.so.1 /usr/local/lib/libmosquittopp.so.1 15  publish libraries: $ ldconfig -v (verbose) 16  test start deamon: $ mosquitto -v -c /opt/mosquitto/mosquitto.conf 17  check if running on port: $ lsof -i4 -P -n | grep 1883

Note: the operation also makes the mosquitto_pub & mosquitto_sub generally available.

Hope this will get you going. (Note my actions were done for a TS509 end-of-life)

Grtz. Peter