1

I'm planning to build a 32 relay IOT node next to my Raspberry Pi. The relays will be controlled by an Arduino Mega 2560. The Pi will run Home Assistant and Mosquitto so I would prefer to communicate with the arduino using MQTT. The Arduino and the Pi will be next to each other, the simplest connection would be over serial. I have found a library: https://github.com/vortex314/serial2mqtt it looks not easy to set up. Do you have any other ideas? Thank you!

  • 2
    Why do you need MQTT over serial. You can just send the number of the relay that should be turned on over serial? – Coder_fox Jun 24 '18 at 11:09
  • That library is designed for the ESP32 which has substantially more power than the Mega2560. – Craig Jun 25 '18 at 18:55
0

Finally I have found the solution! Using mysensors (mysensors.org) I can use the Arduino Mega as a node and a serial gateway. So Home Assistant can control it directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.