Home Assistant integration with Adafruit IO

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
ExtremeBias
 
Posts: 5
Joined: Mon Jul 18, 2022 3:39 am

Home Assistant integration with Adafruit IO

Post by ExtremeBias »

Hi

Can anyone tell me how to configure the MQTT integration in Home Assistant to integrate to Adafruit IO directly?

There are instructions in the below link to setup the configuration.yaml to and provide the certificate which i could download and put somewhere in home assistant, but what .key and what .crt file do I need? I don't think i need a client certificate as I think Adafruit IO uses a server certificate to establish TLS/SSL. However there is an AIO key and maybe this needs to be the .key file and somehow created? I don't have the HA MQTT broker installed as I don't believe its required (I think the mqtt model requires only one broker to join two clients and adafruit IO should be doing that!). Also for the HA MQTT broker to be exposed to internet clients means port forwarding which I am a) trying to avoid, b) don't believe i need to do with this model.

https://www.home-assistant.io/docs/mqtt/certificate/

I am running Home Assistant on RPI on home Wifi and set up Adafruit IO. I have an ESP32 module sitting out on the internet somewhere a hundred km from my home wifi, talking both ways to Adafruit IO via feeds both via the basic and via the MQTT secured approach. :)

Now I want to get data going both ways between Home Assistant and these feeds.

I can set up IFTTT and go that way, but it seems odd leaving a secure MQTT integration to integrate yet another protocol and system (and add bad design, further latency, administration, integration hassle).

User avatar
torwanb
 
Posts: 2
Joined: Wed Nov 04, 2020 6:51 am

Re: Home Assistant integration with Adafruit IO

Post by torwanb »

Write your own little Python script with MQTT client which connects to Adafruit and redistributes to the local MQTT broker sitting next to HA. Then it's easy - configure a new sensor via configuration.yaml and there you go.

User avatar
ExtremeBias
 
Posts: 5
Joined: Mon Jul 18, 2022 3:39 am

Re: Home Assistant integration with Adafruit IO

Post by ExtremeBias »

That’s a good idea. Ultimately you need to add another hop. I ended up using ifttt and the HA integration to it.


User avatar
ExtremeBias
 
Posts: 5
Joined: Mon Jul 18, 2022 3:39 am

Re: Home Assistant integration with Adafruit IO

Post by ExtremeBias »

Regarding that well written tutorial with homeassistant and Esphome and adafruit IO it wasn’t clear to me how these items integrated without port forwarding as in my case the esp device is about 100km away from the home connected via 4G. Sometimes you have to tear apart tutorials to find out if it will work or not in your own case. I hadn’t tried esphome yet, but read this tutorial. It seemed not clear to me if I could use it for this sensing and controlling application but it might have worked. In the end I had esp32 <adafruit mqtt> adafruit IO <IFTTT integration> IFTTT <HA integration> HA.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”