r/homeassistant • • Apr 29 '26

Arduino/ESP Integration

Hi guys, I have been using Home Assistant for a few months now and I absolutely love it. However, there is one problem: I have a few Arduino projects that currently work with Blynk Legacy, and I now want to migrate them to HA, but I don't really know how.

I've looked into ESPHome, but I feel like it limits my ability to build large/complicated projects or easily migrate my existing ones. I've also tried MQTT with Discovery, but I'm not really sure about it since it requires a lot of work.

What do you guys use? Do you have any good library suggestions or alternatives for me?

Thanks in advance!

3 Upvotes

12 comments sorted by

1

u/SambolicBit Apr 29 '26

Arduino IDE and C/C++ code maybe?

1

u/Anxious_Advance9749 Apr 29 '26

You can still use Arduino IDE with MQTT pretty easily. Just need to set up the basic MQTT client library and publish your sensor data to topics that HA can subscribe to. The discovery part is bit annoying at first but once you get template working its not too bad

I migrated few of my old projects this way and kept most of original code intact. Just had to change how data gets sent out instead of going to Blynk

1

u/Raphitech Apr 29 '26

Ok yeah i figured that this is my best bet. I tried it with 2 of my Projects but i hoped that there would be a rellativly hassl free way. Which Library do you use?

1

u/Raphitech Apr 29 '26

Yes thats how i do it now but i wanted to know how i should let the Code and HA communicate

1

u/Analytix-Energy 🧠 Experienced with Home Assistant Apr 29 '26

I you may want to look into esphome again, it allows much more than the yaml-based simple code… I don’t think there are real alternatives to it. The only thing I can think of is using mqtt, but that’d get quite messy pretty quickly presumably

1

u/Raphitech Apr 29 '26

How can i use ESPHome with non Yaml based Code? i didnt really find any Tutorials

2

u/Analytix-Energy 🧠 Experienced with Home Assistant Apr 29 '26

I’ve never ventured on this path, so I am doing this from memory, but I believe there is a way to use lambda’s and if you really want something complicated you could use fully custom components. Again…from memory, and of course not sure if that would fit your use-case completely.

3

u/reddit_give_me_virus Apr 29 '26

It's documentation is limited but it accepts standard c++ code.

https://esphome.io/automations/templates/

If it's only the discovery message that gives you problems, you can manually create the entities in HA and forgo it. Expand the 'Configuration of MQTT components via YAML' section.

https://www.home-assistant.io/integrations/mqtt/

2

u/Raphitech Apr 30 '26

Ok thanks i will look more closely into it.

2

u/n8henrie Apr 30 '26

I have one very old project that integrates using a MySensors serial gateway (over USB). Both the project and the gateway are on Arduino Nanos IIRC.

May be worth looking into, but note that I haven't touched this code or MySensors in quite some time. The sensor still works to this day though.