Before building, install the following software.
- OpenJDK 11
- Maven
After installing the software, execute the following command.
$ mvn wrapper:wrapper
To subscribe the MQTT broker(AWS IoT Core), need to identify the client. You have to copy the certificates to the resource directory.
- AmazonRootCA1.pem: AWS CA Certificate
- [ClientCert]-certificate.pem.crt: the client certificate
- [ClientCert]-private.pem.key: the private key for the client certificate
Modify the application.properties file.
- mp.messaging.incoming.mqtt-broker.host
- mp.messaging.incoming.mqtt-broker.client-id
- mp.messaging.incoming.mqtt-broker.ssl.keystore.location
- mp.messaging.incoming.mqtt-broker.ssl.keystore.password
- tt.rest-client.keys=[KEY1],[KEY2],...,[KEYn]
- tt.rest-client.[KEYn].url
$ ./mvnw package
To run the proxy service, execute this command.
$ /usr/bin/java -jar <BASE_DIR>/target/quarkus-app/quarkus-run.jar
$ cp -a homeiot-proxy.service /etc/systemd/system/
$ systemctl enable homeiot-proxy
To run as a systemd service, execute the following command.
$ systemctl start homeiot-proxy
You can view the journal logs.
$ journalctl -u homeiot-proxy.service --no-pager --since="2023-01-27 18:00:00"