Engimusing Tools for Windows Installation and Quick Start Guide
Due to the complexity of manually installing the mosquitto, openHAB, openHAB Designer, and the engimusing tools themselves, we have created a simple installer that will download and install all 4. It can be downloaded here.
After downloading the installer run the file and it will walk you though picking directories for the packages to be installed to as well as pointing the openHAB runtime to a JAVA install.
If you selected the option to create the desktop folder and open it on exit from the installer then you should see a directory like this:
Connecting an Engimusing Device to OpenHAB Using a Serial Connection
Starting Mosquitto
In order to connect an Engimusing device that has been programed to use a Serial MQTT connection to openHAB there are three applications that will need to be run. The first can be run using the Mosquitto shortcut in the Engimusing Tools directory:
Running Mosquitto will start the Mosquitto MQTT server on your machine at port 1883. It will open a window that will look like this:
Starting OpenHAB
Once Mosquitto is up and running you can start up the openHAB server. The EngimusingToolsInstaller sets up openHAB to install the MQTT bindings and configure it to connect to the Mosquitto server that is also setup by the EngimusingToolsInstaller. OpenHAB can be run using the OpenHab shortcut:
After running that shortcut, openHAB will start and will create a window that will eventually look like this:
You can verify that openHAB started up by going to http://localhost:8080/start/index
It should look like this:
Connecting TMP102 DF11 Board to OpenHAB
The rest of this tutorial will assume that you have a TMP102 DF11 board connected to a ZGUSB board with the TMP102_DF11_MQTT example uploaded to the board.
First we need to setup the openHAB configuration to talk to the MQTT server. Since the installer already setup the mqtt binding all we need to do is add a sitemap and item configuraiton. Download this:
https://engimusing.github.io/install/windowsOpenHAB_TMP_DF11_MQTT_Configuration.zip
and unzip into your openHAB folder. If you did it correctly you should find a tmp_df11_mqtt.sitemap in the conf/sitemaps folder.
Next if you go to:
http://localhost:8080/basicui/app?w=0000&sitemap=tmp102_df11_mqtt
It should look something like this:
Except that the Temperature reading will be "- °C".
The last step is to configure the Serial2MQTT script and run it. This can be done with the Serial2MqttSetup script:
This script will ask which COM port the device is attached to and which mqtt server to connect to. After filling out the answers to the questions it will start running the script. If everything worked, you should start to see messages like this on the Mosquitto window:
1489696107: Received PUBLISH from publisher (d0, q0, r0, m0, 'EFMZGUSB/BOARD/TMP102?/DEG_C', ... (5 bytes))
1489696107: Sending PUBLISH to openHab (d0, q0, r0, m0, 'EFMZGUSB/BOARD/TMP102?/DEG_C', ... (5 bytes))
Now if you go back to:
http://localhost:8080/basicui/app?w=0000&sitemap=tmp102_df11_mqtt
it should have the temperature filled out and it if the LED toggle button is clicked then the LED on the ZGUSB board should turn on and off.