3

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!

asked Jun 24, 2018 at 8:38
2
  • 3
    Why do you need MQTT over serial. You can just send the number of the relay that should be turned on over serial? Commented Jun 24, 2018 at 11:09
  • That library is designed for the ESP32 which has substantially more power than the Mega2560. Commented Jun 25, 2018 at 18:55

2 Answers 2

5

As the author of the serial2mqtt gateway. Maybe it's time to have a new look. I've included the binaries for different platforms in the build : https://github.com/vortex314/serial2mqtt/tree/master/build So to get started : unzip the binary and update the serial2mqtt.json config. Should be piece of cake. Let me know otherwise via github.

answered Jun 27, 2019 at 17:28
1
  • Thank you @Lieven It's a very nice project. Even the documentation is very useful. I already have my system set up but I will keep in mind serial2mqtt. I will definitely try it out. Commented Jul 1, 2019 at 9:56
1

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.

answered Jun 26, 2018 at 12:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.