How to connect Domoticz to AWS IoT Core (MQTT)
Posted: Friday 07 May 2021 21:09
I know Domoticz ships with an MQTT broker but I wanted to connect Domoticz to an AWS IoT core "thing" (which is an instance of TLS MQTT). The obvious benefits are:
1) I can learn how to leverage AWS IoT Core into my home automation plan
2) I don't have to punch holes through my firewall to receive data/control devices outside my firewall
I was able to create a "thing" on AWS IoT core which essentially is an MQTT broker instance and tested it with mosquitto_pub/sub and got it to work:
Test publish:
mosquitto_pub --cert 9s87f8d89s9s8-certificate.pem.crt --key 9s87f8d89s9s8-private.pem.key --cafile ./AmazonRootCA1.pem -h a67sad787sad7-ats.iot.us-east-1.amazonaws.com -p 8883 -t 'test/out' -m "Hello from Mosquitto"
I saw the message show in the MQTT test client on AWS. My question is, how do I get Domoticz to use this broker? I know there's an MQTT datasource in the hardware setup screen and I currently use an external (non-SSL) MQTT broker that is on another server on my internal network. How do I do tyhe same thing with DOmoticz and specify the SSL certificates and such? There appears to be lacking documentation in this area.
1) I can learn how to leverage AWS IoT Core into my home automation plan
2) I don't have to punch holes through my firewall to receive data/control devices outside my firewall
I was able to create a "thing" on AWS IoT core which essentially is an MQTT broker instance and tested it with mosquitto_pub/sub and got it to work:
Test publish:
mosquitto_pub --cert 9s87f8d89s9s8-certificate.pem.crt --key 9s87f8d89s9s8-private.pem.key --cafile ./AmazonRootCA1.pem -h a67sad787sad7-ats.iot.us-east-1.amazonaws.com -p 8883 -t 'test/out' -m "Hello from Mosquitto"
I saw the message show in the MQTT test client on AWS. My question is, how do I get Domoticz to use this broker? I know there's an MQTT datasource in the hardware setup screen and I currently use an external (non-SSL) MQTT broker that is on another server on my internal network. How do I do tyhe same thing with DOmoticz and specify the SSL certificates and such? There appears to be lacking documentation in this area.