Hi, do you have any code examples of using relay modules on a I2C bus of a ESP32 and controlling it using MQTT. I am using your Home Automation Tutorial to build my system but running out of GPIO
Tomorrow (July 21), I’ll be publishing a new Module for the ESP32 course dedicated to MQTT. In that new module, I’ll be using an I2C LCD display. Which I2C component would you like to control? Can you post a link in the forum for your module?
I am using Arduino Uno I2C bus connected to four PCF8574 modules to Drive two 8 CH relay modules and the remaining two PCF8574 will read outputs of 16* Current transformer modules.
I will subscribe to the topics to turn the relays on and off and will publish the current transformer readings on the network.
I’ve just published the new Module about MQTT with ESP32: https://rntlab.com/esp32-with-mqtt-introduction/
I don’t have any examples with that exact component, but have you tried to use this library with the ESP32: https://playground.arduino.cc/Main/PCF8574Class
I haven’t looked if it’s compatible with the ESP32, but it might work.