This project is a simple Spring Boot Application designed to communicate with IoT devices over MQTT Broker. User can send commands to an ESP8266 using Google Assistant or a web interface built with Angular 4.
- Install MySQL 5.5 or MariaDB 10.1.23 on your server/local environment.
- Install latest MQTT on your server/local environment.
On MacOS you can install using brew.sh:
On Debian/Raspberry Pi you can install using following commands:
$ brew install mosquitto
$ sudo apt-get update $ sudo apt-get install mosquitto mosquitto-clients
- For more information on installing MQTT on different operating systems, refer to : https://mosquitto.org/download/
$ git clone git@github.com:adnirjhar/orchid-backend.git
$ cd orchid-backend
$ mvn install
$ mvn spring-boot:run
By default, the application is configured to connect to the publicly open MQTT Broker host iot.eclipse.org
. But eventually you would want it to connect to your own MQTT Broker on your server/local environment.
- In the
application_config
table, find the row wheremqttServer
is set toiot.eclipse.org
. - Replace the
iot.eclipse.org
with your own MQTT Broker's host name or justlocalhost
if local environment. - Also replace the
mqttPort
value with your own MQTT Broker's port in case its not running on the default port1883
.
For a quick start and to help out the users to understand the project better, there is an initialData.sql
file located at src/main/resources/
. Running this sql file will add some ADMIN users and fill up some more data to get you started.
Congratulations! Our Spring Boot Application itself is ready to go! It's time to plug-in the super awesome Frontend Application!
Go to Orchid Frontend, follow the instructions to install and run the frontend project.
I wrote an article on the entire system. You can learn more in this Medium article.