Page 1 of 1

How to connect Domoticz to AWS IoT Core (MQTT)

Posted: Friday 07 May 2021 21:09
by wizworks
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.

Re: How to connect Domoticz to AWS IoT Core (MQTT)

Posted: Friday 07 May 2021 22:21
by waaren
wizworks wrote: Friday 07 May 2021 21:09 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.
Did you consider using node-red to "translate" this message to something domoticz can process?

Re: How to connect Domoticz to AWS IoT Core (MQTT)

Posted: Sunday 08 August 2021 15:34
by bobdvb
Did you get anywhere with this? I don't see anything in the Domoticz configuration to set the mutual auth which I think is where you got stuck?

I was contemplating bridging Mosquitto to AWS IoT and I found this:
https://www.fis.gatech.edu/how-to-confi ... -iot-core/

Re: How to connect Domoticz to AWS IoT Core (MQTT)

Posted: Thursday 12 August 2021 23:33
by wizworks
I haven't pursued this... life events got in the way. Would be nice to see Domoticz with an AWS IoT Core connector.