Closed zachelliottwx closed 2 years ago
FWIW this is what the cert looks like for subject:
Certificate: Data: Version: 3 (0x2) Serial Number: fd:de:0a:8e:65:fc:3b:a7:33:8a:b9:06:6d:cc:a9:74:64:b0:6f:5a Signature Algorithm: sha256WithRSAEncryption Issuer: OU=Amazon Web Services O=Amazon.com Inc. L=Seattle ST=Washington C=US Validity Not Before: Sep 14 23:36:47 2021 GMT Not After : Dec 31 23:59:59 2049 GMT Subject: CN=AWS IoT Certificate Subject Public Key Info:
Ok this appears to be an issue with Paho MQTT actually. I ran a test script I found here: https://gist.github.com/skirdey/9cdead881799a47742ff3cd296d06cc1 and got the same error. Guess you're off the hook for now. I'll update when I figure out more.
This is solved. For future reference, the issue was the way I installed Paho. I was using Amazon Linux 2, and Python 2.x. So I installed python-paho-mqtt via Yum. Well that apparently installed a very very old version of Paho. Once I switched to Python3 and installed via Pip, it worked no problem. So ensure if you are using IoT Core, to use a somewhat recent version of Paho...
Installed MQTTSubscribe today. Configured a thing in AWS IoT Core, downloaded the CA, the Cert and the Private key. Weewx.conf is configured like this: `[MQTTSubscribeDriver]
This section is for the MQTTSubscribe driver.
However in the logs it's failing to connect due to WeeWxIOError: ('Certificate subject does not match remote hostname.',) I can send/subscribe with Mosquitto using those certs just fine, so I know it's not that. Any ideas?